fix(CardMenu): introduce cardRichObject in CardMenu

Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
This commit is contained in:
Maksim Sukharev
2024-02-20 15:23:00 +01:00
parent 0542900bb3
commit 10a3060454

View File

@@ -127,6 +127,7 @@ export default {
'isArchived', 'isArchived',
'boards', 'boards',
'cardActions', 'cardActions',
'stackById',
]), ]),
...mapState({ ...mapState({
showArchived: state => state.showArchived, showArchived: state => state.showArchived,
@@ -155,6 +156,18 @@ export default {
boardId() { boardId() {
return this.card?.boardId ? this.card.boardId : this.$route.params.id return this.card?.boardId ? this.card.boardId : this.$route.params.id
}, },
currentCard() {
return this.$store.getters.cardById(this.card.id)
},
cardRichObject() {
return {
id: '' + this.currentCard.id,
name: this.currentCard.title,
boardname: this.currentBoard.title,
stackname: this.stackById(this.currentCard.stackId)?.title,
link: window.location.protocol + '//' + window.location.host + generateUrl('/apps/deck/') + `#/board/${this.currentBoard.id}/card/${this.currentCard.id}`,
}
},
}, },
methods: { methods: {
openCard() { openCard() {