From e1f7319c2ca4ea4d09a6c043a8fb0908dd23705d Mon Sep 17 00:00:00 2001 From: MadhuMosip Date: Mon, 26 Aug 2024 18:59:07 +0530 Subject: [PATCH 1/2] git commit -s -m MOSIP-35240 added new property to disable language dropdown Signed-off-by: MadhuMosip --- resident-ui/src/app/app-config.service.ts | 2 ++ .../src/app/core/services/data-storage.service.ts | 2 +- .../updatedemographic.component.html | 2 +- .../updatedemographic/updatedemographic.component.ts | 11 +++++------ .../src/app/shared/header/header.component.html | 2 +- resident-ui/src/app/shared/header/header.component.ts | 3 +++ resident-ui/src/assets/i18n/ara.json | 3 ++- resident-ui/src/assets/i18n/eng.json | 3 ++- resident-ui/src/assets/i18n/fra.json | 3 ++- resident-ui/src/assets/i18n/hin.json | 3 ++- resident-ui/src/assets/i18n/kan.json | 3 ++- resident-ui/src/assets/i18n/spa.json | 3 ++- resident-ui/src/assets/i18n/tam.json | 3 ++- 13 files changed, 27 insertions(+), 16 deletions(-) diff --git a/resident-ui/src/app/app-config.service.ts b/resident-ui/src/app/app-config.service.ts index 22e7242d..f99b008f 100644 --- a/resident-ui/src/app/app-config.service.ts +++ b/resident-ui/src/app/app-config.service.ts @@ -70,6 +70,8 @@ export class AppConfigService { this.appConfig["mosip.resident.zoom"] = responseData["mosip.resident.zoom"]; this.appConfig["mosip.resident.maxZoom"] = responseData["mosip.resident.maxZoom"]; this.appConfig["mosip.resident.minZoom"] = responseData["mosip.resident.minZoom"]; + this.appConfig["resident.update-uin.machine-zone-code"] = responseData["resident.update-uin.machine-zone-code"]; + this.appConfig["resident-multi-language-enable"] = responseData["resident-multi-language-enable"]; localStorage.setItem("isDataLoaded", 'true') }, (error) => { diff --git a/resident-ui/src/app/core/services/data-storage.service.ts b/resident-ui/src/app/core/services/data-storage.service.ts index 293e5292..23a3d22d 100644 --- a/resident-ui/src/app/core/services/data-storage.service.ts +++ b/resident-ui/src/app/core/services/data-storage.service.ts @@ -172,7 +172,7 @@ export class DataStorageService { } getProfileInfo(langCode) { - return this.httpClient.get(this.BASE_URL + '/profile?languageCode=' + langCode); + return this.httpClient.get(this.BASE_URL + '/profile'); } getServiceHistory(request: any, filters: any,pageSize1:any) { 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 41b77216..0bf41072 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.html @@ -923,7 +923,7 @@

{{'updatedem
-
+
{{field.labelName[langCode][0]}} 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 69c7a381..4223f97d 100644 --- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts +++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts @@ -691,19 +691,18 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy { let genders = this.dropDownValues.gender let currentValueCode genders[language].forEach(item => { - if (item.value === currentValue) { - currentValueCode = item.code - } - }) + currentValueCode = item.value === currentValue ? item.code : currentValue + }); + let self = this; if (formControlName !== "proofOfIdentity") { - if (event.value.toLowerCase() !== currentValueCode.toLocaleLowerCase()) { + if (event.value !== currentValueCode) { this.isSameData[formControlName] = false; this.userInfoClone[formControlName] = [] this.getUserPerfLang.forEach(item => { let newData genders[item].forEach(eachGender => { - if (eachGender.code === event.value) { + if (eachGender.code.toLowerCase() === event.value.toLowerCase()) { newData = { "language": item, "value": eachGender.value } this.userInputValues[formControlName][item] = eachGender.code; } diff --git a/resident-ui/src/app/shared/header/header.component.html b/resident-ui/src/app/shared/header/header.component.html index 3e4440f3..65ee0c92 100644 --- a/resident-ui/src/app/shared/header/header.component.html +++ b/resident-ui/src/app/shared/header/header.component.html @@ -20,7 +20,7 @@ {{item.label}} - + diff --git a/resident-ui/src/app/shared/header/header.component.ts b/resident-ui/src/app/shared/header/header.component.ts index d4ce6a32..8d6ea2e1 100644 --- a/resident-ui/src/app/shared/header/header.component.ts +++ b/resident-ui/src/app/shared/header/header.component.ts @@ -48,6 +48,7 @@ export class HeaderComponent implements OnInit, OnDestroy { selectedfontsize:any = localStorage.getItem('selectedfontsize'); selectedLangData:any; isAuthorized:boolean = false; + showLangDropDown:boolean; constructor( private router: Router, @@ -79,6 +80,8 @@ export class HeaderComponent implements OnInit, OnDestroy { getConfigData(){ if(localStorage.getItem('isDataLoaded') === 'true'){ let supportedLanguages = this.appConfigService.getConfig()['supportedLanguages'].split(','); + this.showLangDropDown = this.appConfigService.getConfig()['resident-multi-language-enable']; + if(supportedLanguages.length > 1){ supportedLanguages.forEach((language) => { this.selectLanguagesArr.push({ diff --git a/resident-ui/src/assets/i18n/ara.json b/resident-ui/src/assets/i18n/ara.json index d9dd244f..cc4b3af0 100644 --- a/resident-ui/src/assets/i18n/ara.json +++ b/resident-ui/src/assets/i18n/ara.json @@ -714,6 +714,7 @@ "RES-SER-470": "لا توجد سجلات", "RES-SER-401": "استثناء قاعدة", "RES-SER-474": "لم يتم العثور على معرف فردي استثناء", - "RES-SER-527": "الإدخال الذي أدخلته موجود بالفعل. الرجاء إدخال قيمة جديدة للمتابعة." + "RES-SER-527": "الإدخال الذي أدخلته موجود بالفعل. الرجاء إدخال قيمة جديدة للمتابعة.", + "RES-SER-479": "حدث خطأ أثناء تنزيل البطاقة الشخصية." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/eng.json b/resident-ui/src/assets/i18n/eng.json index 04c22c45..f67241bd 100644 --- a/resident-ui/src/assets/i18n/eng.json +++ b/resident-ui/src/assets/i18n/eng.json @@ -715,6 +715,7 @@ "RES-SER-470": "No Record(s) found", "RES-SER-401": "Base exception.", "RES-SER-474": "Individual ID not found exception", - "RES-SER-527": "The input you have entered already exists. Please enter a new value to proceed." + "RES-SER-527": "The input you have entered already exists. Please enter a new value to proceed.", + "RES-SER-479": "Error in downloading personalized card." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/fra.json b/resident-ui/src/assets/i18n/fra.json index 3db84e9c..24ae2c91 100644 --- a/resident-ui/src/assets/i18n/fra.json +++ b/resident-ui/src/assets/i18n/fra.json @@ -715,6 +715,7 @@ "RES-SER-470": "Aucun enregistrement trouvé", "RES-SER-401": "Exception de base", "RES-SER-474": "Exception d'identification individuelle introuvable", - "RES-SER-527": "L'entrée que vous avez saisie existe déjà. Veuillez saisir une nouvelle valeur pour continuer." + "RES-SER-527": "L'entrée que vous avez saisie existe déjà. Veuillez saisir une nouvelle valeur pour continuer.", + "RES-SER-479": "Erreur lors du téléchargement de la carte personnalisée." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/hin.json b/resident-ui/src/assets/i18n/hin.json index a71e88c1..382677a9 100644 --- a/resident-ui/src/assets/i18n/hin.json +++ b/resident-ui/src/assets/i18n/hin.json @@ -715,6 +715,7 @@ "RES-SER-470": "कोई रिकॉर्ड नहीं मिला", "RES-SER-401": "आधार अपवाद", "RES-SER-474": "व्यक्तिगत आईडी को अपवाद नहीं मिला", - "RES-SER-527": "आपके द्वारा दर्ज किया गया इनपुट पहले से मौजूद है। आगे बढ़ने के लिए कृपया एक नया मान दर्ज करें।" + "RES-SER-527": "आपके द्वारा दर्ज किया गया इनपुट पहले से मौजूद है। आगे बढ़ने के लिए कृपया एक नया मान दर्ज करें।", + "RES-SER-479": "वैयक्तिकृत कार्ड डाउनलोड करने में त्रुटि." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/kan.json b/resident-ui/src/assets/i18n/kan.json index f27d6d6b..df2015a5 100644 --- a/resident-ui/src/assets/i18n/kan.json +++ b/resident-ui/src/assets/i18n/kan.json @@ -715,6 +715,7 @@ "RES-SER-470": "ಯಾವುದೇ ದಾಖಲೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ", "RES-SER-401": "ಮೂಲ ವಿನಾಯಿತಿ", "RES-SER-474": "ವೈಯಕ್ತಿಕ ID ವಿನಾಯಿತಿ ಕಂಡುಬಂದಿಲ್ಲ", - "RES-SER-527": "ನೀವು ನಮೂದಿಸಿದ ಇನ್‌ಪುಟ್ ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ. ಮುಂದುವರಿಯಲು ದಯವಿಟ್ಟು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ." + "RES-SER-527": "ನೀವು ನಮೂದಿಸಿದ ಇನ್‌ಪುಟ್ ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ. ಮುಂದುವರಿಯಲು ದಯವಿಟ್ಟು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ.", + "RES-SER-479": "ವೈಯಕ್ತೀಕರಿಸಿದ ಕಾರ್ಡ್ ಡೌನ್‌ಲೋಡ್ ಮಾಡುವಲ್ಲಿ ದೋಷ." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/spa.json b/resident-ui/src/assets/i18n/spa.json index ef83d2ae..222c5be5 100644 --- a/resident-ui/src/assets/i18n/spa.json +++ b/resident-ui/src/assets/i18n/spa.json @@ -715,6 +715,7 @@ "RES-SER-470": "No se encontraron registros", "RES-SER-401": "Excepción básica", "RES-SER-474": "Excepción de identificación individual no encontrada", - "RES-SER-527": "La entrada que has ingresado ya existe. Ingrese un nuevo valor para continuar." + "RES-SER-527": "La entrada que has ingresado ya existe. Ingrese un nuevo valor para continuar.", + "RES-SER-479": "Error al descargar tarjeta personalizada." } } \ No newline at end of file diff --git a/resident-ui/src/assets/i18n/tam.json b/resident-ui/src/assets/i18n/tam.json index a1f088d4..724e456e 100644 --- a/resident-ui/src/assets/i18n/tam.json +++ b/resident-ui/src/assets/i18n/tam.json @@ -716,6 +716,7 @@ "RES-SER-470": "எந்த பதிவுகளும் கண்டறியப்படவில்லை", "RES-SER-401": "அடிப்படை விதிவிலக்கு", "RES-SER-474": "தனிப்பட்ட ஐடி விதிவிலக்கு இல்லை", - "RES-SER-527": "நீங்கள் உள்ளிட்ட உள்ளீடு ஏற்கனவே உள்ளது. தொடர புதிய மதிப்பை உள்ளிடவும்." + "RES-SER-527": "நீங்கள் உள்ளிட்ட உள்ளீடு ஏற்கனவே உள்ளது. தொடர புதிய மதிப்பை உள்ளிடவும்.", + "RES-SER-479": "தனிப்பயனாக்கப்பட்ட கார்டைப் பதிவிறக்குவதில் பிழை." } } \ No newline at end of file From 9f27506c7f0fbf541bf28d99c0ae187cf90fcf9a Mon Sep 17 00:00:00 2001 From: MadhuMosip Date: Tue, 27 Aug 2024 10:23:47 +0530 Subject: [PATCH 2/2] MOSIP-35240 resolved build failure issue Signed-off-by: MadhuMosip --- resident-ui/src/app/shared/header/header.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resident-ui/src/app/shared/header/header.component.ts b/resident-ui/src/app/shared/header/header.component.ts index 8d6ea2e1..a2e52b4b 100644 --- a/resident-ui/src/app/shared/header/header.component.ts +++ b/resident-ui/src/app/shared/header/header.component.ts @@ -48,7 +48,7 @@ export class HeaderComponent implements OnInit, OnDestroy { selectedfontsize:any = localStorage.getItem('selectedfontsize'); selectedLangData:any; isAuthorized:boolean = false; - showLangDropDown:boolean; + showLangDropDown:any; constructor( private router: Router,