mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-18 12:44:59 +00:00
WIP Add toast after successful move
This commit is contained in:
@@ -53,7 +53,7 @@ import TimeSpentInput from "./TimeSpentInput.vue";
|
||||
import CommentInput from "./CommentInput.vue";
|
||||
import DocumentsList from "./DocumentsList.vue";
|
||||
import DocumentActions from "./DocumentActions.vue";
|
||||
import { trans, EVALUATION_DOCUMENT_DUPLICATE_SUCCESS } from "translator";
|
||||
import { trans, EVALUATION_DOCUMENT_DUPLICATE_SUCCESS, EVALUATION_DOCUMENT_MOVE_SUCCESS } from "translator";
|
||||
import { useToast } from "vue-toast-notification";
|
||||
|
||||
const props = defineProps(["evaluation", "docAnchorId"]);
|
||||
@@ -264,7 +264,15 @@ function moveDocumentToEvaluation({ evaluationDest, document }) {
|
||||
evaluationInitial: props.evaluation,
|
||||
evaluationDest: evaluationDest,
|
||||
document: document,
|
||||
});
|
||||
})
|
||||
.then(() => {
|
||||
$toast.open({
|
||||
message: trans(EVALUATION_DOCUMENT_MOVE_SUCCESS),
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
||||
function onStatusDocumentChanged(newStatus) {
|
||||
|
@@ -655,13 +655,13 @@ const store = createStore({
|
||||
{ commit },
|
||||
{ evaluationInitial, evaluationDest, document },
|
||||
) {
|
||||
await moveDocumentToEvaluation(document.id, evaluationDest.id);
|
||||
|
||||
commit("moveDocumentToEvaluation", {
|
||||
evaluationInitial,
|
||||
evaluationDest,
|
||||
document,
|
||||
});
|
||||
|
||||
await moveDocumentToEvaluation(document.id, evaluationDest.id);
|
||||
},
|
||||
removeDocument({ commit }, payload) {
|
||||
commit("removeDocument", payload);
|
||||
|
@@ -782,6 +782,7 @@ evaluation:
|
||||
duplicate_here: Dupliquer ici
|
||||
duplicate_to_other_evaluation: Dupliquer vers une autre évaluation
|
||||
duplicate_success: Le document d'évaluation a été dupliquer
|
||||
move_success: Le document d'évaluation a été déplacer
|
||||
|
||||
|
||||
goal:
|
||||
|
Reference in New Issue
Block a user