feat(politics): enhance office application feedback with required title details
This commit is contained in:
@@ -1611,7 +1611,8 @@
|
||||
"yes": "Ja",
|
||||
"no": "Nein",
|
||||
"blockedByAge": "Mindestalter nicht erreicht",
|
||||
"blockedByTitle": "Standesvoraussetzung nicht erfüllt",
|
||||
"blockedByTitle": "Benötigter Stand: mindestens {title}",
|
||||
"unknownRequiredTitle": "unbekannt",
|
||||
"blockedByPrerequisites": "Vorherige Ämter fehlen"
|
||||
},
|
||||
"too_young": "Dein Charakter ist noch zu jung. Eine Bewerbung ist erst ab 16 Jahren möglich.",
|
||||
|
||||
@@ -797,7 +797,8 @@
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"blockedByAge": "Minimum age not met",
|
||||
"blockedByTitle": "Title requirement not met",
|
||||
"blockedByTitle": "Required title: at least {title}",
|
||||
"unknownRequiredTitle": "unknown",
|
||||
"blockedByPrerequisites": "Required prior offices missing"
|
||||
},
|
||||
"too_young": "Your character is too young. Applications are only possible from age 16.",
|
||||
|
||||
@@ -180,7 +180,11 @@
|
||||
: $t('falukant.politics.officesTab.no') }}
|
||||
<template v-if="!office.canApplyNow">
|
||||
<span v-if="!office.canApplyByAge"> · {{ $t('falukant.politics.officesTab.blockedByAge') }}</span>
|
||||
<span v-if="!office.titleEligible"> · {{ $t('falukant.politics.officesTab.blockedByTitle') }}</span>
|
||||
<span v-if="!office.titleEligible">
|
||||
· {{ $t('falukant.politics.officesTab.blockedByTitle', {
|
||||
title: formatRequiredTitle(office.requiredTitleLabelTr, office.characterGender)
|
||||
}) }}
|
||||
</span>
|
||||
<span v-if="!office.prerequisitesMet"> · {{ $t('falukant.politics.officesTab.blockedByPrerequisites') }}</span>
|
||||
</template>
|
||||
</span>
|
||||
@@ -364,6 +368,10 @@ export default {
|
||||
await this.loadCurrentPositions();
|
||||
},
|
||||
methods: {
|
||||
formatRequiredTitle(titleLabelTr, gender) {
|
||||
if (!titleLabelTr) return this.$t('falukant.politics.officesTab.unknownRequiredTitle');
|
||||
return this.$t(`falukant.titles.${gender === 'female' ? 'female' : 'male'}.${titleLabelTr}`);
|
||||
},
|
||||
formatPoliticalCharacterName(character) {
|
||||
const firstName = character?.definedFirstName?.name || '';
|
||||
const lastName = character?.definedLastName?.name || '';
|
||||
|
||||
Reference in New Issue
Block a user