accesstye
This commit is contained in:
parent
6f3c5d857e
commit
f7c801e835
@ -89,12 +89,14 @@ export class AccesstypeComponent implements OnInit {
|
||||
if (data) {
|
||||
this.toastr.success('Added successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not added Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
|
||||
});
|
||||
this.modalAdd = false;
|
||||
@ -110,8 +112,7 @@ export class AccesstypeComponent implements OnInit {
|
||||
this.modaldelete = true;
|
||||
}
|
||||
|
||||
delete(id)
|
||||
{
|
||||
delete(id) {
|
||||
this.modaldelete = false;
|
||||
console.log("in delete " + id);
|
||||
this.accesstype.delete(id).subscribe((data) => {
|
||||
@ -119,12 +120,14 @@ export class AccesstypeComponent implements OnInit {
|
||||
if (data) {
|
||||
this.toastr.success('Deleted successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Deleted Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
|
||||
}
|
||||
@ -135,12 +138,14 @@ console.log(data);
|
||||
if (data) {
|
||||
this.toastr.success('Updated successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not updated Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
}
|
||||
goTomodules() {
|
||||
@ -171,11 +176,13 @@ this.accesstype.addById(id,this.mentryForm.value).subscribe((data)=>{
|
||||
if (data) {
|
||||
this.toastr.success("Added Successfully");
|
||||
}
|
||||
this.ngOnInit();
|
||||
}, (error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Added Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
})
|
||||
this.moduleAdd = false;
|
||||
}
|
||||
|
||||
@ -4,9 +4,6 @@
|
||||
<li><a href="javascript://">{{ 'MENU_ACCESS_CONTROL' | translate }}</a></li>
|
||||
</ol>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="clr-row">
|
||||
<div class="clr-col-6" style="display:flex ;">
|
||||
<div style="margin-right: 25px;">
|
||||
@ -20,8 +17,10 @@
|
||||
{{ 'FOR' | translate }} <select id="" style="height: 30px;" (change)="idofselected($event.target.value)">
|
||||
<option *ngFor="let sub of givendata" [value]="sub.usrGrp" [selected]="sub.usrGrp== 40">{{sub.groupName}}</option>
|
||||
</select>
|
||||
<button id="add" class="btn btn-primary" style="margin-left: 20px;" (click)="getbyuseriddata()"> {{ 'RELOAD' | translate }} </button>
|
||||
<span *ngIf="!toggle">{{ 'SHOW_ALL' | translate }} </span><span *ngIf="toggle">{{ 'ONLY_MAIN_MENU' | translate }}</span>
|
||||
<button id="add" class="btn btn-primary" style="margin-left: 20px;" (click)="getbyuseriddata()"> {{ 'RELOAD' |
|
||||
translate }} </button>
|
||||
<span *ngIf="!toggle">{{ 'SHOW_ALL' | translate }} </span><span *ngIf="toggle">{{ 'ONLY_MAIN_MENU' | translate
|
||||
}}</span>
|
||||
<label class="switch">
|
||||
<input type="checkbox" ([ngModel])="toggle" checked (click)="toggleCheckbox()">
|
||||
<span class="slider round"></span>
|
||||
@ -34,13 +33,14 @@
|
||||
<div class="clr-row">
|
||||
|
||||
<div class="clr-col-12" style="text-align: right;">
|
||||
<button id="add" class="btn btn-primary" style="margin-left: 20px;" (click)="modaladd()">
|
||||
|
||||
<button id="add" class="btn btn-primary" style="margin-left: 20px;" (click)="modaladd()" [disabled]="!toggle">
|
||||
<clr-icon shape="plus"></clr-icon>{{ 'ADD' | translate }} </button>
|
||||
<div *ngIf="!toggle" class="error-message" style="color: red; font-size: 14px; margin-top: 5px;">
|
||||
{{ ' Close toggle to activate Add button. ' | translate }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<clr-datagrid [clrDgLoading]="loading" *ngIf="!toggle">
|
||||
@ -89,9 +89,10 @@
|
||||
<clr-dg-action-overflow>
|
||||
<button class="action-item" (click)="modalEdit(all)">{{ 'EDIT' | translate }} <clr-icon shape="edit"
|
||||
class="is-error"></clr-icon></button>
|
||||
<button class="action-item" *ngIf="all.menuId!==0" (click)="modalDelete(all)">{{ 'DELETE' | translate }} <clr-icon shape="trash"
|
||||
class="is-error"></clr-icon></button>
|
||||
<button class="action-item" *ngIf="all.menuId==0" (click)="modaldeletemainmenu(all)">{{ 'DELETE_MENU_SUBMENU' | translate }}
|
||||
<button class="action-item" *ngIf="all.menuId!==0" (click)="modalDelete(all)">{{ 'DELETE' | translate }}
|
||||
<clr-icon shape="trash" class="is-error"></clr-icon></button>
|
||||
<button class="action-item" *ngIf="all.menuId==0" (click)="modaldeletemainmenu(all)">{{ 'DELETE_MENU_SUBMENU' |
|
||||
translate }}
|
||||
<clr-icon shape="edit" class="is-error"></clr-icon></button>
|
||||
|
||||
</clr-dg-action-overflow>
|
||||
|
||||
@ -105,7 +105,7 @@ getbyuseriddata(){
|
||||
// console.log(this.menudata)
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.error = "No data Available"
|
||||
}
|
||||
@ -125,12 +125,18 @@ onSubmit(){
|
||||
if (data) {
|
||||
this.toastr.success('Added successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
if(error){
|
||||
console.log('Error in adding data...', error);
|
||||
if (error.status == 400) {
|
||||
this.toastr.error(error.error);
|
||||
|
||||
} else if (error) {
|
||||
this.toastr.error('Not added Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
|
||||
}
|
||||
@ -151,11 +157,13 @@ this.usergrpservice.delete(id,usrgrp).subscribe((data)=>{
|
||||
if (data) {
|
||||
this.toastr.success('Deleted successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
}, (error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Deleted Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
}
|
||||
modaldeletemainmenu(row) {
|
||||
@ -170,11 +178,13 @@ this.usergrpservice.deletemain(id,usrgrp).subscribe((data)=>{
|
||||
if (data) {
|
||||
this.toastr.success('Deleted successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
}, (error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Deleted Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
}
|
||||
onUpdate(id: any, usrgrp: any) {
|
||||
@ -185,21 +195,21 @@ onUpdate(id:any,usrgrp:any){
|
||||
if (data) {
|
||||
this.toastr.success('Updated successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
}, (error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Updated Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
}
|
||||
onChecked(value) {
|
||||
if(value=="y")
|
||||
{
|
||||
if (value == "y") {
|
||||
this.selected = "y"
|
||||
console.log(this.selected); // make a call for checked
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
this.selected = "n"// make a call for unchecked
|
||||
}
|
||||
}
|
||||
@ -220,10 +230,14 @@ console.log(data);
|
||||
if (data) {
|
||||
this.toastr.success('SYNC successfully');
|
||||
}
|
||||
},(error) => { console.log(error);
|
||||
this.ngOnInit();
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
if (error) {
|
||||
this.toastr.error('Not SYNC Data Getting Some Error');
|
||||
} })
|
||||
}
|
||||
this.ngOnInit();
|
||||
})
|
||||
}
|
||||
toggleCheckbox() {
|
||||
this.toggle = !this.toggle;
|
||||
|
||||
@ -59,12 +59,14 @@ export class ModulesComponent implements OnInit {
|
||||
if (data) {
|
||||
this.toastr.success('Added successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not added Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
|
||||
});
|
||||
this.modalAdd = false;
|
||||
@ -80,8 +82,7 @@ export class ModulesComponent implements OnInit {
|
||||
this.modaldelete = true;
|
||||
}
|
||||
|
||||
delete(id)
|
||||
{
|
||||
delete(id) {
|
||||
this.modaldelete = false;
|
||||
console.log("in delete " + id);
|
||||
this.accesstype.delete1(id).subscribe((data) => {
|
||||
@ -89,12 +90,14 @@ export class ModulesComponent implements OnInit {
|
||||
if (data) {
|
||||
this.toastr.success('Deleted successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not Deleted Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
|
||||
}
|
||||
@ -105,12 +108,14 @@ console.log(data);
|
||||
if (data) {
|
||||
this.toastr.success('Updated successfully');
|
||||
}
|
||||
this.ngOnInit();
|
||||
},
|
||||
(error) => {
|
||||
console.log('Error in adding data...',+error);
|
||||
console.log('Error in adding data...', error);
|
||||
if (error) {
|
||||
this.toastr.error('Not updated Data Getting Some Error');
|
||||
}
|
||||
this.ngOnInit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,8 +74,10 @@
|
||||
<clr-dg-cell>{{user.sequence_size}}</clr-dg-cell>
|
||||
<!-- <clr-dg-cell>{{user.date_format}}</clr-dg-cell> -->
|
||||
<clr-dg-action-overflow>
|
||||
<button class="action-item" (click)="goToEdit(user)"> {{ 'EDIT' | translate }} <clr-icon shape="edit" class="is-error"></clr-icon></button>
|
||||
<button class="action-item" (click)="onDelete(user)"> {{ 'DELETE' | translate }}<clr-icon shape="trash" class="is-error"></clr-icon></button>
|
||||
<button class="action-item" (click)="goToEdit(user)"> {{ 'EDIT' | translate }} <clr-icon shape="edit"
|
||||
class="is-error"></clr-icon></button>
|
||||
<button class="action-item" (click)="onDelete(user)"> {{ 'DELETE' | translate }}<clr-icon shape="trash"
|
||||
class="is-error"></clr-icon></button>
|
||||
</clr-dg-action-overflow>
|
||||
|
||||
|
||||
@ -83,7 +85,8 @@
|
||||
|
||||
<clr-dg-footer>
|
||||
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">{{ 'USERS_PER_PAGE' | translate }}</clr-dg-page-size>
|
||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">{{ 'USERS_PER_PAGE' | translate
|
||||
}}</clr-dg-page-size>
|
||||
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}} of {{pagination.totalItems}} users
|
||||
</clr-dg-pagination>
|
||||
</clr-dg-footer>
|
||||
@ -216,11 +219,13 @@
|
||||
</div>
|
||||
<div class="clr-col-sm-12">
|
||||
<label for="tags">Current No</label>
|
||||
<input type="number" class="clr-input" name="current_no" [(ngModel)]="rowSelected.current_no" readonly>
|
||||
<input type="number" class="clr-input" name="current_no" [(ngModel)]="rowSelected.current_no"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="clr-col-sm-12">
|
||||
<label for="tags">Demonstration</label>
|
||||
<input type="text" class="clr-input" name="demonstration" [(ngModel)]="rowSelected.demonstration" readonly>
|
||||
<input type="text" class="clr-input" name="demonstration" [(ngModel)]="rowSelected.demonstration"
|
||||
readonly>
|
||||
</div>
|
||||
<div class="clr-col-sm-12">
|
||||
<label for="tags">Sequence Size</label>
|
||||
|
||||
@ -18,7 +18,7 @@ export class SequencegenaratorComponent implements OnInit {
|
||||
rowSelected: any = {};
|
||||
modaldelete = false;
|
||||
error;
|
||||
alldata;
|
||||
alldata = [];
|
||||
modaladd = false;
|
||||
modaledit = false;
|
||||
submitted = false;
|
||||
@ -47,8 +47,10 @@ current_no:[null]
|
||||
this.seqservice.getAll().subscribe((data) => {
|
||||
console.log(data);
|
||||
this.alldata = data;
|
||||
if(this.alldata.lenght==0){
|
||||
this.error="No data"
|
||||
|
||||
if (this.alldata.length == 0) {
|
||||
console.log('zero data ');
|
||||
this.error = "No data Available!"
|
||||
}
|
||||
}, (error) => {
|
||||
console.log(error);
|
||||
@ -134,8 +136,7 @@ current_no:[null]
|
||||
this.modaldelete = true;
|
||||
}
|
||||
|
||||
delete(id)
|
||||
{
|
||||
delete(id) {
|
||||
this.modaldelete = false;
|
||||
console.log("in delete " + id);
|
||||
this.seqservice.delete(id).subscribe((data) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user