From 3efa75428e3578ee11b9eebda256981031e22b48 Mon Sep 17 00:00:00 2001 From: MadhuMosip Date: Fri, 12 Jul 2024 15:30:13 +0530 Subject: [PATCH] MOSIP-32895 showing error message if user enter same input field Signed-off-by: MadhuMosip --- .../updatedemographic/updatedemographic.component.css | 2 +- .../updatedemographic/updatedemographic.component.html | 2 +- .../updatedemographic/updatedemographic.component.ts | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.css b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.css index f8db2242..097e3476 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.css +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.css @@ -586,7 +586,7 @@ input.readonly{ .contact-update-sub-card{ display: flex; flex-direction: row; - width: 100%; + width: 95%; } .contact-update-each-sub-card{ width: 40%; 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 72d432d9..4d6c47da 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html @@ -218,7 +218,7 @@

{{'updatedem - {{langJson.sameNameInputErrorMsg.replace("$NAME",langJson[field.attributeName]).replace("$NAME",langJson[field.attributeName])}}. + {{langJson.sameNameInputErrorMsg.replace("$NAME",langJson[field.attributeName]).replace("$NAME",langJson[field.attributeName])}} {{langJson.enteredOnlyNums}} 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 c4bea8d3..bdac8aa1 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts @@ -625,7 +625,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { }) } else { if (formControlName !== "proofOfIdentity") { - if (userNewData !== currentValue && !/\d/.test(userNewData) && userNewData !== this.userInputValues[formControlName][language] ) { + if (userNewData.toLowerCase() !== currentValue.toLowerCase() && !/\d/.test(userNewData) && userNewData !== this.userInputValues[formControlName][language] ) { this.isSameData[formControlName] = false; this.enteredOnlyNumbers = false; this.userInfoClone[formControlName] = [] @@ -644,7 +644,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { if (this.userInfoClone[formControlName]) { delete this.userInfoClone[formControlName] } - if(userNewData === currentValue){ + if(userNewData.toLowerCase() === currentValue.toLowerCase()){ this.isSameData[formControlName] = true; }else if(/\d/.test(userNewData)){ this.enteredOnlyNumbers = true; @@ -684,7 +684,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { }) let self = this; if (formControlName !== "proofOfIdentity") { - if (event.value !== currentValueCode) { + if (event.value.toLowerCase() !== currentValueCode.toLocaleLowerCase()) { this.isSameData[formControlName] = false; this.userInfoClone[formControlName] = [] this.getUserPerfLang.forEach(item => { @@ -725,7 +725,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { }) } else { if (formControlName !== "proofOfAddress") { - if (userNewData !== currentValue) { + if (userNewData.toLowerCase() !== currentValue.toLowerCase()) { this.isSameData[formControlName] = false; this.userInfoAddressClone[formControlName] = [] this.getUserPerfLang.forEach(item => {