Handle error when moving document between evaluations and display toast upon success

This commit is contained in:
2025-08-21 16:14:17 +02:00
parent f6179cd3a3
commit 18ababbca9

View File

@@ -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);