mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
Merge remote-tracking branch 'origin/master' into 709-notification-eval-action
This commit is contained in:
@@ -122,7 +122,8 @@
|
||||
<add-evaluation
|
||||
v-for="e in pickedEvaluations"
|
||||
v-bind:key="e.key"
|
||||
v-bind:evaluation="e">
|
||||
v-bind:evaluation="e"
|
||||
v-bind:docAnchorId="this.docAnchorId">
|
||||
</add-evaluation>
|
||||
|
||||
<!-- box to add new evaluation -->
|
||||
@@ -406,6 +407,7 @@ export default {
|
||||
i18n,
|
||||
data() {
|
||||
return {
|
||||
docAnchorId: null,
|
||||
isExpanded: false,
|
||||
editor: ClassicEditor,
|
||||
showAddObjective: false,
|
||||
@@ -445,7 +447,14 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
beforeMount() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.docAnchorId = urlParams.get('doc_id');
|
||||
},
|
||||
mounted() {
|
||||
this.scrollToElement(this.docAnchorId);
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'work',
|
||||
'resultsForAction',
|
||||
@@ -594,7 +603,7 @@ export default {
|
||||
});
|
||||
},
|
||||
saveFormOnTheFly(payload) {
|
||||
console.log('saveFormOnTheFly: type', payload.type, ', data', payload.data);
|
||||
// console.log('saveFormOnTheFly: type', payload.type, ', data', payload.data);
|
||||
|
||||
let body = { type: payload.type };
|
||||
body.name = payload.data.text;
|
||||
@@ -616,6 +625,12 @@ export default {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
}
|
||||
})
|
||||
},
|
||||
scrollToElement(docAnchorId) {
|
||||
const documentEl = document.getElementById(`document_${docAnchorId}`);
|
||||
if (documentEl) {
|
||||
documentEl.scrollIntoView({behavior: 'smooth'});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user