more control

This commit is contained in:
Torsten Schulz (notebook)
2024-08-17 13:05:03 +02:00
parent 31ca0979ce
commit 255fb97dd3
4 changed files with 24 additions and 6 deletions

View File

@@ -20,7 +20,7 @@ export default {
name: 'App',
data() {
return {
selectedClub: null, // Initialisiere selectedClub als null
selectedClub: null,
};
},
computed: {
@@ -28,11 +28,9 @@ export default {
},
watch: {
selectedClub(newVal) {
console.log('selectedClub watcher:', newVal);
this.setCurrentClub(newVal);
},
currentClub(newVal) {
console.log('currentClub watcher:', newVal);
if (newVal === 'new') {
this.$router.push('/createclub');
} else if (newVal) {

View File

@@ -1,8 +1,20 @@
<template>
<h2>Verein {{ club.name }}</h2>
<div v-if="openRequests.length > 0">
<h3>Offene Anfragen auf Zugriff</h3>
</div>
<div>
<h3>Mitglieder</h3>
</div>
<div>
<h3>Traingstagebuch</h3>
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import apiClient from '../apiClient';
export default {
name: "ClubView",
data() {
@@ -10,7 +22,14 @@ export default {
club: {
name: '',
},
openRequests: []
}
}
},
methods: {
async loadOpenRequests() {
const notApproved = apiClient.get('/clubmembers/notapproved/' + id);
this.openRequests = notApproved.data;
}
},
}
</script>