Update MyTischtennis model to use LONGTEXT for encrypted fields and enhance TeamManagementView with season change handling and async loading

This commit is contained in:
Torsten Schulz (local)
2025-11-21 09:31:43 +01:00
parent 51e47cf9f9
commit 4f9761efb0
6 changed files with 256 additions and 14 deletions

View File

@@ -801,9 +801,12 @@ export default {
};
const onSeasonChange = (season) => {
currentSeason.value = season;
loadTeams();
loadLeagues();
if (season) {
currentSeason.value = season;
selectedSeasonId.value = season.id;
loadTeams();
loadLeagues();
}
};
// Load scheduler jobs info
@@ -849,11 +852,19 @@ export default {
};
// Lifecycle
onMounted(() => {
onMounted(async () => {
// Lade Ligen beim ersten Laden der Seite (ohne Saison-Filter)
loadLeagues();
await loadLeagues();
// Lade Job-Informationen
loadSchedulerJobsInfo();
await loadSchedulerJobsInfo();
// Warte kurz, damit SeasonSelector die Saison setzen kann
// Dann lade Teams, falls eine Saison ausgewählt wurde
setTimeout(() => {
if (selectedSeasonId.value && selectedClub.value) {
loadTeams();
}
}, 100);
});
// PDF-Dialog Funktionen
@@ -1222,6 +1233,14 @@ export default {
}
});
// Watch selectedSeasonId to load teams when season changes
watch(selectedSeasonId, (newSeasonId) => {
if (newSeasonId && selectedClub.value) {
loadTeams();
loadLeagues();
}
});
const validateTeamDocumentFile = async (file, label) => {
if (!file) {
return false;