feat: Update age group categories in training stats for better accuracy
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 46s
All checks were successful
Deploy tt-tagebuch / deploy (push) Successful in 46s
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user