Compare commits
3 Commits
55b213af64
...
64d174dcfc
Author | SHA1 | Date | |
---|---|---|---|
64d174dcfc | |||
77ca3a85cf | |||
a33104e402 |
@ -1305,7 +1305,9 @@ div.add-cerclepo-btn,
|
||||
div.add-groupinteret-btn,
|
||||
div.add-adressedoleance-btn,
|
||||
div.add-receptiontraitement-btn,
|
||||
div.add-decision-btn{
|
||||
div.add-decision-btn,
|
||||
div.add-miseenoeuvre-btn,
|
||||
div.add-adressedecision-btn{
|
||||
@include add-btn();
|
||||
margin: 0 0 1em;
|
||||
height: 60px;
|
||||
|
@ -395,6 +395,13 @@ export default {
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'concernement.opened_doleance': {
|
||||
handler (n, o) {
|
||||
console.log(`${this.id} watch concernement.opened_doleance o, n`, o, n);
|
||||
this.focusOpenedDoleanceStep();
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
wait: {
|
||||
handler (n, o){
|
||||
// when we are reloading entites par exemple
|
||||
@ -2209,8 +2216,9 @@ export default {
|
||||
} else if(!this.doleance_transition) {
|
||||
this.concernement.doleances.forEach((d) => {
|
||||
this.paper_main_object.children.doleances.children[`doleance_${d.id}`].visible = d.id === this.concernement.opened_doleance.id;
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
// this.paper_main_object.children.doleance_icon.visible = false;
|
||||
@ -2252,6 +2260,44 @@ export default {
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
focusOpenedDoleanceStep(){
|
||||
console.log('focusOpenedDoleanceStep', this.concernement.opened_doleance);
|
||||
|
||||
if (this.concernement.has_doleance) {
|
||||
if (this.map_mode === "doleancer") {
|
||||
if (this.is_open) {
|
||||
// focus on opened doleance step
|
||||
if (this.concernement.opened_doleance.field) {
|
||||
let paper_doleance = this.paper_main_object.children.doleances.children[`doleance_${this.concernement.opened_doleance.id}`];
|
||||
console.log('paper_doleance', paper_doleance);
|
||||
paper_doleance.children.forEach((step) =>{
|
||||
// console.log('step.item_type', step.item_type);
|
||||
let active = false;
|
||||
if (step.field === this.concernement.opened_doleance.field) {
|
||||
if(typeof this.concernement.opened_doleance.field_index != 'undefined'){
|
||||
// we have an index, let find if we have the right step here
|
||||
if (this.concernement.opened_doleance.field_index === step.field_index) {
|
||||
active = true;
|
||||
}
|
||||
}else{
|
||||
// we do not have a field index, so it is a single step, so it is active no matter the index
|
||||
active = true
|
||||
}
|
||||
}
|
||||
|
||||
if (active) {
|
||||
// step.data.prevStrokeColor is for hover_elmt watch in MapConcernements.vue
|
||||
step.data.prevStrokeColor = step.strokeColor = "#01ffe2";
|
||||
} else {
|
||||
step.data.prevStrokeColor = step.strokeColor = "#fff";
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
initDoleanceTransition(from, to){
|
||||
if (!this.doleance_transition) {
|
||||
|
@ -67,6 +67,9 @@ export default {
|
||||
},
|
||||
receptionettraitment() {
|
||||
return this.doleance.reception_traitement[this.opened_dol.field_index];
|
||||
},
|
||||
miseenoeuvredecision() {
|
||||
return this.doleance.mise_en_oeuvre_decision[this.opened_dol.field_index];
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@ -200,6 +203,10 @@ export default {
|
||||
addDecision(e){
|
||||
this.setOpenedDoleanceField(this.cid, this.doleance.id, "decision");
|
||||
},
|
||||
// adresse de al decision
|
||||
addAdresseDecision(e){
|
||||
this.setOpenedDoleanceField(this.cid, this.doleance.id, "adresse_de_la_decision");
|
||||
},
|
||||
// groupe interet
|
||||
addgroupInteret(e){
|
||||
this.createCerclepoParagGeneric('groupes_interets', 'field_groupes', 'groupesinterets');
|
||||
@ -207,6 +214,9 @@ export default {
|
||||
addReceptionEtTraitement(e){
|
||||
this.createCerclepoParagGeneric('reception_et_traitement', 'field_receptions_et_traitements', 'reception_traitement');
|
||||
},
|
||||
addMiseEnOeuvre(e){
|
||||
this.createCerclepoParagGeneric('mise_en_oeuvre_decision', 'field_mise_en_oeuvre_decision', 'mise_en_oeuvre_decision');
|
||||
},
|
||||
createCerclepoParagGeneric(type, prt_field_name, obj_name){
|
||||
console.log('createCerclepoParagGeneric',type, prt_field_name, obj_name);
|
||||
this.reloading_concernements = true;
|
||||
@ -747,39 +757,145 @@ export default {
|
||||
<section
|
||||
v-if="opened_dol.field === 'mise_en_oeuvre_decision'"
|
||||
class="mise_en_oeuvre_decision">
|
||||
<span class="date">
|
||||
{{ doleance.mise_en_oeuvre_decision[opened_dol.field_index].date.start }}
|
||||
→
|
||||
{{ doleance.mise_en_oeuvre_decision[opened_dol.field_index].date.end }}
|
||||
</span>
|
||||
<h5>{{ ct_cercle_politique.field_mise_en_oeuvre_decision.label }}</h5>
|
||||
<span class="date">
|
||||
<!-- {{ doleance.mise_en_oeuvre_decision[opened_dol.field_index].date.start }}
|
||||
→
|
||||
{{ doleance.mise_en_oeuvre_decision[opened_dol.field_index].date.end }} -->
|
||||
<DateEditable
|
||||
:value="miseenoeuvredecision.date.start"
|
||||
:end_value="miseenoeuvredecision.date.end"
|
||||
class="miseenoeuvredecision-date"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
mode="range"
|
||||
:data="{
|
||||
entitytype: 'paragraph',
|
||||
bundle: 'mise_en_oeuvre_decision',
|
||||
id: miseenoeuvredecision.id,
|
||||
revision_id: miseenoeuvredecision.revision_id,
|
||||
field: {field_name: 'field_date_miseeoeuvre_decision'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
</span>
|
||||
<label for="entite_adresse_decision">{{ p_mise_en_oeuvre_decision.field_entite_adresse_decision.label }}</label>
|
||||
<p
|
||||
<!-- <p name="entite_adresse_decision" v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].entite_adresse_decision" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="entite_adresse_decision"
|
||||
v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].entite_adresse_decision" />
|
||||
:value="miseenoeuvredecision.entite_adressee_decision"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'paragraph',
|
||||
bundle: 'mise_en_oeuvre_decision',
|
||||
id: miseenoeuvredecision.id,
|
||||
revision_id: miseenoeuvredecision.revision_id,
|
||||
field: {field_name: 'field_entite_adresse_decision', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
<label for="formule_decision">{{ p_mise_en_oeuvre_decision.field_formule_decision.label }}</label>
|
||||
<p
|
||||
<!-- <p name="formule_decision" v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].formule_decision" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="formule_decision"
|
||||
v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].formule_decision" />
|
||||
:value="miseenoeuvredecision.formule_decision"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'paragraph',
|
||||
bundle: 'mise_en_oeuvre_decision',
|
||||
id: miseenoeuvredecision.id,
|
||||
revision_id: miseenoeuvredecision.revision_id,
|
||||
field: {field_name: 'field_formule_decision', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
<label for="entite_metenoeuvre_decisio">{{ p_mise_en_oeuvre_decision.field_entite_metenoeuvre_decisio.label }}</label>
|
||||
<p
|
||||
<!-- <p name="entite_metenoeuvre_decisio" v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].entite_metenoeuvre_decisio" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="entite_metenoeuvre_decisio"
|
||||
v-html="doleance.mise_en_oeuvre_decision[opened_dol.field_index].entite_metenoeuvre_decisio" />
|
||||
:value="miseenoeuvredecision.entite_metenoeuvre_decisio"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'paragraph',
|
||||
bundle: 'mise_en_oeuvre_decision',
|
||||
id: miseenoeuvredecision.id,
|
||||
revision_id: miseenoeuvredecision.revision_id,
|
||||
field: {field_name: 'field_entite_metenoeuvre_decisio', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
</section>
|
||||
|
||||
|
||||
<section
|
||||
v-if="opened_dol.field === 'adresse_de_la_decision'"
|
||||
class="adresse_de_la_decision">
|
||||
<span class="date">{{ doleance.date_adresse.start }}</span>
|
||||
<h5>Adresse de la decision à appliquer</h5>
|
||||
<!-- <span class="date">{{ doleance.date_adresse.start }}</span> -->
|
||||
<DateEditable
|
||||
:value="doleance.date_adresse.start"
|
||||
class="adressedecision-date"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'node',
|
||||
bundle: 'cercle_politique',
|
||||
id: doleance.id,
|
||||
field: {field_name: 'field_date_adresse_decision'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
|
||||
<label for="entite_adresse_application">{{ ct_cercle_politique.field_entite_adresse_application.label }}</label>
|
||||
<p name="entite_adresse_application" v-html="doleance.entite_adresse_application" />
|
||||
<!-- <p name="entite_adresse_application" v-html="doleance.entite_adresse_application" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="entite_adresse_application"
|
||||
:value="doleance.entite_adresse_doleance"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'node',
|
||||
bundle: 'cercle_politique',
|
||||
id: doleance.id,
|
||||
field: {field_name: 'field_entite_adresse_doleance', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
<label for="aqui_adresse_decision">{{ ct_cercle_politique.field_aqui_adresse_decision.label }}</label>
|
||||
<p name="aqui_adresse_decision" v-html="doleance.aqui_adresse_decision" />
|
||||
<!-- <p name="aqui_adresse_decision" v-html="doleance.aqui_adresse_decision" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="aqui_adresse_decision"
|
||||
:value="doleance.aqui_adresse_decision"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'node',
|
||||
bundle: 'cercle_politique',
|
||||
id: doleance.id,
|
||||
field: {field_name: 'field_aqui_adresse_decision', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
<label for="comment_formule_decision">{{ ct_cercle_politique.field_comment_formule_decision.label }}</label>
|
||||
<p name="comment_formule_decision" v-html="doleance.comment_formule_decision" />
|
||||
<!-- <p name="comment_formule_decision" v-html="doleance.comment_formule_decision" /> -->
|
||||
<ContentEditable
|
||||
tag="p"
|
||||
name="comment_formule_decision"
|
||||
:value="doleance.comment_formule_decision"
|
||||
:html="true"
|
||||
:class="{ ellipsed: headerreduced }"
|
||||
:contenteditable="opened_concernement.can_update"
|
||||
:data="{
|
||||
entitytype: 'node',
|
||||
bundle: 'cercle_politique',
|
||||
id: doleance.id,
|
||||
field: {field_name: 'field_comment_formule_decision', value:'value'}
|
||||
}"
|
||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||
</section>
|
||||
|
||||
<section
|
||||
@ -837,7 +953,18 @@ export default {
|
||||
|
||||
<template v-if="concernement.can_update">
|
||||
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'decision' || opened_concernement.opened_doleance.field === 'mise_en_oeuvre_decision'">
|
||||
<div
|
||||
v-if="!reloading_concernements"
|
||||
@click="addMiseEnOeuvre"
|
||||
class="add-miseenoeuvre-btn btn">
|
||||
<span>Ajouter une mise-en-œuvre de la décision</span>
|
||||
<svg-icon type="mdi" :path="mdiStickerPlusOutline_path"/>
|
||||
</div>
|
||||
<div v-else class="add-miseenoeuvre-btn btn">
|
||||
<div class="loading">Chargement</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'adresse_de_la_doleance' || opened_concernement.opened_doleance.field === 'reception_et_traitement'">
|
||||
<div
|
||||
@ -852,7 +979,6 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'lenquete' || opened_concernement.opened_doleance.field === 'groupesinterets'">
|
||||
<div
|
||||
v-if="!reloading_concernements"
|
||||
@ -866,15 +992,15 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'groupesinterets'">
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'mise_en_oeuvre_decision'">
|
||||
<div
|
||||
v-if="!reloading_concernements"
|
||||
@click="addAdresseDoleance"
|
||||
class="add-adressedoleance-btn btn">
|
||||
<span>Adresse de la doléance</span>
|
||||
@click="addAdresseDecision"
|
||||
class="add-adressedecision-btn btn">
|
||||
<span>Adresse de la décision à appliquer</span>
|
||||
<svg-icon type="mdi" :path="mdiStickerPlusOutline_path"/>
|
||||
</div>
|
||||
<div v-else class="add-adressedoleance-btn btn">
|
||||
<div v-else class="add-adressedecision-btn btn">
|
||||
<div class="loading">Chargement</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -892,6 +1018,19 @@ export default {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'groupesinterets'">
|
||||
<div
|
||||
v-if="!reloading_concernements"
|
||||
@click="addAdresseDoleance"
|
||||
class="add-adressedoleance-btn btn">
|
||||
<span>Adresse de la doléance</span>
|
||||
<svg-icon type="mdi" :path="mdiStickerPlusOutline_path"/>
|
||||
</div>
|
||||
<div v-else class="add-adressedoleance-btn btn">
|
||||
<div class="loading">Chargement</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="opened_concernement.opened_doleance.field === 'leprobleme' || opened_concernement.opened_doleance.field === 'lenquete'">
|
||||
<div v-if="!reloading_concernements"
|
||||
@click="addCerclePo"
|
||||
|
Loading…
x
Reference in New Issue
Block a user