@@ -36,8 +36,8 @@
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<collection-list v-if="board.id" :id="board.id"
|
||||
:name="board.title" type="deck" />
|
||||
<collection-list v-if="board.id" :id=""board.id"" :name="board.title"
|
||||
type="deck" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ export class StackApi {
|
||||
}
|
||||
|
||||
updateStack(stack) {
|
||||
return axios.put(this.url(`/stacks/${stack.id}`), { stack })
|
||||
return axios.put(this.url(`/stacks/${stack.id}`), stack)
|
||||
.then(
|
||||
(response) => {
|
||||
return Promise.resolve(response.data)
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user