admin front create new doleance
This commit is contained in:
parent
1da22af863
commit
85f4100fe9
@ -721,7 +721,7 @@ div.loading{
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
}
|
}
|
||||||
section>div, p{
|
section>div:not(.btn), p{
|
||||||
// font-size: 1em;
|
// font-size: 1em;
|
||||||
// font-weight: 300;
|
// font-weight: 300;
|
||||||
// line-height: 1.40;
|
// line-height: 1.40;
|
||||||
@ -1329,3 +1329,8 @@ div.add-besoin-btn{
|
|||||||
div.add-ressource-btn{
|
div.add-ressource-btn{
|
||||||
@include add-btn();
|
@include add-btn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.add-cerclepo-btn{
|
||||||
|
@include add-btn();
|
||||||
|
margin: 0 0 1em;
|
||||||
|
}
|
@ -377,6 +377,24 @@ export default {
|
|||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
|
'concernement.doleances': {
|
||||||
|
handler (n, o) {
|
||||||
|
console.log(`${this.id} watch concernement.doleances o, n`, o, n);
|
||||||
|
if (this.is_open && this.map_mode === "doleancer") {
|
||||||
|
this.setPaperDoleances(true); // true for update=true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
|
'concernement.doleances.length': {
|
||||||
|
handler (n, o){
|
||||||
|
console.log(`${this.id} watch concernement.doleances.length o, n`, o, n);
|
||||||
|
if (this.is_open && this.map_mode === "doleancer" && o != null && n !== o) {
|
||||||
|
this.resetPaperContents();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
},
|
||||||
wait: {
|
wait: {
|
||||||
handler (n, o){
|
handler (n, o){
|
||||||
// when we are reloading entites par exemple
|
// when we are reloading entites par exemple
|
||||||
@ -915,9 +933,12 @@ export default {
|
|||||||
this.paper_main_object.addChild(this.setPaperAgissantes());
|
this.paper_main_object.addChild(this.setPaperAgissantes());
|
||||||
break;
|
break;
|
||||||
case 'doleancer':
|
case 'doleancer':
|
||||||
this.addNewPaperSymbolInstance('doleance_bg');
|
if (this.concernement.doleances.length) {
|
||||||
this.paper_main_object.addChild(this.setPaperDoleances());
|
this.addNewPaperSymbolInstance('doleance_bg');
|
||||||
|
this.paper_main_object.addChild(this.setPaperDoleances());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
this.paperContentsIsSet = true;
|
this.paperContentsIsSet = true;
|
||||||
}
|
}
|
||||||
@ -1659,23 +1680,55 @@ export default {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
setPaperDoleances(){
|
setPaperDoleances(update){
|
||||||
let g = new paper.Group({
|
console.log(`setPaperDoleances cid:${this.concernement.id}, update: ${update}`);
|
||||||
pivot: new paper.Point({x:0,y:0}),
|
let g;
|
||||||
name: `doleances`
|
if (update) {
|
||||||
});
|
g = this.paper_main_object.children['doleances'];
|
||||||
|
console.log('REUSING doleances group', g);
|
||||||
|
} else{
|
||||||
|
g = new paper.Group({
|
||||||
|
pivot: new paper.Point({x:0,y:0}),
|
||||||
|
name: `doleances`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!g) {
|
||||||
|
console.warn('no doleances group created nor found')
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.concernement.doleances.forEach((d) => {
|
this.concernement.doleances.forEach((d) => {
|
||||||
g.addChild(this.setPaperDoleanceSteps(d))
|
let doleance_group;
|
||||||
|
if (update) {
|
||||||
|
doleance_group = this.paper_main_object.children['doleances'][`doleance_${d.id}`];
|
||||||
|
if (doleance_group) {
|
||||||
|
this.setPaperDoleanceSteps(d, doleance_group);
|
||||||
|
}else{
|
||||||
|
g.addChild(this.setPaperDoleanceSteps(d));
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
g.addChild(this.setPaperDoleanceSteps(d));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return g;
|
return g;
|
||||||
},
|
},
|
||||||
setPaperDoleanceSteps(doleance){
|
setPaperDoleanceSteps(doleance, groupToUpdate){
|
||||||
let g = new paper.Group({
|
console.log(`setPaperDoleanceSteps doleance`, doleance);
|
||||||
pivot: new paper.Point({x:0,y:0}),
|
console.log(`setPaperDoleanceSteps groupToUpdate`, groupToUpdate);
|
||||||
name: `doleance_${doleance.id}`,
|
|
||||||
doleance_id: doleance.id,
|
let g;
|
||||||
visible: false
|
if (groupToUpdate) {
|
||||||
});
|
g = groupToUpdate;
|
||||||
|
g.removeChildren();
|
||||||
|
} else {
|
||||||
|
g = new paper.Group({
|
||||||
|
pivot: new paper.Point({x:0,y:0}),
|
||||||
|
name: `doleance_${doleance.id}`,
|
||||||
|
doleance_id: doleance.id,
|
||||||
|
visible: false
|
||||||
|
});
|
||||||
|
}
|
||||||
// let doleance = this.concernement.doleances[0];
|
// let doleance = this.concernement.doleances[0];
|
||||||
let all_fields = [
|
let all_fields = [
|
||||||
[
|
[
|
||||||
|
@ -1614,8 +1614,9 @@ export default {
|
|||||||
<li>
|
<li>
|
||||||
<a
|
<a
|
||||||
title="cercle politique" href="#doleancer" @click="setMapMode('doleancer')"
|
title="cercle politique" href="#doleancer" @click="setMapMode('doleancer')"
|
||||||
:class="{ disabled: opened_concernement && !opened_concernement.has_doleance, active: map_mode === 'doleancer'}"
|
:class="{ active: map_mode === 'doleancer'}"
|
||||||
>
|
>
|
||||||
|
<!-- disabled: opened_concernement && !opened_concernement.has_doleance, -->
|
||||||
<span class="icon doleancer"/> <span class="label"> cercle politique</span>
|
<span class="icon doleancer"/> <span class="label"> cercle politique</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
@ -5,11 +5,22 @@ import { ConcernementsStore } from '@stores/concernements'
|
|||||||
import { UserStore } from '@/stores/user'
|
import { UserStore } from '@/stores/user'
|
||||||
import { CommonStore } from '@/stores/common'
|
import { CommonStore } from '@/stores/common'
|
||||||
|
|
||||||
|
import REST from '@api/rest-axios'
|
||||||
|
|
||||||
|
// import { print } from 'graphql/language/printer'
|
||||||
|
// import gql from 'graphql-tag'
|
||||||
|
// import GQL from '@api/graphql-axios'
|
||||||
|
// import EntiteFields from '@api/gql/entite.fragment.gql'
|
||||||
|
|
||||||
|
|
||||||
import CartoucheLayout from '@components/layout/CartoucheLayout.vue';
|
import CartoucheLayout from '@components/layout/CartoucheLayout.vue';
|
||||||
|
|
||||||
import SvgIcon from '@jamescoyle/vue-icon';
|
import SvgIcon from '@jamescoyle/vue-icon';
|
||||||
import { mdiArrowLeft } from '@mdi/js';
|
import { mdiArrowLeft } from '@mdi/js';
|
||||||
import { mdiArrowRight } from '@mdi/js';
|
import { mdiArrowRight } from '@mdi/js';
|
||||||
|
import { mdiStickerPlusOutline } from '@mdi/js';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import ContentEditable from '@components/editable/ContentEditable.vue';
|
import ContentEditable from '@components/editable/ContentEditable.vue';
|
||||||
// import CheckboxEditable from '@components/editable/CheckboxEditable.vue';
|
// import CheckboxEditable from '@components/editable/CheckboxEditable.vue';
|
||||||
@ -24,7 +35,9 @@ export default {
|
|||||||
doleance_selected: null,
|
doleance_selected: null,
|
||||||
doleance_index: null,
|
doleance_index: null,
|
||||||
arrowleft_path: mdiArrowLeft,
|
arrowleft_path: mdiArrowLeft,
|
||||||
arrowright_path: mdiArrowRight
|
arrowright_path: mdiArrowRight,
|
||||||
|
mdiStickerPlusOutline_path: mdiStickerPlusOutline,
|
||||||
|
reloading_concernements: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -39,6 +52,10 @@ export default {
|
|||||||
'p_reception_application_decision',
|
'p_reception_application_decision',
|
||||||
'reloadConcernementCerclePol'
|
'reloadConcernementCerclePol'
|
||||||
]),
|
]),
|
||||||
|
...mapState(UserStore,['name',
|
||||||
|
'csrf_token',
|
||||||
|
'isloggedin',
|
||||||
|
'user_entites']),
|
||||||
...mapState(CommonStore,['hover_elmt'])
|
...mapState(CommonStore,['hover_elmt'])
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@ -53,15 +70,40 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.doleance_index > 0)
|
if(this.concernement && this.concernement.doleances.length){
|
||||||
this.$refs.prevDoleanceBTN.classList.add('visible');
|
if (this.doleance_index > 0)
|
||||||
|
this.$refs.prevDoleanceBTN.classList.add('visible');
|
||||||
|
|
||||||
if (this.doleance_index < this.concernement.doleances.length-1)
|
if (this.doleance_index < this.concernement.doleances.length-1)
|
||||||
this.$refs.nextDoleanceBTN.classList.add('visible');
|
this.$refs.nextDoleanceBTN.classList.add('visible');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
unmounted() {
|
unmounted() {
|
||||||
this.setOpenedDoleance(parseInt(this.cid), this.concernement.doleances[0].id);
|
if(this.concernement && this.concernement.doleances.length){
|
||||||
|
this.setOpenedDoleance(parseInt(this.cid), this.concernement.doleances[0].id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
opened_concernement: {
|
||||||
|
handler (n, o) {
|
||||||
|
console.log(`${this.cid} watch opened_concernement o, n`, o, n);
|
||||||
|
if (!n) { // if there is no opened concernement
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.concernement = this.concernementsByID[this.cid];
|
||||||
|
console.log(`Doleancer content created, id: ${this.cid}, doleances:`,this.concernement.doleances);
|
||||||
|
this.concernement.doleances.forEach((doleance, index) => {
|
||||||
|
if (doleance.id === this.concernement.opened_doleance.id) {
|
||||||
|
this.doleance = doleance;
|
||||||
|
this.doleance_index = index;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
deep: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions(ConcernementsStore,['setOpenedDoleance']),
|
...mapActions(ConcernementsStore,['setOpenedDoleance']),
|
||||||
@ -92,6 +134,88 @@ export default {
|
|||||||
that.$refs.nextDoleanceBTN.classList.toggle('visible', that.doleance_index < that.concernement.doleances.length-1);
|
that.$refs.nextDoleanceBTN.classList.toggle('visible', that.doleance_index < that.concernement.doleances.length-1);
|
||||||
};
|
};
|
||||||
}(this)), 2000)
|
}(this)), 2000)
|
||||||
|
},
|
||||||
|
addCerclePo(e){
|
||||||
|
console.log('add cerclepo');
|
||||||
|
this.reloading_concernements = true;
|
||||||
|
// 1 create entite node
|
||||||
|
this.createCerclepoNode()
|
||||||
|
.then((cerclepo) => {
|
||||||
|
console.log('createCerclepoNode then node', cerclepo);
|
||||||
|
// 2 record on concernement field_entites
|
||||||
|
this.recordConcernementDoleancerField(cerclepo)
|
||||||
|
.then((concernement) => {
|
||||||
|
console.log('concernement', concernement);
|
||||||
|
// reload the map item
|
||||||
|
this.reloadConcernementCerclePol(concernement.nid[0].value)
|
||||||
|
.then(() => {
|
||||||
|
this.reloading_concernements = false;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
|
createCerclepoNode(){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 1 create entite node
|
||||||
|
const params_node_cerclepo = {
|
||||||
|
type: 'cercle_politique',
|
||||||
|
title: [{value:'Titre à personaliser'}]
|
||||||
|
};
|
||||||
|
|
||||||
|
const configs = {
|
||||||
|
headers: {'X-CSRF-Token': this.csrf_token}
|
||||||
|
};
|
||||||
|
|
||||||
|
REST.post(`/node?_format=json`, params_node_cerclepo, configs)
|
||||||
|
.then(({ data }) => {
|
||||||
|
console.log('REST post new node cercle_politique', data);
|
||||||
|
resolve(data)
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.warn(`Issue with post new node cercle_politique`, error)
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
recordConcernementDoleancerField(node){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
// 2 record concernement field_doleancer
|
||||||
|
|
||||||
|
// get all the field_entite values, we don't want to ersae everything
|
||||||
|
let doleances = [];
|
||||||
|
this.concernement.doleances.forEach((doleance) =>{
|
||||||
|
doleances.push({
|
||||||
|
target_id: doleance.id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
// add the new field value
|
||||||
|
doleances.push({
|
||||||
|
target_id: node.nid[0].value
|
||||||
|
})
|
||||||
|
console.log('doleances', doleances);
|
||||||
|
|
||||||
|
const params_node = {
|
||||||
|
type: 'concernement',
|
||||||
|
nid: [{value: this.cid}],
|
||||||
|
'field_doleancer': doleances
|
||||||
|
};
|
||||||
|
|
||||||
|
const configs = {
|
||||||
|
headers: {'X-CSRF-Token': this.csrf_token}
|
||||||
|
};
|
||||||
|
|
||||||
|
REST.patch(`/node/${this.cid}?_format=json`, params_node, configs)
|
||||||
|
.then(({ data }) => {
|
||||||
|
console.log('REST patch node new field_doleancer', data)
|
||||||
|
resolve(data)
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.warn(`Issue with patch node field_doleancer`, error)
|
||||||
|
reject(error)
|
||||||
|
})
|
||||||
|
// resolve('test')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -115,216 +239,237 @@ export default {
|
|||||||
|
|
||||||
<template v-slot:main>
|
<template v-slot:main>
|
||||||
<section
|
<section
|
||||||
class="content-doleances">
|
class="content-doleances">
|
||||||
|
|
||||||
<template v-if="opened_concernement.opened_doleance.id === doleance.id">
|
<template v-if="opened_concernement.opened_doleance && opened_concernement.opened_doleance.id === doleance.id">
|
||||||
<h3 class="doleance-title">{{ doleance.title }}</h3>
|
<ContentEditable
|
||||||
<section
|
tag="h3"
|
||||||
v-if="opened_concernement.opened_doleance.field === 'leprobleme' || !opened_concernement.opened_doleance.field">
|
:value="doleance.title"
|
||||||
<span class="date">{{ doleance.date_leprobleme.start }}</span>
|
class="doleance-title"
|
||||||
<h5>{{ ct_cercle_politique.field_le_probleme.label }}</h5>
|
:contenteditable="opened_concernement.can_update"
|
||||||
<!-- <h4 name="leprobleme">{{ doleance.leprobleme }}</h4> -->
|
:data="{
|
||||||
<ContentEditable
|
entitytype: 'node',
|
||||||
tag="h4"
|
bundle: 'cercle_politique',
|
||||||
:value="doleance.leprobleme"
|
id: doleance.id,
|
||||||
class="doleance-leprobleme"
|
field: {field_name: 'title', value:'value'}
|
||||||
:contenteditable="opened_concernement.can_update"
|
}"
|
||||||
:data="{
|
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||||
entitytype: 'node',
|
<section
|
||||||
bundle: 'cercle_politique',
|
v-if="opened_concernement.opened_doleance.field === 'leprobleme' || !opened_concernement.opened_doleance.field">
|
||||||
id: doleance.id,
|
<span class="date">{{ doleance.date_leprobleme.start }}</span>
|
||||||
field: {field_name: 'field_le_probleme', value:'value'}
|
<h5>{{ ct_cercle_politique.field_le_probleme.label }}</h5>
|
||||||
}"
|
<ContentEditable
|
||||||
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
tag="h4"
|
||||||
|
:value="doleance.leprobleme"
|
||||||
|
class="doleance-leprobleme"
|
||||||
|
:contenteditable="opened_concernement.can_update"
|
||||||
|
:data="{
|
||||||
|
entitytype: 'node',
|
||||||
|
bundle: 'cercle_politique',
|
||||||
|
id: doleance.id,
|
||||||
|
field: {field_name: 'field_le_probleme', value:'value'}
|
||||||
|
}"
|
||||||
|
v-on:updated="reloadConcernementCerclePol(cid)"/>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section
|
||||||
|
v-if="opened_concernement.opened_doleance.field === 'lenquete'"
|
||||||
|
class="lenquete">
|
||||||
|
<h5>{{ ct_cercle_politique.field_enquete_terraindevie.label }}</h5>
|
||||||
|
<!-- <label for="lenquete">{{ ct_cercle_politique.field_enquete_terraindevie.label }}</label> -->
|
||||||
|
<h4 name="lenquete">{{ doleance.lenquete }}</h4>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section
|
||||||
|
v-if="opened_concernement.opened_doleance.field === 'groupesinterets'"
|
||||||
|
class="groupesinterets">
|
||||||
|
<span class="date">
|
||||||
|
{{ doleance.groupesinterets[opened_concernement.opened_doleance.field_index].date.start }}
|
||||||
|
→
|
||||||
|
{{ doleance.groupesinterets[opened_concernement.opened_doleance.field_index].date.end }}
|
||||||
|
</span>
|
||||||
|
<h5>Construction de groupes d'intérets avec qui composer la doléance</h5>
|
||||||
|
<section>
|
||||||
|
<label for="groupe">{{ p_groupes_interets.field_groupe_interets.label }}</label>
|
||||||
|
<p
|
||||||
|
name="groupe"
|
||||||
|
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].groupe_interets" />
|
||||||
|
|
||||||
|
<label for="accorder">{{ p_groupes_interets.field_accorder_interets.label }}</label>
|
||||||
|
<p
|
||||||
|
name="accorder"
|
||||||
|
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].accorder_interets" />
|
||||||
|
|
||||||
|
<label for="formuler">{{ p_groupes_interets.field_formuler.label }}</label>
|
||||||
|
<p
|
||||||
|
name="formuler"
|
||||||
|
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].formuler" />
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-if="opened_concernement.opened_doleance.field === 'lenquete'"
|
v-if="opened_concernement.opened_doleance.field === 'adresse_de_la_doleance'"
|
||||||
class="lenquete">
|
class="adresse">
|
||||||
<h5>{{ ct_cercle_politique.field_enquete_terraindevie.label }}</h5>
|
<span class="date">{{ doleance.date_adresse.start }}</span>
|
||||||
<!-- <label for="lenquete">{{ ct_cercle_politique.field_enquete_terraindevie.label }}</label> -->
|
|
||||||
<h4 name="lenquete">{{ doleance.lenquete }}</h4>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
<h5>Adresse de la doléance</h5>
|
||||||
v-if="opened_concernement.opened_doleance.field === 'groupesinterets'"
|
|
||||||
class="groupesinterets">
|
|
||||||
<span class="date">
|
|
||||||
{{ doleance.groupesinterets[opened_concernement.opened_doleance.field_index].date.start }}
|
|
||||||
→
|
|
||||||
{{ doleance.groupesinterets[opened_concernement.opened_doleance.field_index].date.end }}
|
|
||||||
</span>
|
|
||||||
<h5>Construction de groupes d'intérets avec qui composer la doléance</h5>
|
|
||||||
<section>
|
|
||||||
<label for="groupe">{{ p_groupes_interets.field_groupe_interets.label }}</label>
|
|
||||||
<p
|
|
||||||
name="groupe"
|
|
||||||
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].groupe_interets" />
|
|
||||||
|
|
||||||
<label for="accorder">{{ p_groupes_interets.field_accorder_interets.label }}</label>
|
<label for="entite_addresse_doleance">{{ ct_cercle_politique.field_entite_adresse_doleance.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="accorder"
|
name="entite_addresse_doleance"
|
||||||
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].accorder_interets" />
|
v-html="doleance.entite_addresse_doleance" />
|
||||||
|
|
||||||
<label for="formuler">{{ p_groupes_interets.field_formuler.label }}</label>
|
<label for="comment_ennonce_doleance">{{ ct_cercle_politique.field_comment_enonce_doleance.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="formuler"
|
name="comment_ennonce_doleance"
|
||||||
v-html="doleance.groupesinterets[opened_concernement.opened_doleance.field_index].formuler" />
|
v-html="doleance.comment_ennonce_doleance" />
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
<label for="aqui_addresse_doleance">{{ ct_cercle_politique.field_a_qui_adresse_doleance.label }}</label>
|
||||||
v-if="opened_concernement.opened_doleance.field === 'adresse_de_la_doleance'"
|
<p
|
||||||
class="adresse">
|
name="aqui_addresse_doleance"
|
||||||
<span class="date">{{ doleance.date_adresse.start }}</span>
|
v-html="doleance.aqui_addresse_doleance" />
|
||||||
|
</section>
|
||||||
|
|
||||||
<h5>Adresse de la doléance</h5>
|
<section
|
||||||
|
v-if="opened_concernement.opened_doleance.field === 'reception_traitement'"
|
||||||
|
class="reception_traitement">
|
||||||
|
<span class="date">
|
||||||
|
{{ doleance.reception_traitement[opened_concernement.opened_doleance.field_index].date.start }}
|
||||||
|
→
|
||||||
|
{{ doleance.reception_traitement[opened_concernement.opened_doleance.field_index].date.end }}
|
||||||
|
</span>
|
||||||
|
<h5>Reception et traitement de la doléance</h5>
|
||||||
|
<label for="entite_adressee">{{ p_reception_et_traitement.field_entite_adressee.label }}</label>
|
||||||
|
<p
|
||||||
|
name="entite_adressee"
|
||||||
|
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].entite_adressee" />
|
||||||
|
<label for="doleance_formulee">{{ p_reception_et_traitement.field_doleance_formulee.label }}</label>
|
||||||
|
<p
|
||||||
|
name="doleance_formulee"
|
||||||
|
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].doleance_formulee" />
|
||||||
|
<label for="traite_doleance">{{ p_reception_et_traitement.field_traite_doleance.label }}</label>
|
||||||
|
<p
|
||||||
|
name="traite_doleance"
|
||||||
|
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].traite_doleance" />
|
||||||
|
<label for="entite_recoit_doleance">{{ p_reception_et_traitement.field_entite_recoit_doleance.label }}</label>
|
||||||
|
<p
|
||||||
|
name="entite_recoit_doleance"
|
||||||
|
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].entite_recoit_doleance" />
|
||||||
|
</section>
|
||||||
|
|
||||||
<label for="entite_addresse_doleance">{{ ct_cercle_politique.field_entite_adresse_doleance.label }}</label>
|
<section
|
||||||
<p
|
v-if="opened_concernement.opened_doleance.field === 'decision'"
|
||||||
name="entite_addresse_doleance"
|
class="decision">
|
||||||
v-html="doleance.entite_addresse_doleance" />
|
<span class="date">{{ doleance.date_decision.start }}</span>
|
||||||
|
|
||||||
<label for="comment_ennonce_doleance">{{ ct_cercle_politique.field_comment_enonce_doleance.label }}</label>
|
<h5>Décision</h5>
|
||||||
<p
|
<label for="entites_decisionnaires">{{ ct_cercle_politique.field_entites_decisionnaires.label }}</label>
|
||||||
name="comment_ennonce_doleance"
|
<p name="entites_decisionnaires" v-html="doleance.entites_decisionnaires" />
|
||||||
v-html="doleance.comment_ennonce_doleance" />
|
<label for="decision_formule">{{ ct_cercle_politique.field_decision_formulee.label }}</label>
|
||||||
|
<p name="decision_formule" v-html="doleance.decision_formule" />
|
||||||
|
</section>
|
||||||
|
|
||||||
<label for="aqui_addresse_doleance">{{ ct_cercle_politique.field_a_qui_adresse_doleance.label }}</label>
|
<section
|
||||||
<p
|
v-if="opened_concernement.opened_doleance.field === 'mise_en_oeuvre_decision'"
|
||||||
name="aqui_addresse_doleance"
|
class="mise_en_oeuvre_decision">
|
||||||
v-html="doleance.aqui_addresse_doleance" />
|
<span class="date">
|
||||||
</section>
|
{{ doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].date.start }}
|
||||||
|
→
|
||||||
<section
|
{{ doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].date.end }}
|
||||||
v-if="opened_concernement.opened_doleance.field === 'reception_traitement'"
|
</span>
|
||||||
class="reception_traitement">
|
<h5>{{ ct_cercle_politique.field_mise_en_oeuvre_decision.label }}</h5>
|
||||||
<span class="date">
|
<label for="entite_adresse_decision">{{ p_mise_en_oeuvre_decision.field_entite_adresse_decision.label }}</label>
|
||||||
{{ doleance.reception_traitement[opened_concernement.opened_doleance.field_index].date.start }}
|
<p
|
||||||
→
|
name="entite_adresse_decision"
|
||||||
{{ doleance.reception_traitement[opened_concernement.opened_doleance.field_index].date.end }}
|
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].entite_adresse_decision" />
|
||||||
</span>
|
<label for="formule_decision">{{ p_mise_en_oeuvre_decision.field_formule_decision.label }}</label>
|
||||||
<h5>Reception et traitement de la doléance</h5>
|
<p
|
||||||
<label for="entite_adressee">{{ p_reception_et_traitement.field_entite_adressee.label }}</label>
|
name="formule_decision"
|
||||||
<p
|
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].formule_decision" />
|
||||||
name="entite_adressee"
|
<label for="entite_metenoeuvre_decisio">{{ p_mise_en_oeuvre_decision.field_entite_metenoeuvre_decisio.label }}</label>
|
||||||
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].entite_adressee" />
|
<p
|
||||||
<label for="doleance_formulee">{{ p_reception_et_traitement.field_doleance_formulee.label }}</label>
|
name="entite_metenoeuvre_decisio"
|
||||||
<p
|
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].entite_metenoeuvre_decisio" />
|
||||||
name="doleance_formulee"
|
</section>
|
||||||
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].doleance_formulee" />
|
|
||||||
<label for="traite_doleance">{{ p_reception_et_traitement.field_traite_doleance.label }}</label>
|
|
||||||
<p
|
|
||||||
name="traite_doleance"
|
|
||||||
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].traite_doleance" />
|
|
||||||
<label for="entite_recoit_doleance">{{ p_reception_et_traitement.field_entite_recoit_doleance.label }}</label>
|
|
||||||
<p
|
|
||||||
name="entite_recoit_doleance"
|
|
||||||
v-html="doleance.reception_traitement[opened_concernement.opened_doleance.field_index].entite_recoit_doleance" />
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
|
||||||
v-if="opened_concernement.opened_doleance.field === 'decision'"
|
|
||||||
class="decision">
|
|
||||||
<span class="date">{{ doleance.date_decision.start }}</span>
|
|
||||||
|
|
||||||
<h5>Décision</h5>
|
|
||||||
<label for="entites_decisionnaires">{{ ct_cercle_politique.field_entites_decisionnaires.label }}</label>
|
|
||||||
<p name="entites_decisionnaires" v-html="doleance.entites_decisionnaires" />
|
|
||||||
<label for="decision_formule">{{ ct_cercle_politique.field_decision_formulee.label }}</label>
|
|
||||||
<p name="decision_formule" v-html="doleance.decision_formule" />
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section
|
|
||||||
v-if="opened_concernement.opened_doleance.field === 'mise_en_oeuvre_decision'"
|
|
||||||
class="mise_en_oeuvre_decision">
|
|
||||||
<span class="date">
|
|
||||||
{{ doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].date.start }}
|
|
||||||
→
|
|
||||||
{{ doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].date.end }}
|
|
||||||
</span>
|
|
||||||
<h5>{{ ct_cercle_politique.field_mise_en_oeuvre_decision.label }}</h5>
|
|
||||||
<label for="entite_adresse_decision">{{ p_mise_en_oeuvre_decision.field_entite_adresse_decision.label }}</label>
|
|
||||||
<p
|
|
||||||
name="entite_adresse_decision"
|
|
||||||
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].entite_adresse_decision" />
|
|
||||||
<label for="formule_decision">{{ p_mise_en_oeuvre_decision.field_formule_decision.label }}</label>
|
|
||||||
<p
|
|
||||||
name="formule_decision"
|
|
||||||
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].formule_decision" />
|
|
||||||
<label for="entite_metenoeuvre_decisio">{{ p_mise_en_oeuvre_decision.field_entite_metenoeuvre_decisio.label }}</label>
|
|
||||||
<p
|
|
||||||
name="entite_metenoeuvre_decisio"
|
|
||||||
v-html="doleance.mise_en_oeuvre_decision[opened_concernement.opened_doleance.field_index].entite_metenoeuvre_decisio" />
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-if="opened_concernement.opened_doleance.field === 'adresse_de_la_decision'"
|
v-if="opened_concernement.opened_doleance.field === 'adresse_de_la_decision'"
|
||||||
class="adresse_de_la_decision">
|
class="adresse_de_la_decision">
|
||||||
<span class="date">{{ doleance.date_adresse.start }}</span>
|
<span class="date">{{ doleance.date_adresse.start }}</span>
|
||||||
<h5>Adresse de la decision à appliquer</h5>
|
<h5>Adresse de la decision à appliquer</h5>
|
||||||
|
|
||||||
<label for="entite_adresse_application">{{ ct_cercle_politique.field_entite_adresse_application.label }}</label>
|
<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" />
|
||||||
<label for="aqui_adresse_decision">{{ ct_cercle_politique.field_aqui_adresse_decision.label }}</label>
|
<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" />
|
||||||
<label for="comment_formule_decision">{{ ct_cercle_politique.field_comment_formule_decision.label }}</label>
|
<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" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-if="opened_concernement.opened_doleance.field === 'receptions_et_applications'"
|
v-if="opened_concernement.opened_doleance.field === 'receptions_et_applications'"
|
||||||
class="receptions_et_applications">
|
class="receptions_et_applications">
|
||||||
<span class="date">
|
<span class="date">
|
||||||
{{ doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].date.start }}
|
{{ doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].date.start }}
|
||||||
→
|
→
|
||||||
{{ doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].date.end }}
|
{{ doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].date.end }}
|
||||||
</span>
|
</span>
|
||||||
<h5>{{ ct_cercle_politique.field_receptions_et_applications.label }}</h5>
|
<h5>{{ ct_cercle_politique.field_receptions_et_applications.label }}</h5>
|
||||||
|
|
||||||
<label for="applique_decision">{{ p_reception_application_decision.field_applique_decision.label }}</label>
|
<label for="applique_decision">{{ p_reception_application_decision.field_applique_decision.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="applique_decision"
|
name="applique_decision"
|
||||||
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].applique_decision" />
|
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].applique_decision" />
|
||||||
|
|
||||||
<label for="formule_decision_applic">{{ p_reception_application_decision.field_formule_decision_applic.label }}</label>
|
<label for="formule_decision_applic">{{ p_reception_application_decision.field_formule_decision_applic.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="formule_decision_applic"
|
name="formule_decision_applic"
|
||||||
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].formule_decision_applic" />
|
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].formule_decision_applic" />
|
||||||
|
|
||||||
<label for="entite_recoit_decision">{{ p_reception_application_decision.field_entite_recoit_decision.label }}</label>
|
<label for="entite_recoit_decision">{{ p_reception_application_decision.field_entite_recoit_decision.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="entite_recoit_decision"
|
name="entite_recoit_decision"
|
||||||
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].entite_recoit_decision" />
|
v-html="doleance.receptions_et_applications[opened_concernement.opened_doleance.field_index].entite_recoit_decision" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section
|
<section
|
||||||
v-if="opened_concernement.opened_doleance.field === 'probleme_initial_resolu'"
|
v-if="opened_concernement.opened_doleance.field === 'probleme_initial_resolu'"
|
||||||
class="probleme_initial_resolu">
|
class="probleme_initial_resolu">
|
||||||
|
|
||||||
<h5>Réussite / échec / reprise du cercle politique</h5>
|
<h5>Réussite / échec / reprise du cercle politique</h5>
|
||||||
|
|
||||||
<label for="probleme_initial_resolu">{{ ct_cercle_politique.field_probleme_initial_resolu.label }}</label>
|
<label for="probleme_initial_resolu">{{ ct_cercle_politique.field_probleme_initial_resolu.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="probleme_initial_resolu"
|
name="probleme_initial_resolu"
|
||||||
v-html="doleance.probleme_initial_resolu" />
|
v-html="doleance.probleme_initial_resolu" />
|
||||||
|
|
||||||
<label for="oui_nouvelle_situation">{{ ct_cercle_politique.field_oui_nouvelle_situation.label }}</label>
|
<label for="oui_nouvelle_situation">{{ ct_cercle_politique.field_oui_nouvelle_situation.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="oui_nouvelle_situation"
|
name="oui_nouvelle_situation"
|
||||||
v-html="doleance.oui_nouvelle_situation" />
|
v-html="doleance.oui_nouvelle_situation" />
|
||||||
|
|
||||||
<label for="non_adresse_doleance">{{ ct_cercle_politique.field_non_adresse_doleance.label }}</label>
|
<label for="non_adresse_doleance">{{ ct_cercle_politique.field_non_adresse_doleance.label }}</label>
|
||||||
<p
|
<p
|
||||||
name="non_adresse_doleance"
|
name="non_adresse_doleance"
|
||||||
v-html="doleance.non_adresse_doleance" />
|
v-html="doleance.non_adresse_doleance" />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
|
<template v-if="concernement.can_update">
|
||||||
|
<div v-if="!reloading_concernements" @click="addCerclePo" class="add-cerclepo-btn btn">
|
||||||
|
<span>Ajouter un crecle politique</span>
|
||||||
|
<svg-icon type="mdi" :path="mdiStickerPlusOutline_path"/>
|
||||||
|
</div>
|
||||||
|
<div v-else class="add-cerclepo-btn btn">
|
||||||
|
<div class="loading">Chargement</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<!-- <vue-plyr>
|
<!-- <vue-plyr>
|
||||||
<div class="plyr__video-embed"> -->
|
<div class="plyr__video-embed"> -->
|
||||||
<iframe
|
<iframe
|
||||||
|
@ -308,7 +308,7 @@ export default {
|
|||||||
resolve(data)
|
resolve(data)
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.warn(`Issue with post new paragraph source`, error)
|
console.warn(`Issue with post new node cercle_politique`, error)
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -637,6 +637,19 @@ export const ConcernementsStore = defineStore({
|
|||||||
let tmp_conc = this.concernementsByID[concernement.id];
|
let tmp_conc = this.concernementsByID[concernement.id];
|
||||||
// merge old concernement entites with new once
|
// merge old concernement entites with new once
|
||||||
_assign(tmp_conc.doleances, concernement.doleances);
|
_assign(tmp_conc.doleances, concernement.doleances);
|
||||||
|
|
||||||
|
// redefine opened doleance if needed
|
||||||
|
tmp_conc.has_doleance = tmp_conc.doleances.length ? true : false;
|
||||||
|
if (tmp_conc.has_doleance) {
|
||||||
|
// console.log('concernement has doleance', tmp_conc.doleances);
|
||||||
|
if (!tmp_conc.opened_doleance) {
|
||||||
|
tmp_conc.opened_doleance = {
|
||||||
|
id: tmp_conc.doleances[0].id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// resolve
|
||||||
resolve(concernement);
|
resolve(concernement);
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user