do not fill doleance step with empty fields #2311

This commit is contained in:
Bachir Soussi Chiadmi 2023-10-02 16:33:10 +02:00
parent 980ae6e5a1
commit 8d7bbe2b68

View File

@ -934,6 +934,7 @@ export default {
// l'enquete // l'enquete
// //
// camenbert // camenbert
if (doleance.lenquete) {
let cam = new paper.Path({ let cam = new paper.Path({
strokeColor: '#fff', strokeColor: '#fff',
strokeWidth: 2, strokeWidth: 2,
@ -962,11 +963,14 @@ export default {
// locked: true // locked: true
// })); // }));
g.addChild(cam); g.addChild(cam);
}
// //
// probleme_initial_resolu // probleme_initial_resolu
// //
// camenbert // camenbert
if(doleance.probleme_initial_resolu === 0 || doleance.probleme_initial_resolu === 1){
let rescam = new paper.Path({ let rescam = new paper.Path({
strokeColor: '#fff', strokeColor: '#fff',
strokeWidth: 2, strokeWidth: 2,
@ -995,6 +999,8 @@ export default {
// justification: 'center' // justification: 'center'
// })); // }));
g.addChild(rescam) g.addChild(rescam)
}
// //
// MULTIPLE FIELDS // MULTIPLE FIELDS
@ -1063,6 +1069,7 @@ export default {
// POINTS CARDINAUX // POINTS CARDINAUX
// leprobleme // leprobleme
if (doleance.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 * this.scale, radius: 3 * this.scale,
@ -1076,8 +1083,11 @@ export default {
did: doleance.id, did: doleance.id,
field: 'leprobleme' field: 'leprobleme'
})); }));
}
// adresse de la doleance // adresse de la doleance
if (doleance.entite_addresse_doleance || doleance.aqui_addresse_doleance || doleance.comment_ennonce_doleance) {
g.addChild(new paper.Path.Circle({ g.addChild(new paper.Path.Circle({
center: [this.pos.x - r, this.pos.y], center: [this.pos.x - r, this.pos.y],
radius: 3 * this.scale, radius: 3 * this.scale,
@ -1091,8 +1101,11 @@ export default {
did: doleance.id, did: doleance.id,
field: 'adresse_de_la_doleance' field: 'adresse_de_la_doleance'
})); }));
}
// decision // decision
if (doleance.entites_decisionnaires || doleance.decision_formule) {
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 * this.scale, radius: 3 * this.scale,
@ -1106,8 +1119,10 @@ export default {
did: doleance.id, did: doleance.id,
field: 'decision' field: 'decision'
})); }));
}
// adresse_de_la_decision // adresse_de_la_decision
if (doleance.entite_adresse_application || doleance.aqui_adresse_decision || doleance.comment_formule_decision) {
g.addChild(new paper.Path.Circle({ g.addChild(new paper.Path.Circle({
center: [this.pos.x + r, this.pos.y], center: [this.pos.x + r, this.pos.y],
radius: 3 * this.scale, radius: 3 * this.scale,
@ -1121,6 +1136,7 @@ export default {
did: doleance.id, did: doleance.id,
field: 'adresse_de_la_decision' field: 'adresse_de_la_decision'
})); }));
}
return g; return g;