diff --git a/frontend/src/components/tournament/InternalTournamentStats.vue b/frontend/src/components/tournament/InternalTournamentStats.vue index 68c239f2..2a01639d 100644 --- a/frontend/src/components/tournament/InternalTournamentStats.vue +++ b/frontend/src/components/tournament/InternalTournamentStats.vue @@ -153,11 +153,15 @@ export default { }, sortedAgeOptions() { const list = [...(this.stats.ageClassOptions || [])]; - list.sort((a, b) => - this.formatAgeOption(a).localeCompare(this.formatAgeOption(b), 'de', { - sensitivity: 'base', - }), - ); + list.sort((a, b) => { + const va = this.ageClassSortValue(a); + const vb = this.ageClassSortValue(b); + if (va !== vb) return va - vb; + const ga = this.tournamentGenderSortOrder(a.gender); + const gb = this.tournamentGenderSortOrder(b.gender); + if (ga !== gb) return ga - gb; + return (a.name || '').localeCompare(b.name || '', 'de', { sensitivity: 'base' }); + }); return list; }, }, @@ -228,19 +232,43 @@ export default { this.selectedAgeKeys = []; this.load(); }, + /** TT: nur Weiblich vs. Alle (offen); kein „Männlich“ mehr in Turnierklassen */ + tournamentClassGenderLabel(gender) { + if (gender === 'female') return this.$t('tournaments.tournamentClassGenderFemale'); + return this.$t('tournaments.tournamentClassGenderOpen'); + }, + tournamentGenderSortOrder(gender) { + return gender === 'female' ? 0 : 1; + }, + /** + * Reihenfolge: J9 … J19 (bzw. U…), dann Erwachsene/Senioren, Sonstiges, ohne Klasse zuletzt. + */ + ageClassSortValue(opt) { + if (opt.isNoClass) return 99999; + const name = (opt.name || '').trim(); + const ju = name.match(/\bJ\s*(\d+)\b/i) || name.match(/\bU\s*(\d+)\b/i); + if (ju) { + const num = parseInt(ju[1], 10); + return 100 + num; + } + if (/erwachsen|senioren/i.test(name)) return 9000; + if (/damen|herren|aktive|mixed|offen|frei/i.test(name)) return 9100; + return 5000; + }, formatAgeOption(opt) { if (!opt) return ''; if (opt.isNoClass) return this.$t('tournaments.internalStatsAgeNoClass'); const bits = []; - if (opt.name) bits.push(opt.name); + const nameTrim = (opt.name || '').trim(); + if (nameTrim) bits.push(nameTrim); const min = opt.minBirthYear; const max = opt.maxBirthYear; - if (min != null && max != null) bits.push(`${min}–${max}`); - else if (max != null) bits.push(`≤ ${max}`); - else if (min != null) bits.push(`≥ ${min}`); - if (opt.gender === 'male') bits.push(this.$t('members.genderMale')); - else if (opt.gender === 'female') bits.push(this.$t('members.genderFemale')); - else if (opt.gender === 'mixed') bits.push(this.$t('tournaments.genderMixed')); + if (!nameTrim) { + if (min != null && max != null) bits.push(`${min}–${max}`); + else if (max != null) bits.push(`≤ ${max}`); + else if (min != null) bits.push(`≥ ${min}`); + } + bits.push(this.tournamentClassGenderLabel(opt.gender)); return bits.join(' · '); }, ageFilterPdfLine() { diff --git a/frontend/src/i18n/locales/de-CH.json b/frontend/src/i18n/locales/de-CH.json index 2dbfa844..8da39c50 100644 --- a/frontend/src/i18n/locales/de-CH.json +++ b/frontend/src/i18n/locales/de-CH.json @@ -178,7 +178,9 @@ "internalStatsTitle": "Statistik interne Turniere (Einzel)", "internalStatsOpenButton": "Turnierstatistik (Einzel)", "internalStatsExportPdf": "Als PDF exportieren", - "internalStatsAgeFilter": "Altersklassen (Einzel)", + "internalStatsAgeFilter": "Altersklassä & Gschlächt (Einzel)", + "tournamentClassGenderFemale": "Weiblich", + "tournamentClassGenderOpen": "Alli", "internalStatsAgeNoClass": "Ohni Klassäzuordnig", "internalStatsAgeSelectAll": "Alli", "internalStatsAgeSelectNone": "Keini", diff --git a/frontend/src/i18n/locales/de-extended.json b/frontend/src/i18n/locales/de-extended.json index 6ae0ea48..892e5a79 100644 --- a/frontend/src/i18n/locales/de-extended.json +++ b/frontend/src/i18n/locales/de-extended.json @@ -409,7 +409,9 @@ "internalStatsTitle": "Statistik interne Turniere (Einzel)", "internalStatsOpenButton": "Turnierstatistik (Einzel)", "internalStatsExportPdf": "Als PDF exportieren", - "internalStatsAgeFilter": "Altersklassen (Einzel)", + "internalStatsAgeFilter": "Altersklassen & Geschlecht (Einzel)", + "tournamentClassGenderFemale": "Weiblich", + "tournamentClassGenderOpen": "Alle", "internalStatsAgeNoClass": "Ohne Klassenzuordnung", "internalStatsAgeSelectAll": "Alle", "internalStatsAgeSelectNone": "Keine", diff --git a/frontend/src/i18n/locales/de.json b/frontend/src/i18n/locales/de.json index 01814fae..43c397e7 100644 --- a/frontend/src/i18n/locales/de.json +++ b/frontend/src/i18n/locales/de.json @@ -701,7 +701,9 @@ "internalStatsTitle": "Statistik interne Turniere (Einzel)", "internalStatsOpenButton": "Turnierstatistik (Einzel)", "internalStatsExportPdf": "Als PDF exportieren", - "internalStatsAgeFilter": "Altersklassen (Einzel)", + "internalStatsAgeFilter": "Altersklassen & Geschlecht (Einzel)", + "tournamentClassGenderFemale": "Weiblich", + "tournamentClassGenderOpen": "Alle", "internalStatsAgeNoClass": "Ohne Klassenzuordnung", "internalStatsAgeSelectAll": "Alle", "internalStatsAgeSelectNone": "Keine", diff --git a/frontend/src/i18n/locales/en-AU.json b/frontend/src/i18n/locales/en-AU.json index 6ed7037a..fbcc3ac6 100644 --- a/frontend/src/i18n/locales/en-AU.json +++ b/frontend/src/i18n/locales/en-AU.json @@ -178,7 +178,9 @@ "internalStatsTitle": "Internal tournaments statistics (singles)", "internalStatsOpenButton": "Tournament statistics (singles)", "internalStatsExportPdf": "Export as PDF", - "internalStatsAgeFilter": "Age classes (singles)", + "internalStatsAgeFilter": "Age group & gender (singles)", + "tournamentClassGenderFemale": "Female", + "tournamentClassGenderOpen": "Open (all)", "internalStatsAgeNoClass": "No class assigned", "internalStatsAgeSelectAll": "All", "internalStatsAgeSelectNone": "None", diff --git a/frontend/src/i18n/locales/en-GB.json b/frontend/src/i18n/locales/en-GB.json index 25ad63ed..53c5b374 100644 --- a/frontend/src/i18n/locales/en-GB.json +++ b/frontend/src/i18n/locales/en-GB.json @@ -359,7 +359,9 @@ "internalStatsTitle": "Internal tournaments statistics (singles)", "internalStatsOpenButton": "Tournament statistics (singles)", "internalStatsExportPdf": "Export as PDF", - "internalStatsAgeFilter": "Age classes (singles)", + "internalStatsAgeFilter": "Age group & gender (singles)", + "tournamentClassGenderFemale": "Female", + "tournamentClassGenderOpen": "Open (all)", "internalStatsAgeNoClass": "No class assigned", "internalStatsAgeSelectAll": "All", "internalStatsAgeSelectNone": "None", diff --git a/frontend/src/i18n/locales/en-US.json b/frontend/src/i18n/locales/en-US.json index fb72b71d..03a60edb 100644 --- a/frontend/src/i18n/locales/en-US.json +++ b/frontend/src/i18n/locales/en-US.json @@ -178,7 +178,9 @@ "internalStatsTitle": "Internal tournaments statistics (singles)", "internalStatsOpenButton": "Tournament statistics (singles)", "internalStatsExportPdf": "Export as PDF", - "internalStatsAgeFilter": "Age classes (singles)", + "internalStatsAgeFilter": "Age group & gender (singles)", + "tournamentClassGenderFemale": "Female", + "tournamentClassGenderOpen": "Open (all)", "internalStatsAgeNoClass": "No class assigned", "internalStatsAgeSelectAll": "All", "internalStatsAgeSelectNone": "None", diff --git a/frontend/src/i18n/locales/es.json b/frontend/src/i18n/locales/es.json index a3f289ba..3c45241c 100644 --- a/frontend/src/i18n/locales/es.json +++ b/frontend/src/i18n/locales/es.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Estadísticas de torneos internos (individual)", "internalStatsOpenButton": "Estadísticas de torneos (individual)", "internalStatsExportPdf": "Exportar como PDF", - "internalStatsAgeFilter": "Categorías de edad (individual)", + "internalStatsAgeFilter": "Edad y género (individual)", + "tournamentClassGenderFemale": "Femenino", + "tournamentClassGenderOpen": "Abierta (todos)", "internalStatsAgeNoClass": "Sin clase asignada", "internalStatsAgeSelectAll": "Todas", "internalStatsAgeSelectNone": "Ninguna", diff --git a/frontend/src/i18n/locales/fil.json b/frontend/src/i18n/locales/fil.json index 86949cb0..9a6768c3 100644 --- a/frontend/src/i18n/locales/fil.json +++ b/frontend/src/i18n/locales/fil.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Estadistika ng internal na paligsahan (singles)", "internalStatsOpenButton": "Buksan ang estadistika (singles)", "internalStatsExportPdf": "I-export bilang PDF", - "internalStatsAgeFilter": "Mga pangkat ng edad (singles)", + "internalStatsAgeFilter": "Edad at kasarian (singles)", + "tournamentClassGenderFemale": "Babae", + "tournamentClassGenderOpen": "Bukas (lahat)", "internalStatsAgeNoClass": "Walang klase", "internalStatsAgeSelectAll": "Lahat", "internalStatsAgeSelectNone": "Wala", diff --git a/frontend/src/i18n/locales/fr.json b/frontend/src/i18n/locales/fr.json index fbba35a4..d23e2114 100644 --- a/frontend/src/i18n/locales/fr.json +++ b/frontend/src/i18n/locales/fr.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Statistiques des tournois internes (simple)", "internalStatsOpenButton": "Statistiques (simple)", "internalStatsExportPdf": "Exporter en PDF", - "internalStatsAgeFilter": "Catégories d’âge (simple)", + "internalStatsAgeFilter": "Âge et genre (simple)", + "tournamentClassGenderFemale": "Féminin", + "tournamentClassGenderOpen": "Tous", "internalStatsAgeNoClass": "Sans classe assignée", "internalStatsAgeSelectAll": "Tout", "internalStatsAgeSelectNone": "Aucune", diff --git a/frontend/src/i18n/locales/it.json b/frontend/src/i18n/locales/it.json index ed0dd6cc..0be743fe 100644 --- a/frontend/src/i18n/locales/it.json +++ b/frontend/src/i18n/locales/it.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Statistiche tornei interni (singolo)", "internalStatsOpenButton": "Statistiche tornei (singolo)", "internalStatsExportPdf": "Esporta PDF", - "internalStatsAgeFilter": "Categorie di età (singolo)", + "internalStatsAgeFilter": "Età e genere (singolo)", + "tournamentClassGenderFemale": "Femminile", + "tournamentClassGenderOpen": "Aperta (tutti)", "internalStatsAgeNoClass": "Senza classe assegnata", "internalStatsAgeSelectAll": "Tutte", "internalStatsAgeSelectNone": "Nessuna", diff --git a/frontend/src/i18n/locales/ja.json b/frontend/src/i18n/locales/ja.json index cd8531ac..ca8a35b7 100644 --- a/frontend/src/i18n/locales/ja.json +++ b/frontend/src/i18n/locales/ja.json @@ -177,7 +177,9 @@ "internalStatsTitle": "内部大会の統計(シングルス)", "internalStatsOpenButton": "統計を表示(シングルス)", "internalStatsExportPdf": "PDFで出力", - "internalStatsAgeFilter": "年齢クラス(シングルス)", + "internalStatsAgeFilter": "年齢・性別(シングルス)", + "tournamentClassGenderFemale": "女子", + "tournamentClassGenderOpen": "オープン(全員)", "internalStatsAgeNoClass": "クラス未設定", "internalStatsAgeSelectAll": "すべて", "internalStatsAgeSelectNone": "なし", diff --git a/frontend/src/i18n/locales/pl.json b/frontend/src/i18n/locales/pl.json index 63df21ad..e4e36bcb 100644 --- a/frontend/src/i18n/locales/pl.json +++ b/frontend/src/i18n/locales/pl.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Statystyki turniejów wewnętrznych (singel)", "internalStatsOpenButton": "Statystyki turniejów (singel)", "internalStatsExportPdf": "Eksportuj do PDF", - "internalStatsAgeFilter": "Klasy wiekowe (singel)", + "internalStatsAgeFilter": "Grupa wiekowa i płeć (singel)", + "tournamentClassGenderFemale": "Kobiety", + "tournamentClassGenderOpen": "Otwarta (wszyscy)", "internalStatsAgeNoClass": "Bez przypisania do klasy", "internalStatsAgeSelectAll": "Wszystkie", "internalStatsAgeSelectNone": "Żadna", diff --git a/frontend/src/i18n/locales/th.json b/frontend/src/i18n/locales/th.json index 2bf146bb..9cd6b4a2 100644 --- a/frontend/src/i18n/locales/th.json +++ b/frontend/src/i18n/locales/th.json @@ -177,7 +177,9 @@ "internalStatsTitle": "สถิติการแข่งขันภายใน (เดี่ยว)", "internalStatsOpenButton": "เปิดสถิติ (เดี่ยว)", "internalStatsExportPdf": "ส่งออก PDF", - "internalStatsAgeFilter": "รุ่นอายุ (เดี่ยว)", + "internalStatsAgeFilter": "รุ่นอายุและเพศ (เดี่ยว)", + "tournamentClassGenderFemale": "หญิง", + "tournamentClassGenderOpen": "เปิด (ทุกคน)", "internalStatsAgeNoClass": "ไม่มีคลาส", "internalStatsAgeSelectAll": "ทั้งหมด", "internalStatsAgeSelectNone": "ไม่มี", diff --git a/frontend/src/i18n/locales/tl.json b/frontend/src/i18n/locales/tl.json index 49ba5ea1..7c9d1f92 100644 --- a/frontend/src/i18n/locales/tl.json +++ b/frontend/src/i18n/locales/tl.json @@ -177,7 +177,9 @@ "internalStatsTitle": "Istatistika ng internal na tournament (singles)", "internalStatsOpenButton": "Buksan ang istatistika (singles)", "internalStatsExportPdf": "I-export bilang PDF", - "internalStatsAgeFilter": "Mga pangkat ng edad (singles)", + "internalStatsAgeFilter": "Edad at kasarian (singles)", + "tournamentClassGenderFemale": "Babae", + "tournamentClassGenderOpen": "Bukas (lahat)", "internalStatsAgeNoClass": "Walang klase", "internalStatsAgeSelectAll": "Lahat", "internalStatsAgeSelectNone": "Wala", diff --git a/frontend/src/i18n/locales/zh.json b/frontend/src/i18n/locales/zh.json index a3c95788..918d4fd7 100644 --- a/frontend/src/i18n/locales/zh.json +++ b/frontend/src/i18n/locales/zh.json @@ -177,7 +177,9 @@ "internalStatsTitle": "内部锦标赛统计(单打)", "internalStatsOpenButton": "打开单打统计数据", "internalStatsExportPdf": "导出 PDF", - "internalStatsAgeFilter": "年龄组(单打)", + "internalStatsAgeFilter": "年龄与性别(单打)", + "tournamentClassGenderFemale": "女子", + "tournamentClassGenderOpen": "公开组(全体)", "internalStatsAgeNoClass": "未分配级别", "internalStatsAgeSelectAll": "全选", "internalStatsAgeSelectNone": "全不选",