Update MyTischtennis model to use LONGTEXT for encrypted fields and enhance TeamManagementView with season change handling and async loading
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user