From 032d1f648338aa5afe6eea44e5484c6eebb87bd2 Mon Sep 17 00:00:00 2001 From: MadhuMosip Date: Thu, 22 Aug 2024 13:03:37 +0530 Subject: [PATCH] MOSIP-35240 taking initial location code from config file Signed-off-by: MadhuMosip --- .../updatedemographic.component.html | 12 ++++++------ .../updatedemographic/updatedemographic.component.ts | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html index 9e0059db..41b77216 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html @@ -662,16 +662,16 @@

{{'updatedem + *ngIf="dynamicDropDown[field.attributeName]"> - {{ data.name }} @@ -687,14 +687,14 @@

{{'updatedem + *ngIf="dynamicDropDown[field.attributeName]"> - + {{ data.name }} diff --git a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts index 352f26ea..69c7a381 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts @@ -164,7 +164,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { async ngOnInit() { this.defaultJsonValue = { ...defaultJson } - this.initialLocationCode = "MOR"; + this.initialLocationCode = this.appConfigService.getConfig()["resident.update-uin.machine-zone-code"]; this.locCode = 5; this.translateService.use(localStorage.getItem("langCode")); this.supportedLanguages = ["eng"]; @@ -493,7 +493,8 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { let filedNameForuserInput = (item.charAt(0).toLocaleLowerCase() + item.slice(1)).replace(" ", "") if (typeof this.userInputValues[filedNameForuserInput] !== 'string') { this.getUserPerfLang.forEach(lang => { - this.userInputValues[filedNameForuserInput][lang] = '' + if(this.userInputValues[filedNameForuserInput]) + this.userInputValues[filedNameForuserInput][lang] = '' }) } else { this.userInputValues[filedNameForuserInput] = ''