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