add category context menu

This commit is contained in:
smilerz
2022-01-04 14:00:01 -06:00
parent 25c1689ca0
commit 214db80dac
11 changed files with 74 additions and 44 deletions

View File

@ -26,7 +26,7 @@
<div class="m-0 text-truncate">{{ item[subtitle] }}</div>
<div class="m-0 text-truncate small text-muted" v-if="getFullname">{{ getFullname }}</div>
<generic-pill v-for="x in itemTags" :key="x.field" :item_list="item[x.field]" :label="x.label" :color="x.color" />
<generic-pill v-for="x in itemTags" :key="x.field" :item_list="itemList(x)" :label="x.label" :color="x.color" />
<generic-ordered-pill
v-for="x in itemOrderedTags"
:key="x.field"
@ -259,6 +259,14 @@ export default {
finishAction: function (e) {
this.$emit("finish-action", e)
},
itemList: function (tag) {
let itemlist = this.item?.[tag?.field] ?? []
if (Array.isArray(itemlist)) {
return itemlist
} else {
return [itemlist]
}
},
},
}
</script>