Allow to use card item without being available in global card store

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-07-11 11:10:47 +02:00
parent 3a4bbac6d4
commit 348fc669be
12 changed files with 160 additions and 52 deletions

View File

@@ -21,7 +21,7 @@
-->
<template>
<div class="badges">
<div v-if="card" class="badges">
<div v-if="card.commentsUnread > 0" class="icon icon-comment" />
<div v-if="card.description && checkListCount > 0" class="card-tasks icon icon-checkmark">
@@ -34,7 +34,7 @@
<AvatarList :users="card.assignedUsers" />
<CardMenu :id="id" />
<CardMenu :id="card.id" />
</div>
</template>
<script>
@@ -45,8 +45,8 @@ export default {
name: 'CardBadges',
components: { AvatarList, CardMenu },
props: {
id: {
type: Number,
card: {
type: Object,
default: null,
},
},
@@ -57,9 +57,6 @@ export default {
checkListCheckedCount() {
return (this.card.description.match(/^\s*([*+-]|(\d\.))\s+\[\s*x\s*\](.*)$/gim) || []).length
},
card() {
return this.$store.getters.cardById(this.id)
},
},
}
</script>