some overall changes

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2019-05-24 09:34:36 +02:00
committed by Julius Härtl
parent f71f24c450
commit 501545f2e5
7 changed files with 160 additions and 98 deletions

View File

@@ -54,13 +54,15 @@ export default {
},
deleteStack(state, stack) {
let existingIndex = state.stacks.findIndex(_stack => _stack.id === stack.id)
console.log(existingIndex)
if (existingIndex !== -1) {
state.stacks.splice(existingIndex, 1)
}
},
updateStack(state, stack) {
let existingIndex = state.stacks.findIndex(_stack => _stack.id === stack.id)
if (existingIndex !== -1) {
state.stacks[existingIndex] = stack
}
}
},
actions: {