feat: Update age group categories in training stats for better accuracy
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 46s

This commit is contained in:
Torsten Schulz (local)
2026-05-22 14:49:23 +02:00
parent 75a17d42b5
commit 2e7cf0c28d
4 changed files with 16 additions and 14 deletions

View File

@@ -563,11 +563,13 @@ export default {
ageGroupStats() {
const buckets = [
{ label: 'Kinder U13', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age <= 12 },
{ label: 'Jugend U19', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 13 && age <= 18 },
{ label: 'Erwachsene', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 19 && age <= 59 },
{ label: 'Senioren 60+', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 60 },
{ label: 'Ohne Geburtsdatum', memberCount: 0, totalParticipations12Months: 0, match: (age) => age === null }
{ label: 'U7', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age <= 6 },
{ label: 'U9', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 7 && age <= 8 },
{ label: 'U11', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 9 && age <= 10 },
{ label: 'U13', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 11 && age <= 12 },
{ label: 'U15', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 13 && age <= 14 },
{ label: 'U19', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 15 && age <= 18 },
{ label: 'Erwachsene', memberCount: 0, totalParticipations12Months: 0, match: (age) => age !== null && age >= 19 }
];
this.filteredMembers.forEach((member) => {
@@ -579,7 +581,6 @@ export default {
});
return buckets
.filter((entry) => entry.memberCount > 0)
.map((entry) => ({
...entry,
averageParticipations12Months: entry.memberCount > 0 ? entry.totalParticipations12Months / entry.memberCount : 0