From e2ec16792e226a7d47f5f0055a850cd926618617 Mon Sep 17 00:00:00 2001 From: Ajoymaity Date: Fri, 15 Sep 2023 11:23:54 +0530 Subject: [PATCH] Issue #ED-2873 fix: Fixed navigation issue for update profile type --- src/app/district-mapping/district-mapping.page.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/district-mapping/district-mapping.page.ts b/src/app/district-mapping/district-mapping.page.ts index d25754da4..58bbd1366 100644 --- a/src/app/district-mapping/district-mapping.page.ts +++ b/src/app/district-mapping/district-mapping.page.ts @@ -275,7 +275,10 @@ export class DistrictMappingPage implements OnDestroy { this.location.back(); } else if (this.profile && this.source === PageId.PROFILE) { this.location.back(); - this.events.publish('UPDATE_TABS', {type: 'SWITCH_TABS_USERTYPE'}); + if (this.profile.serverProfile && (!Object.keys(this.profile.serverProfile.profileUserType).length + || (this.formGroup.value.persona !== this.profile.serverProfile.profileUserType.type))) { + this.events.publish('UPDATE_TABS', {type: 'SWITCH_TABS_USERTYPE'}); + } } else { if (this.profile && !isSSOUser) { await this.appGlobalService.showYearOfBirthPopup(this.profile.serverProfile);