From 2ecc60338cb61b6acbb6cd0daac306a9f7a10e10 Mon Sep 17 00:00:00 2001 From: pradeep kumar Date: Thu, 18 Nov 2021 12:45:27 +0530 Subject: [PATCH 1/4] Issue #Portal : fix : profile modal on close loader removed --- .../location-selection/location-selection.component.ts | 7 ++++--- .../components/profile-page/profile-page.component.html | 2 +- .../components/profile-page/profile-page.component.ts | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/client/src/app/plugins/location/components/location-selection/location-selection.component.ts b/src/app/client/src/app/plugins/location/components/location-selection/location-selection.component.ts index f643ac7c9a4..982bb6cdabd 100644 --- a/src/app/client/src/app/plugins/location/components/location-selection/location-selection.component.ts +++ b/src/app/client/src/app/plugins/location/components/location-selection/location-selection.component.ts @@ -16,13 +16,13 @@ import { SbFormLocationSelectionDelegate } from '../delegate/sb-form-location-se export class LocationSelectionComponent implements OnInit, OnDestroy, AfterViewInit { @Input() isClosable = true; @Input() deviceProfile: IDeviceProfile; - @Output() close = new EventEmitter(); + @Output() close = new EventEmitter(); @ViewChild('onboardingModal', { static: true }) onboardingModal; telemetryImpression: IImpressionEventInput; sbFormLocationSelectionDelegate: SbFormLocationSelectionDelegate; - + isSubmitted:boolean=false; constructor( public resourceService: ResourceService, public toasterService: ToasterService, @@ -81,7 +81,7 @@ export class LocationSelectionComponent implements OnInit, OnDestroy, AfterViewI closeModal() { this.onboardingModal.deny(); this.popupControlService.changePopupStatus(true); - this.close.emit(); + this.close.emit({isSubmitted:this.isSubmitted}); } async updateUserLocation() { @@ -106,6 +106,7 @@ export class LocationSelectionComponent implements OnInit, OnDestroy, AfterViewI } catch (e) { this.toasterService.error(this.resourceService.messages.fmsg.m0049); } finally { + this.isSubmitted=true; this.closeModal(); } } diff --git a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.html b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.html index 5f454dd401a..4d2f81bfac7 100644 --- a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.html +++ b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.html @@ -409,7 +409,7 @@

{{resourceService.frmelmn
diff --git a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.ts b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.ts index 68bc72b3570..2cf82b14fd5 100644 --- a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.ts +++ b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.ts @@ -617,9 +617,9 @@ private async getSubPersonaConfig(subPersonaCode: string, persona: string, userL return subPersonaFieldConfigOption ? subPersonaFieldConfigOption.label : undefined; } -public onLocationModalClose() { +public onLocationModalClose(event) { this.showEditUserDetailsPopup = !this.showEditUserDetailsPopup; - this.showFullScreenLoader = true; + this.showFullScreenLoader = !event?.isSubmitted ? false : true; setTimeout(() => { if (this.showFullScreenLoader) { this.showFullScreenLoader = false; From e5f94927d685363c22971eabd4bfe4acc44e6ed5 Mon Sep 17 00:00:00 2001 From: pradeep kumar Date: Thu, 18 Nov 2021 14:43:43 +0530 Subject: [PATCH 2/4] Issue #Portal : test : profile close testcase --- .../profile-page.component.spec.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.spec.ts b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.spec.ts index 6c96cd8083f..e3ccdca7b0a 100644 --- a/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.spec.ts +++ b/src/app/client/src/app/plugins/profile/components/profile-page/profile-page.component.spec.ts @@ -510,4 +510,23 @@ describe('ProfilePageComponent', () => { component.copyToClipboard('user'); expect(component.toasterService.success).toHaveBeenCalledWith(resourceBundle.messages.profile.smsg.m0041); }); + + it('should close the profile popup on onLocationModalClose() called',()=>{ + let event = { + isSubmitted : false + } + component.showEditUserDetailsPopup =!component.showEditUserDetailsPopup; + component.onLocationModalClose(event); + expect(component.showFullScreenLoader).toBe(false); + }) + + it('should close the profile popup on onLocationModalClose() called when submission is true',()=>{ + let event = { + isSubmitted : true + } + component.showEditUserDetailsPopup =!component.showEditUserDetailsPopup; + component.onLocationModalClose(event); + expect(component.showFullScreenLoader).toBe(true); + }) + }); From ce24c00e8698fcd6da70326e1d4562c92d7b9a84 Mon Sep 17 00:00:00 2001 From: pradeep kumar Date: Thu, 18 Nov 2021 17:06:31 +0530 Subject: [PATCH 3/4] Issue #SB-27101 : package.json updated --- src/app/client/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/client/package.json b/src/app/client/package.json index 2b79b6427f3..df838f8a4f9 100644 --- a/src/app/client/package.json +++ b/src/app/client/package.json @@ -65,7 +65,7 @@ "@project-sunbird/web-extensions": "^0.0.2", "@samagra-x/uci-console": "1.2.1", "@shikshalokam/sl-questionnaire": "0.0.11", - "@shikshalokam/sl-reports-library": "^1.0.5", + "@shikshalokam/sl-reports-library": "1.0.6", "@swimlane/ngx-datatable": "16.1.1", "@types/jquery": "3.3.31", "@types/jquery.fancytree": "2.7.34", From 869631836ff6c6233c4161fb70368bb29770d9eb Mon Sep 17 00:00:00 2001 From: pradeep kumar Date: Thu, 18 Nov 2021 18:24:46 +0530 Subject: [PATCH 4/4] Issue #SB-27435 : fix : name change --- .../components/program-datasets/program-datasets.component.html | 2 +- src/app/resourcebundles/data/consumption/en.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html index 4968bb3cd6c..59be39f1719 100644 --- a/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html +++ b/src/app/client/src/app/modules/program-dashboard/components/program-datasets/program-datasets.component.html @@ -84,7 +84,7 @@