diff --git a/frontend/src/views/TrainingStatsView.vue b/frontend/src/views/TrainingStatsView.vue index b7611a45..c1847926 100644 --- a/frontend/src/views/TrainingStatsView.vue +++ b/frontend/src/views/TrainingStatsView.vue @@ -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 diff --git a/mobile-app/composeApp/release/composeApp-release.aab b/mobile-app/composeApp/release/composeApp-release.aab index e5c3c491..1d6b1f68 100644 Binary files a/mobile-app/composeApp/release/composeApp-release.aab and b/mobile-app/composeApp/release/composeApp-release.aab differ diff --git a/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/stats/TrainingStatsDerived.kt b/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/stats/TrainingStatsDerived.kt index 115919d7..ff9ea544 100644 --- a/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/stats/TrainingStatsDerived.kt +++ b/mobile-app/composeApp/src/androidMain/kotlin/de/tsschulz/tt_tagebuch/app/stats/TrainingStatsDerived.kt @@ -228,11 +228,13 @@ object TrainingStatsDerived { fun ageGroupStats(filteredMembers: List): List { data class Bucket(val label: String, val match: (Int?) -> Boolean, var memberCount: Int = 0, var totalP12: Int = 0) val buckets = listOf( - Bucket("Kinder U13", { a -> a != null && a <= 12 }), - Bucket("Jugend U19", { a -> a != null && a in 13..18 }), - Bucket("Erwachsene", { a -> a != null && a in 19..59 }), - Bucket("Senioren 60+", { a -> a != null && a >= 60 }), - Bucket("Ohne Geburtsdatum", { a -> a == null }), + Bucket("U7", { a -> a != null && a <= 6 }), + Bucket("U9", { a -> a != null && a in 7..8 }), + Bucket("U11", { a -> a != null && a in 9..10 }), + Bucket("U13", { a -> a != null && a in 11..12 }), + Bucket("U15", { a -> a != null && a in 13..14 }), + Bucket("U19", { a -> a != null && a in 15..18 }), + Bucket("Erwachsene", { a -> a != null && a >= 19 }), ) for (member in filteredMembers) { val age = ageFromBirthDate(member.birthDate) @@ -241,7 +243,6 @@ object TrainingStatsDerived { bucket.totalP12 += member.participation12Months } return buckets - .filter { it.memberCount > 0 } .map { val mc = it.memberCount AgeGroupStatRow( diff --git a/mobile-app/gradle/libs.versions.toml b/mobile-app/gradle/libs.versions.toml index a259b183..017f6ced 100644 --- a/mobile-app/gradle/libs.versions.toml +++ b/mobile-app/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] # composeApp (Play Store / „Über die App“-Build) -appVersionCode = "14" -appVersionName = "1.5.0" +appVersionCode = "15" +appVersionName = "1.6.0" agp = "9.2.1" android-compileSdk = "35" android-minSdk = "24"