Fairoj : User config new register handling
This commit is contained in:
parent
d7a3957a76
commit
c37a036e50
@ -191,7 +191,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<form [formGroup]="configForm" (ngSubmit)="configuration(configForm.value)">
|
||||
<div>
|
||||
<div *ngIf="usersData && usersData.userid">
|
||||
<mat-card *ngIf="shortname =='MWISE'">
|
||||
<mat-card-title>Configurations</mat-card-title><hr/>
|
||||
<!--******************************************-->
|
||||
@ -234,9 +234,9 @@
|
||||
</mat-card-header> -->
|
||||
|
||||
<mat-card-content >
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" >
|
||||
<mat-form-field dividerColor="primary" class="ml-xs mr-xs" style="width: 50%;">
|
||||
<mat-select multiple placeholder="State" formControlName="rcm_state_mapping" required >
|
||||
<mat-option>--</mat-option>
|
||||
<!-- <mat-option>--</mat-option> -->
|
||||
<mat-option *ngFor="let s of State" [value]="s.state_id" >
|
||||
{{s.name}}
|
||||
</mat-option>
|
||||
|
||||
@ -244,6 +244,10 @@ console.log("cog",userData,this.usersData)
|
||||
this.AWS.UserGroup(res,userData).subscribe(res=>{});}
|
||||
this.users.saveRecords(res, userData).subscribe(res => {
|
||||
data = res;
|
||||
if(data.dataStatus) {
|
||||
this.usersData = {userid:data.record}
|
||||
this.regForm.controls['userid'].setValue(data.record)
|
||||
}
|
||||
if (data.status == 200) {
|
||||
this.AWS.adminUpdateuser(userData, data.record).subscribe(res => { });
|
||||
|
||||
@ -289,7 +293,7 @@ console.log("cog",userData,this.usersData)
|
||||
}
|
||||
if(this.configForm.get('rcm_state_mapping').dirty==false && this.configForm.get('salespd_products').dirty==false)
|
||||
{
|
||||
Swal('you cannot change anything');
|
||||
Swal('you did not change anything in the configuration');
|
||||
return
|
||||
}
|
||||
|
||||
@ -297,6 +301,7 @@ console.log("cog",userData,this.usersData)
|
||||
this.users.saveConfig(configdata).subscribe(res=>{
|
||||
this.loader = false;
|
||||
Swal('User Configuration Updated');
|
||||
this.configForm.markAsPristine()
|
||||
// this.router.navigate(['setting/users/userlist']);
|
||||
//this.shared.redirectTo('settings/userListing');
|
||||
delete this.AWS.localUserId;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user