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

@@ -237,12 +237,11 @@ export default new Vuex.Store({
},
},
actions: {
loadBoardById({ commit }, boardId) {
apiClient.loadById(boardId)
.then((board) => {
commit('setCurrentBoard', board)
commit('setAssignableUsers', board.users)
})
async loadBoardById({ commit }, boardId) {
commit('setCurrentBoard', null)
const board = await apiClient.loadById(boardId)
commit('setCurrentBoard', board)
commit('setAssignableUsers', board.users)
},
toggleShowArchived({ commit }) {

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