Allow editing cards on filtered views

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-08-20 10:28:57 +02:00
parent f4a6060a3c
commit a73b761a72
4 changed files with 42 additions and 23 deletions

View File

@@ -95,14 +95,19 @@ export default {
},
computed: {
...mapGetters([
'canEdit',
'isArchived',
]),
...mapState({
showArchived: state => state.showArchived,
currentBoard: state => state.currentBoard,
}),
canEdit() {
if (this.currentBoard) {
return this.$store.getters.canEdit
}
const board = this.$store.getters.boards.find((item) => item.id === this.card.boardId)
return board.permissions.PERMISSION_EDIT
},
isBoardAndStackChoosen() {
if (this.selectedBoard === '' || this.selectedStack === '') {
return false