it is working now

Signed-off-by: Jakob <jakob.roehrl@web.de>
This commit is contained in:
Jakob
2019-07-05 11:05:56 +02:00
committed by Julius Härtl
parent c6d16f4c16
commit 408ea69272
5 changed files with 9 additions and 9 deletions

View File

@@ -38,14 +38,13 @@ export default {
},
mutations: {
addCard(state, card) {
state.cards.push(card)
/* let existingIndex = state.cards.findIndex(_card => _card.id === card.id)
let existingIndex = state.cards.findIndex(_card => _card.id === card.id)
if (existingIndex !== -1) {
let existingCard = state.cards.find(_card => _card.id === card.id)
Vue.set(state.cards, existingIndex, Object.assign({}, existingCard, card))
} else {
state.cards.push(card)
} */
}
}
},
actions: {

View File

@@ -170,7 +170,7 @@ export default new Vuex.Store({
// acl mutators
addAclToCurrentBoard(state, createdAcl) {
state.currentBoard.acl[createdAcl.id] = createdAcl
Vue.set(state.currentBoard.acl, createdAcl.id, createdAcl)
},
updateAclFromCurrentBoard(state, acl) {
for (var acl_ in state.currentBoard.acl) {
@@ -191,7 +191,7 @@ export default new Vuex.Store({
}
if (removeIndex > -1) {
delete state.currentBoard.acl[removeIndex]
Vue.delete(state.currentBoard.acl, removeIndex)
}
}
},

View File

@@ -53,6 +53,7 @@ export default {
}
},
deleteStack(state, stack) {
let existingIndex = state.stacks.findIndex(_stack => _stack.id === stack.id)
if (existingIndex !== -1) {
state.stacks.splice(existingIndex, 1)
@@ -61,7 +62,7 @@ export default {
updateStack(state, stack) {
let existingIndex = state.stacks.findIndex(_stack => _stack.id === stack.id)
if (existingIndex !== -1) {
state.stacks[existingIndex] = stack
state.stacks[existingIndex].title = stack.title
}
}
},