fitness: add weekly workout goal with streak counter on stats page

Store a per-user weekly workout target (1-14) in a new FitnessGoal model.
Compute consecutive-week streak from WorkoutSession history via a new
/api/fitness/goal endpoint. Display streak as a 4th lifetime card on the
stats page with an inline goal editor modal.
This commit is contained in:
2026-03-22 21:35:07 +01:00
parent 0fae3d6d14
commit 80479c0312
5 changed files with 337 additions and 4 deletions
+9
View File
@@ -216,6 +216,15 @@ const translations: Translations = {
// WorkoutFab
active_workout: { en: 'Active Workout', de: 'Aktives Training' },
// Streak / Goal
streak: { en: 'Streak', de: 'Serie' },
streak_weeks: { en: 'Weeks', de: 'Wochen' },
streak_week: { en: 'Week', de: 'Woche' },
weekly_goal: { en: 'Weekly Goal', de: 'Wochenziel' },
workouts_per_week_goal: { en: 'workouts / week', de: 'Trainings / Woche' },
set_goal: { en: 'Set Goal', de: 'Ziel setzen' },
goal_set: { en: 'Goal set', de: 'Ziel gesetzt' },
};
/** Get a translated string */