FIX [review] process review and make minor visual changes

This commit is contained in:
Julie Lenaerts 2023-05-31 09:47:48 +02:00
parent ff03299f80
commit ed556d9ee8
3 changed files with 15 additions and 16 deletions

View File

@ -123,7 +123,7 @@
v-for="e in pickedEvaluations" v-for="e in pickedEvaluations"
v-bind:key="e.key" v-bind:key="e.key"
v-bind:evaluation="e" v-bind:evaluation="e"
v-bind:docId="this.docId"> v-bind:docAnchorId="this.docAnchorId">
</add-evaluation> </add-evaluation>
<!-- box to add new evaluation --> <!-- box to add new evaluation -->
@ -390,7 +390,7 @@ export default {
i18n, i18n,
data() { data() {
return { return {
docId: null, docAnchorId: null,
isExpanded: false, isExpanded: false,
editor: ClassicEditor, editor: ClassicEditor,
showAddObjective: false, showAddObjective: false,
@ -432,10 +432,10 @@ export default {
}, },
beforeMount() { beforeMount() {
const urlParams = new URLSearchParams(window.location.search); const urlParams = new URLSearchParams(window.location.search);
this.docId = urlParams.get('doc_id'); this.docAnchorId = urlParams.get('doc_id');
}, },
mounted() { mounted() {
this.scrollToElement(this.docId); this.scrollToElement(this.docAnchorId);
}, },
computed: { computed: {
...mapState([ ...mapState([
@ -591,8 +591,8 @@ export default {
} }
}) })
}, },
scrollToElement(docId) { scrollToElement(docAnchorId) {
const documentEl = document.getElementById(`document_${docId}`); const documentEl = document.getElementById(`document_${docAnchorId}`);
if (documentEl) { if (documentEl) {
documentEl.scrollIntoView({behavior: 'smooth'}); documentEl.scrollIntoView({behavior: 'smooth'});
} }

View File

@ -11,7 +11,7 @@
</div> </div>
<div> <div>
<form-evaluation ref="FormEvaluation" :key="evaluation.key" :evaluation="evaluation" :docId="docId"></form-evaluation> <form-evaluation ref="FormEvaluation" :key="evaluation.key" :evaluation="evaluation" :docAnchorId="docAnchorId"></form-evaluation>
<ul class="record_actions"> <ul class="record_actions">
<li v-if="evaluation.workflows_availables.length > 0"> <li v-if="evaluation.workflows_availables.length > 0">
@ -85,7 +85,7 @@ export default {
Modal, Modal,
ListWorkflowModal, ListWorkflowModal,
}, },
props: ['evaluation', 'docId'], props: ['evaluation', 'docAnchorId'],
i18n, i18n,
data() { data() {
return { return {
@ -95,9 +95,6 @@ export default {
} }
}; };
}, },
/* mounted() {
console.log('docId is here', this.docId)
},*/
computed: { computed: {
pickedEvaluations() { pickedEvaluations() {
return this.$store.state.evaluationsPicked; return this.$store.state.evaluationsPicked;

View File

@ -80,12 +80,13 @@
<div class="flex-table"> <div class="flex-table">
<div class="item-bloc" v-for="(d, i) in evaluation.documents" :key="d.id"> <div class="item-bloc" v-for="(d, i) in evaluation.documents" :key="d.id">
<div :id="`document_${d.id}`" class="item-row" :class="[parseInt(this.docId) === d.id ? 'bg-blink' : 'nothing']"> <div :id="`document_${d.id}`" class="item-row">
<div class="input-group input-group-lg mb-3 row"> <div class="input-group input-group-lg mb-3 row">
<label class="col-sm-3 col-form-label">Titre du document:</label> <label class="col-sm-3 col-form-label">Titre du document:</label>
<div class="col-sm-9"> <div class="col-sm-9">
<input <input
class="form-control document-title" class="form-control document-title"
:class="[parseInt(this.docAnchorId) === d.id ? 'bg-blink' : 'nothing']"
type="text" type="text"
:value="d.title" :value="d.title"
:id="d.id" :id="d.id"
@ -221,7 +222,7 @@ const i18n = {
export default { export default {
name: "FormEvaluation", name: "FormEvaluation",
props: ['evaluation', 'docId'], props: ['evaluation', 'docAnchorId'],
components: { components: {
ckeditor: CKEditor.component, ckeditor: CKEditor.component,
PickTemplate, PickTemplate,
@ -409,11 +410,12 @@ export default {
display: inline-block; display: inline-block;
border-radius: 5px; border-radius: 5px;
animation: blinkingBackground 2.2s infinite; animation: blinkingBackground 2.2s infinite;
animation-iteration-count: 3; animation-iteration-count: 2;
} }
@keyframes blinkingBackground{ @keyframes blinkingBackground{
0% { background-color: #fa8888;} 0% { background-color: #ed776d;}
50% { background-color: #ffffff;} 50% { background-color: #ffffff;}
100% { background-color: #fa8888;} 100% { background-color: #ed776d;}
} }
</style> </style>