more control
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user