diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue index a30bcb25e..77f8b9748 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -56,9 +56,15 @@ import CommentInput from './CommentInput.vue'; import DocumentsList from './DocumentsList.vue'; import DocumentActions from './DocumentActions.vue'; import {makeFetch} from "ChillMainAssets/lib/api/apiMethods"; +import { useToast } from "vue-toast-notification"; +import { + DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS, + trans +} from 'translator'; const props = defineProps(['evaluation', 'docAnchorId']); const store = useStore(); +const toast = useToast(); const timeSpentChoices = [ { text: '1 minute', value: 60 }, @@ -215,15 +221,16 @@ function duplicateDocument(document) { }); } + function duplicateDocumentToEvaluation({evaluation, document}) { const url = `/api/1.0/person/accompanying-course-work-evaluation-document/${document.id}/evaluation/${evaluation.id}/duplicate`; - console.log('document id', document.id, 'evaluation id', evaluation.id) + // console.log('document id', document.id, 'evaluation id', evaluation.id) makeFetch("POST", url) .then((response) => { console.log('new document', response) - this.$toast.open({ message: 'Le document a été dupliquer' }); + toast.open({ message: trans(DOCUMENT_DUPLICATE_TO_EVALUATION_SUCCESS) }); }) .catch((error) => { console.log(error);