mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
FEATURE [workflow][doc] scroll immediately to document in workflow and let background flash
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:docId="this.docId">
|
||||
</add-evaluation>
|
||||
|
||||
<!-- box to add new evaluation -->
|
||||
@@ -389,6 +390,7 @@ export default {
|
||||
i18n,
|
||||
data() {
|
||||
return {
|
||||
docId: null,
|
||||
isExpanded: false,
|
||||
editor: ClassicEditor,
|
||||
showAddObjective: false,
|
||||
@@ -428,7 +430,14 @@ export default {
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
beforeMount() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.docId = urlParams.get('doc_id');
|
||||
},
|
||||
mounted() {
|
||||
this.scrollToElement(this.docId);
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'work',
|
||||
'resultsForAction',
|
||||
@@ -559,7 +568,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;
|
||||
@@ -581,6 +590,12 @@ export default {
|
||||
this.$toast.open({message: 'An error occurred'});
|
||||
}
|
||||
})
|
||||
},
|
||||
scrollToElement(docId) {
|
||||
const documentEl = document.getElementById(`document_${docId}`);
|
||||
if (documentEl) {
|
||||
documentEl.scrollIntoView({behavior: 'smooth'});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user