mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-17 10:42:48 +00:00
calendar app: fix list for showing users and their colors (not in rgith place in page)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<span class="badge" :style="style">{{ user.text }}</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters} from 'vuex';
|
||||
|
||||
export default {
|
||||
name: "CalendarActive",
|
||||
props: ['user'],
|
||||
computed: {
|
||||
style() {
|
||||
return {
|
||||
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';
|
||||
}
|
||||
|
||||
return this.$store.getters.getUserDataById(this.userId).mainColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
Reference in New Issue
Block a user