mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 14:07:43 +00:00
Fixed: [vue][evaluation] save social action and evaluation before opening collabora edition
This commit is contained in:
parent
f9b151e4db
commit
214bfd198e
@ -118,7 +118,7 @@
|
||||
</add-async-upload-downloader>
|
||||
</li>
|
||||
<li v-if="canEditDocument(d)">
|
||||
<a :href="buildEditLink(d.storedObject)" class="btn btn-wopilink"></a>
|
||||
<a class="btn btn-wopilink" @click="submitBeforeEdit(d.storedObject)"></a>
|
||||
</li>
|
||||
<li v-if="d.workflows.length === 0">
|
||||
<a class="btn btn-delete" @click="removeDocument(d)">
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user