Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-07-13 11:23:44 +02:00
committed by Julius Härtl
parent 818ffa2d57
commit 66f6a3e193
5 changed files with 121 additions and 104 deletions

View File

@@ -32,6 +32,12 @@ export default {
assignedCards: [],
},
getters: {
dueOverdue: state => {
return state.withDue.filter((card) => {
return card
})
},
withDueDashboard: state => {
return state.withDue
},
@@ -49,15 +55,16 @@ export default {
},
actions: {
async loadDashboards({ commit }) {
async loadDueDashboard({ commit }) {
const withDue = await apiClient.findAllWithDue()
const withDueFlat = withDue.flat()
commit('setWithDueDashboard', withDueFlat)
},
async loadAssignDashboard({ commit }) {
const assignedCards = await apiClient.findMyAssignedCards()
const assignedCardsFlat = assignedCards.flat()
commit('setAssignedCards', assignedCardsFlat)
},
},
}