You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.1 KiB

<template>
<label-list
:headers="headers"
:labels="items"
:selected="selected"
:loading="loading"
@update-selected="updateSelected"
@update-label="handleUpdateLabel"
/>
</template>
<script>
import { mapState, mapActions, mapMutations } from 'vuex'
import LabelList from '@/components/organisms/LabelList'
export default {
components: {
LabelList
},
data() {
return {
headers: [
{
text: 'Name',
align: 'left',
value: 'text'
},
{
text: 'Shortkey',
value: 'suffix_key'
},
{
text: 'Color',
sortable: false,
value: 'background_color'
}
]
}
},
computed: {
...mapState('labels', ['items', 'selected', 'loading'])
},
created() {
this.getLabelList()
},
methods: {
...mapActions('labels', ['getLabelList', 'updateLabel']),
...mapMutations('labels', ['updateSelected']),
handleUpdateLabel(payload) {
const data = {
projectId: this.$route.params.id,
...payload
}
this.updateLabel(data)
}
}
}
</script>