mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 17:44:58 +00:00
Handle error when moving document between evaluations and display toast upon success
This commit is contained in:
@@ -655,13 +655,19 @@ const store = createStore({
|
||||
{ commit },
|
||||
{ evaluationInitial, evaluationDest, document },
|
||||
) {
|
||||
await moveDocumentToEvaluation(document.id, evaluationDest.id);
|
||||
|
||||
try {
|
||||
const response = await moveDocumentToEvaluation(document.id, evaluationDest.id);
|
||||
commit("moveDocumentToEvaluation", {
|
||||
evaluationInitial,
|
||||
evaluationDest,
|
||||
document,
|
||||
});
|
||||
|
||||
return response;
|
||||
} catch (error) {
|
||||
console.error("Failed to move document:", error);
|
||||
throw error;
|
||||
}
|
||||
},
|
||||
removeDocument({ commit }, payload) {
|
||||
commit("removeDocument", payload);
|
||||
|
Reference in New Issue
Block a user