feat(cards): add card cloning ability

Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
This commit is contained in:
grnd-alt
2024-10-29 11:59:52 +01:00
committed by Julius Knorr
parent f6df55dd2d
commit e436cb921a
4 changed files with 137 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<NcModal v-if="modalShow" :title="t('deck', 'Move card to another board')" @close="modalShow=false">
<NcModal v-if="modalShow" :title="t('deck', 'Move card to another board')" @close="modalShow = false">
<div class="modal__content">
<h3>{{ t('deck', 'Move card to another board') }}</h3>
<NcSelect v-model="selectedBoard"
@@ -24,7 +24,7 @@
<button :disabled="!isBoardAndStackChoosen" class="primary" @click="moveCard">
{{ t('deck', 'Move card') }}
</button>
<button @click="modalShow=false">
<button @click="modalShow = false">
{{ t('deck', 'Cancel') }}
</button>
</div>
@@ -81,7 +81,7 @@ export default {
this.copiedCard = Object.assign({}, this.card)
this.copiedCard.stackId = this.selectedStack.id
this.$store.dispatch('moveCard', this.copiedCard)
if (parseInt(this.boardId) === parseInt(this.selectedStack.boardId)) {
if (parseInt(this.selectedBoard.id) === parseInt(this.selectedStack.boardId)) {
await this.$store.commit('addNewCard', { ...this.copiedCard })
}
this.modalShow = false