From c37a036e500c352e577de530aac81c9256cb5352 Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Mon, 29 Mar 2021 19:23:41 +0530 Subject: [PATCH] Fairoj : User config new register handling --- .../app/settings/users/register/register.component.html | 6 +++--- .../src/app/settings/users/register/register.component.ts | 7 ++++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ng6-seed/src/app/settings/users/register/register.component.html b/ng6-seed/src/app/settings/users/register/register.component.html index a60acf1f4..3102484ea 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.html +++ b/ng6-seed/src/app/settings/users/register/register.component.html @@ -191,7 +191,7 @@
-
+
Configurations
@@ -234,9 +234,9 @@ --> - + - -- + {{s.name}} diff --git a/ng6-seed/src/app/settings/users/register/register.component.ts b/ng6-seed/src/app/settings/users/register/register.component.ts index 9eb8d487c..f4af95f6c 100755 --- a/ng6-seed/src/app/settings/users/register/register.component.ts +++ b/ng6-seed/src/app/settings/users/register/register.component.ts @@ -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;