fix: Get proper rich object for card actions

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2023-12-05 23:13:15 +01:00
parent 2389eff5ea
commit b06b41f7eb
3 changed files with 61 additions and 11 deletions

View File

@@ -136,6 +136,8 @@ export default {
'isArchived',
'boards',
'cardActions',
'stackById',
'boardById',
]),
...mapState({
showArchived: state => state.showArchived,
@@ -165,7 +167,17 @@ export default {
},
boardId() {
return this.card?.boardId ? this.card.boardId : this.$route.params.id
return this.card?.boardId ? this.card.boardId : Number(this.$route.params.id)
},
cardRichObject() {
return {
id: '' + this.card.id,
name: this.card.title,
boardname: this.boardById(this.boardId)?.title,
stackname: this.stackById(this.card.stackId)?.title,
link: window.location.protocol + '//' + window.location.host + generateUrl('/apps/deck/') + `card/${this.card.id}`,
}
},
},
methods: {