@@ -37,9 +37,18 @@
|
|||||||
<ActionButton icon="icon-archive" @click="archiveUnarchiveCard()">{{ t('deck', (showArchived ? 'Unarchive card' : 'Archive card')) }}</ActionButton>
|
<ActionButton icon="icon-archive" @click="archiveUnarchiveCard()">{{ t('deck', (showArchived ? 'Unarchive card' : 'Archive card')) }}</ActionButton>
|
||||||
<ActionButton v-if="showArchived === false" icon="icon-delete" @click="deleteCard()">{{ t('deck', 'Delete card') }}</ActionButton>
|
<ActionButton v-if="showArchived === false" icon="icon-delete" @click="deleteCard()">{{ t('deck', 'Delete card') }}</ActionButton>
|
||||||
<ActionButton icon="icon-settings-dark" @click="openCard">{{ t('deck', 'Card details') }}</ActionButton>
|
<ActionButton icon="icon-settings-dark" @click="openCard">{{ t('deck', 'Card details') }}</ActionButton>
|
||||||
|
<ActionButton icon="icon-settings-dark" @click.stop="modalShow=true">{{ t('deck', 'Move card') }}</ActionButton>
|
||||||
</Actions>
|
</Actions>
|
||||||
|
|
||||||
</transition>
|
</transition>
|
||||||
|
<modal v-if="modalShow" title="Move card to another board" @close="modalShow=false">
|
||||||
|
<div class="modal__content">
|
||||||
|
<Multiselect v-model="selectedBoard" :options="boards" label="title" />
|
||||||
|
{{ stacksBySelectedBoard }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</modal>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<ul class="labels" @click="openCard">
|
<ul class="labels" @click="openCard">
|
||||||
<li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)"><span>{{ label.title }}</span></li>
|
<li v-for="label in card.labels" :key="label.id" :style="labelStyle(label)"><span>{{ label.title }}</span></li>
|
||||||
@@ -51,9 +60,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { PopoverMenu } from 'nextcloud-vue'
|
import { Modal } from 'nextcloud-vue/dist/Components/Modal'
|
||||||
import { Actions } from 'nextcloud-vue/dist/Components/Actions'
|
import { Actions } from 'nextcloud-vue/dist/Components/Actions'
|
||||||
import { ActionButton } from 'nextcloud-vue/dist/Components/ActionButton'
|
import { ActionButton } from 'nextcloud-vue/dist/Components/ActionButton'
|
||||||
|
import { Multiselect } from 'nextcloud-vue/dist/Components/Multiselect'
|
||||||
import ClickOutside from 'vue-click-outside'
|
import ClickOutside from 'vue-click-outside'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
@@ -63,7 +73,7 @@ import Color from '../../mixins/color'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CardItem',
|
name: 'CardItem',
|
||||||
components: { PopoverMenu, CardBadges, LabelTag, Actions, ActionButton },
|
components: { Modal, CardBadges, LabelTag, Actions, ActionButton, Multiselect },
|
||||||
directives: {
|
directives: {
|
||||||
ClickOutside
|
ClickOutside
|
||||||
},
|
},
|
||||||
@@ -78,17 +88,32 @@ export default {
|
|||||||
return {
|
return {
|
||||||
menuOpened: false,
|
menuOpened: false,
|
||||||
editing: false,
|
editing: false,
|
||||||
copiedCard: ''
|
copiedCard: '',
|
||||||
|
modalShow: false,
|
||||||
|
selectedBoard: '',
|
||||||
|
selectedStack: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
compactMode: state => state.compactMode,
|
compactMode: state => state.compactMode,
|
||||||
showArchived: state => state.showArchived
|
showArchived: state => state.showArchived,
|
||||||
|
currentBoard: state => state.currentBoard
|
||||||
}),
|
}),
|
||||||
card() {
|
card() {
|
||||||
return this.$store.getters.cardById(this.id)
|
return this.$store.getters.cardById(this.id)
|
||||||
},
|
},
|
||||||
|
boards() {
|
||||||
|
return this.$store.getters.boards.filter(board => {
|
||||||
|
return board.id !== this.currentBoard.id
|
||||||
|
})
|
||||||
|
},
|
||||||
|
stacksBySelectedBoard() {
|
||||||
|
if (this.selectedBoard === '') {
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
return this.$store.getters.stacksByBoard(this.selectedBoard.id)
|
||||||
|
},
|
||||||
menu() {
|
menu() {
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
@@ -136,6 +161,9 @@ export default {
|
|||||||
this.copiedCard = Object.assign({}, this.card)
|
this.copiedCard = Object.assign({}, this.card)
|
||||||
this.copiedCard.newUserUid = this.card.owner.uid
|
this.copiedCard.newUserUid = this.card.owner.uid
|
||||||
this.$store.dispatch('assignCardToUser', this.copiedCard)
|
this.$store.dispatch('assignCardToUser', this.copiedCard)
|
||||||
|
},
|
||||||
|
moveCard() {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,4 +276,10 @@ export default {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal__content {
|
||||||
|
width: 50vw;
|
||||||
|
text-align: center;
|
||||||
|
margin: 10vw 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user