From 214bfd198edabe773af6ca333a9835223f86057d Mon Sep 17 00:00:00 2001 From: Mathieu Jaumotte Date: Wed, 25 Jan 2023 17:24:07 +0100 Subject: [PATCH] Fixed: [vue][evaluation] save social action and evaluation before opening collabora edition --- .../components/FormEvaluation.vue | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) 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 66918ad71..7e9716e5b 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/components/FormEvaluation.vue @@ -118,7 +118,7 @@
  • - +
  • @@ -359,10 +359,19 @@ export default { }) ; }, - buildEditLink(storedObject) { - return `/chill/wopi/edit/${storedObject.uuid}?returnPath=` + encodeURIComponent( + buildEditLink(document) { + return `/chill/wopi/edit/${document.storedObject.uuid}?returnPath=` + encodeURIComponent( window.location.pathname + window.location.search + window.location.hash); }, + submitBeforeEdit(storedObject) { + const callback = (data) => { + let evaluation = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key); + let document = evaluation.documents.find(d => d.storedObject.id === storedObject.id); + //console.log('=> document', document); + window.location.assign(this.buildEditLink(document)); + }; + return this.$store.dispatch('submit', callback).catch(e => { console.log(e); throw e; }); + }, submitBeforeGenerate({template}) { const callback = (data) => { let evaluationId = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key).id;