From 7b0fe78642d3932bcc76044d2e57c67946b0eadb Mon Sep 17 00:00:00 2001 From: vanitha1822 Date: Fri, 19 Jun 2026 16:32:38 +0530 Subject: [PATCH 1/3] feat: update Common-UI submodule for ABDM v3 care context linking --- Common-UI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common-UI b/Common-UI index 31e1f8f..d9456c1 160000 --- a/Common-UI +++ b/Common-UI @@ -1 +1 @@ -Subproject commit 31e1f8f50414fb864ce83107a3318758c7dcd06e +Subproject commit d9456c13812e0400fd8a004ba63c7250b46a81ce From b8cbe7c7f6ad66d893b2b26bd4c6c9b60cf010c8 Mon Sep 17 00:00:00 2001 From: vanitha1822 Date: Fri, 19 Jun 2026 16:52:04 +0530 Subject: [PATCH 2/3] feat: update Common-UI submodule to 3.8.1-based v3 care context branch --- Common-UI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common-UI b/Common-UI index d9456c1..4677d34 160000 --- a/Common-UI +++ b/Common-UI @@ -1 +1 @@ -Subproject commit d9456c13812e0400fd8a004ba63c7250b46a81ce +Subproject commit 4677d34d9da62a00a5927447de105ce4bea74576 From 67ced7d948da028461218f240da6fecb8c307d6d Mon Sep 17 00:00:00 2001 From: vanitha1822 Date: Mon, 22 Jun 2026 21:40:46 +0530 Subject: [PATCH 3/3] fix: add working location id --- .../workarea/workarea.component.ts | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts index 0c36f97..a0b9dbf 100644 --- a/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts +++ b/src/app/app-modules/nurse-doctor/workarea/workarea.component.ts @@ -4492,13 +4492,23 @@ export class WorkareaComponent let workLocationId: any; if (jsonLoccationData?.previlegeObj[0]?.roles) { const roles = jsonLoccationData?.previlegeObj[0]?.roles; - roles.forEach((item: any) => { - if (item.RoleName.toLowerCase() === 'doctor') { - workLocationId = item.workingLocationID; - } - }); + // Prefer doctor role, fall back to first available role with a workingLocationID + const doctorRole = roles.find( + (item: any) => item.RoleName?.toLowerCase() === 'doctor', + ); + const fallbackRole = roles.find((item: any) => item.workingLocationID); + workLocationId = + doctorRole?.workingLocationID ?? fallbackRole?.workingLocationID; } console.log('workLocationId', workLocationId); + if (!workLocationId) { + this.abdmFacilityId = null; + this.abdmFacilityName = null; + this.sessionstorage.setItem('abdmFacilityId', null); + this.sessionstorage.setItem('abdmFacilityName', null); + this.saveAbdmFacilityForVisit(); + return; + } this.registrarService.getMappedFacility(workLocationId).subscribe( (res: any) => { if (res.statusCode === 200 && res.data !== null) {