General design enhancements and scroll area changes

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-01-25 08:42:30 +01:00
parent b42ce6219c
commit 3adadc23d0
21 changed files with 225 additions and 2351 deletions

View File

@@ -88,23 +88,21 @@ export default {
commit('orderStack', { stack, addedIndex, removedIndex })
})
},
loadStacks({ commit }, boardId) {
async loadStacks({ commit }, boardId) {
commit('clearCards')
let call = 'loadStacks'
if (this.state.showArchived === true) {
call = 'loadArchivedStacks'
}
apiClient[call](boardId)
.then((stacks) => {
for (const i in stacks) {
const stack = stacks[i]
for (const j in stack.cards) {
commit('addCard', stack.cards[j])
}
delete stack.cards
commit('addStack', stack)
}
})
const stacks = await apiClient[call](boardId)
for (const i in stacks) {
const stack = stacks[i]
for (const j in stack.cards) {
commit('addCard', stack.cards[j])
}
delete stack.cards
commit('addStack', stack)
}
},
createStack({ commit }, stack) {
stack.boardId = this.state.currentBoard.id