feat(politics): update title eligibility messages and logic in PoliticsView

This commit is contained in:
Torsten Schulz (local)
2026-08-19 15:06:44 +02:00
parent 4cacc3c7a7
commit a8a13ac25a
4 changed files with 18 additions and 32 deletions

View File

@@ -180,11 +180,12 @@
: $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 v-if="!office.titleEligible && office.requiredTitleLabelTr">
· {{ $t('falukant.politics.officesTab.blockedByTitleMinimum', {
title: formatRequiredTitle(office.requiredTitleLabelTr, office.characterGender)
}) }}
</span>
<span v-else-if="!office.titleEligible"> · {{ $t('falukant.politics.officesTab.blockedByTitle') }}</span>
<span v-if="!office.prerequisitesMet"> · {{ $t('falukant.politics.officesTab.blockedByPrerequisites') }}</span>
</template>
</span>
@@ -369,7 +370,6 @@ export default {
},
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) {