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

@@ -9,6 +9,7 @@
import { sequelize } from '../utils/sequelize.js';
import VocabCourseLesson from '../models/community/vocab_course_lesson.js';
import { getBisayaLessonPedagogy } from './bisaya-course-phase2-pedagogy.js';
const LESSONS_TO_ADD = [
{
@@ -98,6 +99,8 @@ async function addBisayaWeek1Lessons() {
continue;
}
const pedagogy = getBisayaLessonPedagogy(lessonData.lessonNumber) || {};
await VocabCourseLesson.create({
courseId: course.id,
chapterId: null,
@@ -113,7 +116,14 @@ async function addBisayaWeek1Lessons() {
speakingPrompts: lessonData.speakingPrompts || [],
targetMinutes: lessonData.targetMinutes,
targetScorePercent: lessonData.targetScorePercent,
requiresReview: lessonData.requiresReview
requiresReview: lessonData.requiresReview,
didacticMode: pedagogy.didacticMode || null,
phaseLabel: pedagogy.phaseLabel || null,
blockNumber: pedagogy.blockNumber ?? null,
difficultyWeight: pedagogy.difficultyWeight ?? null,
newUnitTarget: pedagogy.newUnitTarget ?? null,
reviewWeight: pedagogy.reviewWeight ?? null,
isIntensiveReview: Boolean(pedagogy.isIntensiveReview)
});
console.log(` ✅ Lektion ${lessonData.lessonNumber}: "${lessonData.title}" hinzugefügt`);