fix: 빈 특기의 획득 예정 나이를 표시한다

메인 장수 read model에 내정·전투 특기 예정 나이를 투영하고, Ref와 같은 현재 나이 다음 해 하한을 적용한다. API 회귀와 Chromium 데스크톱·모바일 검증을 추가한다.
This commit is contained in:
2026-08-22 05:03:25 +00:00
parent 0c75b96908
commit b8e9e6b513
4 changed files with 94 additions and 6 deletions
@@ -99,6 +99,7 @@ export interface GeneralBasicCardData {
crewTypeName?: string;
crewTypeInfo?: CrewTypeDisplayInfo | null;
traits?: { personal: string; specialWar: string; specialDomestic: string };
traitAges?: { specialWar: number; specialDomestic: number };
traitInfo?: { personal: string; specialWar: string; specialDomestic: string };
progression?: GeneralProgression;
itemNames?: ItemDisplayNames;
@@ -226,9 +227,19 @@ const displayDefence = computed(() => {
});
const displayKillTurn = computed(() => props.general?.killTurn ?? props.killTurn);
const displayRemainingMinutes = computed(() => props.general?.remainingMinutes ?? props.remainingMinutes);
const resolveSpecialDisplayName = (kind: 'specialDomestic' | 'specialWar') => {
const general = props.general;
if (!general) return '-';
const traitName = general.traits?.[kind];
if (traitName && traitName !== '-') return traitName;
const scheduledAge = general.traitAges?.[kind];
if (general.age === undefined || scheduledAge === undefined) return '-';
return `${Math.max(general.age + 1, scheduledAge)}`;
};
const specialDomesticText = computed(() => resolveSpecialDisplayName('specialDomestic'));
const specialWarText = computed(() => resolveSpecialDisplayName('specialWar'));
const specialText = computed(() => {
const traits = props.general?.traits;
return traits ? `${traits.specialDomestic || '-'} / ${traits.specialWar || '-'}` : '-';
return `${specialDomesticText.value} / ${specialWarText.value}`;
});
</script>
@@ -379,19 +390,19 @@ const specialText = computed(() => {
<span class="cell-label">특기</span>
<strong class="special-value" :aria-label="specialText">
<RichTooltip
:title="`내정특기 · ${props.general.traits?.specialDomestic ?? '-'}`"
:title="`내정특기 · ${specialDomesticText}`"
:description="props.general.traitInfo?.specialDomestic"
test-id="special-domestic"
>
{{ props.general.traits?.specialDomestic ?? '-' }}
{{ specialDomesticText }}
</RichTooltip>
/
<RichTooltip
:title="`전투특기 · ${props.general.traits?.specialWar ?? '-'}`"
:title="`전투특기 · ${specialWarText}`"
:description="props.general.traitInfo?.specialWar"
test-id="special-war"
>
{{ props.general.traits?.specialWar ?? '-' }}
{{ specialWarText }}
</RichTooltip>
</strong>