Skip to content

Commit

Permalink
MOSIP-35240 taking initial location code from config file
Browse files Browse the repository at this point in the history
Signed-off-by: MadhuMosip <[email protected]>
  • Loading branch information
MadhuMosip committed Aug 22, 2024
1 parent 6553eda commit 032d1f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -662,16 +662,16 @@ <h3 [style.font-size]="fontSize.headingForUIN" class="tab-headings">{{'updatedem
</td>
<td class="sub-table-row ele-for-lap-tab-card" width="3%"></td>
<td class="sub-table-row each-Hierarchy-td width-of-input ele-for-lap-tab-card"
*ngIf="dynamicDropDown[field.name]">
*ngIf="dynamicDropDown[field.attributeName]">
<span [ngClass]="item.language === 'ara' ? 'dir-rtl' :'dir-ltl'">
<mat-select #matSelect [style.font-size]="fontSize.paragraph" disableOptionCentering
placeholder="{{field.placeHolder[item.language]}}"
[ngClass]="dynamicDropDown[field.name]?.length === 0 ? 'disable-dropdown' : 'enable-dropdown'"
[ngClass]="dynamicDropDown[field.attributeName]?.length === 0 ? 'disable-dropdown' : 'enable-dropdown'"
[(value)]="userInputValues[field.attributeName][item.language]"
id="{{field.name}}{{item.language}}"
(selectionChange)="loadLocationDataDynamically($event, field.locationHierarchyLevel,field.attributeName,typeOf(userInfo[field.attributeName]))"
(click)="isUpdatedataInProgress(matSelect, 'dropDownField')">
<mat-option *ngFor="let data of dynamicDropDown[field.name][item.language]"
<mat-option *ngFor="let data of dynamicDropDown[field.attributeName][item.language]"
[value]="data.code">
{{ data.name }}
</mat-option>
Expand All @@ -687,14 +687,14 @@ <h3 [style.font-size]="fontSize.headingForUIN" class="tab-headings">{{'updatedem
</td>
<td class="sub-table-row ele-for-lap-tab-card" width="3%"></td>
<td class="sub-table-row each-Hierarchy-td width-of-input ele-for-lap-tab-card"
*ngIf="dynamicDropDown[field.name]">
*ngIf="dynamicDropDown[field.attributeName]">
<mat-select #matSelect [style.font-size]="fontSize.paragraph" disableOptionCentering
placeholder="{{langJson.select}} {{field.labelName[langCode][1]}}"
[ngClass]="dynamicDropDown[field.name]?.length === 0 ? 'disable-dropdown' : 'enable-dropdown'"
[ngClass]="dynamicDropDown[field.attributeName]?.length === 0 ? 'disable-dropdown' : 'enable-dropdown'"
[(value)]="userInputValues[field.attributeName]" id="{{field.name}}"
(selectionChange)="loadLocationDataDynamically($event, field.locationHierarchyLevel,field.attributeName,typeOf(userInfo[field.attributeName]))"
(click)="isUpdatedataInProgress(matSelect, 'dropDownField')">
<mat-option *ngFor="let data of dynamicDropDown[field.name].eng" [value]="data.code">
<mat-option *ngFor="let data of dynamicDropDown[field.attributeName].eng" [value]="data.code">
{{ data.name }}
</mat-option>
</mat-select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down Expand Up @@ -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] = ''
Expand Down

0 comments on commit 032d1f6

Please sign in to comment.