mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-17 10:42:48 +00:00
add toggle button to show/add remote and ranges for each user in calendar
This commit is contained in:
@@ -1,5 +1,15 @@
|
||||
<template>
|
||||
<span class="badge" :style="style">{{ user.text }}</span>
|
||||
<span class="badge" :style="style">
|
||||
{{ user.text }}
|
||||
<span class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" v-model="rangeShow">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Disponibilité</label>
|
||||
</span>
|
||||
<span class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="flexSwitchCheckDefault" v-model="remoteShow">
|
||||
<label class="form-check-label" for="flexSwitchCheckDefault">Agenda</label>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -14,17 +24,22 @@ export default {
|
||||
backgroundColor: this.$store.getters.getUserData(this.user).mainColor,
|
||||
};
|
||||
},
|
||||
mainColor() {
|
||||
return 'blue';
|
||||
console.log('mainColor userId', this.userId);
|
||||
console.log(this.$store.state.usersData);
|
||||
|
||||
if (!this.$store.getters.hasUserDataById(this.userId)) {
|
||||
return 'blue';
|
||||
rangeShow: {
|
||||
set (value) {
|
||||
this.$store.commit('showUserOnCalendar', {user: this.user, ranges: value});
|
||||
},
|
||||
get() {
|
||||
return this.$store.getters.isRangeShownOnCalendarForUser(this.user);
|
||||
}
|
||||
|
||||
return this.$store.getters.getUserDataById(this.userId).mainColor;
|
||||
}
|
||||
},
|
||||
remoteShow: {
|
||||
set (value) {
|
||||
this.$store.commit('showUserOnCalendar', {user: this.user, remote: value});
|
||||
},
|
||||
get() {
|
||||
return this.$store.getters.isRemoteShownOnCalendarForUser(this.user);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user