doleancer: click on le problème to display it #2285 #2286

This commit is contained in:
Bachir Soussi Chiadmi 2023-09-29 11:40:29 +02:00
parent c94679017e
commit 9b357e6d6e
2 changed files with 40 additions and 34 deletions

View File

@ -1055,21 +1055,21 @@ export default {
// POINTS CARDINAUX // POINTS CARDINAUX
//
// // leprobleme // leprobleme
// g.addChild(new paper.Path.Circle({ g.addChild(new paper.Path.Circle({
// center: [this.pos.x, this.pos.y + r], center: [this.pos.x, this.pos.y + r],
// radius: 3, radius: 3 * this.scale,
// style: { style: {
// strokeColor: '#fff', strokeColor: '#fff',
// strokeWidth: 2, strokeWidth: 2,
// fillColor: "rgba(255, 255, 255, 0.4)", fillColor: "rgba(255, 255, 255, 0.9)",
// }, },
// item_type: 'doleance_step', item_type: 'doleance_step',
// item_id: `leprobleme`, item_id: `leprobleme`,
// did: doleance.id, did: doleance.id,
// field: 'leprobleme' field: 'leprobleme'
// })); }));
// adresse de la doleance // adresse de la doleance
g.addChild(new paper.Path.Circle({ g.addChild(new paper.Path.Circle({

View File

@ -8,8 +8,8 @@ import { CommonStore } from '@/stores/common'
import CartoucheLayout from '@components/layout/CartoucheLayout.vue'; import CartoucheLayout from '@components/layout/CartoucheLayout.vue';
import vSelect from 'vue-select'; // import vSelect from 'vue-select';
import 'vue-select/dist/vue-select.css'; // import 'vue-select/dist/vue-select.css';
export default { export default {
props: ['cid'], props: ['cid'],
@ -31,20 +31,20 @@ export default {
'p_reception_application_decision' 'p_reception_application_decision'
]), ]),
...mapState(CommonStore,['hover_elmt']), ...mapState(CommonStore,['hover_elmt']),
doleances_select_options () { // doleances_select_options () {
let os = []; // let os = [];
this.opened_concernement.doleances.forEach((doleance, index) => { // this.opened_concernement.doleances.forEach((doleance, index) => {
let o = { // let o = {
label: doleance.leprobleme, // label: doleance.leprobleme,
id: doleance.id // id: doleance.id
} // }
if (doleance.id === this.opened_concernement.opened_doleance.id) { // if (doleance.id === this.opened_concernement.opened_doleance.id) {
this.doleance_selected = o; // this.doleance_selected = o;
} // }
os.push(o); // os.push(o);
}) // })
return os; // return os;
}, // },
// doleances_select_value () { // doleances_select_value () {
// let value; // let value;
// this.opened_concernement.doleances.forEach((doleance, index) => { // this.opened_concernement.doleances.forEach((doleance, index) => {
@ -81,7 +81,7 @@ export default {
}, },
components: { components: {
CartoucheLayout, CartoucheLayout,
vSelect // vSelect
} }
} }
@ -99,7 +99,7 @@ export default {
<section <section
class="content-doleances"> class="content-doleances">
<label for="leprobleme">{{ ct_cercle_politique.field_le_probleme.label }}</label> <!-- <label for="leprobleme">{{ ct_cercle_politique.field_le_probleme.label }}</label>
<v-select <v-select
:options="doleances_select_options" :options="doleances_select_options"
item-value="id" item-value="id"
@ -108,9 +108,15 @@ export default {
:searchable="false" :searchable="false"
@option:selected="onDoleanceSelected" @option:selected="onDoleanceSelected"
> >
</v-select> </v-select> -->
<main v-if="opened_concernement.opened_doleance.id === doleance.id && opened_concernement.opened_doleance.field"> <main v-if="opened_concernement.opened_doleance.id === doleance.id && opened_concernement.opened_doleance.field">
<section
v-if="opened_concernement.opened_doleance.field === 'leprobleme'">
<h5>{{ ct_cercle_politique.field_le_probleme.label }}</h5>
<h4 name="leprobleme">{{ doleance.leprobleme }}</h4>
</section>
<section <section
v-if="opened_concernement.opened_doleance.field === 'lenquete'" v-if="opened_concernement.opened_doleance.field === 'lenquete'"
class="lenquete"> class="lenquete">