feat(admin): add potential fathers retrieval for character management
All checks were successful
Deploy to production / deploy (push) Successful in 2m47s

- Implemented a new method in AdminService to fetch potential fathers for a given character based on existing relationships.
- Updated AdminController to expose this functionality via a new API endpoint.
- Enhanced adminRouter to include the route for retrieving potential fathers.
- Modified frontend components to allow selection of potential fathers during pregnancy and birth management.
- Updated internationalization files to include new translation keys related to father selection.
This commit is contained in:
Torsten Schulz (local)
2026-03-31 08:50:56 +02:00
parent ee11a989a0
commit 9a78bc7c4b
30 changed files with 3907 additions and 45 deletions

View File

@@ -73,6 +73,12 @@
<span class="title-label">{{ lesson.title }}</span>
<span v-if="lesson.description" class="lesson-description">{{ lesson.description }}</span>
</div>
<div class="lesson-pedagogy" v-if="lesson.pedagogy">
<span class="lesson-chip lesson-chip--phase">{{ getPhaseLabel(lesson.pedagogy.phaseLabel) }}</span>
<span class="lesson-chip lesson-chip--mode">{{ getDidacticModeLabel(lesson.pedagogy.didacticMode) }}</span>
<span v-if="lesson.pedagogy.blockNumber" class="lesson-chip lesson-chip--block">Block {{ lesson.pedagogy.blockNumber }}</span>
<span v-if="lesson.pedagogy.isIntensiveReview" class="lesson-chip lesson-chip--intensive">Intensive Wiederholung</span>
</div>
<div class="lesson-actions-content">
<button
@click="openLesson(lesson.id)"
@@ -328,6 +334,36 @@ export default {
openLanguageAssistantSettings() {
this.$router.push('/settings/language-assistant');
},
getPhaseLabel(phaseLabel) {
switch (phaseLabel) {
case 'quickstart':
return 'Schnellstart';
case 'daily_life':
return 'Alltag';
case 'stabilization':
return 'Stabilisierung';
default:
return 'Lernphase';
}
},
getDidacticModeLabel(didacticMode) {
switch (didacticMode) {
case 'core_input':
return 'Neuer Stoff';
case 'guided_dialogue':
return 'Geführter Dialog';
case 'pattern_drill':
return 'Mustertraining';
case 'real_life_scenario':
return 'Alltagsszenario';
case 'intensive_review':
return 'Wiederholungsphase';
case 'checkpoint':
return 'Checkpoint';
default:
return 'Lerneinheit';
}
},
editLesson() {
showInfo(this, 'Die Bearbeitung einzelner Lektionen folgt noch.');
}
@@ -517,6 +553,42 @@ export default {
background: rgba(255, 255, 255, 0.7);
}
.lesson-pedagogy {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.lesson-chip {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 999px;
font-size: 0.78rem;
font-weight: 700;
letter-spacing: 0.02em;
}
.lesson-chip--phase {
background: rgba(120, 195, 138, 0.16);
color: #42634e;
}
.lesson-chip--mode {
background: rgba(248, 162, 43, 0.16);
color: #8a5411;
}
.lesson-chip--block {
background: rgba(93, 64, 55, 0.09);
color: #6d5446;
}
.lesson-chip--intensive {
background: rgba(207, 78, 78, 0.14);
color: #a13f3f;
}
.lesson-card__header {
display: flex;
align-items: center;