fix: Get proper rich object for card actions
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -83,7 +83,6 @@
|
||||
|
||||
<script>
|
||||
import { NcActionButton, NcAppSidebar, NcAppSidebarTab } from '@nextcloud/vue'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { mapState, mapGetters } from 'vuex'
|
||||
import CardSidebarTabDetails from './CardSidebarTabDetails.vue'
|
||||
import CardSidebarTabAttachments from './CardSidebarTabAttachments.vue'
|
||||
@@ -160,15 +159,6 @@ export default {
|
||||
subtitleTooltip() {
|
||||
return t('deck', 'Modified') + ': ' + this.formatDate(this.currentCard.lastModified) + '\n' + t('deck', 'Created') + ': ' + this.formatDate(this.currentCard.createdAt)
|
||||
},
|
||||
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}`,
|
||||
}
|
||||
},
|
||||
cardDetailsInModal: {
|
||||
get() {
|
||||
return this.$store.getters.config('cardDetailsInModal')
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user