@@ -64,10 +64,18 @@ export default {
|
||||
},
|
||||
assignCardToMe(state, card) {
|
||||
console.log(card)
|
||||
let existingIndex = state.cards.findIndex(_card => _card.id === card.id)
|
||||
if (existingIndex !== -1) {
|
||||
// let existingIndex = state.cards.findIndex(_card => _card.id === card.id)
|
||||
/* if (existingIndex !== -1) {
|
||||
|
||||
}
|
||||
} */
|
||||
},
|
||||
updateCard(state, card) {
|
||||
// console.log(card)
|
||||
// new card is not returned!
|
||||
// let existingIndex = state.cards.findIndex(_card => _card.id === card.id)
|
||||
/* if (existingIndex !== -1) {
|
||||
state.cards[existingIndex] = card
|
||||
} */
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -105,6 +113,12 @@ export default {
|
||||
.then((card) => {
|
||||
commit('assignCardToMe', card)
|
||||
})
|
||||
},
|
||||
assignLabel({ commit }, data) {
|
||||
apiClient.assignLabelToCard(data)
|
||||
.then((card) => {
|
||||
commit('updateCard', card)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ export default new Vuex.Store({
|
||||
params.append('itemType', 0)
|
||||
params.append('itemType', 1)
|
||||
axios.get(OC.linkToOCS('apps/files_sharing/api/v1') + 'sharees', { params }).then((response) => {
|
||||
//commit('setSharees', response.data.ocs.data.users)
|
||||
// commit('setSharees', response.data.ocs.data.users)
|
||||
commit('setSharees', response.data.ocs.data)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user