feat(FalukantService, MessagesDialog): enhance character data handling in notifications
All checks were successful
Deploy to production / deploy (push) Successful in 2m3s
All checks were successful
Deploy to production / deploy (push) Successful in 2m3s
- Added mappings for character titles and genders in the FalukantService to enrich notifications with additional character information. - Updated the MessagesDialog component to utilize the new title and gender data, improving the display of director names based on their titles and genders. - Ensured that character names are displayed correctly, enhancing the overall user experience in notifications.
This commit is contained in:
@@ -430,9 +430,18 @@ export default {
|
||||
|| base.event === 'director_resigned'
|
||||
|| (typeof base.tr === 'string' && (base.tr.includes('director.resignation') || base.tr.includes('director.resigned')));
|
||||
if (isDirectorResign) {
|
||||
params.directorName = params.characterName
|
||||
const baseName = params.characterName
|
||||
|| base.character_name
|
||||
|| (base.director_character_id != null ? `#${base.director_character_id}` : '');
|
||||
const titleTr = base.director_title_tr || base.character_title_tr || null;
|
||||
const gender = base.director_gender || base.character_gender || null;
|
||||
if (titleTr && gender) {
|
||||
const k = `falukant.titles.${gender}.${titleTr}`;
|
||||
const translatedTitle = this.$t(k);
|
||||
params.directorName = translatedTitle !== k ? `${translatedTitle} ${baseName}`.trim() : `${titleTr} ${baseName}`.trim();
|
||||
} else {
|
||||
params.directorName = baseName;
|
||||
}
|
||||
}
|
||||
if (base.director_id !== undefined) {
|
||||
params.director_id = base.director_id;
|
||||
|
||||
Reference in New Issue
Block a user