Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOSIP-35240 added new property to disable language dropdown and calling profile api without lang code #753

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions resident-ui/src/app/app-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion resident-ui/src/app/core/services/data-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ <h3 [style.font-size]="fontSize.headingForUIN" class="tab-headings">{{'updatedem
<div *ngFor="let field of schema['identity']; let i = index" dir="{{sitealignment}}">
<div class="contact-update-card" *ngIf="field.tabgroup === 'contact'" gutterSize="7px">
<div class="contact-update-sub-card">
<div class="contact-update-each-sub-card">
<div class="contact-update-each-sub-card" *ngIf="buildJSONData[field.attributeName]">
<mat-card-subtitle [style.font-size]="fontSize.paragraph" class="contact-lable">{{field.labelName[langCode][0]}}</mat-card-subtitle>
<input [style.font-size]="fontSize.paragraph" type="text" class="readonly" readonly="true" disabled="true"
[value]="buildJSONData[field.attributeName].value">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion resident-ui/src/app/shared/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{{item.label}}</button>
</mat-menu>

<mat-list-item *ngIf="activeUrl !== '#/dashboard/expired' ">
<mat-list-item *ngIf="activeUrl !== '#/dashboard/expired' && showLangDropDown === 'true'">
<button [style.font-size]="fontSize.lableText" id="languages" mat-button [matMenuTriggerFor]="languages"> <span class="mat-button-wrapper"><mat-icon>g_translate</mat-icon>
<span class="selected-lang">{{selectedLanguage}}</span> <mat-icon>keyboard_arrow_down</mat-icon></span></button>
</mat-list-item>
Expand Down
3 changes: 3 additions & 0 deletions resident-ui/src/app/shared/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
selectedfontsize:any = localStorage.getItem('selectedfontsize');
selectedLangData:any;
isAuthorized:boolean = false;
showLangDropDown:any;

constructor(
private router: Router,
Expand Down Expand Up @@ -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({
Expand Down
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@
"RES-SER-470": "لا توجد سجلات",
"RES-SER-401": "استثناء قاعدة",
"RES-SER-474": "لم يتم العثور على معرف فردي استثناء",
"RES-SER-527": "الإدخال الذي أدخلته موجود بالفعل. الرجاء إدخال قيمة جديدة للمتابعة."
"RES-SER-527": "الإدخال الذي أدخلته موجود بالفعل. الرجاء إدخال قيمة جديدة للمتابعة.",
"RES-SER-479": "حدث خطأ أثناء تنزيل البطاقة الشخصية."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/hin.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@
"RES-SER-470": "कोई रिकॉर्ड नहीं मिला",
"RES-SER-401": "आधार अपवाद",
"RES-SER-474": "व्यक्तिगत आईडी को अपवाद नहीं मिला",
"RES-SER-527": "आपके द्वारा दर्ज किया गया इनपुट पहले से मौजूद है। आगे बढ़ने के लिए कृपया एक नया मान दर्ज करें।"
"RES-SER-527": "आपके द्वारा दर्ज किया गया इनपुट पहले से मौजूद है। आगे बढ़ने के लिए कृपया एक नया मान दर्ज करें।",
"RES-SER-479": "वैयक्तिकृत कार्ड डाउनलोड करने में त्रुटि."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/kan.json
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@
"RES-SER-470": "ಯಾವುದೇ ದಾಖಲೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ",
"RES-SER-401": "ಮೂಲ ವಿನಾಯಿತಿ",
"RES-SER-474": "ವೈಯಕ್ತಿಕ ID ವಿನಾಯಿತಿ ಕಂಡುಬಂದಿಲ್ಲ",
"RES-SER-527": "ನೀವು ನಮೂದಿಸಿದ ಇನ್‌ಪುಟ್ ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ. ಮುಂದುವರಿಯಲು ದಯವಿಟ್ಟು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ."
"RES-SER-527": "ನೀವು ನಮೂದಿಸಿದ ಇನ್‌ಪುಟ್ ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ. ಮುಂದುವರಿಯಲು ದಯವಿಟ್ಟು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ.",
"RES-SER-479": "ವೈಯಕ್ತೀಕರಿಸಿದ ಕಾರ್ಡ್ ಡೌನ್‌ಲೋಡ್ ಮಾಡುವಲ್ಲಿ ದೋಷ."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/spa.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
3 changes: 2 additions & 1 deletion resident-ui/src/assets/i18n/tam.json
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@
"RES-SER-470": "எந்த பதிவுகளும் கண்டறியப்படவில்லை",
"RES-SER-401": "அடிப்படை விதிவிலக்கு",
"RES-SER-474": "தனிப்பட்ட ஐடி விதிவிலக்கு இல்லை",
"RES-SER-527": "நீங்கள் உள்ளிட்ட உள்ளீடு ஏற்கனவே உள்ளது. தொடர புதிய மதிப்பை உள்ளிடவும்."
"RES-SER-527": "நீங்கள் உள்ளிட்ட உள்ளீடு ஏற்கனவே உள்ளது. தொடர புதிய மதிப்பை உள்ளிடவும்.",
"RES-SER-479": "தனிப்பயனாக்கப்பட்ட கார்டைப் பதிவிறக்குவதில் பிழை."
}
}
Loading