docstore: use API entrypoint for storing storedObject in AddAsyncUpload.vue

This commit is contained in:
nobohan
2022-02-24 12:11:34 +01:00
parent b1390f4e9b
commit 3f43574371
3 changed files with 54 additions and 11 deletions

View File

@@ -107,6 +107,7 @@
<add-async-upload
:buttonTitle="$t('browse')"
:options="asyncUploadOptions"
@addDocument="addDocument"
>
</add-async-upload>
</li>
@@ -229,11 +230,11 @@ export default {
})
;
},
buildEditLink(storedObject) {
return `/wopi/edit/${storedObject.uuid}?returnPath=` + encodeURIComponent(
buildEditLink(storedObject) {
return `/wopi/edit/${storedObject.uuid}?returnPath=` + encodeURIComponent(
window.location.pathname + window.location.search + window.location.hash);
},
submitBeforeGenerate({template}) {
},
submitBeforeGenerate({template}) {
const callback = (data) => {
let evaluationId = data.accompanyingPeriodWorkEvaluations.find(e => e.key === this.evaluation.key).id;
@@ -241,6 +242,10 @@ export default {
};
return this.$store.dispatch('submit', callback).catch(e => { console.log(e); throw e; });
},
addDocument(storedObject) {
console.log(storedObject);
console.log('Add document');
}
},
}