Wähle zuerst einen Verein aus, damit Aufgaben, Mitglieder, Trainings und Termine geladen werden. @@ -743,6 +748,7 @@ export default { return { dashboardSectionsOverride: null, dashboardLoading: false, + dashboardError: '', }; }, computed: { @@ -793,22 +799,28 @@ export default { await this.loadClubDashboard(); }, }, + appProduct() { + this.loadClubDashboard(); + }, }, methods: { ...mapActions(['logout']), async loadClubDashboard() { if (!this.isTtVereinProduct || !this.isAuthenticated || !this.currentClub) { this.dashboardSectionsOverride = null; + this.dashboardError = ''; return; } this.dashboardLoading = true; + this.dashboardError = ''; try { const response = await apiClient.get(`/club-dashboard/${this.currentClub}`); const sections = Array.isArray(response.data?.sections) ? response.data.sections : null; this.dashboardSectionsOverride = sections && sections.length > 0 ? sections : null; - } catch (_error) { + } catch (error) { this.dashboardSectionsOverride = null; + this.dashboardError = error?.response?.data?.error || 'Bitte prüfe deine Verbindung und versuche es erneut.'; } finally { this.dashboardLoading = false; }