diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 26391e07..a0011c43 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -62,14 +62,11 @@
{{ $t('club.select') }}
-
@@ -140,7 +137,7 @@
-
+
@@ -240,11 +237,11 @@ export default {
// Owner oder Admin können Berechtigungen verwalten
return this.isClubOwner || this.userRole === 'admin' || this.hasPermission('permissions', 'read');
},
+ viewReloadKey() {
+ return `${this.$route.fullPath}|${this.currentClub || 'no-club'}`;
+ }
},
watch: {
- selectedClub(newVal) {
- this.setCurrentClub(newVal);
- },
currentClub(newVal) {
if (newVal === 'new') {
this.$router.push('/createclub');
@@ -315,6 +312,18 @@ export default {
}
});
},
+
+ async handleClubSelectionChange() {
+ if (!this.selectedClub) {
+ await this.setCurrentClub(null);
+ return;
+ }
+
+ await this.setCurrentClub(this.selectedClub);
+ if (this.selectedClub === 'new') {
+ this.$router.push('/createclub');
+ }
+ },
async loadUserData() {
try {
@@ -332,20 +341,6 @@ export default {
}
},
- async loadClub() {
- await this.setCurrentClub(this.selectedClub);
- if (this.selectedClub === 'new') {
- this.$router.push('/createclub');
- return;
- }
- // Wenn keine Berechtigung, auf Club-Ansicht mit Anfrage-Button
- if (!this.hasPermission('statistics', 'read')) {
- this.$router.push(`/showclub/${this.selectedClub}`);
- return;
- }
- this.$router.push('/training-stats');
- },
-
async checkSession() {
try {
const response = await apiClient.get('/session/status');