calendar app: fix list for showing users and their colors (not in rgith place in page)

This commit is contained in:
2022-05-18 13:33:56 +02:00
parent b89edc29af
commit dba0e84781
5 changed files with 67 additions and 11 deletions

View File

@@ -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>