@amsom-habitat/cresol 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -46
- package/dist/cresol.js +966 -813
- package/dist/cresol.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cresol.js
CHANGED
|
@@ -1,46 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
1
|
+
import { library as e } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
+
import { faBriefcase as t, faBuilding as n, faBuildingShield as r, faCheck as i, faChevronLeft as a, faChevronRight as o, faCircleExclamation as s, faCircleInfo as c, faCircleQuestion as l, faDungeon as u, faFileSignature as d, faHandsHolding as f, faHourglass as p, faHouse as ee, faInfo as m, faLayerGroup as h, faLocationDot as te, faMagnifyingGlass as ne, faPersonShelter as re, faSquareParking as ie, faStore as ae, faTag as oe, faUser as se, faUserGraduate as ce, faXmark as le } from "@fortawesome/free-solid-svg-icons";
|
|
3
|
+
import { AmsomModal as ue, AmsomOverlay as g } from "@amsom-habitat/ui";
|
|
4
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as C, createTextVNode as w, createVNode as T, guardReactiveProps as E, inject as de, mergeProps as fe, normalizeClass as D, normalizeProps as O, openBlock as k, provide as pe, reactive as A, ref as j, renderList as M, renderSlot as N, resolveComponent as P, toDisplayString as F, toHandlers as me, toRef as I, unref as L, vShow as he, withCtx as R, withDirectives as ge } from "vue";
|
|
5
|
+
import { AmsomNavTabsHorizontal as _e } from "@amsom-habitat/nav-tabs";
|
|
6
|
+
import ve from "@amsom-habitat/horizontal-stepper";
|
|
7
|
+
import { AmsomAutocomplete as z } from "@amsom-habitat/amsom-autocomplete";
|
|
8
|
+
import ye from "@amsom-habitat/axios-overlay";
|
|
9
|
+
import B from "@amsom-habitat/user-manager";
|
|
10
|
+
import { AmsomTextarea as be } from "@amsom-habitat/amsom-textarea";
|
|
11
|
+
import { AmsomUploadFile as xe } from "@amsom-habitat/file-manager";
|
|
12
|
+
//#region src/icons.js
|
|
13
|
+
e.add(t, n, r, i, a, o, s, c, l, u, d, f, p, ee, m, h, te, ne, re, ie, ae, oe, se, ce, le);
|
|
14
|
+
//#endregion
|
|
11
15
|
//#region src/utils/provenanceContact.js
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
id: "G",
|
|
25
|
-
libelle: "Gardien",
|
|
26
|
-
icon: "user-shield"
|
|
16
|
+
var V = {
|
|
17
|
+
T: "phone",
|
|
18
|
+
M: "envelope",
|
|
19
|
+
G: "user-shield",
|
|
20
|
+
V: "building",
|
|
21
|
+
IP: "exclamation-triangle",
|
|
22
|
+
C: "envelope-open"
|
|
23
|
+
}, Se = "comment-dots", Ce = (e) => V[e] ?? "comment-dots", we = Object.keys(V), Te = "T", H = {
|
|
24
|
+
locataire: {
|
|
25
|
+
libelle: "Locataire",
|
|
26
|
+
icon: "house-user",
|
|
27
|
+
couleur: "primary"
|
|
27
28
|
},
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
demandeur: {
|
|
30
|
+
libelle: "Demandeur",
|
|
31
|
+
icon: "hourglass-half",
|
|
32
|
+
couleur: "info"
|
|
32
33
|
},
|
|
33
|
-
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
tiers: {
|
|
35
|
+
libelle: "Tiers",
|
|
36
|
+
icon: "user-tie",
|
|
37
|
+
couleur: "warning"
|
|
37
38
|
},
|
|
38
|
-
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
autre: {
|
|
40
|
+
libelle: "Autre",
|
|
41
|
+
icon: "user",
|
|
42
|
+
couleur: "secondary"
|
|
43
|
+
},
|
|
44
|
+
fournisseur: {
|
|
45
|
+
libelle: "Fournisseur",
|
|
46
|
+
icon: "truck",
|
|
47
|
+
couleur: "success"
|
|
48
|
+
},
|
|
49
|
+
personnel: {
|
|
50
|
+
libelle: "Personnel",
|
|
51
|
+
icon: "id-badge",
|
|
52
|
+
couleur: "dark"
|
|
53
|
+
},
|
|
54
|
+
inconnu: {
|
|
55
|
+
libelle: "Inconnu",
|
|
56
|
+
icon: "circle-question",
|
|
57
|
+
couleur: "danger"
|
|
42
58
|
}
|
|
43
|
-
|
|
59
|
+
}, Ee = ["L", "P"], De = {
|
|
60
|
+
...Object.fromEntries(Ee.map((e) => [e, "locataire"])),
|
|
61
|
+
D: "demandeur",
|
|
62
|
+
T: "tiers",
|
|
63
|
+
U: "autre",
|
|
64
|
+
F: "fournisseur",
|
|
65
|
+
E: "personnel"
|
|
66
|
+
}, U = Object.keys(De), Oe = (e) => [...new Set(e.map((e) => De[e]))], ke = (e) => e ? H[e.categorie] ? e.categorie : De[e.type] ?? "inconnu" : null, Ae = (e) => H[ke(e)] ?? null, je = Symbol("cresol:draft"), W = () => ({
|
|
44
67
|
idCommune: null,
|
|
45
68
|
commune: null,
|
|
46
69
|
idEntree: null,
|
|
@@ -55,7 +78,7 @@ var ce = [
|
|
|
55
78
|
typeContratActuel: null,
|
|
56
79
|
idContratActuel: null,
|
|
57
80
|
occupantActuel: null
|
|
58
|
-
}),
|
|
81
|
+
}), Me = () => ({
|
|
59
82
|
idMotif: null,
|
|
60
83
|
idCategorie: null,
|
|
61
84
|
idType: null,
|
|
@@ -73,7 +96,7 @@ var ce = [
|
|
|
73
96
|
dateFaits: null,
|
|
74
97
|
dateFaitsOverride: !1,
|
|
75
98
|
fichier: null
|
|
76
|
-
}),
|
|
99
|
+
}), Ne = [
|
|
77
100
|
"reclamant",
|
|
78
101
|
"provenance",
|
|
79
102
|
"motif",
|
|
@@ -82,23 +105,19 @@ var ce = [
|
|
|
82
105
|
"dateFaits",
|
|
83
106
|
"responsable",
|
|
84
107
|
"fichier"
|
|
85
|
-
],
|
|
86
|
-
"D",
|
|
87
|
-
"U",
|
|
88
|
-
"T"
|
|
89
|
-
], N = (e = "T") => ({
|
|
108
|
+
], Pe = (e = "T") => ({
|
|
90
109
|
reclamant: {
|
|
91
110
|
type: null,
|
|
92
111
|
id: null
|
|
93
112
|
},
|
|
94
113
|
provenance: e,
|
|
95
114
|
lignes: [{
|
|
96
|
-
...
|
|
115
|
+
...Me(),
|
|
97
116
|
cibleMode: "contrat",
|
|
98
|
-
patrimoine:
|
|
117
|
+
patrimoine: W(),
|
|
99
118
|
description: ""
|
|
100
119
|
}]
|
|
101
|
-
}),
|
|
120
|
+
}), Fe = (e) => e?.id ?? e ?? null, Ie = (e) => {
|
|
102
121
|
if (!e) return "Cible non définie";
|
|
103
122
|
let t = [
|
|
104
123
|
e.commune,
|
|
@@ -106,17 +125,17 @@ var ce = [
|
|
|
106
125
|
e.libelleModule
|
|
107
126
|
].filter(Boolean);
|
|
108
127
|
return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
|
|
109
|
-
},
|
|
128
|
+
}, Le = (e) => !!e && (e.idModule != null || e.idEntree != null), Re = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : Le(e.patrimoine), ze = (e, t) => e.description == null ? !t : e.description.trim().length > 0, Be = (e = {}) => {
|
|
110
129
|
let t = {
|
|
111
|
-
...
|
|
130
|
+
...Me(),
|
|
112
131
|
...e
|
|
113
132
|
};
|
|
114
133
|
return e.patrimoine && (t.patrimoine = {
|
|
115
|
-
...
|
|
134
|
+
...W(),
|
|
116
135
|
...e.patrimoine
|
|
117
136
|
}), t;
|
|
118
|
-
},
|
|
119
|
-
let t =
|
|
137
|
+
}, Ve = (e) => {
|
|
138
|
+
let t = Pe();
|
|
120
139
|
if (!e) return t;
|
|
121
140
|
let n = Array.isArray(e.lignes) && e.lignes.length ? e.lignes : null;
|
|
122
141
|
return {
|
|
@@ -129,168 +148,168 @@ var ce = [
|
|
|
129
148
|
provenance: e.provenance ?? t.provenance,
|
|
130
149
|
lignes: n ? n.map((e, n) => n === 0 ? {
|
|
131
150
|
...t.lignes[0],
|
|
132
|
-
...
|
|
133
|
-
} :
|
|
151
|
+
...Be(e)
|
|
152
|
+
} : Be(e)) : t.lignes
|
|
134
153
|
};
|
|
135
154
|
};
|
|
136
|
-
function
|
|
137
|
-
let
|
|
138
|
-
let e =
|
|
139
|
-
return e === !0 ?
|
|
140
|
-
}),
|
|
141
|
-
let e =
|
|
142
|
-
return !e ||
|
|
143
|
-
}),
|
|
144
|
-
let e =
|
|
155
|
+
function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly: r = j(!1) } = {}) {
|
|
156
|
+
let i = A(Pe()), a = v(() => {
|
|
157
|
+
let e = L(r);
|
|
158
|
+
return e === !0 ? Ne : Array.isArray(e) ? e : [];
|
|
159
|
+
}), o = (e) => a.value.includes(e), s = v(() => i.lignes[0]), c = v(() => i.lignes.slice(1)), l = v(() => L(e) ?? []), u = j(null), d = (e, t) => e.type === t.type && String(e.id) === String(t.id), f = v(() => {
|
|
160
|
+
let e = u.value;
|
|
161
|
+
return !e || l.value.some((t) => d(t, e)) ? l.value : [...l.value, e];
|
|
162
|
+
}), p = v(() => f.value.find((e) => d(e, i.reclamant)) ?? f.value[0] ?? null), ee = v(() => {
|
|
163
|
+
let e = L(t) ?? [], r = L(n);
|
|
145
164
|
return (r == null ? null : e.find((e) => String(e.idModule) === String(r))) ?? e.find((e) => e.estModulePrincipal) ?? e[0] ?? null;
|
|
146
|
-
}),
|
|
147
|
-
draft:
|
|
148
|
-
lignePrincipale:
|
|
149
|
-
lignesAssociees:
|
|
150
|
-
reclamantsFournis:
|
|
151
|
-
reclamantsDisponibles:
|
|
152
|
-
reclamantSelectionne:
|
|
153
|
-
moduleReclamantPrincipal:
|
|
154
|
-
reclamantEstContrat:
|
|
155
|
-
ciblesValid:
|
|
156
|
-
detailsValid:
|
|
157
|
-
isReadonly:
|
|
165
|
+
}), m = v(() => !!p.value && Ee.includes(p.value.type)), h = {
|
|
166
|
+
draft: i,
|
|
167
|
+
lignePrincipale: s,
|
|
168
|
+
lignesAssociees: c,
|
|
169
|
+
reclamantsFournis: l,
|
|
170
|
+
reclamantsDisponibles: f,
|
|
171
|
+
reclamantSelectionne: p,
|
|
172
|
+
moduleReclamantPrincipal: ee,
|
|
173
|
+
reclamantEstContrat: m,
|
|
174
|
+
ciblesValid: v(() => i.lignes.every((e) => Re(e, m.value))),
|
|
175
|
+
detailsValid: v(() => i.lignes.every((e, t) => ze(e, t === 0))),
|
|
176
|
+
isReadonly: o,
|
|
158
177
|
reset(e = null) {
|
|
159
|
-
let t =
|
|
160
|
-
Object.assign(
|
|
178
|
+
let t = Ve(e);
|
|
179
|
+
Object.assign(i, t), i.lignes = t.lignes;
|
|
161
180
|
},
|
|
162
181
|
setProvenance(e) {
|
|
163
|
-
|
|
182
|
+
i.provenance = e;
|
|
164
183
|
},
|
|
165
184
|
syncReclamant() {
|
|
166
|
-
let e =
|
|
167
|
-
|
|
185
|
+
let e = p.value;
|
|
186
|
+
h.setReclamant({
|
|
168
187
|
type: e?.type ?? null,
|
|
169
188
|
id: e?.id ?? null
|
|
170
189
|
});
|
|
171
190
|
},
|
|
172
191
|
selectReclamant(e) {
|
|
173
|
-
e && (
|
|
192
|
+
e && (l.value.some((t) => d(t, e)) || (u.value = e), h.setReclamant(e));
|
|
174
193
|
},
|
|
175
194
|
setReclamant({ type: e, id: t }) {
|
|
176
|
-
if (
|
|
195
|
+
if (i.reclamant = {
|
|
177
196
|
type: e ?? null,
|
|
178
197
|
id: t ?? null
|
|
179
|
-
},
|
|
180
|
-
let n =
|
|
181
|
-
e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode =
|
|
198
|
+
}, o("cible")) return;
|
|
199
|
+
let n = i.lignes[0];
|
|
200
|
+
e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = m.value ? "contrat" : "patrimoine", n.contratReclamant = m.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = W(), h.prefillCiblePrincipale());
|
|
182
201
|
},
|
|
183
202
|
prefillCiblePrincipale() {
|
|
184
|
-
if (
|
|
185
|
-
let e =
|
|
186
|
-
e &&
|
|
203
|
+
if (o("cible")) return;
|
|
204
|
+
let e = ee.value;
|
|
205
|
+
e && h.prefillFromModule(0, e);
|
|
187
206
|
},
|
|
188
207
|
_resetAfterNomenclature() {
|
|
189
|
-
|
|
208
|
+
i.lignes[0].responsable = null, i.lignes.splice(1);
|
|
190
209
|
},
|
|
191
210
|
setCategorie(e) {
|
|
192
|
-
let t =
|
|
193
|
-
t.idCategorie = e, t.idType = null, t.idNature = null, t.idMotif = null,
|
|
211
|
+
let t = i.lignes[0];
|
|
212
|
+
t.idCategorie = e, t.idType = null, t.idNature = null, t.idMotif = null, h._resetAfterNomenclature();
|
|
194
213
|
},
|
|
195
214
|
setType(e) {
|
|
196
|
-
let t =
|
|
197
|
-
t.idType = e, t.idNature = null, t.idMotif = null,
|
|
215
|
+
let t = i.lignes[0];
|
|
216
|
+
t.idType = e, t.idNature = null, t.idMotif = null, h._resetAfterNomenclature();
|
|
198
217
|
},
|
|
199
218
|
setNature(e) {
|
|
200
|
-
let t =
|
|
201
|
-
t.idNature = e, t.idMotif = null,
|
|
219
|
+
let t = i.lignes[0];
|
|
220
|
+
t.idNature = e, t.idMotif = null, h._resetAfterNomenclature();
|
|
202
221
|
},
|
|
203
222
|
setMotif(e) {
|
|
204
|
-
|
|
223
|
+
i.lignes[0].idMotif = e, h._resetAfterNomenclature();
|
|
205
224
|
},
|
|
206
225
|
selectMotifChain(e) {
|
|
207
|
-
let t =
|
|
208
|
-
t.idCategorie = e?.idCategorie ?? null, t.idType = e?.idType ?? null, t.idNature = e?.idNature ?? null, t.idMotif = e?.id ?? null,
|
|
226
|
+
let t = i.lignes[0];
|
|
227
|
+
t.idCategorie = e?.idCategorie ?? null, t.idType = e?.idType ?? null, t.idNature = e?.idNature ?? null, t.idMotif = e?.id ?? null, h._resetAfterNomenclature();
|
|
209
228
|
},
|
|
210
229
|
toggleLigneAssociee(e, t = {}) {
|
|
211
|
-
let n =
|
|
212
|
-
n === -1 ?
|
|
213
|
-
...
|
|
230
|
+
let n = i.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
|
|
231
|
+
n === -1 ? i.lignes.push({
|
|
232
|
+
...Me(),
|
|
214
233
|
idMotif: e,
|
|
215
234
|
...t
|
|
216
|
-
}) :
|
|
235
|
+
}) : i.lignes.splice(n, 1);
|
|
217
236
|
},
|
|
218
237
|
_patrimoine(e) {
|
|
219
|
-
return
|
|
238
|
+
return i.lignes[e]?.patrimoine ?? null;
|
|
220
239
|
},
|
|
221
240
|
setCibleMode(e, t) {
|
|
222
|
-
let n =
|
|
223
|
-
n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" &&
|
|
241
|
+
let n = i.lignes[e];
|
|
242
|
+
n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && m.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= W());
|
|
224
243
|
},
|
|
225
244
|
setModulePrecis(e, t) {
|
|
226
|
-
let n =
|
|
227
|
-
n && (n.modulePrecis = !!t, n.modulePrecis ||
|
|
245
|
+
let n = i.lignes[e];
|
|
246
|
+
n && (n.modulePrecis = !!t, n.modulePrecis || h.setPatrimoineModule(e, null));
|
|
228
247
|
},
|
|
229
248
|
toggleContratReclamant(e, t) {
|
|
230
|
-
let n =
|
|
231
|
-
n && (n.contratReclamant = t ?? !n.contratReclamant, n.contratCible = null, n.patrimoine &&
|
|
249
|
+
let n = i.lignes[e];
|
|
250
|
+
n && (n.contratReclamant = t ?? !n.contratReclamant, n.contratCible = null, n.patrimoine && h.setPatrimoineModule(e, null));
|
|
232
251
|
},
|
|
233
252
|
setContratCible(e, t) {
|
|
234
|
-
let n =
|
|
253
|
+
let n = i.lignes[e];
|
|
235
254
|
n && (n.contratCible = t ? {
|
|
236
255
|
typeContrat: t.typeContrat,
|
|
237
256
|
idContrat: t.idContrat,
|
|
238
257
|
libelle: t.libelle ?? null
|
|
239
|
-
} : null,
|
|
258
|
+
} : null, h.setPatrimoineModule(e, null));
|
|
240
259
|
},
|
|
241
260
|
setPatrimoineCommune(e, t) {
|
|
242
|
-
let n =
|
|
243
|
-
n && (n.idCommune = t?.idCommune ?? null, n.commune = t?.commune ?? null,
|
|
261
|
+
let n = h._patrimoine(e);
|
|
262
|
+
n && (n.idCommune = t?.idCommune ?? null, n.commune = t?.commune ?? null, h.setPatrimoineEntree(e, null));
|
|
244
263
|
},
|
|
245
264
|
setPatrimoineEntree(e, t) {
|
|
246
|
-
let n =
|
|
247
|
-
n && (n.idEntree = t?.idEntree ?? null, n.entree = t?.entree ?? null, n.codeProgramme = t?.codeProgramme ?? null, n.codeTranche = t?.codeTranche ?? null, n.codeBatiment = t?.codeBatiment ?? null, n.codeEscalier = t?.codeEscalier ?? null, n.etage = null,
|
|
265
|
+
let n = h._patrimoine(e);
|
|
266
|
+
n && (n.idEntree = t?.idEntree ?? null, n.entree = t?.entree ?? null, n.codeProgramme = t?.codeProgramme ?? null, n.codeTranche = t?.codeTranche ?? null, n.codeBatiment = t?.codeBatiment ?? null, n.codeEscalier = t?.codeEscalier ?? null, n.etage = null, h.setPatrimoineModule(e, null));
|
|
248
267
|
},
|
|
249
268
|
setPatrimoineEtage(e, t) {
|
|
250
|
-
let n =
|
|
251
|
-
n && (n.etage = t,
|
|
269
|
+
let n = h._patrimoine(e);
|
|
270
|
+
n && (n.etage = t, h.setPatrimoineModule(e, null));
|
|
252
271
|
},
|
|
253
272
|
setPatrimoineModule(e, t) {
|
|
254
|
-
let n =
|
|
273
|
+
let n = h._patrimoine(e);
|
|
255
274
|
n && (n.idModule = t?.idModule ?? null, n.libelleModule = t?.libelleModule ?? null, n.typeContratActuel = t?.typeContratActuel ?? null, n.idContratActuel = t?.idContratActuel ?? null, n.occupantActuel = t?.occupantActuel ?? null, t && (n.codeProgramme = t.codeProgramme ?? n.codeProgramme, n.codeTranche = t.codeTranche ?? n.codeTranche, n.codeBatiment = t.codeBatiment ?? n.codeBatiment, n.codeEscalier = t.codeEscalier ?? n.codeEscalier, t.idEntree != null && (n.idEntree = t.idEntree), t.etage != null && (n.etage = t.etage)));
|
|
256
275
|
},
|
|
257
276
|
prefillFromModule(e, t) {
|
|
258
|
-
let n =
|
|
277
|
+
let n = h._patrimoine(e);
|
|
259
278
|
n && t && (n.idCommune = t.idCommune ?? null, n.commune = t.commune ?? null, n.idEntree = t.idEntree ?? null, n.entree = t.adresse ?? t.numeroRue ?? null, n.codeProgramme = t.codeProgramme ?? null, n.codeTranche = t.codeTranche ?? null, n.codeBatiment = t.codeBatiment ?? null, n.codeEscalier = t.codeEscalier ?? null, n.etage = t.etage ?? null, n.idModule = t.idModule ?? null, n.libelleModule = t.libelleModule ?? t.adresse ?? null, n.typeContratActuel = t.typeContratActuel ?? null, n.idContratActuel = t.idContratActuel ?? null, n.occupantActuel = t.occupantActuel ?? null);
|
|
260
279
|
},
|
|
261
280
|
toggleCibleOverride(e) {
|
|
262
|
-
let t =
|
|
281
|
+
let t = i.lignes[e];
|
|
263
282
|
if (!t) return;
|
|
264
|
-
let n =
|
|
283
|
+
let n = i.lignes[0];
|
|
265
284
|
t.cibleOverride ? (t.cibleOverride = !1, t.cibleMode = null, t.patrimoine = null, t.reprendreLocataireActuel = !1, t.modulePrecis = !0, t.contratReclamant = !0, t.contratCible = null) : (t.cibleOverride = !0, t.cibleMode = n.cibleMode, t.patrimoine = n.cibleMode === "demande" ? null : { ...n.patrimoine }, t.reprendreLocataireActuel = n.reprendreLocataireActuel, t.modulePrecis = n.modulePrecis, t.contratReclamant = n.contratReclamant, t.contratCible = n.contratCible ? { ...n.contratCible } : null);
|
|
266
285
|
},
|
|
267
286
|
setReprendreLocataireActuel(e, t) {
|
|
268
|
-
let n =
|
|
287
|
+
let n = i.lignes[e];
|
|
269
288
|
n && (n.reprendreLocataireActuel = !!t);
|
|
270
289
|
},
|
|
271
290
|
setDescription(e, t) {
|
|
272
|
-
let n =
|
|
291
|
+
let n = i.lignes[e];
|
|
273
292
|
n && (n.description = t);
|
|
274
293
|
},
|
|
275
294
|
setDateFaits(e, t) {
|
|
276
|
-
let n =
|
|
295
|
+
let n = i.lignes[e];
|
|
277
296
|
n && (n.dateFaits = t);
|
|
278
297
|
},
|
|
279
298
|
setResponsable(e, t) {
|
|
280
|
-
let n =
|
|
299
|
+
let n = i.lignes[e];
|
|
281
300
|
n && (n.responsable = t);
|
|
282
301
|
},
|
|
283
302
|
setFichier(e, t) {
|
|
284
|
-
let n =
|
|
303
|
+
let n = i.lignes[e];
|
|
285
304
|
n && (n.fichier = t);
|
|
286
305
|
},
|
|
287
306
|
toggleDescriptionOverride(e) {
|
|
288
|
-
let t =
|
|
307
|
+
let t = i.lignes[e];
|
|
289
308
|
t && (t.description = t.description == null ? "" : null);
|
|
290
309
|
},
|
|
291
310
|
toggleDateFaitsOverride(e) {
|
|
292
|
-
let t =
|
|
293
|
-
t && (t.dateFaitsOverride = !t.dateFaitsOverride, t.dateFaits = t.dateFaitsOverride ?
|
|
311
|
+
let t = i.lignes[e];
|
|
312
|
+
t && (t.dateFaitsOverride = !t.dateFaitsOverride, t.dateFaits = t.dateFaitsOverride ? i.lignes[0].dateFaits : null);
|
|
294
313
|
},
|
|
295
314
|
_patrimoinePayload(e) {
|
|
296
315
|
return e.idModule == null ? {
|
|
@@ -302,26 +321,26 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
|
|
|
302
321
|
} : { idModule: e.idModule };
|
|
303
322
|
},
|
|
304
323
|
_lignePayload(e, t) {
|
|
305
|
-
let n =
|
|
324
|
+
let n = i.lignes[0], r = t > 0 && !e.cibleOverride ? n : e, a = (e.description ?? "").trim() || (n.description ?? "").trim(), o = e.dateFaits == null ? n.dateFaits : e.dateFaits, s = i.reclamant.type === "D", c = {
|
|
306
325
|
categorie: e.idCategorie,
|
|
307
326
|
type: e.idType,
|
|
308
327
|
nature: e.idNature,
|
|
309
328
|
motif: e.idMotif,
|
|
310
|
-
description:
|
|
329
|
+
description: a,
|
|
311
330
|
dateFaits: o,
|
|
312
|
-
responsable:
|
|
331
|
+
responsable: Fe(e.responsable)
|
|
313
332
|
};
|
|
314
333
|
if (r.cibleMode === "demande") return {
|
|
315
334
|
...c,
|
|
316
335
|
codeTypeCible: "D",
|
|
317
|
-
idCible:
|
|
336
|
+
idCible: i.reclamant.id,
|
|
318
337
|
deduireCible: !1
|
|
319
338
|
};
|
|
320
|
-
let l =
|
|
339
|
+
let l = h._patrimoinePayload(r.patrimoine);
|
|
321
340
|
if (r.cibleMode === "contrat" && !r.reprendreLocataireActuel) {
|
|
322
|
-
let e = r.contratReclamant &&
|
|
323
|
-
typeContrat:
|
|
324
|
-
idContrat:
|
|
341
|
+
let e = r.contratReclamant && m.value ? {
|
|
342
|
+
typeContrat: i.reclamant.type,
|
|
343
|
+
idContrat: i.reclamant.id
|
|
325
344
|
} : r.contratCible;
|
|
326
345
|
return {
|
|
327
346
|
...c,
|
|
@@ -340,57 +359,57 @@ function ye({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
|
|
|
340
359
|
};
|
|
341
360
|
},
|
|
342
361
|
cibleResume(e) {
|
|
343
|
-
let t =
|
|
362
|
+
let t = i.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
|
|
344
363
|
if (n.cibleMode === "demande") return "La demande";
|
|
345
|
-
let r =
|
|
364
|
+
let r = Ie(n.patrimoine);
|
|
346
365
|
if (n.cibleMode === "patrimoine" && !n.modulePrecis) return `Parties communes — ${r}`;
|
|
347
366
|
if (n.cibleMode !== "contrat") return r;
|
|
348
|
-
let
|
|
349
|
-
if (n.contratReclamant &&
|
|
367
|
+
let a = "Contrat non défini";
|
|
368
|
+
if (n.contratReclamant && m.value) a = "Contrat du réclamant";
|
|
350
369
|
else if (n.contratCible) {
|
|
351
370
|
let e = n.contratCible;
|
|
352
|
-
|
|
371
|
+
a = `${e.libelle ?? "Contrat"} (${e.typeContrat}/${e.idContrat})`;
|
|
353
372
|
}
|
|
354
|
-
return `${
|
|
373
|
+
return `${a} — ${r}`;
|
|
355
374
|
},
|
|
356
375
|
lignesPayload() {
|
|
357
|
-
return
|
|
376
|
+
return i.lignes.map((e, t) => h._lignePayload(e, t));
|
|
358
377
|
},
|
|
359
378
|
creationPayload() {
|
|
360
|
-
let e =
|
|
379
|
+
let e = p.value;
|
|
361
380
|
return {
|
|
362
381
|
typeReclamant: e?.type ?? null,
|
|
363
382
|
reclamant: e?.id ?? null,
|
|
364
|
-
lignes:
|
|
365
|
-
provenance:
|
|
383
|
+
lignes: h.lignesPayload(),
|
|
384
|
+
provenance: i.provenance
|
|
366
385
|
};
|
|
367
386
|
}
|
|
368
387
|
};
|
|
369
|
-
return
|
|
388
|
+
return A(h);
|
|
370
389
|
}
|
|
371
|
-
function
|
|
372
|
-
return
|
|
390
|
+
function Ue(e) {
|
|
391
|
+
return pe(je, e), e;
|
|
373
392
|
}
|
|
374
|
-
function
|
|
375
|
-
let e =
|
|
393
|
+
function G() {
|
|
394
|
+
let e = de(je, null);
|
|
376
395
|
if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
|
|
377
396
|
return e;
|
|
378
397
|
}
|
|
379
398
|
//#endregion
|
|
380
399
|
//#region \0plugin-vue:export-helper
|
|
381
|
-
var
|
|
400
|
+
var K = (e, t) => {
|
|
382
401
|
let n = e.__vccOpts || e;
|
|
383
402
|
for (let [e, r] of t) n[e] = r;
|
|
384
403
|
return n;
|
|
385
|
-
},
|
|
404
|
+
}, We = {
|
|
386
405
|
name: "AsideBlock",
|
|
387
|
-
components: { AmsomNavTabsHorizontal:
|
|
406
|
+
components: { AmsomNavTabsHorizontal: _e },
|
|
388
407
|
props: { nbSimilaires: {
|
|
389
408
|
type: Number,
|
|
390
409
|
default: 0
|
|
391
410
|
} },
|
|
392
411
|
setup() {
|
|
393
|
-
return { draft:
|
|
412
|
+
return { draft: G() };
|
|
394
413
|
},
|
|
395
414
|
data() {
|
|
396
415
|
return { activeTab: null };
|
|
@@ -426,44 +445,44 @@ var F = (e, t) => {
|
|
|
426
445
|
e.some((e) => e.id === this.activeTab) || (this.activeTab = e[0]?.id ?? null);
|
|
427
446
|
}
|
|
428
447
|
} }
|
|
429
|
-
},
|
|
448
|
+
}, Ge = {
|
|
430
449
|
key: 0,
|
|
431
450
|
class: "badge bg-danger ms-1"
|
|
432
|
-
},
|
|
433
|
-
function
|
|
434
|
-
let
|
|
435
|
-
return
|
|
451
|
+
}, Ke = { style: { "min-height": "320px" } }, qe = { key: 0 }, Je = { key: 1 };
|
|
452
|
+
function Ye(e, t, n, r, i, a) {
|
|
453
|
+
let o = P("font-awesome-icon"), s = P("amsom-nav-tabs-horizontal");
|
|
454
|
+
return a.tabs.length ? (k(), y(s, {
|
|
436
455
|
key: 0,
|
|
437
|
-
modelValue:
|
|
438
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
439
|
-
items:
|
|
456
|
+
modelValue: i.activeTab,
|
|
457
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.activeTab = e,
|
|
458
|
+
items: a.tabs,
|
|
440
459
|
"item-key": "id",
|
|
441
460
|
"tab-spacing": 1
|
|
442
461
|
}, {
|
|
443
|
-
libelle:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
e.id === "similarite" && n.nbSimilaires > 0 ? (
|
|
462
|
+
libelle: R(({ item: e }) => [
|
|
463
|
+
T(o, { icon: e.icon }, null, 8, ["icon"]),
|
|
464
|
+
S("span", null, F(e.label), 1),
|
|
465
|
+
e.id === "similarite" && n.nbSimilaires > 0 ? (k(), x("span", Ge, F(n.nbSimilaires), 1)) : b("", !0)
|
|
447
466
|
]),
|
|
448
|
-
content:
|
|
467
|
+
content: R(() => [S("div", Ke, [e.$slots.similaires ? ge((k(), x("div", qe, [N(e.$slots, "similaires", O(E(a.scope)))], 512)), [[he, i.activeTab === "similarite"]]) : b("", !0), e.$slots.evenements ? ge((k(), x("div", Je, [N(e.$slots, "evenements")], 512)), [[he, i.activeTab === "evenements"]]) : b("", !0)])]),
|
|
449
468
|
_: 3
|
|
450
|
-
}, 8, ["modelValue", "items"])) :
|
|
469
|
+
}, 8, ["modelValue", "items"])) : b("", !0);
|
|
451
470
|
}
|
|
452
|
-
var
|
|
471
|
+
var Xe = /*#__PURE__*/ K(We, [["render", Ye]]), Ze = {
|
|
453
472
|
baseUrl: "",
|
|
454
|
-
getToken: () =>
|
|
455
|
-
setToken: (e) =>
|
|
456
|
-
logout: () =>
|
|
457
|
-
goToLoginPage: () =>
|
|
473
|
+
getToken: () => B.getToken(),
|
|
474
|
+
setToken: (e) => B.setToken(e),
|
|
475
|
+
logout: () => B.logout(),
|
|
476
|
+
goToLoginPage: () => B.goToLoginPage()
|
|
458
477
|
};
|
|
459
|
-
function
|
|
460
|
-
Object.assign(
|
|
478
|
+
function Qe(e = {}) {
|
|
479
|
+
Object.assign(Ze, e);
|
|
461
480
|
}
|
|
462
|
-
var
|
|
481
|
+
var $e = () => Ze;
|
|
463
482
|
//#endregion
|
|
464
483
|
//#region src/api/transport/axiosOverlayConnector.js
|
|
465
|
-
function
|
|
466
|
-
let n =
|
|
484
|
+
function et(e, t = {}) {
|
|
485
|
+
let n = $e(), r = {
|
|
467
486
|
getToken: () => n.getToken?.() ?? null,
|
|
468
487
|
setToken: (e) => n.setToken?.(e),
|
|
469
488
|
logout: () => n.logout?.(),
|
|
@@ -485,69 +504,74 @@ function ke(e, t = {}) {
|
|
|
485
504
|
}, t.functions.errorsHandlers = {
|
|
486
505
|
...r.errorsHandlers,
|
|
487
506
|
...t.functions.errorsHandlers ?? {}
|
|
488
|
-
},
|
|
507
|
+
}, ye(e, t);
|
|
489
508
|
}
|
|
490
509
|
//#endregion
|
|
491
510
|
//#region src/api/transport/httpClient.js
|
|
492
|
-
var
|
|
493
|
-
let n = t ||
|
|
511
|
+
var tt = (e, t) => {
|
|
512
|
+
let n = t || $e().baseUrl;
|
|
494
513
|
if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
|
|
495
514
|
return `${n}${e}`;
|
|
496
|
-
},
|
|
515
|
+
}, nt = (e = {}) => {
|
|
497
516
|
let t = new URLSearchParams();
|
|
498
517
|
Object.entries(e).forEach(([e, n]) => {
|
|
499
518
|
n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
|
|
500
519
|
});
|
|
501
520
|
let n = t.toString();
|
|
502
521
|
return n ? `?${n}` : "";
|
|
503
|
-
},
|
|
504
|
-
url:
|
|
522
|
+
}, rt = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => et({
|
|
523
|
+
url: tt(`${t}${nt(n)}`, a),
|
|
505
524
|
method: e,
|
|
506
525
|
...r === void 0 ? {} : { data: r },
|
|
507
526
|
...i ? { signal: i } : {}
|
|
508
|
-
}, o),
|
|
527
|
+
}, o), q = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => rt({
|
|
509
528
|
method: "GET",
|
|
510
529
|
path: e,
|
|
511
530
|
params: t,
|
|
512
531
|
signal: n,
|
|
513
532
|
baseUrl: i
|
|
514
|
-
}, r).then((e) => e.data),
|
|
533
|
+
}, r).then((e) => e.data), it = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => rt({
|
|
515
534
|
method: "POST",
|
|
516
535
|
path: e,
|
|
517
536
|
params: n,
|
|
518
537
|
data: t,
|
|
519
538
|
signal: r,
|
|
520
539
|
baseUrl: a
|
|
521
|
-
}, i).then((e) => e.data),
|
|
540
|
+
}, i).then((e) => e.data), at = { mustBeAuthenticated: !1 }, J = (e, { signal: t, baseUrl: n } = {}) => q(e, {
|
|
522
541
|
signal: t,
|
|
523
542
|
baseUrl: n,
|
|
524
|
-
overlay:
|
|
525
|
-
}),
|
|
543
|
+
overlay: at
|
|
544
|
+
}), ot = (e) => J("/v2/sollicitation/motifs", e), st = (e) => J("/v2/sollicitation/categories", e), ct = (e) => J("/v2/sollicitation/types", e), lt = (e) => J("/v2/sollicitation/natures", e), ut = (e) => J("/v2/sollicitation/etats", e), dt = ({ signal: e, baseUrl: t } = {}) => q("/v2/sollicitation/provenances", {
|
|
545
|
+
params: { estDesactive: !1 },
|
|
546
|
+
signal: e,
|
|
547
|
+
baseUrl: t,
|
|
548
|
+
overlay: at
|
|
549
|
+
}), ft = ({ signal: e, baseUrl: t } = {}) => q("/collaborateurs", {
|
|
526
550
|
params: { actif: !0 },
|
|
527
551
|
signal: e,
|
|
528
552
|
baseUrl: t
|
|
529
|
-
}),
|
|
553
|
+
}), pt = async ({ signal: e, baseUrl: t } = {}) => (await q("/v2/patrimoine/communes", {
|
|
530
554
|
signal: e,
|
|
531
555
|
baseUrl: t
|
|
532
556
|
}) ?? []).map((e) => ({
|
|
533
557
|
idCommune: e.id,
|
|
534
558
|
commune: e.libelle
|
|
535
|
-
})),
|
|
559
|
+
})), mt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/entrees", {
|
|
536
560
|
params: { idCommune: e },
|
|
537
561
|
signal: t,
|
|
538
562
|
baseUrl: n
|
|
539
|
-
}),
|
|
563
|
+
}), ht = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/modules", {
|
|
540
564
|
params: { codeProgramme: e },
|
|
541
565
|
signal: t,
|
|
542
566
|
baseUrl: n
|
|
543
|
-
}),
|
|
567
|
+
}), gt = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => q("/v2/patrimoine/contrat_modules", {
|
|
544
568
|
params: {
|
|
545
569
|
idContrat: e,
|
|
546
570
|
typeContrat: t
|
|
547
571
|
},
|
|
548
572
|
signal: n,
|
|
549
573
|
baseUrl: r
|
|
550
|
-
}),
|
|
574
|
+
}), _t = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => q("/v2/sollicitation/responsables", {
|
|
551
575
|
params: {
|
|
552
576
|
motif: e,
|
|
553
577
|
categorie: t,
|
|
@@ -556,11 +580,11 @@ var Ae = (e, t) => {
|
|
|
556
580
|
},
|
|
557
581
|
signal: i,
|
|
558
582
|
baseUrl: a
|
|
559
|
-
}),
|
|
583
|
+
}), vt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/contrat_module_rechercher", {
|
|
560
584
|
params: { recherche: e },
|
|
561
585
|
signal: t,
|
|
562
586
|
baseUrl: n
|
|
563
|
-
}),
|
|
587
|
+
}), yt = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => q("/v2/cresol/reclamant_rechercher", {
|
|
564
588
|
params: {
|
|
565
589
|
categorie: e,
|
|
566
590
|
recherche: t
|
|
@@ -570,86 +594,88 @@ var Ae = (e, t) => {
|
|
|
570
594
|
});
|
|
571
595
|
//#endregion
|
|
572
596
|
//#region src/utils/apiError.js
|
|
573
|
-
function
|
|
597
|
+
function bt(e) {
|
|
574
598
|
let t = e?.response?.data;
|
|
575
599
|
return t?.error ? t.error : t?.errorList ? t.errorList.map((e) => e.message).join(", ") : e?.response?.status === 500 ? "Erreur interne" : e?.response?.status === 401 ? "Non autorisé à faire cette action" : "Erreur";
|
|
576
600
|
}
|
|
577
|
-
var
|
|
601
|
+
var xt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", St = Symbol("cresol:data"), Ct = () => ({
|
|
578
602
|
motifs: null,
|
|
579
603
|
categories: null,
|
|
580
604
|
types: null,
|
|
581
605
|
natures: null,
|
|
582
606
|
etats: null,
|
|
607
|
+
provenances: null,
|
|
583
608
|
collaborateurs: null,
|
|
584
609
|
communes: null,
|
|
585
610
|
adressesByCommune: {},
|
|
586
611
|
modulesByProgramme: {},
|
|
587
612
|
modulesByContrat: {},
|
|
588
613
|
responsablesByMotif: {}
|
|
589
|
-
}),
|
|
590
|
-
function
|
|
591
|
-
|
|
614
|
+
}), wt = /* @__PURE__ */ new Map(), Tt = (e) => (wt.has(e) || wt.set(e, A(Ct())), wt.get(e)), Y = /* @__PURE__ */ new Map();
|
|
615
|
+
function Et() {
|
|
616
|
+
wt.clear(), Y.clear();
|
|
592
617
|
}
|
|
593
|
-
var
|
|
594
|
-
function
|
|
595
|
-
let n =
|
|
596
|
-
let
|
|
597
|
-
if (
|
|
618
|
+
var X = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, Dt = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
|
|
619
|
+
function Ot({ onError: e, baseUrl: t } = {}) {
|
|
620
|
+
let n = j(0), r = () => ({ baseUrl: L(t) || null }), i = () => L(t) || $e().baseUrl || "", a = () => Tt(i()), o = (t, r) => {
|
|
621
|
+
let a = `${i()}|${t}`;
|
|
622
|
+
if (Y.has(a)) return Y.get(a);
|
|
598
623
|
n.value += 1;
|
|
599
|
-
let o = Promise.resolve().then(r).catch((t) => (
|
|
600
|
-
--n.value,
|
|
624
|
+
let o = Promise.resolve().then(r).catch((t) => (xt(t) || e?.(bt(t)), null)).finally(() => {
|
|
625
|
+
--n.value, Y.delete(a);
|
|
601
626
|
});
|
|
602
|
-
return
|
|
603
|
-
},
|
|
627
|
+
return Y.set(a, o), o;
|
|
628
|
+
}, s = (e, t) => a()[e]?.length ? Promise.resolve(a()[e]) : o(`referentiel:${e}`, async () => (a()[e] = await t(r()), a()[e])), c = {
|
|
604
629
|
get cache() {
|
|
605
|
-
return
|
|
630
|
+
return a();
|
|
606
631
|
},
|
|
607
632
|
loading: n,
|
|
608
|
-
isLoading:
|
|
633
|
+
isLoading: v(() => n.value > 0),
|
|
609
634
|
loadNomenclature() {
|
|
610
635
|
return Promise.all([
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
636
|
+
s("motifs", ot),
|
|
637
|
+
s("categories", st),
|
|
638
|
+
s("types", ct),
|
|
639
|
+
s("natures", lt),
|
|
640
|
+
s("etats", ut)
|
|
616
641
|
]);
|
|
617
642
|
},
|
|
618
|
-
loadCollaborateurs: () =>
|
|
643
|
+
loadCollaborateurs: () => s("collaborateurs", ft),
|
|
644
|
+
loadProvenances: () => s("provenances", dt),
|
|
619
645
|
loadCommunes() {
|
|
620
|
-
return
|
|
646
|
+
return a().communes?.length ? Promise.resolve(a().communes) : o("communes", async () => (a().communes = await pt(r()), a().communes));
|
|
621
647
|
},
|
|
622
648
|
loadAdresses(e) {
|
|
623
|
-
return e == null ? Promise.resolve([]) :
|
|
624
|
-
let t = await
|
|
625
|
-
return
|
|
649
|
+
return e == null ? Promise.resolve([]) : a().adressesByCommune[e] ? Promise.resolve(a().adressesByCommune[e]) : o(`adresses:${e}`, async () => {
|
|
650
|
+
let t = await mt(e, r());
|
|
651
|
+
return a().adressesByCommune[e] = t ?? [], t;
|
|
626
652
|
});
|
|
627
653
|
},
|
|
628
654
|
loadModulesOfProgramme(e) {
|
|
629
|
-
return e == null ? Promise.resolve([]) :
|
|
630
|
-
let t = await
|
|
631
|
-
return
|
|
655
|
+
return e == null ? Promise.resolve([]) : a().modulesByProgramme[e] ? Promise.resolve(a().modulesByProgramme[e]) : o(`modules:${e}`, async () => {
|
|
656
|
+
let t = await ht(e, r());
|
|
657
|
+
return a().modulesByProgramme[e] = t ?? [], t;
|
|
632
658
|
});
|
|
633
659
|
},
|
|
634
660
|
loadModulesOfContrat({ idContrat: e, typeContrat: t }) {
|
|
635
661
|
if (e == null) return Promise.resolve([]);
|
|
636
662
|
let n = `${t ?? ""}|${e}`;
|
|
637
|
-
return
|
|
638
|
-
let
|
|
663
|
+
return a().modulesByContrat[n] ? Promise.resolve(a().modulesByContrat[n]) : o(`contratModules:${n}`, async () => {
|
|
664
|
+
let i = await gt({
|
|
639
665
|
idContrat: e,
|
|
640
666
|
typeContrat: t
|
|
641
|
-
},
|
|
642
|
-
return
|
|
667
|
+
}, r());
|
|
668
|
+
return a().modulesByContrat[n] = i ?? [], i;
|
|
643
669
|
});
|
|
644
670
|
},
|
|
645
671
|
async searchContrats(e, { signal: t } = {}) {
|
|
646
672
|
let n = (e ?? "").trim();
|
|
647
673
|
if (!n) return [];
|
|
648
|
-
let
|
|
649
|
-
...
|
|
674
|
+
let i = await vt(n, {
|
|
675
|
+
...r(),
|
|
650
676
|
signal: t
|
|
651
677
|
}), a = /* @__PURE__ */ new Map();
|
|
652
|
-
for (let e of
|
|
678
|
+
for (let e of i ?? []) {
|
|
653
679
|
let t = `${e.typeContrat}|${e.idContrat}`;
|
|
654
680
|
(!a.has(t) || e.estModulePrincipal) && a.set(t, {
|
|
655
681
|
typeContrat: e.typeContrat,
|
|
@@ -658,19 +684,20 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
658
684
|
adresse: e.adresse ?? null,
|
|
659
685
|
commune: e.commune ?? null,
|
|
660
686
|
estSorti: !!e.estContratSorti,
|
|
687
|
+
dateSortie: e.dateSortieContrat ?? null,
|
|
661
688
|
nbModules: e.nbModulesContrat ?? 1
|
|
662
689
|
});
|
|
663
690
|
}
|
|
664
691
|
return [...a.values()].sort((e, t) => Number(e.estSorti) - Number(t.estSorti) || (e.libelle ?? "").localeCompare(t.libelle ?? ""));
|
|
665
692
|
},
|
|
666
693
|
async searchReclamants(e, t, { signal: n } = {}) {
|
|
667
|
-
let
|
|
668
|
-
if (!
|
|
669
|
-
let a = await
|
|
694
|
+
let i = (t ?? "").trim();
|
|
695
|
+
if (!i) return [];
|
|
696
|
+
let a = await yt({
|
|
670
697
|
categorie: e,
|
|
671
|
-
recherche:
|
|
698
|
+
recherche: i
|
|
672
699
|
}, {
|
|
673
|
-
...
|
|
700
|
+
...r(),
|
|
674
701
|
signal: n
|
|
675
702
|
}), o = /* @__PURE__ */ new Map();
|
|
676
703
|
for (let t of a ?? []) {
|
|
@@ -700,25 +727,25 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
700
727
|
};
|
|
701
728
|
});
|
|
702
729
|
},
|
|
703
|
-
loadResponsables({ motif: e, categorie: t, type: n, nature:
|
|
704
|
-
return e == null ? Promise.resolve([]) :
|
|
705
|
-
let
|
|
730
|
+
loadResponsables({ motif: e, categorie: t, type: n, nature: i }) {
|
|
731
|
+
return e == null ? Promise.resolve([]) : a().responsablesByMotif[e] ? Promise.resolve(a().responsablesByMotif[e]) : o(`responsables:${e}`, async () => {
|
|
732
|
+
let o = await _t({
|
|
706
733
|
motif: e,
|
|
707
734
|
categorie: t,
|
|
708
735
|
type: n,
|
|
709
|
-
nature:
|
|
710
|
-
},
|
|
711
|
-
return
|
|
736
|
+
nature: i
|
|
737
|
+
}, r());
|
|
738
|
+
return a().responsablesByMotif[e] = o ?? [], o;
|
|
712
739
|
});
|
|
713
740
|
},
|
|
714
|
-
adressesOfCommune: (e) =>
|
|
715
|
-
modulesOfProgramme: (e) =>
|
|
716
|
-
modulesOfContrat: ({ idContrat: e, typeContrat: t }) =>
|
|
717
|
-
allAdresses: () => Object.values(
|
|
741
|
+
adressesOfCommune: (e) => a().adressesByCommune[e] ?? null,
|
|
742
|
+
modulesOfProgramme: (e) => a().modulesByProgramme[e] ?? null,
|
|
743
|
+
modulesOfContrat: ({ idContrat: e, typeContrat: t }) => a().modulesByContrat[`${t ?? ""}|${e}`] ?? null,
|
|
744
|
+
allAdresses: () => Object.values(a().adressesByCommune).flat(),
|
|
718
745
|
getResponsableSuggere({ idMotif: e, codeProgramme: t, codeTranche: n, codeBatiment: r, codeEscalier: i }) {
|
|
719
|
-
let
|
|
720
|
-
if (!
|
|
721
|
-
let s =
|
|
746
|
+
let o = a().responsablesByMotif[e];
|
|
747
|
+
if (!o?.length || t == null) return null;
|
|
748
|
+
let s = o.filter((e) => String(e.codeProgramme) === String(t) && (e.codeTranche == null || e.codeTranche === n) && (e.codeBatiment == null || e.codeBatiment === r) && (e.codeEscalier == null || e.codeEscalier === i));
|
|
722
749
|
if (!s.length) return null;
|
|
723
750
|
let c = (e) => (e.codeEscalier == null ? 0 : 4) + (e.codeBatiment == null ? 0 : 2) + (e.codeTranche == null ? 0 : 1), l = s.reduce((e, t) => c(t) > c(e) ? t : e);
|
|
724
751
|
return {
|
|
@@ -726,54 +753,89 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
726
753
|
libelle: l.libelleResponsable
|
|
727
754
|
};
|
|
728
755
|
},
|
|
729
|
-
motifLibelle: (e) =>
|
|
730
|
-
categorieLibelle: (e) =>
|
|
731
|
-
typeLibelle: (e) =>
|
|
732
|
-
natureLibelle: (e) =>
|
|
733
|
-
etatLibelle: (e) =>
|
|
734
|
-
motifIcon: (e) =>
|
|
735
|
-
categorieIcon: (e) =>
|
|
736
|
-
typeIcon: (e) =>
|
|
737
|
-
natureIcon: (e) =>
|
|
756
|
+
motifLibelle: (e) => X(a().motifs, "id", e),
|
|
757
|
+
categorieLibelle: (e) => X(a().categories, "id", e),
|
|
758
|
+
typeLibelle: (e) => X(a().types, "id", e),
|
|
759
|
+
natureLibelle: (e) => X(a().natures, "id", e),
|
|
760
|
+
etatLibelle: (e) => X(a().etats, "code", e),
|
|
761
|
+
motifIcon: (e) => Dt(a().motifs, "id", e),
|
|
762
|
+
categorieIcon: (e) => Dt(a().categories, "id", e),
|
|
763
|
+
typeIcon: (e) => Dt(a().types, "id", e),
|
|
764
|
+
natureIcon: (e) => Dt(a().natures, "id", e)
|
|
738
765
|
};
|
|
739
|
-
return
|
|
766
|
+
return A(c);
|
|
740
767
|
}
|
|
741
|
-
function
|
|
742
|
-
return
|
|
768
|
+
function kt(e) {
|
|
769
|
+
return pe(St, e), e;
|
|
743
770
|
}
|
|
744
|
-
function
|
|
745
|
-
let e =
|
|
771
|
+
function Z() {
|
|
772
|
+
let e = de(St, null);
|
|
746
773
|
if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
|
|
747
774
|
return e;
|
|
748
775
|
}
|
|
749
776
|
//#endregion
|
|
750
777
|
//#region src/utils/fontAwesomeIcons.js
|
|
751
|
-
var
|
|
752
|
-
async function
|
|
753
|
-
let
|
|
754
|
-
[...new Set(
|
|
755
|
-
let
|
|
756
|
-
|
|
778
|
+
var At = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
779
|
+
async function jt(t) {
|
|
780
|
+
let n = await import("@fortawesome/free-solid-svg-icons");
|
|
781
|
+
[...new Set(t.filter(Boolean))].forEach((t) => {
|
|
782
|
+
let r = n[At(t)];
|
|
783
|
+
r && e.add(r);
|
|
757
784
|
});
|
|
758
785
|
}
|
|
759
786
|
//#endregion
|
|
760
787
|
//#region src/utils/date.js
|
|
761
|
-
function
|
|
788
|
+
function Mt(e) {
|
|
762
789
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
763
790
|
}
|
|
764
|
-
function
|
|
791
|
+
function Nt(e) {
|
|
765
792
|
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
766
793
|
}
|
|
767
|
-
function
|
|
794
|
+
function Pt(e) {
|
|
768
795
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
|
|
769
796
|
}
|
|
770
797
|
//#endregion
|
|
771
|
-
//#region src/
|
|
772
|
-
var
|
|
798
|
+
//#region src/composables/useCresolContext.js
|
|
799
|
+
var Ft = Symbol("cresol:options"), It = (e) => pe(Ft, e), Q = () => de(Ft, {}), Lt = j(!1);
|
|
800
|
+
jt(Object.values(H).map((e) => e.icon)).then(() => {
|
|
801
|
+
Lt.value = !0;
|
|
802
|
+
});
|
|
803
|
+
var Rt = {
|
|
804
|
+
name: "ReclamantTypeBadgeComponent",
|
|
805
|
+
props: {
|
|
806
|
+
reclamant: {
|
|
807
|
+
type: Object,
|
|
808
|
+
default: null
|
|
809
|
+
},
|
|
810
|
+
iconOnly: {
|
|
811
|
+
type: Boolean,
|
|
812
|
+
default: !1
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
setup() {
|
|
816
|
+
return { iconsReady: Lt };
|
|
817
|
+
},
|
|
818
|
+
computed: { type() {
|
|
819
|
+
return Ae(this.reclamant);
|
|
820
|
+
} }
|
|
821
|
+
}, zt = ["title"], Bt = { key: 1 };
|
|
822
|
+
function Vt(e, t, n, r, i, a) {
|
|
823
|
+
let o = P("font-awesome-icon");
|
|
824
|
+
return a.type ? (k(), x("span", {
|
|
825
|
+
key: 0,
|
|
826
|
+
class: D(["badge d-inline-flex align-items-center gap-1 border flex-shrink-0", `bg-${a.type.couleur}-subtle text-${a.type.couleur}-emphasis border-${a.type.couleur}-subtle`]),
|
|
827
|
+
title: a.type.libelle
|
|
828
|
+
}, [r.iconsReady ? (k(), y(o, {
|
|
829
|
+
key: 0,
|
|
830
|
+
icon: a.type.icon,
|
|
831
|
+
"fixed-width": ""
|
|
832
|
+
}, null, 8, ["icon"])) : b("", !0), n.iconOnly ? b("", !0) : (k(), x("span", Bt, F(a.type.libelle), 1))], 10, zt)) : b("", !0);
|
|
833
|
+
}
|
|
834
|
+
var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
773
835
|
{
|
|
774
836
|
key: "locataire",
|
|
775
837
|
label: "Locataire",
|
|
776
|
-
icon:
|
|
838
|
+
icon: H.locataire.icon,
|
|
777
839
|
recherche: "Rechercher un locataire",
|
|
778
840
|
aucun: "Aucun locataire trouvé.",
|
|
779
841
|
placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
|
|
@@ -781,7 +843,7 @@ var q = [
|
|
|
781
843
|
{
|
|
782
844
|
key: "demandeur",
|
|
783
845
|
label: "Demandeur",
|
|
784
|
-
icon:
|
|
846
|
+
icon: H.demandeur.icon,
|
|
785
847
|
recherche: "Rechercher un demandeur",
|
|
786
848
|
aucun: "Aucun demandeur trouvé.",
|
|
787
849
|
placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
|
|
@@ -789,7 +851,7 @@ var q = [
|
|
|
789
851
|
{
|
|
790
852
|
key: "tiers",
|
|
791
853
|
label: "Tiers",
|
|
792
|
-
icon:
|
|
854
|
+
icon: H.tiers.icon,
|
|
793
855
|
recherche: "Rechercher un tiers",
|
|
794
856
|
aucun: "Aucun tiers trouvé.",
|
|
795
857
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -797,11 +859,27 @@ var q = [
|
|
|
797
859
|
{
|
|
798
860
|
key: "autre",
|
|
799
861
|
label: "Autre",
|
|
800
|
-
icon:
|
|
862
|
+
icon: H.autre.icon,
|
|
801
863
|
recherche: "Rechercher un individu « Autre »",
|
|
802
864
|
aucun: "Aucun individu « Autre » trouvé.",
|
|
803
865
|
placeholder: "Nom, prénom, adresse, téléphone ou mail…"
|
|
804
866
|
},
|
|
867
|
+
{
|
|
868
|
+
key: "fournisseur",
|
|
869
|
+
label: "Fournisseur",
|
|
870
|
+
icon: H.fournisseur.icon,
|
|
871
|
+
recherche: "Rechercher un fournisseur",
|
|
872
|
+
aucun: "Aucun fournisseur trouvé.",
|
|
873
|
+
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
key: "personnel",
|
|
877
|
+
label: "Personnel",
|
|
878
|
+
icon: H.personnel.icon,
|
|
879
|
+
recherche: "Rechercher un collaborateur",
|
|
880
|
+
aucun: "Aucun collaborateur trouvé.",
|
|
881
|
+
placeholder: "Nom, prénom, téléphone ou mail…"
|
|
882
|
+
},
|
|
805
883
|
{
|
|
806
884
|
key: "tout",
|
|
807
885
|
label: "Tout",
|
|
@@ -810,45 +888,51 @@ var q = [
|
|
|
810
888
|
aucun: "Aucun réclamant trouvé.",
|
|
811
889
|
placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
|
|
812
890
|
}
|
|
813
|
-
],
|
|
891
|
+
], Wt = {
|
|
814
892
|
signataire: "Signataire",
|
|
815
893
|
occupant: "Occupant",
|
|
816
894
|
demandeur: "Demandeur"
|
|
817
|
-
},
|
|
818
|
-
D: "demandeur",
|
|
819
|
-
T: "tiers",
|
|
820
|
-
U: "autre"
|
|
821
|
-
}[e.type] ?? "locataire" : null, ot = {
|
|
895
|
+
}, Gt = {
|
|
822
896
|
name: "ReclamantRechercheBlock",
|
|
823
|
-
components: {
|
|
897
|
+
components: {
|
|
898
|
+
AmsomAutocomplete: z,
|
|
899
|
+
ReclamantTypeBadgeComponent: Ht
|
|
900
|
+
},
|
|
824
901
|
setup() {
|
|
825
902
|
return {
|
|
826
|
-
draft:
|
|
827
|
-
data:
|
|
903
|
+
draft: G(),
|
|
904
|
+
data: Z(),
|
|
905
|
+
options: Q()
|
|
828
906
|
};
|
|
829
907
|
},
|
|
830
908
|
data() {
|
|
831
909
|
return {
|
|
832
910
|
iconsReady: !1,
|
|
833
|
-
categorie:
|
|
911
|
+
categorie: null,
|
|
834
912
|
trouves: [],
|
|
835
913
|
rechercheEnCours: !1,
|
|
836
914
|
rechercheFaite: !1
|
|
837
915
|
};
|
|
838
916
|
},
|
|
839
917
|
computed: {
|
|
918
|
+
typesAutorises() {
|
|
919
|
+
return this.options.typesReclamant ?? U;
|
|
920
|
+
},
|
|
921
|
+
autorisees() {
|
|
922
|
+
return Oe(this.typesAutorises);
|
|
923
|
+
},
|
|
840
924
|
categories() {
|
|
841
|
-
return
|
|
925
|
+
return Ut.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
|
|
842
926
|
},
|
|
843
927
|
categorieCourante() {
|
|
844
|
-
return
|
|
928
|
+
return Ut.find((e) => e.key === this.categorie);
|
|
845
929
|
},
|
|
846
930
|
selectionne() {
|
|
847
931
|
return this.draft.reclamantSelectionne;
|
|
848
932
|
},
|
|
849
933
|
selectedTrouve: {
|
|
850
934
|
get() {
|
|
851
|
-
return this.categorie === "tout" ||
|
|
935
|
+
return this.categorie === "tout" || this.categorieOf(this.selectionne) === this.categorie ? this.selectionne : null;
|
|
852
936
|
},
|
|
853
937
|
set(e) {
|
|
854
938
|
this.select(e);
|
|
@@ -856,14 +940,14 @@ var q = [
|
|
|
856
940
|
}
|
|
857
941
|
},
|
|
858
942
|
async created() {
|
|
859
|
-
await
|
|
943
|
+
this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await jt(Ut.map((e) => e.icon)), this.iconsReady = !0;
|
|
860
944
|
},
|
|
861
945
|
beforeUnmount() {
|
|
862
946
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
863
947
|
},
|
|
864
948
|
methods: {
|
|
865
949
|
select(e) {
|
|
866
|
-
e && (this.draft.selectReclamant(e), this.categorie !== "tout" && (this.categorie =
|
|
950
|
+
e && (this.draft.selectReclamant(e), this.categorie !== "tout" && (this.categorie = this.categorieOf(e) ?? this.categorie));
|
|
867
951
|
},
|
|
868
952
|
setCategorie(e) {
|
|
869
953
|
e !== this.categorie && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
|
|
@@ -873,8 +957,8 @@ var q = [
|
|
|
873
957
|
},
|
|
874
958
|
rechercher(e) {
|
|
875
959
|
let t = (e ?? "").trim();
|
|
876
|
-
t.length < 2 ? (this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1) : (this.controller?.abort(), this.controller = new AbortController(), this.rechercheEnCours = !0, this.data.searchReclamants(this.categorie, t, { signal: this.controller.signal }).then((e) => {
|
|
877
|
-
this.trouves = e ?? [], this.rechercheFaite = !0, this.rechercheEnCours = !1;
|
|
960
|
+
t.length < 2 ? (this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1) : (this.controller?.abort(), this.controller = new AbortController(), this.rechercheEnCours = !0, this.data.searchReclamants(this.categorie === "tout" ? this.autorisees.join(",") : this.categorie, t, { signal: this.controller.signal }).then((e) => {
|
|
961
|
+
this.trouves = (e ?? []).filter((e) => this.typesAutorises.includes(e.type)), this.rechercheFaite = !0, this.rechercheEnCours = !1;
|
|
878
962
|
}).catch(() => {
|
|
879
963
|
this.rechercheEnCours = !1;
|
|
880
964
|
}));
|
|
@@ -882,82 +966,90 @@ var q = [
|
|
|
882
966
|
cleReclamant(e) {
|
|
883
967
|
return e ? `${e.type}|${e.id}` : null;
|
|
884
968
|
},
|
|
885
|
-
categorieOf
|
|
886
|
-
|
|
887
|
-
return
|
|
969
|
+
categorieOf(e) {
|
|
970
|
+
let t = ke(e);
|
|
971
|
+
return this.autorisees.includes(t) ? t : null;
|
|
888
972
|
},
|
|
889
|
-
|
|
890
|
-
return
|
|
973
|
+
sortiLibelle(e) {
|
|
974
|
+
return e?.dateSortie == null ? "sorti" : `sorti le ${Pt(e.dateSortie)}`;
|
|
891
975
|
},
|
|
892
976
|
nomsOf(e) {
|
|
893
977
|
return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
|
|
894
978
|
},
|
|
895
979
|
titreOf(e) {
|
|
896
980
|
if (!e?.individus) return e?.libelle ?? "";
|
|
897
|
-
let t =
|
|
981
|
+
let t = this.categorieOf(e);
|
|
898
982
|
return t === "locataire" ? e.libelleReclamant || this.nomsOf(e) : t === "demandeur" ? this.nomsOf(e) : e.libelleReclamant;
|
|
899
983
|
},
|
|
900
984
|
referenceOf(e) {
|
|
901
985
|
if (!e?.individus) return "";
|
|
902
|
-
let t =
|
|
903
|
-
return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" :
|
|
986
|
+
let t = this.categorieOf(e);
|
|
987
|
+
return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : Ae(e).libelle;
|
|
904
988
|
},
|
|
905
989
|
detailOf(e) {
|
|
906
990
|
let t = e?.individus ?? [];
|
|
907
|
-
if (["
|
|
991
|
+
if (!["locataire", "demandeur"].includes(ke(e))) {
|
|
908
992
|
let e = t[0];
|
|
909
993
|
return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
|
|
910
994
|
}
|
|
911
995
|
return t.map((t) => {
|
|
912
|
-
let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${
|
|
996
|
+
let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${Pt(t.dateSortie)}` : null, i = [Wt[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
|
|
913
997
|
return i ? `${n} (${i})` : n;
|
|
914
998
|
}).join(", ");
|
|
915
999
|
}
|
|
916
1000
|
}
|
|
917
|
-
},
|
|
1001
|
+
}, Kt = {
|
|
918
1002
|
key: 0,
|
|
919
1003
|
class: "d-flex flex-column gap-3"
|
|
920
|
-
},
|
|
1004
|
+
}, qt = { class: "d-flex flex-wrap gap-2" }, Jt = ["onClick"], Yt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Xt = { class: "min-w-0" }, Zt = {
|
|
921
1005
|
key: 0,
|
|
922
1006
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
923
|
-
},
|
|
1007
|
+
}, Qt = { class: "text-muted d-block text-truncate" }, $t = { key: 0 }, en = {
|
|
924
1008
|
key: 0,
|
|
925
1009
|
class: "text-muted d-block text-truncate"
|
|
926
|
-
},
|
|
1010
|
+
}, tn = {
|
|
927
1011
|
key: 0,
|
|
928
1012
|
class: "text-muted"
|
|
929
1013
|
};
|
|
930
|
-
function
|
|
931
|
-
let
|
|
932
|
-
return
|
|
1014
|
+
function nn(e, t, n, r, i, a) {
|
|
1015
|
+
let o = P("font-awesome-icon"), s = P("reclamant-type-badge-component"), c = P("amsom-autocomplete");
|
|
1016
|
+
return i.iconsReady ? (k(), x("div", Kt, [S("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), S("div", qt, [(k(!0), x(_, null, M(a.categories, (e) => (k(), x("button", {
|
|
933
1017
|
key: e.key,
|
|
934
1018
|
type: "button",
|
|
935
|
-
class:
|
|
936
|
-
onClick: (t) =>
|
|
937
|
-
}, [
|
|
1019
|
+
class: D(["btn btn-sm d-inline-flex align-items-center gap-2", i.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
|
|
1020
|
+
onClick: (t) => a.setCategorie(e.key)
|
|
1021
|
+
}, [T(o, {
|
|
938
1022
|
icon: e.icon,
|
|
939
1023
|
"fixed-width": ""
|
|
940
|
-
}, null, 8, ["icon"]),
|
|
941
|
-
|
|
942
|
-
(
|
|
943
|
-
key:
|
|
944
|
-
modelValue:
|
|
945
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
946
|
-
items:
|
|
1024
|
+
}, null, 8, ["icon"]), S("span", null, F(e.label), 1)], 10, Jt))), 128))])]), S("div", null, [
|
|
1025
|
+
S("label", Yt, F(a.categorieCourante.recherche), 1),
|
|
1026
|
+
(k(), y(c, {
|
|
1027
|
+
key: i.categorie,
|
|
1028
|
+
modelValue: a.selectedTrouve,
|
|
1029
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.selectedTrouve = e,
|
|
1030
|
+
items: i.trouves,
|
|
947
1031
|
"filtering-function": ({ items: e }) => e,
|
|
948
|
-
loading:
|
|
949
|
-
"get-id":
|
|
1032
|
+
loading: i.rechercheEnCours,
|
|
1033
|
+
"get-id": a.cleReclamant,
|
|
950
1034
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
951
|
-
placeholder:
|
|
1035
|
+
placeholder: a.categorieCourante.placeholder,
|
|
952
1036
|
"input-size": "sm",
|
|
953
1037
|
"hide-choices": "",
|
|
954
1038
|
"debounce-delay": 0,
|
|
955
|
-
onSearch:
|
|
1039
|
+
onSearch: a.rechercherPlusTard
|
|
956
1040
|
}, {
|
|
957
|
-
options:
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1041
|
+
options: R((e) => [S("div", Xt, [
|
|
1042
|
+
S("div", { class: D(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
|
|
1043
|
+
T(s, {
|
|
1044
|
+
reclamant: e,
|
|
1045
|
+
"icon-only": "",
|
|
1046
|
+
class: "me-1"
|
|
1047
|
+
}, null, 8, ["reclamant"]),
|
|
1048
|
+
w(" " + F(a.titreOf(e)) + " ", 1),
|
|
1049
|
+
e?.estActif ? b("", !0) : (k(), x("span", Zt, F(a.categorieOf(e) === "demandeur" ? "inactive" : a.sortiLibelle(e)), 1))
|
|
1050
|
+
], 2),
|
|
1051
|
+
S("small", Qt, [w(F(a.referenceOf(e)) + " ", 1), e?.adresse ? (k(), x("span", $t, " — " + F(e.adresse), 1)) : b("", !0)]),
|
|
1052
|
+
a.detailOf(e) ? (k(), x("small", en, F(a.detailOf(e)), 1)) : b("", !0)
|
|
961
1053
|
])]),
|
|
962
1054
|
_: 1
|
|
963
1055
|
}, 8, [
|
|
@@ -970,89 +1062,110 @@ function _t(e, t, r, c, d, f) {
|
|
|
970
1062
|
"placeholder",
|
|
971
1063
|
"onSearch"
|
|
972
1064
|
])),
|
|
973
|
-
|
|
974
|
-
])])) :
|
|
1065
|
+
i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (k(), x("small", tn, F(a.categorieCourante.aucun), 1)) : b("", !0)
|
|
1066
|
+
])])) : b("", !0);
|
|
975
1067
|
}
|
|
976
|
-
var
|
|
1068
|
+
var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
|
|
977
1069
|
name: "ProvenanceSelecteurBlock",
|
|
978
1070
|
setup() {
|
|
979
|
-
return {
|
|
1071
|
+
return {
|
|
1072
|
+
draft: G(),
|
|
1073
|
+
data: Z(),
|
|
1074
|
+
options: Q()
|
|
1075
|
+
};
|
|
1076
|
+
},
|
|
1077
|
+
data() {
|
|
1078
|
+
return { iconsReady: !1 };
|
|
980
1079
|
},
|
|
981
1080
|
computed: {
|
|
982
1081
|
provenances() {
|
|
983
|
-
return
|
|
1082
|
+
return this.options.provenances;
|
|
1083
|
+
},
|
|
1084
|
+
loaded() {
|
|
1085
|
+
return this.data.cache.provenances != null;
|
|
984
1086
|
},
|
|
985
1087
|
selected() {
|
|
986
1088
|
return this.draft.draft.provenance;
|
|
987
1089
|
},
|
|
1090
|
+
libelleFige() {
|
|
1091
|
+
return this.data.cache.provenances?.find((e) => e.id === this.selected)?.libelle ?? this.selected ?? "—";
|
|
1092
|
+
},
|
|
988
1093
|
provenanceChoisie() {
|
|
989
1094
|
return this.provenances.find((e) => e.id === this.selected) ?? null;
|
|
990
1095
|
}
|
|
991
|
-
}
|
|
992
|
-
|
|
1096
|
+
},
|
|
1097
|
+
async created() {
|
|
1098
|
+
await jt([...Object.values(V), Se]), this.iconsReady = !0;
|
|
1099
|
+
},
|
|
1100
|
+
methods: { iconOf: Ce }
|
|
1101
|
+
}, on = {
|
|
993
1102
|
key: 0,
|
|
994
1103
|
class: "fs-7 text-muted"
|
|
995
|
-
},
|
|
1104
|
+
}, sn = { class: "fw-medium" }, cn = { key: 1 }, ln = { class: "d-flex flex-wrap gap-2" }, un = ["onClick"], dn = {
|
|
996
1105
|
key: 0,
|
|
997
1106
|
class: "fs-7 text-danger mt-1"
|
|
998
1107
|
};
|
|
999
|
-
function
|
|
1000
|
-
let
|
|
1001
|
-
return
|
|
1108
|
+
function fn(e, t, n, r, i, a) {
|
|
1109
|
+
let o = P("font-awesome-icon");
|
|
1110
|
+
return r.draft.isReadonly("provenance") ? (k(), x("div", on, [t[0] ||= w(" Provenance du contact : ", -1), S("span", sn, [i.iconsReady && a.selected ? (k(), y(o, {
|
|
1002
1111
|
key: 0,
|
|
1003
|
-
icon:
|
|
1112
|
+
icon: a.iconOf(a.selected),
|
|
1004
1113
|
"fixed-width": ""
|
|
1005
|
-
}, null, 8, ["icon"])) :
|
|
1006
|
-
t[1] ||=
|
|
1007
|
-
|
|
1114
|
+
}, null, 8, ["icon"])) : b("", !0), w(" " + F(a.libelleFige), 1)])])) : (k(), x("div", cn, [
|
|
1115
|
+
t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [w(" Provenance du contact "), S("span", { class: "text-danger" }, "*")], -1),
|
|
1116
|
+
S("div", ln, [(k(!0), x(_, null, M(a.provenances, (e) => (k(), x("button", {
|
|
1008
1117
|
key: e.id,
|
|
1009
1118
|
type: "button",
|
|
1010
|
-
class:
|
|
1011
|
-
onClick: (t) =>
|
|
1012
|
-
}, [
|
|
1119
|
+
class: D(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === a.selected ? "btn-primary" : "btn-outline-primary"]),
|
|
1120
|
+
onClick: (t) => r.draft.setProvenance(e.id)
|
|
1121
|
+
}, [i.iconsReady ? (k(), y(o, {
|
|
1122
|
+
key: 0,
|
|
1013
1123
|
icon: e.icon,
|
|
1014
1124
|
"fixed-width": ""
|
|
1015
|
-
}, null, 8, ["icon"]),
|
|
1016
|
-
|
|
1125
|
+
}, null, 8, ["icon"])) : b("", !0), S("span", null, F(e.libelle), 1)], 10, un))), 128))]),
|
|
1126
|
+
a.loaded && !a.provenanceChoisie ? (k(), x("div", dn, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : b("", !0)
|
|
1017
1127
|
]));
|
|
1018
1128
|
}
|
|
1019
|
-
var
|
|
1129
|
+
var pn = /*#__PURE__*/ K(an, [["render", fn]]), mn = {
|
|
1020
1130
|
name: "EtapeReclamantBlock",
|
|
1021
1131
|
components: {
|
|
1022
|
-
ReclamantRechercheBlock:
|
|
1023
|
-
ProvenanceSelecteurBlock:
|
|
1132
|
+
ReclamantRechercheBlock: rn,
|
|
1133
|
+
ProvenanceSelecteurBlock: pn
|
|
1024
1134
|
},
|
|
1025
1135
|
props: { premiere: {
|
|
1026
1136
|
type: Boolean,
|
|
1027
1137
|
default: !1
|
|
1028
1138
|
} },
|
|
1029
1139
|
setup() {
|
|
1030
|
-
return { draft:
|
|
1140
|
+
return { draft: G() };
|
|
1031
1141
|
}
|
|
1032
|
-
},
|
|
1033
|
-
function
|
|
1034
|
-
let
|
|
1035
|
-
return
|
|
1142
|
+
}, hn = { class: "d-flex flex-column gap-3" }, gn = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
|
|
1143
|
+
function _n(e, t, n, r, i, a) {
|
|
1144
|
+
let o = P("provenance-selecteur-block"), s = P("font-awesome-icon"), c = P("reclamant-recherche-block");
|
|
1145
|
+
return k(), x("div", hn, [n.premiere ? (k(), y(o, { key: 0 })) : b("", !0), N(e.$slots, "reclamant", {
|
|
1036
1146
|
reclamant: r.draft.reclamantSelectionne,
|
|
1037
1147
|
select: r.draft.selectReclamant
|
|
1038
|
-
}, () => [
|
|
1148
|
+
}, () => [S("div", gn, [T(s, {
|
|
1039
1149
|
icon: "user",
|
|
1040
1150
|
class: "text-primary me-2"
|
|
1041
|
-
}), t[0] ||=
|
|
1151
|
+
}), t[0] ||= w(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), T(c)])]);
|
|
1042
1152
|
}
|
|
1043
|
-
var
|
|
1153
|
+
var vn = /*#__PURE__*/ K(mn, [["render", _n]]);
|
|
1044
1154
|
//#endregion
|
|
1045
1155
|
//#region src/utils/text.js
|
|
1046
|
-
function
|
|
1156
|
+
function $(e, t = !0) {
|
|
1047
1157
|
if (!e) return null;
|
|
1048
1158
|
let n = e.toString().normalize("NFD").replace(/[̀-ͯ]/g, "");
|
|
1049
1159
|
return t ? n.toLowerCase() : n;
|
|
1050
1160
|
}
|
|
1051
1161
|
//#endregion
|
|
1052
1162
|
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1053
|
-
var
|
|
1163
|
+
var yn = {
|
|
1054
1164
|
name: "ReclamantSelecteurBlock",
|
|
1055
|
-
components: {
|
|
1165
|
+
components: {
|
|
1166
|
+
AmsomAutocomplete: z,
|
|
1167
|
+
ReclamantTypeBadgeComponent: Ht
|
|
1168
|
+
},
|
|
1056
1169
|
props: {
|
|
1057
1170
|
mode: {
|
|
1058
1171
|
type: String,
|
|
@@ -1065,8 +1178,8 @@ var Ft = {
|
|
|
1065
1178
|
},
|
|
1066
1179
|
setup() {
|
|
1067
1180
|
return {
|
|
1068
|
-
draft:
|
|
1069
|
-
options:
|
|
1181
|
+
draft: G(),
|
|
1182
|
+
options: Q()
|
|
1070
1183
|
};
|
|
1071
1184
|
},
|
|
1072
1185
|
computed: {
|
|
@@ -1092,66 +1205,73 @@ var Ft = {
|
|
|
1092
1205
|
this.draft.selectReclamant(e);
|
|
1093
1206
|
},
|
|
1094
1207
|
filterReclamants({ search: e, items: t }) {
|
|
1095
|
-
let n = (
|
|
1096
|
-
return n ? t.filter((e) => (
|
|
1208
|
+
let n = ($(e) ?? "").trim();
|
|
1209
|
+
return n ? t.filter((e) => ($(e?.libelle) ?? "").includes(n)) : t;
|
|
1097
1210
|
}
|
|
1098
1211
|
}
|
|
1099
|
-
},
|
|
1212
|
+
}, bn = {
|
|
1100
1213
|
key: 0,
|
|
1101
1214
|
class: "fs-7 text-muted"
|
|
1102
|
-
},
|
|
1215
|
+
}, xn = { class: "fw-medium" }, Sn = {
|
|
1103
1216
|
key: 0,
|
|
1104
1217
|
class: "btn-group btn-group-sm",
|
|
1105
1218
|
role: "group"
|
|
1106
|
-
},
|
|
1107
|
-
function
|
|
1108
|
-
let
|
|
1109
|
-
return
|
|
1219
|
+
}, Cn = ["onClick"], wn = ["value"], Tn = ["value"];
|
|
1220
|
+
function En(e, t, n, r, i, a) {
|
|
1221
|
+
let o = P("reclamant-type-badge-component"), s = P("amsom-autocomplete");
|
|
1222
|
+
return a.estFige ? (k(), x("div", bn, [t[2] ||= w(" Réclamant : ", -1), S("span", xn, F(a.reclamantSelectionne?.libelle), 1)])) : (k(), x("div", {
|
|
1110
1223
|
key: 1,
|
|
1111
|
-
class:
|
|
1112
|
-
}, [t[3] ||=
|
|
1224
|
+
class: D(n.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
|
|
1225
|
+
}, [t[3] ||= S("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), a.presentation === "switch" ? (k(), x("div", Sn, [(k(!0), x(_, null, M(a.reclamants, (e, t) => (k(), x("button", {
|
|
1113
1226
|
key: t,
|
|
1114
1227
|
type: "button",
|
|
1115
|
-
class:
|
|
1116
|
-
onClick: (t) =>
|
|
1117
|
-
},
|
|
1228
|
+
class: D(["btn btn-sm py-0", e === a.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
|
|
1229
|
+
onClick: (t) => a.select(e)
|
|
1230
|
+
}, F(e.libelle), 11, Cn))), 128))])) : a.presentation === "autocomplete" ? (k(), y(s, {
|
|
1118
1231
|
key: 1,
|
|
1119
|
-
"model-value":
|
|
1120
|
-
items:
|
|
1121
|
-
"get-id":
|
|
1232
|
+
"model-value": a.reclamantSelectionne,
|
|
1233
|
+
items: a.reclamants,
|
|
1234
|
+
"get-id": a.reclamantId,
|
|
1122
1235
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1123
|
-
"filtering-function":
|
|
1236
|
+
"filtering-function": a.filterReclamants,
|
|
1124
1237
|
placeholder: "Rechercher un réclamant…",
|
|
1125
1238
|
"input-size": "sm",
|
|
1126
1239
|
"hide-choices": "",
|
|
1127
|
-
class:
|
|
1128
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1129
|
-
},
|
|
1240
|
+
class: D(n.inline ? "" : "w-100"),
|
|
1241
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.select(e)
|
|
1242
|
+
}, {
|
|
1243
|
+
options: R((e) => [T(o, {
|
|
1244
|
+
reclamant: e,
|
|
1245
|
+
"icon-only": "",
|
|
1246
|
+
class: "me-1"
|
|
1247
|
+
}, null, 8, ["reclamant"]), w(" " + F(e?.libelle), 1)]),
|
|
1248
|
+
_: 1
|
|
1249
|
+
}, 8, [
|
|
1130
1250
|
"model-value",
|
|
1131
1251
|
"items",
|
|
1132
1252
|
"get-id",
|
|
1133
1253
|
"get-input-libelle",
|
|
1134
1254
|
"filtering-function",
|
|
1135
1255
|
"class"
|
|
1136
|
-
])) : (
|
|
1256
|
+
])) : (k(), x("select", {
|
|
1137
1257
|
key: 2,
|
|
1138
|
-
class:
|
|
1139
|
-
value:
|
|
1140
|
-
onChange: t[1] ||= (e) =>
|
|
1141
|
-
}, [(
|
|
1258
|
+
class: D(["form-select form-select-sm", n.inline ? "w-auto" : ""]),
|
|
1259
|
+
value: a.reclamants.indexOf(a.reclamantSelectionne),
|
|
1260
|
+
onChange: t[1] ||= (e) => a.select(a.reclamants[e.target.value])
|
|
1261
|
+
}, [(k(!0), x(_, null, M(a.reclamants, (e, t) => (k(), x("option", {
|
|
1142
1262
|
key: t,
|
|
1143
1263
|
value: t
|
|
1144
|
-
},
|
|
1264
|
+
}, F(e.libelle), 9, Tn))), 128))], 42, wn))], 2));
|
|
1145
1265
|
}
|
|
1146
1266
|
//#endregion
|
|
1147
1267
|
//#region src/components/EtapeCategorieBlock.vue
|
|
1148
|
-
var
|
|
1268
|
+
var Dn = {
|
|
1149
1269
|
name: "EtapeCategorieBlock",
|
|
1150
1270
|
components: {
|
|
1151
|
-
AmsomOverlay:
|
|
1152
|
-
AmsomAutocomplete:
|
|
1153
|
-
ReclamantSelecteurBlock: /* @__PURE__ */
|
|
1154
|
-
ProvenanceSelecteurBlock:
|
|
1271
|
+
AmsomOverlay: g,
|
|
1272
|
+
AmsomAutocomplete: z,
|
|
1273
|
+
ReclamantSelecteurBlock: /* @__PURE__ */ K(yn, [["render", En]]),
|
|
1274
|
+
ProvenanceSelecteurBlock: pn
|
|
1155
1275
|
},
|
|
1156
1276
|
props: { premiere: {
|
|
1157
1277
|
type: Boolean,
|
|
@@ -1159,9 +1279,9 @@ var Ut = {
|
|
|
1159
1279
|
} },
|
|
1160
1280
|
setup() {
|
|
1161
1281
|
return {
|
|
1162
|
-
draft:
|
|
1163
|
-
data:
|
|
1164
|
-
options:
|
|
1282
|
+
draft: G(),
|
|
1283
|
+
data: Z(),
|
|
1284
|
+
options: Q()
|
|
1165
1285
|
};
|
|
1166
1286
|
},
|
|
1167
1287
|
data() {
|
|
@@ -1278,7 +1398,7 @@ var Ut = {
|
|
|
1278
1398
|
});
|
|
1279
1399
|
},
|
|
1280
1400
|
registerIcons() {
|
|
1281
|
-
return
|
|
1401
|
+
return jt([
|
|
1282
1402
|
...this.data.cache.categories ?? [],
|
|
1283
1403
|
...this.data.cache.types ?? [],
|
|
1284
1404
|
...this.data.cache.natures ?? [],
|
|
@@ -1286,11 +1406,11 @@ var Ut = {
|
|
|
1286
1406
|
].map((e) => e.icon));
|
|
1287
1407
|
},
|
|
1288
1408
|
filterMotifs({ search: e, items: t }) {
|
|
1289
|
-
let n = (
|
|
1409
|
+
let n = ($(e) ?? "").trim();
|
|
1290
1410
|
if (!n) return t;
|
|
1291
1411
|
let r = n.split(/\s+/);
|
|
1292
1412
|
return t.filter((e) => {
|
|
1293
|
-
let t =
|
|
1413
|
+
let t = $(`${e.libelle} ${e.categorie} ${e.type} ${e.nature}`) ?? "";
|
|
1294
1414
|
return r.every((e) => t.includes(e));
|
|
1295
1415
|
});
|
|
1296
1416
|
},
|
|
@@ -1313,57 +1433,57 @@ var Ut = {
|
|
|
1313
1433
|
return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
|
|
1314
1434
|
}
|
|
1315
1435
|
}
|
|
1316
|
-
},
|
|
1436
|
+
}, On = {
|
|
1317
1437
|
key: 0,
|
|
1318
1438
|
class: "d-flex flex-column gap-3"
|
|
1319
|
-
},
|
|
1439
|
+
}, kn = { key: 2 }, An = { class: "d-flex flex-wrap align-items-center gap-2" }, jn = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, Mn = { key: 3 }, Nn = { class: "d-flex align-items-center gap-2" }, Pn = { class: "min-w-0" }, Fn = { class: "fw-medium text-truncate" }, In = { class: "text-muted d-block text-truncate" }, Ln = {
|
|
1320
1440
|
key: 4,
|
|
1321
1441
|
class: "d-flex align-items-center gap-2 text-muted fs-7"
|
|
1322
|
-
},
|
|
1442
|
+
}, Rn = {
|
|
1323
1443
|
key: 5,
|
|
1324
1444
|
class: "d-flex flex-wrap align-items-center gap-2"
|
|
1325
|
-
},
|
|
1445
|
+
}, zn = ["onClick"], Bn = { key: 6 }, Vn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, Hn = { class: "row justify-content-around g-3" }, Un = ["title", "onClick"], Wn = { class: "fs-7 mt-1 lh-sm" }, Gn = {
|
|
1326
1446
|
key: 0,
|
|
1327
1447
|
class: "col-12 text-muted fs-7"
|
|
1328
|
-
},
|
|
1448
|
+
}, Kn = [
|
|
1329
1449
|
"id",
|
|
1330
1450
|
"checked",
|
|
1331
1451
|
"disabled",
|
|
1332
1452
|
"onChange"
|
|
1333
|
-
],
|
|
1334
|
-
function
|
|
1335
|
-
let
|
|
1336
|
-
return
|
|
1337
|
-
default:
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1453
|
+
], qn = ["for"];
|
|
1454
|
+
function Jn(e, t, n, r, i, a) {
|
|
1455
|
+
let o = P("provenance-selecteur-block"), s = P("reclamant-selecteur-block"), c = P("font-awesome-icon"), l = P("amsom-autocomplete"), u = P("amsom-overlay");
|
|
1456
|
+
return k(), y(u, { loading: r.data.isLoading && !r.data.cache.motifs || !i.iconsReady }, {
|
|
1457
|
+
default: R(() => [i.iconsReady ? (k(), x("div", On, [
|
|
1458
|
+
n.premiere ? (k(), y(o, { key: 0 })) : b("", !0),
|
|
1459
|
+
r.options.reclamantMode === "step" ? b("", !0) : (k(), y(s, { key: 1 })),
|
|
1460
|
+
a.motifFige && a.selectionChain.length ? (k(), x("div", kn, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), S("div", An, [(k(!0), x(_, null, M(a.selectionChain, (e, t) => (k(), x(_, { key: e.level }, [t > 0 ? (k(), y(c, {
|
|
1341
1461
|
key: 0,
|
|
1342
1462
|
icon: "fa-solid fa-chevron-right",
|
|
1343
1463
|
class: "text-muted fs-7"
|
|
1344
|
-
})) :
|
|
1464
|
+
})) : b("", !0), S("span", jn, [e.icon ? (k(), y(c, {
|
|
1345
1465
|
key: 0,
|
|
1346
1466
|
icon: e.icon,
|
|
1347
1467
|
"fixed-width": ""
|
|
1348
|
-
}, null, 8, ["icon"])) :
|
|
1349
|
-
|
|
1350
|
-
modelValue:
|
|
1351
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1352
|
-
items:
|
|
1353
|
-
"get-id":
|
|
1354
|
-
"get-input-libelle":
|
|
1355
|
-
"get-input-libelle-from-id":
|
|
1356
|
-
"filtering-function":
|
|
1468
|
+
}, null, 8, ["icon"])) : b("", !0), w(" " + F(e.libelle), 1)])], 64))), 128))])])) : b("", !0),
|
|
1469
|
+
a.motifFige ? b("", !0) : (k(), x("div", Mn, [t[2] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), T(l, {
|
|
1470
|
+
modelValue: a.motifRecherche,
|
|
1471
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.motifRecherche = e,
|
|
1472
|
+
items: a.allowedMotifs,
|
|
1473
|
+
"get-id": a.getMotifId,
|
|
1474
|
+
"get-input-libelle": a.getMotifInputLibelle,
|
|
1475
|
+
"get-input-libelle-from-id": a.motifLibelleFromId,
|
|
1476
|
+
"filtering-function": a.filterMotifs,
|
|
1357
1477
|
placeholder: "Rechercher (motif, catégorie, type, nature)…",
|
|
1358
1478
|
"input-size": "sm",
|
|
1359
1479
|
"hide-choices": ""
|
|
1360
1480
|
}, {
|
|
1361
|
-
options:
|
|
1481
|
+
options: R((e) => [S("div", Nn, [e?.icon ? (k(), y(c, {
|
|
1362
1482
|
key: 0,
|
|
1363
1483
|
icon: e.icon,
|
|
1364
1484
|
class: "text-primary",
|
|
1365
1485
|
"fixed-width": ""
|
|
1366
|
-
}, null, 8, ["icon"])) :
|
|
1486
|
+
}, null, 8, ["icon"])) : b("", !0), S("div", Pn, [S("div", Fn, F(e?.libelle), 1), S("small", In, F(e?.categorie) + " › " + F(e?.type) + " › " + F(e?.nature), 1)])])]),
|
|
1367
1487
|
_: 1
|
|
1368
1488
|
}, 8, [
|
|
1369
1489
|
"modelValue",
|
|
@@ -1373,67 +1493,67 @@ function dn(e, t, r, c, d, f) {
|
|
|
1373
1493
|
"get-input-libelle-from-id",
|
|
1374
1494
|
"filtering-function"
|
|
1375
1495
|
])])),
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1496
|
+
a.motifFige ? b("", !0) : (k(), x("div", Ln, [...t[3] ||= [
|
|
1497
|
+
S("hr", { class: "flex-grow-1 my-0" }, null, -1),
|
|
1498
|
+
S("span", null, "ou sélection guidée", -1),
|
|
1499
|
+
S("hr", { class: "flex-grow-1 my-0" }, null, -1)
|
|
1380
1500
|
]])),
|
|
1381
|
-
!
|
|
1501
|
+
!a.motifFige && a.selectionChain.length ? (k(), x("div", Rn, [(k(!0), x(_, null, M(a.selectionChain, (e, t) => (k(), x(_, { key: e.level }, [t > 0 ? (k(), y(c, {
|
|
1382
1502
|
key: 0,
|
|
1383
1503
|
icon: "fa-solid fa-chevron-right",
|
|
1384
1504
|
class: "text-muted fs-7"
|
|
1385
|
-
})) :
|
|
1505
|
+
})) : b("", !0), S("button", {
|
|
1386
1506
|
type: "button",
|
|
1387
1507
|
class: "btn btn-sm btn-primary rounded-pill d-inline-flex align-items-center gap-2",
|
|
1388
|
-
onClick: (t) =>
|
|
1508
|
+
onClick: (t) => a.goBackTo(e.level)
|
|
1389
1509
|
}, [
|
|
1390
|
-
e.icon ? (
|
|
1510
|
+
e.icon ? (k(), y(c, {
|
|
1391
1511
|
key: 0,
|
|
1392
1512
|
icon: e.icon,
|
|
1393
1513
|
"fixed-width": ""
|
|
1394
|
-
}, null, 8, ["icon"])) :
|
|
1395
|
-
|
|
1396
|
-
|
|
1514
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1515
|
+
S("span", null, F(e.libelle), 1),
|
|
1516
|
+
T(c, {
|
|
1397
1517
|
icon: "fa-solid fa-xmark",
|
|
1398
1518
|
class: "fs-7 opacity-75"
|
|
1399
1519
|
})
|
|
1400
|
-
], 8,
|
|
1401
|
-
!
|
|
1520
|
+
], 8, zn)], 64))), 128))])) : b("", !0),
|
|
1521
|
+
!a.motifFige && a.currentLevel ? (k(), x("div", Bn, [S("label", Vn, F(a.currentLevel.title), 1), S("div", Hn, [(k(!0), x(_, null, M(a.currentLevel.options, (e) => (k(), x("div", {
|
|
1402
1522
|
key: e.id,
|
|
1403
1523
|
class: "col-3 text-center"
|
|
1404
|
-
}, [
|
|
1524
|
+
}, [S("button", {
|
|
1405
1525
|
type: "button",
|
|
1406
1526
|
class: "btn btn-lg btn-outline-primary btn-circle d-flex align-items-center justify-content-center mx-auto",
|
|
1407
1527
|
title: e.libelle,
|
|
1408
|
-
onClick: (t) =>
|
|
1409
|
-
}, [e.icon ? (
|
|
1528
|
+
onClick: (t) => a.currentLevel.select(e.id)
|
|
1529
|
+
}, [e.icon ? (k(), y(c, {
|
|
1410
1530
|
key: 0,
|
|
1411
1531
|
icon: e.icon,
|
|
1412
1532
|
size: "lg"
|
|
1413
|
-
}, null, 8, ["icon"])) :
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
], -1), (
|
|
1533
|
+
}, null, 8, ["icon"])) : b("", !0)], 8, Un), S("div", Wn, F(e.libelle), 1)]))), 128)), a.currentLevel.options.length ? b("", !0) : (k(), x("div", Gn, " Aucun choix disponible "))])])) : b("", !0),
|
|
1534
|
+
a.motifsAssocies.length ? (k(), x(_, { key: 7 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
1535
|
+
S("hr", { class: "flex-grow-1 my-0" }),
|
|
1536
|
+
S("span", null, "Autres motifs liés"),
|
|
1537
|
+
S("hr", { class: "flex-grow-1 my-0" })
|
|
1538
|
+
], -1), (k(!0), x(_, null, M(a.motifsAssocies, (e) => (k(), x("div", {
|
|
1419
1539
|
key: e.idMotif,
|
|
1420
1540
|
class: "form-check form-switch"
|
|
1421
|
-
}, [
|
|
1541
|
+
}, [S("input", {
|
|
1422
1542
|
id: `assoc-${e.idMotif}`,
|
|
1423
1543
|
class: "form-check-input",
|
|
1424
1544
|
type: "checkbox",
|
|
1425
|
-
checked:
|
|
1426
|
-
disabled:
|
|
1427
|
-
onChange: (t) =>
|
|
1428
|
-
}, null, 40,
|
|
1545
|
+
checked: a.isActive(e.idMotif),
|
|
1546
|
+
disabled: a.motifFige,
|
|
1547
|
+
onChange: (t) => a.toggleMotifAssocie(e)
|
|
1548
|
+
}, null, 40, Kn), S("label", {
|
|
1429
1549
|
class: "form-check-label fs-7",
|
|
1430
1550
|
for: `assoc-${e.idMotif}`
|
|
1431
|
-
},
|
|
1432
|
-
])) :
|
|
1551
|
+
}, F(e.libelle) + " ? ", 9, qn)]))), 128))], 64)) : b("", !0)
|
|
1552
|
+
])) : b("", !0)]),
|
|
1433
1553
|
_: 1
|
|
1434
1554
|
}, 8, ["loading"]);
|
|
1435
1555
|
}
|
|
1436
|
-
var
|
|
1556
|
+
var Yn = /*#__PURE__*/ K(Dn, [["render", Jn]]), Xn = {
|
|
1437
1557
|
B: "briefcase",
|
|
1438
1558
|
M: "store",
|
|
1439
1559
|
W: "dungeon",
|
|
@@ -1443,17 +1563,17 @@ var fn = /*#__PURE__*/ F(Ut, [["render", dn]]), pn = {
|
|
|
1443
1563
|
S: "square-parking",
|
|
1444
1564
|
V: "hands-holding"
|
|
1445
1565
|
};
|
|
1446
|
-
function
|
|
1447
|
-
return e === "L" ? t ? "building" : "house" :
|
|
1566
|
+
function Zn(e, t = !1, n = "circle-question") {
|
|
1567
|
+
return e === "L" ? t ? "building" : "house" : Xn[e] ?? n;
|
|
1448
1568
|
}
|
|
1449
|
-
function
|
|
1569
|
+
function Qn(e) {
|
|
1450
1570
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1451
1571
|
}
|
|
1452
1572
|
//#endregion
|
|
1453
1573
|
//#region src/components/CiblePickerBlock.vue
|
|
1454
|
-
var
|
|
1574
|
+
var $n = 0, er = {
|
|
1455
1575
|
name: "CiblePickerBlock",
|
|
1456
|
-
components: { AmsomAutocomplete:
|
|
1576
|
+
components: { AmsomAutocomplete: z },
|
|
1457
1577
|
props: {
|
|
1458
1578
|
patrimoine: {
|
|
1459
1579
|
type: Object,
|
|
@@ -1504,11 +1624,11 @@ var gn = 0, _n = {
|
|
|
1504
1624
|
"set-module-precis"
|
|
1505
1625
|
],
|
|
1506
1626
|
setup() {
|
|
1507
|
-
return { data:
|
|
1627
|
+
return { data: Z() };
|
|
1508
1628
|
},
|
|
1509
1629
|
data() {
|
|
1510
1630
|
return {
|
|
1511
|
-
uid:
|
|
1631
|
+
uid: ++$n,
|
|
1512
1632
|
rechercheContrat: "",
|
|
1513
1633
|
contratsTrouves: [],
|
|
1514
1634
|
rechercheEnCours: !1,
|
|
@@ -1655,6 +1775,7 @@ var gn = 0, _n = {
|
|
|
1655
1775
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
1656
1776
|
},
|
|
1657
1777
|
methods: {
|
|
1778
|
+
formatDate: Pt,
|
|
1658
1779
|
rechercherPlusTard(e) {
|
|
1659
1780
|
clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
|
|
1660
1781
|
},
|
|
@@ -1674,16 +1795,16 @@ var gn = 0, _n = {
|
|
|
1674
1795
|
},
|
|
1675
1796
|
filterOn(e) {
|
|
1676
1797
|
return ({ search: t, items: n }) => {
|
|
1677
|
-
let r = (
|
|
1678
|
-
return r ? n.filter((t) => (
|
|
1798
|
+
let r = ($(t) ?? "").trim();
|
|
1799
|
+
return r ? n.filter((t) => ($(t?.[e]) ?? "").includes(r)) : n;
|
|
1679
1800
|
};
|
|
1680
1801
|
},
|
|
1681
1802
|
filterModules({ search: e, items: t }) {
|
|
1682
|
-
let n = (
|
|
1683
|
-
return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || (
|
|
1803
|
+
let n = ($(e) ?? "").trim();
|
|
1804
|
+
return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || ($(this.moduleInputLibelle(e)) ?? "").includes(n) || ($(e?._autreLibelle) ?? "").includes(n)) : t;
|
|
1684
1805
|
},
|
|
1685
|
-
getCategorieModuleIcon:
|
|
1686
|
-
categorieLibelle:
|
|
1806
|
+
getCategorieModuleIcon: Zn,
|
|
1807
|
+
categorieLibelle: Qn,
|
|
1687
1808
|
moduleLibelle(e) {
|
|
1688
1809
|
return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
|
|
1689
1810
|
},
|
|
@@ -1695,84 +1816,84 @@ var gn = 0, _n = {
|
|
|
1695
1816
|
return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
|
|
1696
1817
|
}
|
|
1697
1818
|
}
|
|
1698
|
-
},
|
|
1819
|
+
}, tr = { class: "d-flex flex-column gap-3" }, nr = {
|
|
1699
1820
|
class: "btn-group w-100",
|
|
1700
1821
|
role: "group"
|
|
1701
|
-
},
|
|
1822
|
+
}, rr = ["onClick"], ir = { class: "text-muted d-block mt-1" }, ar = {
|
|
1702
1823
|
key: 0,
|
|
1703
1824
|
class: "form-check"
|
|
1704
|
-
},
|
|
1825
|
+
}, or = ["id", "checked"], sr = ["for"], cr = { key: 1 }, lr = { class: "min-w-0" }, ur = { class: "fw-medium text-truncate text-capitalize" }, dr = { class: "d-flex flex-wrap align-items-center gap-1" }, fr = { class: "text-muted" }, pr = {
|
|
1705
1826
|
key: 0,
|
|
1706
1827
|
class: "badge bg-info"
|
|
1707
|
-
},
|
|
1828
|
+
}, mr = {
|
|
1708
1829
|
key: 1,
|
|
1709
1830
|
class: "badge bg-warning"
|
|
1710
|
-
},
|
|
1831
|
+
}, hr = {
|
|
1711
1832
|
key: 0,
|
|
1712
1833
|
class: "text-muted d-block text-truncate"
|
|
1713
|
-
},
|
|
1834
|
+
}, gr = { key: 1 }, _r = { class: "row g-2" }, vr = ["aria-pressed", "onClick"], yr = { class: "min-w-0" }, br = { class: "d-block fw-semibold fs-6" }, xr = { class: "d-block text-muted" }, Sr = {
|
|
1714
1835
|
key: 2,
|
|
1715
1836
|
class: "row g-3"
|
|
1716
|
-
},
|
|
1837
|
+
}, Cr = { class: "min-w-0" }, wr = { class: "fw-medium text-truncate" }, Tr = { class: "text-muted d-block text-truncate" }, Er = ["value"], Dr = ["value"], Or = ["value"], kr = {
|
|
1717
1838
|
key: 0,
|
|
1718
1839
|
class: "col-12 col-md-6"
|
|
1719
|
-
},
|
|
1840
|
+
}, Ar = { class: "d-flex flex-wrap align-items-center gap-1" }, jr = ["title"], Mr = { class: "text-muted" }, Nr = {
|
|
1720
1841
|
key: 1,
|
|
1721
1842
|
class: "d-block text-truncate"
|
|
1722
|
-
},
|
|
1843
|
+
}, Pr = {
|
|
1723
1844
|
key: 2,
|
|
1724
1845
|
class: "text-muted d-block"
|
|
1725
|
-
},
|
|
1846
|
+
}, Fr = {
|
|
1726
1847
|
key: 0,
|
|
1727
1848
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1728
|
-
},
|
|
1729
|
-
function
|
|
1730
|
-
let
|
|
1731
|
-
return
|
|
1732
|
-
|
|
1733
|
-
t[7] ||=
|
|
1734
|
-
|
|
1849
|
+
}, Ir = { class: "form-check mb-0 ms-3" }, Lr = ["id", "checked"], Rr = ["for"];
|
|
1850
|
+
function zr(e, t, n, r, i, a) {
|
|
1851
|
+
let o = P("font-awesome-icon"), s = P("amsom-autocomplete");
|
|
1852
|
+
return k(), x("div", tr, [
|
|
1853
|
+
S("div", null, [
|
|
1854
|
+
t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
|
|
1855
|
+
S("div", nr, [(k(!0), x(_, null, M(a.availableModes, (t) => (k(), x("button", {
|
|
1735
1856
|
key: t.key,
|
|
1736
1857
|
type: "button",
|
|
1737
|
-
class:
|
|
1858
|
+
class: D(["btn btn-sm", n.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
1738
1859
|
onClick: (n) => e.$emit("change-mode", t.key)
|
|
1739
|
-
}, [
|
|
1860
|
+
}, [T(o, {
|
|
1740
1861
|
icon: t.icon,
|
|
1741
1862
|
class: "me-1"
|
|
1742
|
-
}, null, 8, ["icon"]),
|
|
1743
|
-
|
|
1863
|
+
}, null, 8, ["icon"]), w(" " + F(t.label), 1)], 10, rr))), 128))]),
|
|
1864
|
+
S("small", ir, F(a.currentMode?.aide), 1)
|
|
1744
1865
|
]),
|
|
1745
|
-
|
|
1746
|
-
id: `contrat-reclamant-${
|
|
1866
|
+
n.cibleMode === "contrat" ? (k(), x(_, { key: 0 }, [n.afficheCaseContratReclamant ? (k(), x("div", ar, [S("input", {
|
|
1867
|
+
id: `contrat-reclamant-${i.uid}`,
|
|
1747
1868
|
class: "form-check-input",
|
|
1748
1869
|
type: "checkbox",
|
|
1749
|
-
checked:
|
|
1870
|
+
checked: n.contratReclamant,
|
|
1750
1871
|
onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
|
|
1751
|
-
}, null, 40,
|
|
1872
|
+
}, null, 40, or), S("label", {
|
|
1752
1873
|
class: "form-check-label fs-7",
|
|
1753
|
-
for: `contrat-reclamant-${
|
|
1754
|
-
}, " Contrat du réclamant ", 8,
|
|
1755
|
-
modelValue:
|
|
1756
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
1757
|
-
items:
|
|
1874
|
+
for: `contrat-reclamant-${i.uid}`
|
|
1875
|
+
}, " Contrat du réclamant ", 8, sr)])) : b("", !0), n.contratReclamant ? b("", !0) : (k(), x("div", cr, [t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), T(s, {
|
|
1876
|
+
modelValue: a.selectedContrat,
|
|
1877
|
+
"onUpdate:modelValue": t[1] ||= (e) => a.selectedContrat = e,
|
|
1878
|
+
items: i.contratsTrouves,
|
|
1758
1879
|
"filtering-function": ({ items: e }) => e,
|
|
1759
|
-
loading:
|
|
1880
|
+
loading: i.rechercheEnCours,
|
|
1760
1881
|
"get-id": (e) => e ? `${e.typeContrat}|${e.idContrat}` : null,
|
|
1761
|
-
"get-input-libelle":
|
|
1882
|
+
"get-input-libelle": a.contratInputLibelle,
|
|
1762
1883
|
placeholder: "N° de contrat, locataire, module ou adresse…",
|
|
1763
1884
|
"input-size": "sm",
|
|
1764
1885
|
"hide-choices": "",
|
|
1765
1886
|
"debounce-delay": 0,
|
|
1766
|
-
onSearch:
|
|
1887
|
+
onSearch: a.rechercherPlusTard
|
|
1767
1888
|
}, {
|
|
1768
|
-
options:
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
e?.nbModules > 1 ? (
|
|
1773
|
-
e?.estSorti ? (
|
|
1889
|
+
options: R((e) => [S("div", lr, [
|
|
1890
|
+
S("div", ur, F(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
|
|
1891
|
+
S("div", dr, [
|
|
1892
|
+
S("small", fr, "N° " + F(e?.typeContrat) + "/" + F(e?.idContrat), 1),
|
|
1893
|
+
e?.nbModules > 1 ? (k(), x("span", pr, F(e.nbModules) + " modules", 1)) : b("", !0),
|
|
1894
|
+
e?.estSorti ? (k(), x("span", mr, F(e.dateSortie ? `Sorti le ${a.formatDate(e.dateSortie)}` : "Sorti"), 1)) : b("", !0)
|
|
1774
1895
|
]),
|
|
1775
|
-
|
|
1896
|
+
a.contratAdresse(e) ? (k(), x("small", hr, F(a.contratAdresse(e)), 1)) : b("", !0)
|
|
1776
1897
|
])]),
|
|
1777
1898
|
_: 1
|
|
1778
1899
|
}, 8, [
|
|
@@ -1783,28 +1904,28 @@ function nr(e, t, r, c, d, f) {
|
|
|
1783
1904
|
"get-id",
|
|
1784
1905
|
"get-input-libelle",
|
|
1785
1906
|
"onSearch"
|
|
1786
|
-
])]))], 64)) :
|
|
1787
|
-
|
|
1907
|
+
])]))], 64)) : b("", !0),
|
|
1908
|
+
n.cibleMode === "patrimoine" ? (k(), x("div", gr, [t[9] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), S("div", _r, [(k(!0), x(_, null, M(a.portees, (t) => (k(), x("div", {
|
|
1788
1909
|
key: t.titre,
|
|
1789
1910
|
class: "col-12 col-md-6"
|
|
1790
|
-
}, [
|
|
1911
|
+
}, [S("button", {
|
|
1791
1912
|
type: "button",
|
|
1792
|
-
class:
|
|
1793
|
-
"aria-pressed": t.modulePrecis ===
|
|
1913
|
+
class: D(["btn w-100 h-100 text-start d-flex align-items-center gap-3 p-3 rounded border text-primary", t.modulePrecis === n.modulePrecis ? "border-primary bg-light" : "bg-white"]),
|
|
1914
|
+
"aria-pressed": t.modulePrecis === n.modulePrecis,
|
|
1794
1915
|
onClick: (n) => e.$emit("set-module-precis", t.modulePrecis)
|
|
1795
|
-
}, [
|
|
1916
|
+
}, [T(o, {
|
|
1796
1917
|
icon: t.icon,
|
|
1797
1918
|
class: "fs-4",
|
|
1798
1919
|
"fixed-width": ""
|
|
1799
|
-
}, null, 8, ["icon"]),
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
modelValue:
|
|
1803
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
1804
|
-
items:
|
|
1920
|
+
}, null, 8, ["icon"]), S("span", yr, [S("span", br, F(t.titre), 1), S("small", xr, F(t.aide), 1)])], 10, vr)]))), 128))])])) : b("", !0),
|
|
1921
|
+
n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (k(), x("div", Sr, [S("div", { class: D(["col-12 d-flex flex-column gap-3", { "col-md-6": a.afficheModule }]) }, [n.cibleMode === "patrimoine" ? (k(), x(_, { key: 0 }, [
|
|
1922
|
+
S("div", null, [t[10] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), T(s, {
|
|
1923
|
+
modelValue: a.selectedCommune,
|
|
1924
|
+
"onUpdate:modelValue": t[2] ||= (e) => a.selectedCommune = e,
|
|
1925
|
+
items: r.data.cache.communes || [],
|
|
1805
1926
|
"get-id": (e) => e?.idCommune,
|
|
1806
1927
|
"get-input-libelle": (e) => e?.commune ?? "",
|
|
1807
|
-
"filtering-function":
|
|
1928
|
+
"filtering-function": a.filterOn("commune"),
|
|
1808
1929
|
placeholder: "Rechercher une commune…",
|
|
1809
1930
|
"input-size": "sm",
|
|
1810
1931
|
"hide-choices": ""
|
|
@@ -1815,19 +1936,19 @@ function nr(e, t, r, c, d, f) {
|
|
|
1815
1936
|
"get-input-libelle",
|
|
1816
1937
|
"filtering-function"
|
|
1817
1938
|
])]),
|
|
1818
|
-
|
|
1819
|
-
modelValue:
|
|
1820
|
-
"onUpdate:modelValue": t[3] ||= (e) =>
|
|
1821
|
-
items:
|
|
1939
|
+
S("div", null, [t[11] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), T(s, {
|
|
1940
|
+
modelValue: a.selectedAdresse,
|
|
1941
|
+
"onUpdate:modelValue": t[3] ||= (e) => a.selectedAdresse = e,
|
|
1942
|
+
items: a.adresses,
|
|
1822
1943
|
"get-id": (e) => e?.idEntree,
|
|
1823
1944
|
"get-input-libelle": (e) => e?.entree ?? "",
|
|
1824
|
-
"filtering-function":
|
|
1825
|
-
disabled: !
|
|
1945
|
+
"filtering-function": a.filterOn("entree"),
|
|
1946
|
+
disabled: !n.patrimoine.idCommune,
|
|
1826
1947
|
placeholder: "Rechercher une adresse…",
|
|
1827
1948
|
"input-size": "sm",
|
|
1828
1949
|
"hide-choices": ""
|
|
1829
1950
|
}, {
|
|
1830
|
-
options:
|
|
1951
|
+
options: R((e) => [S("div", Cr, [S("div", wr, F(e?.entree), 1), S("small", Tr, F(e?.commune) + " — Programme " + F(e?.codeProgramme), 1)])]),
|
|
1831
1952
|
_: 1
|
|
1832
1953
|
}, 8, [
|
|
1833
1954
|
"modelValue",
|
|
@@ -1837,13 +1958,13 @@ function nr(e, t, r, c, d, f) {
|
|
|
1837
1958
|
"filtering-function",
|
|
1838
1959
|
"disabled"
|
|
1839
1960
|
])]),
|
|
1840
|
-
|
|
1841
|
-
modelValue:
|
|
1842
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
1843
|
-
items:
|
|
1961
|
+
S("div", null, [t[12] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), T(s, {
|
|
1962
|
+
modelValue: a.selectedEtage,
|
|
1963
|
+
"onUpdate:modelValue": t[4] ||= (e) => a.selectedEtage = e,
|
|
1964
|
+
items: a.etages,
|
|
1844
1965
|
"get-id": (e) => e?.id,
|
|
1845
1966
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1846
|
-
disabled: !
|
|
1967
|
+
disabled: !n.patrimoine.idEntree,
|
|
1847
1968
|
placeholder: "Tous les étages…",
|
|
1848
1969
|
"input-size": "sm",
|
|
1849
1970
|
"hide-choices": ""
|
|
@@ -1854,50 +1975,50 @@ function nr(e, t, r, c, d, f) {
|
|
|
1854
1975
|
"get-input-libelle",
|
|
1855
1976
|
"disabled"
|
|
1856
1977
|
])])
|
|
1857
|
-
], 64)) : (
|
|
1858
|
-
|
|
1978
|
+
], 64)) : (k(), x(_, { key: 1 }, [
|
|
1979
|
+
S("div", null, [t[13] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), S("input", {
|
|
1859
1980
|
class: "form-control form-control-sm",
|
|
1860
1981
|
disabled: "",
|
|
1861
|
-
value:
|
|
1862
|
-
}, null, 8,
|
|
1863
|
-
|
|
1982
|
+
value: n.patrimoine.commune ?? "—"
|
|
1983
|
+
}, null, 8, Er)]),
|
|
1984
|
+
S("div", null, [t[14] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), S("input", {
|
|
1864
1985
|
class: "form-control form-control-sm",
|
|
1865
1986
|
disabled: "",
|
|
1866
|
-
value:
|
|
1867
|
-
}, null, 8,
|
|
1868
|
-
|
|
1987
|
+
value: n.patrimoine.entree ?? "—"
|
|
1988
|
+
}, null, 8, Dr)]),
|
|
1989
|
+
S("div", null, [t[15] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), S("input", {
|
|
1869
1990
|
class: "form-control form-control-sm",
|
|
1870
1991
|
disabled: "",
|
|
1871
|
-
value:
|
|
1872
|
-
}, null, 8,
|
|
1873
|
-
], 64))], 2),
|
|
1874
|
-
t[16] ||=
|
|
1875
|
-
|
|
1876
|
-
modelValue:
|
|
1877
|
-
"onUpdate:modelValue": t[5] ||= (e) =>
|
|
1878
|
-
items:
|
|
1992
|
+
value: n.patrimoine.etage ?? "—"
|
|
1993
|
+
}, null, 8, Or)])
|
|
1994
|
+
], 64))], 2), a.afficheModule ? (k(), x("div", kr, [
|
|
1995
|
+
t[16] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
|
|
1996
|
+
T(s, {
|
|
1997
|
+
modelValue: a.selectedModule,
|
|
1998
|
+
"onUpdate:modelValue": t[5] ||= (e) => a.selectedModule = e,
|
|
1999
|
+
items: a.modules,
|
|
1879
2000
|
"get-id": (e) => e?.idModule,
|
|
1880
|
-
"get-input-libelle": (e) =>
|
|
1881
|
-
"filtering-function":
|
|
1882
|
-
disabled:
|
|
2001
|
+
"get-input-libelle": (e) => a.moduleInputLibelle(e),
|
|
2002
|
+
"filtering-function": a.filterModules,
|
|
2003
|
+
disabled: a.areModulesLocked,
|
|
1883
2004
|
placeholder: "Rechercher un module…",
|
|
1884
2005
|
"input-size": "sm",
|
|
1885
2006
|
"hide-choices": ""
|
|
1886
2007
|
}, {
|
|
1887
|
-
options:
|
|
1888
|
-
e?._autreLibelle ? (
|
|
2008
|
+
options: R((e) => [S("div", { class: D(["min-w-0 w-100 rounded position-relative", e?._autreLibelle ? "bg-yellow-subtle p-2" : ""]) }, [
|
|
2009
|
+
e?._autreLibelle ? (k(), y(o, {
|
|
1889
2010
|
key: 0,
|
|
1890
2011
|
icon: "building",
|
|
1891
2012
|
class: "position-absolute top-0 end-0 m-1 text-muted",
|
|
1892
2013
|
title: "Autre adresse ou étage du même programme"
|
|
1893
|
-
})) :
|
|
1894
|
-
|
|
1895
|
-
|
|
2014
|
+
})) : b("", !0),
|
|
2015
|
+
S("div", { class: D(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", a.isExit(e) ? "text-decoration-line-through" : ""]]) }, F(a.moduleLibelle(e)), 3),
|
|
2016
|
+
S("div", Ar, [a.categorieLibelle(e) ? (k(), x("span", {
|
|
1896
2017
|
key: 0,
|
|
1897
2018
|
class: "badge bg-info",
|
|
1898
2019
|
title: e?.categorieModule
|
|
1899
|
-
}, [
|
|
1900
|
-
e?._autreLibelle ? (
|
|
2020
|
+
}, [T(o, { icon: a.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, jr)) : b("", !0), S("small", Mr, "N° " + F(e?.idModule), 1)]),
|
|
2021
|
+
e?._autreLibelle ? (k(), x("small", Nr, F(e._autreLibelle), 1)) : e?.etage == null ? b("", !0) : (k(), x("small", Pr, " Étage " + F(e.etage), 1))
|
|
1901
2022
|
], 2)]),
|
|
1902
2023
|
_: 1
|
|
1903
2024
|
}, 8, [
|
|
@@ -1908,35 +2029,35 @@ function nr(e, t, r, c, d, f) {
|
|
|
1908
2029
|
"filtering-function",
|
|
1909
2030
|
"disabled"
|
|
1910
2031
|
]),
|
|
1911
|
-
|
|
2032
|
+
n.locataireActuelOption ? (k(), x("div", Fr, [S("div", { class: D(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", n.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [T(o, {
|
|
1912
2033
|
icon: "circle-info",
|
|
1913
2034
|
class: "mt-1"
|
|
1914
|
-
}),
|
|
1915
|
-
id: `locataire-actuel-${
|
|
2035
|
+
}), S("span", null, F(n.locataireActuelOption.hint), 1)], 2), S("div", Ir, [S("input", {
|
|
2036
|
+
id: `locataire-actuel-${i.uid}`,
|
|
1916
2037
|
class: "form-check-input",
|
|
1917
2038
|
type: "checkbox",
|
|
1918
|
-
checked:
|
|
2039
|
+
checked: n.locataireActuelOption.reprendre,
|
|
1919
2040
|
onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
|
|
1920
|
-
}, null, 40,
|
|
2041
|
+
}, null, 40, Lr), S("label", {
|
|
1921
2042
|
class: "form-check-label fs-7",
|
|
1922
|
-
for: `locataire-actuel-${
|
|
1923
|
-
}, " Rattacher au locataire actuel du module ", 8,
|
|
1924
|
-
])) :
|
|
2043
|
+
for: `locataire-actuel-${i.uid}`
|
|
2044
|
+
}, " Rattacher au locataire actuel du module ", 8, Rr)])])) : b("", !0)
|
|
2045
|
+
])) : b("", !0)])) : b("", !0)
|
|
1925
2046
|
]);
|
|
1926
2047
|
}
|
|
1927
2048
|
//#endregion
|
|
1928
2049
|
//#region src/components/EtapeCibleBlock.vue
|
|
1929
|
-
var
|
|
2050
|
+
var Br = {
|
|
1930
2051
|
name: "EtapeCibleBlock",
|
|
1931
2052
|
components: {
|
|
1932
|
-
AmsomOverlay:
|
|
1933
|
-
CiblePickerBlock: /* @__PURE__ */
|
|
2053
|
+
AmsomOverlay: g,
|
|
2054
|
+
CiblePickerBlock: /* @__PURE__ */ K(er, [["render", zr]])
|
|
1934
2055
|
},
|
|
1935
2056
|
setup() {
|
|
1936
2057
|
return {
|
|
1937
|
-
draft:
|
|
1938
|
-
data:
|
|
1939
|
-
options:
|
|
2058
|
+
draft: G(),
|
|
2059
|
+
data: Z(),
|
|
2060
|
+
options: Q()
|
|
1940
2061
|
};
|
|
1941
2062
|
},
|
|
1942
2063
|
computed: {
|
|
@@ -2036,78 +2157,78 @@ var rr = {
|
|
|
2036
2157
|
e === "contrat" ? this.draft.prefillFromModule(t, this.mainModule) : this.mainModule && (this.draft.prefillFromModule(t, this.mainModule), this.mainModule.idCommune != null && await this.data.loadAdresses(this.mainModule.idCommune), this.mainModule.codeProgramme != null && await this.data.loadModulesOfProgramme(this.mainModule.codeProgramme));
|
|
2037
2158
|
}
|
|
2038
2159
|
}
|
|
2039
|
-
},
|
|
2160
|
+
}, Vr = { class: "d-flex flex-column gap-3" }, Hr = {
|
|
2040
2161
|
key: 0,
|
|
2041
2162
|
class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
|
|
2042
|
-
},
|
|
2163
|
+
}, Ur = { class: "fs-7" }, Wr = {
|
|
2043
2164
|
key: 1,
|
|
2044
2165
|
class: "d-flex flex-column gap-1"
|
|
2045
|
-
},
|
|
2166
|
+
}, Gr = {
|
|
2046
2167
|
key: 0,
|
|
2047
2168
|
class: "text-muted me-1"
|
|
2048
|
-
},
|
|
2169
|
+
}, Kr = { class: "d-flex align-items-center gap-2" }, qr = { class: "fw-medium fs-7" }, Jr = { class: "form-check form-switch mb-0" }, Yr = [
|
|
2049
2170
|
"id",
|
|
2050
2171
|
"checked",
|
|
2051
2172
|
"onChange"
|
|
2052
|
-
],
|
|
2173
|
+
], Xr = ["for"], Zr = {
|
|
2053
2174
|
key: 0,
|
|
2054
2175
|
class: "mt-2"
|
|
2055
2176
|
};
|
|
2056
|
-
function
|
|
2057
|
-
let
|
|
2058
|
-
return
|
|
2059
|
-
default:
|
|
2060
|
-
|
|
2177
|
+
function Qr(e, t, n, r, i, a) {
|
|
2178
|
+
let o = P("font-awesome-icon"), s = P("cible-picker-block"), c = P("amsom-overlay");
|
|
2179
|
+
return k(), y(c, { loading: r.data.isLoading }, {
|
|
2180
|
+
default: R(() => [S("div", Vr, [
|
|
2181
|
+
a.motifLibelle ? (k(), x("div", Hr, [T(o, {
|
|
2061
2182
|
icon: "tag",
|
|
2062
2183
|
class: "text-primary"
|
|
2063
|
-
}),
|
|
2064
|
-
|
|
2184
|
+
}), S("span", Ur, [t[9] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), w(F(a.motifLibelle), 1)])])) : b("", !0),
|
|
2185
|
+
a.cibleFigee ? (k(), x("div", Wr, [(k(!0), x(_, null, M(r.draft.draft.lignes, (e, t) => (k(), x("span", {
|
|
2065
2186
|
key: t,
|
|
2066
2187
|
class: "fs-7"
|
|
2067
2188
|
}, [
|
|
2068
|
-
|
|
2189
|
+
T(o, {
|
|
2069
2190
|
icon: "location-dot",
|
|
2070
2191
|
class: "text-primary me-2"
|
|
2071
2192
|
}),
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
]))), 128))])) : (
|
|
2075
|
-
onChangeMode: t[0] ||= (e) =>
|
|
2076
|
-
onSelectCommune: t[1] ||= (e) =>
|
|
2077
|
-
onSelectAdresse: t[2] ||= (e) =>
|
|
2078
|
-
onSelectEtage: t[3] ||= (e) =>
|
|
2079
|
-
onSelectModule: t[4] ||= (e) =>
|
|
2080
|
-
onSelectContrat: t[5] ||= (e) =>
|
|
2081
|
-
onToggleContratReclamant: t[6] ||= (e) =>
|
|
2082
|
-
onToggleReprendreLocataireActuel: t[7] ||= (e) =>
|
|
2083
|
-
onSetModulePrecis: t[8] ||= (e) =>
|
|
2193
|
+
a.lignesAssociees.length ? (k(), x("span", Gr, F(t === 0 ? a.motifLibelle : e.libelle) + " : ", 1)) : b("", !0),
|
|
2194
|
+
w(" " + F(r.draft.cibleResume(e)), 1)
|
|
2195
|
+
]))), 128))])) : (k(), y(s, fe({ key: 2 }, a.pickerProps(a.lignePrincipale), {
|
|
2196
|
+
onChangeMode: t[0] ||= (e) => a.onChangeMode(e),
|
|
2197
|
+
onSelectCommune: t[1] ||= (e) => a.onSelectCommune(e),
|
|
2198
|
+
onSelectAdresse: t[2] ||= (e) => a.onSelectAdresse(e),
|
|
2199
|
+
onSelectEtage: t[3] ||= (e) => a.onSelectEtage(e),
|
|
2200
|
+
onSelectModule: t[4] ||= (e) => a.onSelectModule(e),
|
|
2201
|
+
onSelectContrat: t[5] ||= (e) => a.onSelectContrat(e),
|
|
2202
|
+
onToggleContratReclamant: t[6] ||= (e) => a.onToggleContratReclamant(e),
|
|
2203
|
+
onToggleReprendreLocataireActuel: t[7] ||= (e) => a.onToggleReprendre(e),
|
|
2204
|
+
onSetModulePrecis: t[8] ||= (e) => r.draft.setModulePrecis(0, e)
|
|
2084
2205
|
}), null, 16)),
|
|
2085
|
-
!
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
], -1), (
|
|
2206
|
+
!a.cibleFigee && a.lignesAssociees.length && a.reclamantType !== "D" ? (k(), x(_, { key: 3 }, [t[10] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
2207
|
+
S("hr", { class: "flex-grow-1 my-0" }),
|
|
2208
|
+
S("span", null, "Cible des autres motifs"),
|
|
2209
|
+
S("hr", { class: "flex-grow-1 my-0" })
|
|
2210
|
+
], -1), (k(!0), x(_, null, M(a.lignesAssociees, (e, t) => (k(), x("div", {
|
|
2090
2211
|
key: e.idMotif,
|
|
2091
2212
|
class: "border rounded p-2"
|
|
2092
|
-
}, [
|
|
2213
|
+
}, [S("div", Kr, [S("span", qr, F(e.libelle), 1), S("div", Jr, [S("input", {
|
|
2093
2214
|
id: `memecible-${e.idMotif}`,
|
|
2094
2215
|
class: "form-check-input",
|
|
2095
2216
|
type: "checkbox",
|
|
2096
2217
|
checked: !e.patrimoine,
|
|
2097
|
-
onChange: (e) =>
|
|
2098
|
-
}, null, 40,
|
|
2218
|
+
onChange: (e) => r.draft.toggleCibleOverride(t + 1)
|
|
2219
|
+
}, null, 40, Yr), S("label", {
|
|
2099
2220
|
class: "form-check-label fs-7",
|
|
2100
2221
|
for: `memecible-${e.idMotif}`
|
|
2101
|
-
}, " Même cible que la ligne principale ", 8,
|
|
2102
|
-
onChangeMode: (e) =>
|
|
2103
|
-
onSelectCommune: (e) =>
|
|
2104
|
-
onSelectAdresse: (e) =>
|
|
2105
|
-
onSelectEtage: (e) =>
|
|
2106
|
-
onSelectModule: (e) =>
|
|
2107
|
-
onSelectContrat: (e) =>
|
|
2108
|
-
onToggleContratReclamant: (e) =>
|
|
2109
|
-
onToggleReprendreLocataireActuel: (e) =>
|
|
2110
|
-
onSetModulePrecis: (e) =>
|
|
2222
|
+
}, " Même cible que la ligne principale ", 8, Xr)])]), e.patrimoine ? (k(), x("div", Zr, [T(s, fe({ ref_for: !0 }, a.pickerProps(e), {
|
|
2223
|
+
onChangeMode: (e) => a.onChangeMode(e, t + 1),
|
|
2224
|
+
onSelectCommune: (e) => a.onSelectCommune(e, t + 1),
|
|
2225
|
+
onSelectAdresse: (e) => a.onSelectAdresse(e, t + 1),
|
|
2226
|
+
onSelectEtage: (e) => a.onSelectEtage(e, t + 1),
|
|
2227
|
+
onSelectModule: (e) => a.onSelectModule(e, t + 1),
|
|
2228
|
+
onSelectContrat: (e) => a.onSelectContrat(e, t + 1),
|
|
2229
|
+
onToggleContratReclamant: (e) => a.onToggleContratReclamant(e, t + 1),
|
|
2230
|
+
onToggleReprendreLocataireActuel: (e) => a.onToggleReprendre(e, t + 1),
|
|
2231
|
+
onSetModulePrecis: (e) => r.draft.setModulePrecis(t + 1, e)
|
|
2111
2232
|
}), null, 16, [
|
|
2112
2233
|
"onChangeMode",
|
|
2113
2234
|
"onSelectCommune",
|
|
@@ -2118,14 +2239,14 @@ function hr(e, t, r, c, d, f) {
|
|
|
2118
2239
|
"onToggleContratReclamant",
|
|
2119
2240
|
"onToggleReprendreLocataireActuel",
|
|
2120
2241
|
"onSetModulePrecis"
|
|
2121
|
-
])])) :
|
|
2242
|
+
])])) : b("", !0)]))), 128))], 64)) : b("", !0)
|
|
2122
2243
|
])]),
|
|
2123
2244
|
_: 1
|
|
2124
2245
|
}, 8, ["loading"]);
|
|
2125
2246
|
}
|
|
2126
|
-
var
|
|
2247
|
+
var $r = /*#__PURE__*/ K(Br, [["render", Qr]]), ei = {
|
|
2127
2248
|
name: "LigneDocumentBlock",
|
|
2128
|
-
components: { AmsomUploadFile:
|
|
2249
|
+
components: { AmsomUploadFile: xe },
|
|
2129
2250
|
props: {
|
|
2130
2251
|
index: {
|
|
2131
2252
|
type: Number,
|
|
@@ -2142,9 +2263,9 @@ var gr = /*#__PURE__*/ F(rr, [["render", hr]]), _r = {
|
|
|
2142
2263
|
},
|
|
2143
2264
|
emits: ["update"]
|
|
2144
2265
|
};
|
|
2145
|
-
function
|
|
2146
|
-
let
|
|
2147
|
-
return
|
|
2266
|
+
function ti(e, t, n, r, i, a) {
|
|
2267
|
+
let o = P("amsom-upload-file");
|
|
2268
|
+
return k(), x("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), T(o, {
|
|
2148
2269
|
"model-value": n.fichier,
|
|
2149
2270
|
renameable: "",
|
|
2150
2271
|
"output-format": "object",
|
|
@@ -2158,12 +2279,12 @@ function vr(e, t, n, r, i, a) {
|
|
|
2158
2279
|
"read-only"
|
|
2159
2280
|
])]);
|
|
2160
2281
|
}
|
|
2161
|
-
var
|
|
2282
|
+
var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
|
|
2162
2283
|
name: "LigneDetailBlock",
|
|
2163
2284
|
components: {
|
|
2164
|
-
AmsomAutocomplete:
|
|
2165
|
-
AmsomTextarea:
|
|
2166
|
-
LigneDocumentBlock:
|
|
2285
|
+
AmsomAutocomplete: z,
|
|
2286
|
+
AmsomTextarea: be,
|
|
2287
|
+
LigneDocumentBlock: ni
|
|
2167
2288
|
},
|
|
2168
2289
|
props: { index: {
|
|
2169
2290
|
type: Number,
|
|
@@ -2171,12 +2292,12 @@ var yr = /*#__PURE__*/ F(_r, [["render", vr]]), br = 4e3, xr = {
|
|
|
2171
2292
|
} },
|
|
2172
2293
|
setup() {
|
|
2173
2294
|
return {
|
|
2174
|
-
draft:
|
|
2175
|
-
data:
|
|
2295
|
+
draft: G(),
|
|
2296
|
+
data: Z()
|
|
2176
2297
|
};
|
|
2177
2298
|
},
|
|
2178
2299
|
computed: {
|
|
2179
|
-
descriptionMaxLength: () =>
|
|
2300
|
+
descriptionMaxLength: () => ri,
|
|
2180
2301
|
isPrincipale() {
|
|
2181
2302
|
return this.index === 0;
|
|
2182
2303
|
},
|
|
@@ -2194,107 +2315,107 @@ var yr = /*#__PURE__*/ F(_r, [["render", vr]]), br = 4e3, xr = {
|
|
|
2194
2315
|
}
|
|
2195
2316
|
},
|
|
2196
2317
|
methods: {
|
|
2197
|
-
timestampToDateInput:
|
|
2198
|
-
dateInputToTimestamp:
|
|
2318
|
+
timestampToDateInput: Mt,
|
|
2319
|
+
dateInputToTimestamp: Nt,
|
|
2199
2320
|
responsableLibelle(e) {
|
|
2200
2321
|
let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
|
|
2201
2322
|
return t ? `${t.prenom} ${t.nom}` : "";
|
|
2202
2323
|
},
|
|
2203
2324
|
filterCollaborateurs({ search: e, items: t }) {
|
|
2204
|
-
let n = (
|
|
2205
|
-
return n ? t.filter((e) => (
|
|
2325
|
+
let n = ($(e) ?? "").trim();
|
|
2326
|
+
return n ? t.filter((e) => ($(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
|
|
2206
2327
|
}
|
|
2207
2328
|
}
|
|
2208
|
-
},
|
|
2329
|
+
}, ai = { class: "d-flex flex-column gap-2" }, oi = { class: "d-flex align-items-center gap-2 mb-1" }, si = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, ci = {
|
|
2209
2330
|
key: 0,
|
|
2210
2331
|
class: "ms-1 text-danger"
|
|
2211
|
-
},
|
|
2332
|
+
}, li = {
|
|
2212
2333
|
key: 0,
|
|
2213
2334
|
class: "form-check form-switch mb-0"
|
|
2214
|
-
},
|
|
2335
|
+
}, ui = [
|
|
2215
2336
|
"id",
|
|
2216
2337
|
"checked",
|
|
2217
2338
|
"disabled"
|
|
2218
|
-
],
|
|
2339
|
+
], di = ["for"], fi = {
|
|
2219
2340
|
key: 1,
|
|
2220
2341
|
class: "text-muted d-block",
|
|
2221
2342
|
style: { "white-space": "pre-line" }
|
|
2222
|
-
},
|
|
2343
|
+
}, pi = { class: "row g-3" }, mi = { class: "col-6" }, hi = { class: "d-flex align-items-center gap-2 mb-1" }, gi = {
|
|
2223
2344
|
key: 0,
|
|
2224
2345
|
class: "form-check form-switch mb-0"
|
|
2225
|
-
},
|
|
2346
|
+
}, _i = [
|
|
2226
2347
|
"id",
|
|
2227
2348
|
"checked",
|
|
2228
2349
|
"disabled"
|
|
2229
|
-
],
|
|
2350
|
+
], vi = ["for"], yi = ["value"], bi = {
|
|
2230
2351
|
key: 1,
|
|
2231
2352
|
class: "text-muted d-block"
|
|
2232
|
-
},
|
|
2353
|
+
}, xi = {
|
|
2233
2354
|
key: 0,
|
|
2234
2355
|
class: "text-muted d-block"
|
|
2235
|
-
},
|
|
2356
|
+
}, Si = { class: "min-w-0" }, Ci = { class: "fw-medium text-truncate" }, wi = {
|
|
2236
2357
|
key: 0,
|
|
2237
2358
|
class: "text-muted d-block"
|
|
2238
|
-
},
|
|
2359
|
+
}, Ti = {
|
|
2239
2360
|
key: 2,
|
|
2240
2361
|
class: "text-muted"
|
|
2241
|
-
},
|
|
2242
|
-
function
|
|
2243
|
-
let
|
|
2244
|
-
return
|
|
2245
|
-
id: `memedetail-${
|
|
2362
|
+
}, Ei = { class: "col-12 col-md-6" };
|
|
2363
|
+
function Di(e, t, n, r, i, a) {
|
|
2364
|
+
let o = P("amsom-textarea"), s = P("amsom-autocomplete"), c = P("ligne-document-block");
|
|
2365
|
+
return k(), x("div", ai, [S("div", null, [S("div", oi, [S("label", si, [t[6] ||= w(" Description", -1), a.isPrincipale ? (k(), x("span", ci, "*")) : b("", !0)]), a.isPrincipale ? b("", !0) : (k(), x("div", li, [S("input", {
|
|
2366
|
+
id: `memedetail-${a.ligne.idMotif}`,
|
|
2246
2367
|
class: "form-check-input",
|
|
2247
2368
|
type: "checkbox",
|
|
2248
|
-
checked:
|
|
2369
|
+
checked: a.ligne.description == null,
|
|
2249
2370
|
disabled: r.draft.isReadonly("description"),
|
|
2250
2371
|
onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
|
|
2251
|
-
}, null, 40,
|
|
2372
|
+
}, null, 40, ui), S("label", {
|
|
2252
2373
|
class: "form-check-label fs-7",
|
|
2253
|
-
for: `memedetail-${
|
|
2254
|
-
}, " Même description ", 8,
|
|
2374
|
+
for: `memedetail-${a.ligne.idMotif}`
|
|
2375
|
+
}, " Même description ", 8, di)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (k(), y(o, {
|
|
2255
2376
|
key: 0,
|
|
2256
|
-
"model-value":
|
|
2377
|
+
"model-value": a.ligne.description,
|
|
2257
2378
|
"input-size": "sm",
|
|
2258
|
-
rows:
|
|
2259
|
-
maxlength:
|
|
2260
|
-
placeholder:
|
|
2379
|
+
rows: a.isPrincipale ? 4 : 3,
|
|
2380
|
+
maxlength: a.descriptionMaxLength,
|
|
2381
|
+
placeholder: a.isPrincipale ? "Décrivez la sollicitation…" : "Décrivez ce motif…",
|
|
2261
2382
|
"onUpdate:modelValue": t[1] ||= (e) => r.draft.setDescription(n.index, e)
|
|
2262
2383
|
}, null, 8, [
|
|
2263
2384
|
"model-value",
|
|
2264
2385
|
"rows",
|
|
2265
2386
|
"maxlength",
|
|
2266
2387
|
"placeholder"
|
|
2267
|
-
])) : (
|
|
2268
|
-
id: `memedate-${
|
|
2388
|
+
])) : (k(), x("small", fi, F((a.ligne.description ?? a.lignePrincipale.description) || "—"), 1))]), S("div", pi, [S("div", mi, [S("div", null, [S("div", hi, [t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), a.isPrincipale ? b("", !0) : (k(), x("div", gi, [S("input", {
|
|
2389
|
+
id: `memedate-${a.ligne.idMotif}`,
|
|
2269
2390
|
class: "form-check-input",
|
|
2270
2391
|
type: "checkbox",
|
|
2271
|
-
checked: !
|
|
2392
|
+
checked: !a.ligne.dateFaitsOverride,
|
|
2272
2393
|
disabled: r.draft.isReadonly("dateFaits"),
|
|
2273
2394
|
onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
|
|
2274
|
-
}, null, 40,
|
|
2395
|
+
}, null, 40, _i), S("label", {
|
|
2275
2396
|
class: "form-check-label fs-7",
|
|
2276
|
-
for: `memedate-${
|
|
2277
|
-
}, " Même date ", 8,
|
|
2397
|
+
for: `memedate-${a.ligne.idMotif}`
|
|
2398
|
+
}, " Même date ", 8, vi)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (k(), x("input", {
|
|
2278
2399
|
key: 0,
|
|
2279
|
-
value:
|
|
2400
|
+
value: a.timestampToDateInput(a.ligne.dateFaits),
|
|
2280
2401
|
type: "date",
|
|
2281
2402
|
class: "form-control form-control-sm",
|
|
2282
|
-
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index,
|
|
2283
|
-
}, null, 40,
|
|
2284
|
-
t[8] ||=
|
|
2285
|
-
r.draft.isReadonly("responsable") ? (
|
|
2403
|
+
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, a.dateInputToTimestamp(e.target.value))
|
|
2404
|
+
}, null, 40, yi)) : (k(), x("small", bi, F(a.timestampToDateInput(a.dateFaits) || "—"), 1))]), S("div", null, [
|
|
2405
|
+
t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
|
|
2406
|
+
r.draft.isReadonly("responsable") ? (k(), x("small", xi, F(a.responsableLibelle(a.ligne.responsable) || "Déterminé automatiquement"), 1)) : (k(), y(s, {
|
|
2286
2407
|
key: 1,
|
|
2287
|
-
"model-value":
|
|
2288
|
-
items:
|
|
2408
|
+
"model-value": a.ligne.responsable,
|
|
2409
|
+
items: a.collaborateurs,
|
|
2289
2410
|
"get-id": (e) => e?.id,
|
|
2290
|
-
"get-input-libelle":
|
|
2291
|
-
"filtering-function":
|
|
2411
|
+
"get-input-libelle": a.responsableLibelle,
|
|
2412
|
+
"filtering-function": a.filterCollaborateurs,
|
|
2292
2413
|
placeholder: "Rechercher un responsable…",
|
|
2293
2414
|
"input-size": "sm",
|
|
2294
2415
|
"hide-choices": "",
|
|
2295
2416
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2296
2417
|
}, {
|
|
2297
|
-
options:
|
|
2418
|
+
options: R((e) => [S("div", Si, [S("div", Ci, F(e?.prenom) + " " + F(e?.nom), 1), e?.service ? (k(), x("small", wi, F(e.service), 1)) : b("", !0)])]),
|
|
2298
2419
|
_: 1
|
|
2299
2420
|
}, 8, [
|
|
2300
2421
|
"model-value",
|
|
@@ -2303,10 +2424,10 @@ function Wr(e, t, n, r, c, d) {
|
|
|
2303
2424
|
"get-input-libelle",
|
|
2304
2425
|
"filtering-function"
|
|
2305
2426
|
])),
|
|
2306
|
-
|
|
2307
|
-
])]),
|
|
2427
|
+
a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (k(), x("small", Ti, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : b("", !0)
|
|
2428
|
+
])]), S("div", Ei, [T(c, {
|
|
2308
2429
|
index: n.index,
|
|
2309
|
-
fichier:
|
|
2430
|
+
fichier: a.ligne.fichier,
|
|
2310
2431
|
readonly: r.draft.isReadonly("fichier"),
|
|
2311
2432
|
onUpdate: t[5] ||= (e) => r.draft.setFichier(n.index, e)
|
|
2312
2433
|
}, null, 8, [
|
|
@@ -2317,16 +2438,16 @@ function Wr(e, t, n, r, c, d) {
|
|
|
2317
2438
|
}
|
|
2318
2439
|
//#endregion
|
|
2319
2440
|
//#region src/components/EtapeDetailsBlock.vue
|
|
2320
|
-
var
|
|
2441
|
+
var Oi = {
|
|
2321
2442
|
name: "EtapeDetailsBlock",
|
|
2322
2443
|
components: {
|
|
2323
|
-
AmsomOverlay:
|
|
2324
|
-
LigneDetailBlock: /* @__PURE__ */
|
|
2444
|
+
AmsomOverlay: g,
|
|
2445
|
+
LigneDetailBlock: /* @__PURE__ */ K(ii, [["render", Di]])
|
|
2325
2446
|
},
|
|
2326
2447
|
setup() {
|
|
2327
2448
|
return {
|
|
2328
|
-
draft:
|
|
2329
|
-
data:
|
|
2449
|
+
draft: G(),
|
|
2450
|
+
data: Z()
|
|
2330
2451
|
};
|
|
2331
2452
|
},
|
|
2332
2453
|
computed: {
|
|
@@ -2377,67 +2498,67 @@ var Gr = {
|
|
|
2377
2498
|
}
|
|
2378
2499
|
}
|
|
2379
2500
|
}
|
|
2380
|
-
},
|
|
2501
|
+
}, ki = { class: "d-flex flex-column gap-3" }, Ai = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, ji = {
|
|
2381
2502
|
key: 0,
|
|
2382
2503
|
class: "fs-7"
|
|
2383
|
-
},
|
|
2384
|
-
function
|
|
2385
|
-
let
|
|
2386
|
-
return
|
|
2387
|
-
default:
|
|
2388
|
-
|
|
2389
|
-
|
|
2504
|
+
}, Mi = { class: "fs-7" }, Ni = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, Pi = { class: "fs-7" }, Fi = { class: "fs-7" };
|
|
2505
|
+
function Ii(e, t, n, r, i, a) {
|
|
2506
|
+
let o = P("font-awesome-icon"), s = P("ligne-detail-block"), c = P("amsom-overlay");
|
|
2507
|
+
return k(), y(c, { loading: r.data.isLoading && !r.data.cache.collaborateurs }, {
|
|
2508
|
+
default: R(() => [S("div", ki, [
|
|
2509
|
+
S("div", Ai, [a.motifLibelle ? (k(), x("span", ji, [
|
|
2510
|
+
T(o, {
|
|
2390
2511
|
icon: "tag",
|
|
2391
2512
|
class: "text-primary me-2"
|
|
2392
2513
|
}),
|
|
2393
|
-
t[0] ||=
|
|
2394
|
-
|
|
2395
|
-
])) :
|
|
2396
|
-
|
|
2514
|
+
t[0] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2515
|
+
w(F(a.motifLibelle), 1)
|
|
2516
|
+
])) : b("", !0), S("span", Mi, [
|
|
2517
|
+
T(o, {
|
|
2397
2518
|
icon: "location-dot",
|
|
2398
2519
|
class: "text-primary me-2"
|
|
2399
2520
|
}),
|
|
2400
|
-
t[1] ||=
|
|
2401
|
-
|
|
2521
|
+
t[1] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2522
|
+
w(" " + F(r.draft.cibleResume(a.lignePrincipale)), 1)
|
|
2402
2523
|
])]),
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
], -1), (
|
|
2524
|
+
T(s, { index: 0 }),
|
|
2525
|
+
a.lignesAssociees.length ? (k(), x(_, { key: 0 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
2526
|
+
S("hr", { class: "flex-grow-1 my-0" }),
|
|
2527
|
+
S("span", null, "Détail des autres motifs"),
|
|
2528
|
+
S("hr", { class: "flex-grow-1 my-0" })
|
|
2529
|
+
], -1), (k(!0), x(_, null, M(a.lignesAssociees, (e, n) => (k(), x("div", {
|
|
2409
2530
|
key: e.idMotif,
|
|
2410
2531
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2411
|
-
}, [
|
|
2412
|
-
|
|
2532
|
+
}, [S("div", Ni, [S("span", Pi, [
|
|
2533
|
+
T(o, {
|
|
2413
2534
|
icon: "tag",
|
|
2414
2535
|
class: "text-primary me-2"
|
|
2415
2536
|
}),
|
|
2416
|
-
t[2] ||=
|
|
2417
|
-
|
|
2418
|
-
]),
|
|
2419
|
-
|
|
2537
|
+
t[2] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2538
|
+
w(" " + F(e.libelle), 1)
|
|
2539
|
+
]), S("span", Fi, [
|
|
2540
|
+
T(o, {
|
|
2420
2541
|
icon: "location-dot",
|
|
2421
2542
|
class: "text-primary me-2"
|
|
2422
2543
|
}),
|
|
2423
|
-
t[3] ||=
|
|
2424
|
-
|
|
2425
|
-
])]),
|
|
2544
|
+
t[3] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2545
|
+
w(" " + F(r.draft.cibleResume(e)), 1)
|
|
2546
|
+
])]), T(s, { index: n + 1 }, null, 8, ["index"])]))), 128))], 64)) : b("", !0)
|
|
2426
2547
|
])]),
|
|
2427
2548
|
_: 1
|
|
2428
2549
|
}, 8, ["loading"]);
|
|
2429
2550
|
}
|
|
2430
2551
|
//#endregion
|
|
2431
2552
|
//#region src/components/StepperBlock.vue
|
|
2432
|
-
var
|
|
2553
|
+
var Li = {
|
|
2433
2554
|
name: "StepperBlock",
|
|
2434
2555
|
components: {
|
|
2435
|
-
AmsomHorizontalStepper:
|
|
2436
|
-
AmsomOverlay:
|
|
2437
|
-
EtapeReclamantBlock:
|
|
2438
|
-
EtapeCategorieBlock:
|
|
2439
|
-
EtapeCibleBlock:
|
|
2440
|
-
EtapeDetailsBlock: /* @__PURE__ */
|
|
2556
|
+
AmsomHorizontalStepper: ve,
|
|
2557
|
+
AmsomOverlay: g,
|
|
2558
|
+
EtapeReclamantBlock: vn,
|
|
2559
|
+
EtapeCategorieBlock: Yn,
|
|
2560
|
+
EtapeCibleBlock: $r,
|
|
2561
|
+
EtapeDetailsBlock: /* @__PURE__ */ K(Oi, [["render", Ii]])
|
|
2441
2562
|
},
|
|
2442
2563
|
props: {
|
|
2443
2564
|
step: {
|
|
@@ -2456,9 +2577,9 @@ var ei = {
|
|
|
2456
2577
|
],
|
|
2457
2578
|
setup() {
|
|
2458
2579
|
return {
|
|
2459
|
-
draft:
|
|
2460
|
-
data:
|
|
2461
|
-
options:
|
|
2580
|
+
draft: G(),
|
|
2581
|
+
data: Z(),
|
|
2582
|
+
options: Q()
|
|
2462
2583
|
};
|
|
2463
2584
|
},
|
|
2464
2585
|
computed: {
|
|
@@ -2496,11 +2617,14 @@ var ei = {
|
|
|
2496
2617
|
let e = this.lignePrincipale.idMotif;
|
|
2497
2618
|
return e ? this.data.cache.motifs?.find((t) => t.id === e)?.aide ?? null : null;
|
|
2498
2619
|
},
|
|
2620
|
+
provenanceValid() {
|
|
2621
|
+
return this.options.provenances.some((e) => e.id === this.draft.draft.provenance);
|
|
2622
|
+
},
|
|
2499
2623
|
canGoNext() {
|
|
2500
2624
|
return this.gatePassed(this.currentKey);
|
|
2501
2625
|
},
|
|
2502
2626
|
canCreer() {
|
|
2503
|
-
return !!this.lignePrincipale.idMotif &&
|
|
2627
|
+
return !!this.lignePrincipale.idMotif && this.provenanceValid && this.draft.ciblesValid && this.draft.detailsValid && this.draft.reclamantSelectionne != null;
|
|
2504
2628
|
},
|
|
2505
2629
|
stepperSteps() {
|
|
2506
2630
|
return this.steps.map((e, t) => {
|
|
@@ -2529,7 +2653,7 @@ var ei = {
|
|
|
2529
2653
|
} },
|
|
2530
2654
|
methods: {
|
|
2531
2655
|
gatePassed(e) {
|
|
2532
|
-
return e === "reclamant" ? this.draft.reclamantSelectionne != null &&
|
|
2656
|
+
return e === "reclamant" ? this.draft.reclamantSelectionne != null && this.provenanceValid : e === "categorie" ? !!this.lignePrincipale.idMotif && this.provenanceValid : e !== "cible" || this.draft.ciblesValid;
|
|
2533
2657
|
},
|
|
2534
2658
|
onStepClick(e) {
|
|
2535
2659
|
e < this.step && this.$emit("update:step", e);
|
|
@@ -2549,73 +2673,73 @@ var ei = {
|
|
|
2549
2673
|
}));
|
|
2550
2674
|
}
|
|
2551
2675
|
}
|
|
2552
|
-
},
|
|
2676
|
+
}, Ri = { class: "d-flex flex-column gap-3" }, zi = {
|
|
2553
2677
|
key: 0,
|
|
2554
2678
|
class: "w-100 fs-6 fw-medium my-3 alert alert-info",
|
|
2555
2679
|
style: { "white-space": "pre-line" }
|
|
2556
|
-
},
|
|
2557
|
-
function
|
|
2558
|
-
let
|
|
2559
|
-
return
|
|
2560
|
-
default:
|
|
2561
|
-
|
|
2562
|
-
steps:
|
|
2680
|
+
}, Bi = { style: { "min-height": "260px" } }, Vi = { class: "d-flex justify-content-between" }, Hi = { key: 1 }, Ui = ["disabled"], Wi = ["disabled"];
|
|
2681
|
+
function Gi(e, t, n, r, i, a) {
|
|
2682
|
+
let o = P("amsom-horizontal-stepper"), s = P("font-awesome-icon"), c = P("etape-reclamant-block"), l = P("etape-categorie-block"), u = P("etape-cible-block"), d = P("etape-details-block"), f = P("amsom-overlay");
|
|
2683
|
+
return k(), y(f, { loading: n.creating }, {
|
|
2684
|
+
default: R(() => [S("div", Ri, [
|
|
2685
|
+
T(o, {
|
|
2686
|
+
steps: a.stepperSteps,
|
|
2563
2687
|
size: "md",
|
|
2564
|
-
onStepClick:
|
|
2688
|
+
onStepClick: a.onStepClick
|
|
2565
2689
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2566
|
-
|
|
2690
|
+
a.aideMotif ? (k(), x("div", zi, [T(s, {
|
|
2567
2691
|
icon: "circle-info",
|
|
2568
2692
|
class: "text-info-emphasis me-2"
|
|
2569
|
-
}),
|
|
2570
|
-
|
|
2693
|
+
}), S("span", null, F(a.aideMotif), 1)])) : b("", !0),
|
|
2694
|
+
S("div", Bi, [a.currentKey === "reclamant" ? (k(), y(c, {
|
|
2571
2695
|
key: 0,
|
|
2572
2696
|
premiere: n.step === 1
|
|
2573
|
-
},
|
|
2697
|
+
}, C({ _: 2 }, [e.$slots.reclamant ? {
|
|
2574
2698
|
name: "reclamant",
|
|
2575
|
-
fn:
|
|
2699
|
+
fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
|
|
2576
2700
|
key: "0"
|
|
2577
|
-
} : void 0]), 1032, ["premiere"])) :
|
|
2701
|
+
} : void 0]), 1032, ["premiere"])) : a.currentKey === "categorie" ? (k(), y(l, {
|
|
2578
2702
|
key: 1,
|
|
2579
2703
|
premiere: n.step === 1
|
|
2580
|
-
}, null, 8, ["premiere"])) :
|
|
2581
|
-
|
|
2704
|
+
}, null, 8, ["premiere"])) : a.currentKey === "cible" ? (k(), y(u, { key: 2 })) : a.currentKey === "details" ? (k(), y(d, { key: 3 })) : b("", !0)]),
|
|
2705
|
+
S("div", Vi, [n.step > 1 ? (k(), x("button", {
|
|
2582
2706
|
key: 0,
|
|
2583
2707
|
class: "btn btn-sm btn-outline-secondary",
|
|
2584
|
-
onClick: t[0] ||= (...e) =>
|
|
2585
|
-
}, [
|
|
2708
|
+
onClick: t[0] ||= (...e) => a.goPrevious && a.goPrevious(...e)
|
|
2709
|
+
}, [T(s, {
|
|
2586
2710
|
icon: "chevron-left",
|
|
2587
2711
|
class: "me-1"
|
|
2588
|
-
}), t[3] ||=
|
|
2712
|
+
}), t[3] ||= w(" Précédent ", -1)])) : (k(), x("span", Hi)), n.step < a.steps.length ? (k(), x("button", {
|
|
2589
2713
|
key: 2,
|
|
2590
2714
|
class: "btn btn-sm btn-primary",
|
|
2591
|
-
disabled: !
|
|
2592
|
-
onClick: t[1] ||= (...e) =>
|
|
2593
|
-
}, [t[4] ||=
|
|
2715
|
+
disabled: !a.canGoNext,
|
|
2716
|
+
onClick: t[1] ||= (...e) => a.goNext && a.goNext(...e)
|
|
2717
|
+
}, [t[4] ||= w(" Suivant ", -1), T(s, {
|
|
2594
2718
|
icon: "chevron-right",
|
|
2595
2719
|
class: "ms-1"
|
|
2596
|
-
})], 8,
|
|
2720
|
+
})], 8, Ui)) : (k(), x("button", {
|
|
2597
2721
|
key: 3,
|
|
2598
2722
|
class: "btn btn-sm btn-success",
|
|
2599
|
-
disabled: !
|
|
2723
|
+
disabled: !a.canCreer || n.creating,
|
|
2600
2724
|
onClick: t[2] ||= (t) => e.$emit("submit")
|
|
2601
|
-
}, [
|
|
2725
|
+
}, [T(s, {
|
|
2602
2726
|
icon: "check",
|
|
2603
2727
|
class: "me-1"
|
|
2604
|
-
}), t[5] ||=
|
|
2728
|
+
}), t[5] ||= w(" Créer la sollicitation ", -1)], 8, Wi))])
|
|
2605
2729
|
])]),
|
|
2606
2730
|
_: 3
|
|
2607
2731
|
}, 8, ["loading"]);
|
|
2608
2732
|
}
|
|
2609
|
-
var
|
|
2733
|
+
var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n } = {}) => it("/v2/cresol/creer_sollicitation", e, {
|
|
2610
2734
|
signal: t,
|
|
2611
2735
|
baseUrl: n
|
|
2612
|
-
}),
|
|
2736
|
+
}), Ji = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => it("/v2/cresol/upload_sollicitation_ged", {
|
|
2613
2737
|
idSollicitation: e,
|
|
2614
2738
|
pj: t
|
|
2615
2739
|
}, {
|
|
2616
2740
|
signal: n,
|
|
2617
2741
|
baseUrl: r
|
|
2618
|
-
}),
|
|
2742
|
+
}), Yi = {
|
|
2619
2743
|
modelValue: {
|
|
2620
2744
|
type: Object,
|
|
2621
2745
|
default: null
|
|
@@ -2634,10 +2758,28 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2634
2758
|
"step"
|
|
2635
2759
|
].includes(e)
|
|
2636
2760
|
},
|
|
2761
|
+
typesReclamant: {
|
|
2762
|
+
type: Array,
|
|
2763
|
+
default: null,
|
|
2764
|
+
validator: (e) => e.every((e) => U.includes(e))
|
|
2765
|
+
},
|
|
2766
|
+
typesReclamantExclus: {
|
|
2767
|
+
type: Array,
|
|
2768
|
+
default: () => [],
|
|
2769
|
+
validator: (e) => e.every((e) => U.includes(e))
|
|
2770
|
+
},
|
|
2771
|
+
provenances: {
|
|
2772
|
+
type: Array,
|
|
2773
|
+
default: () => [...we]
|
|
2774
|
+
},
|
|
2775
|
+
provenancesExclues: {
|
|
2776
|
+
type: Array,
|
|
2777
|
+
default: () => []
|
|
2778
|
+
},
|
|
2637
2779
|
readonly: {
|
|
2638
2780
|
type: [Boolean, Array],
|
|
2639
2781
|
default: !1,
|
|
2640
|
-
validator: (e) => typeof e == "boolean" || e.every((e) =>
|
|
2782
|
+
validator: (e) => typeof e == "boolean" || e.every((e) => Ne.includes(e))
|
|
2641
2783
|
},
|
|
2642
2784
|
modules: {
|
|
2643
2785
|
type: Array,
|
|
@@ -2663,7 +2805,7 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2663
2805
|
type: String,
|
|
2664
2806
|
default: null
|
|
2665
2807
|
}
|
|
2666
|
-
},
|
|
2808
|
+
}, Xi = Object.keys(Yi), Zi = [
|
|
2667
2809
|
"update:modelValue",
|
|
2668
2810
|
"reclamantChange",
|
|
2669
2811
|
"motifChange",
|
|
@@ -2672,33 +2814,44 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2672
2814
|
"created",
|
|
2673
2815
|
"createError",
|
|
2674
2816
|
"error"
|
|
2675
|
-
],
|
|
2817
|
+
], Qi = {
|
|
2676
2818
|
name: "CreerSollicitationForm",
|
|
2677
2819
|
components: {
|
|
2678
|
-
AsideBlock:
|
|
2679
|
-
StepperBlock:
|
|
2820
|
+
AsideBlock: Xe,
|
|
2821
|
+
StepperBlock: Ki
|
|
2680
2822
|
},
|
|
2681
|
-
props: { ...
|
|
2682
|
-
emits: [...
|
|
2823
|
+
props: { ...Yi },
|
|
2824
|
+
emits: [...Zi],
|
|
2683
2825
|
setup(e, { emit: t }) {
|
|
2684
|
-
let n = (e) => t("error", e),
|
|
2826
|
+
let n = (e) => t("error", e), r = { baseUrl: I(e, "baseUrl") }, i = kt(Ot({
|
|
2685
2827
|
onError: n,
|
|
2686
|
-
...
|
|
2687
|
-
})),
|
|
2688
|
-
reclamants:
|
|
2689
|
-
modules:
|
|
2690
|
-
idModulePrefere:
|
|
2691
|
-
readonly:
|
|
2828
|
+
...r
|
|
2829
|
+
})), a = j(null), o = v(() => a.value ?? e.modules ?? []), s = Ue(He({
|
|
2830
|
+
reclamants: v(() => e.reclamantMode === "step" ? [] : e.reclamants),
|
|
2831
|
+
modules: o,
|
|
2832
|
+
idModulePrefere: I(e, "idModule"),
|
|
2833
|
+
readonly: I(e, "readonly")
|
|
2692
2834
|
}));
|
|
2693
|
-
return
|
|
2694
|
-
nomenclatureFilter:
|
|
2695
|
-
reclamantMode:
|
|
2696
|
-
|
|
2697
|
-
|
|
2835
|
+
return It(A({
|
|
2836
|
+
nomenclatureFilter: I(e, "nomenclatureFilter"),
|
|
2837
|
+
reclamantMode: I(e, "reclamantMode"),
|
|
2838
|
+
typesReclamant: v(() => (e.typesReclamant ?? U).filter((t) => !e.typesReclamantExclus.includes(t))),
|
|
2839
|
+
provenances: v(() => {
|
|
2840
|
+
let t = i.cache.provenances ?? [];
|
|
2841
|
+
return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
|
|
2842
|
+
let n = t.find((t) => t.id === e);
|
|
2843
|
+
return n ? [{
|
|
2844
|
+
...n,
|
|
2845
|
+
icon: Ce(e)
|
|
2846
|
+
}] : [];
|
|
2847
|
+
});
|
|
2848
|
+
}),
|
|
2849
|
+
modulesReclamant: o,
|
|
2850
|
+
...r
|
|
2698
2851
|
})), {
|
|
2699
|
-
data:
|
|
2700
|
-
draft:
|
|
2701
|
-
modulesCharges:
|
|
2852
|
+
data: i,
|
|
2853
|
+
draft: s,
|
|
2854
|
+
modulesCharges: a,
|
|
2702
2855
|
onError: n
|
|
2703
2856
|
};
|
|
2704
2857
|
},
|
|
@@ -2734,7 +2887,7 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2734
2887
|
let e = this.draft.reclamantSelectionne;
|
|
2735
2888
|
this.$watch("draft.reclamantSelectionne", async (t) => {
|
|
2736
2889
|
this.$emit("reclamantChange", t), await this.chargerModulesReclamant(t, e) && this.draft.syncReclamant();
|
|
2737
|
-
}), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)), this.data.loadNomenclature(), await this.chargerModulesReclamant(e, e) && this.draft.prefillCiblePrincipale();
|
|
2890
|
+
}), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)), this.data.loadNomenclature(), this.data.loadProvenances(), await this.chargerModulesReclamant(e, e) && this.draft.prefillCiblePrincipale();
|
|
2738
2891
|
},
|
|
2739
2892
|
methods: {
|
|
2740
2893
|
async chargerModulesReclamant(e, t) {
|
|
@@ -2754,10 +2907,10 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2754
2907
|
if (!await this.autoriserCreation(e)) return;
|
|
2755
2908
|
let t;
|
|
2756
2909
|
try {
|
|
2757
|
-
t = await
|
|
2910
|
+
t = await qi(e, this.requestOptions) ?? [];
|
|
2758
2911
|
} catch (t) {
|
|
2759
|
-
if (
|
|
2760
|
-
let n =
|
|
2912
|
+
if (xt(t)) return;
|
|
2913
|
+
let n = bt(t);
|
|
2761
2914
|
this.$emit("createError", {
|
|
2762
2915
|
error: t,
|
|
2763
2916
|
message: n,
|
|
@@ -2807,7 +2960,7 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2807
2960
|
message: t
|
|
2808
2961
|
};
|
|
2809
2962
|
};
|
|
2810
|
-
return a?.id ?
|
|
2963
|
+
return a?.id ? Ji({
|
|
2811
2964
|
idSollicitation: a.id,
|
|
2812
2965
|
pj: {
|
|
2813
2966
|
name: n.name,
|
|
@@ -2818,34 +2971,34 @@ var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n
|
|
|
2818
2971
|
...o,
|
|
2819
2972
|
ok: !0,
|
|
2820
2973
|
message: null
|
|
2821
|
-
})).catch((e) => s(
|
|
2974
|
+
})).catch((e) => s(bt(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
|
|
2822
2975
|
});
|
|
2823
2976
|
return Promise.all(n);
|
|
2824
2977
|
}
|
|
2825
2978
|
}
|
|
2826
|
-
},
|
|
2979
|
+
}, $i = { class: "row g-3" }, ea = {
|
|
2827
2980
|
key: 0,
|
|
2828
2981
|
class: "col-12 col-lg-4"
|
|
2829
2982
|
};
|
|
2830
|
-
function
|
|
2831
|
-
let
|
|
2832
|
-
return
|
|
2983
|
+
function ta(e, t, n, r, i, a) {
|
|
2984
|
+
let o = P("aside-block"), s = P("stepper-block");
|
|
2985
|
+
return k(), x("div", $i, [e.aside ? (k(), x("div", ea, [N(e.$slots, "aside", {}, () => [T(o, { "nb-similaires": e.nbSimilaires }, C({ _: 2 }, [e.$slots["aside-similaires"] ? {
|
|
2833
2986
|
name: "similaires",
|
|
2834
|
-
fn:
|
|
2987
|
+
fn: R((t) => [N(e.$slots, "aside-similaires", O(E(t)))]),
|
|
2835
2988
|
key: "0"
|
|
2836
2989
|
} : void 0, e.$slots["aside-evenements"] ? {
|
|
2837
2990
|
name: "evenements",
|
|
2838
|
-
fn:
|
|
2991
|
+
fn: R(() => [N(e.$slots, "aside-evenements")]),
|
|
2839
2992
|
key: "1"
|
|
2840
|
-
} : void 0]), 1032, ["nb-similaires"])])])) :
|
|
2993
|
+
} : void 0]), 1032, ["nb-similaires"])])])) : b("", !0), S("div", { class: D(["col-12", e.aside ? "col-lg-8" : ""]) }, [T(s, {
|
|
2841
2994
|
step: i.currentStep,
|
|
2842
2995
|
"onUpdate:step": t[0] ||= (e) => i.currentStep = e,
|
|
2843
2996
|
creating: i.creating,
|
|
2844
2997
|
onStepChange: t[1] ||= (t) => e.$emit("stepChange", t),
|
|
2845
|
-
onSubmit:
|
|
2846
|
-
},
|
|
2998
|
+
onSubmit: a.creer
|
|
2999
|
+
}, C({ _: 2 }, [e.$slots.reclamant ? {
|
|
2847
3000
|
name: "reclamant",
|
|
2848
|
-
fn:
|
|
3001
|
+
fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
|
|
2849
3002
|
key: "0"
|
|
2850
3003
|
} : void 0]), 1032, [
|
|
2851
3004
|
"step",
|
|
@@ -2853,14 +3006,14 @@ function gi(e, t, n, r, i, l) {
|
|
|
2853
3006
|
"onSubmit"
|
|
2854
3007
|
])], 2)]);
|
|
2855
3008
|
}
|
|
2856
|
-
var
|
|
3009
|
+
var na = /*#__PURE__*/ K(Qi, [["render", ta]]), ra = {
|
|
2857
3010
|
name: "CreerSollicitationModal",
|
|
2858
3011
|
components: {
|
|
2859
|
-
AmsomModal:
|
|
2860
|
-
CreerSollicitationForm:
|
|
3012
|
+
AmsomModal: ue,
|
|
3013
|
+
CreerSollicitationForm: na
|
|
2861
3014
|
},
|
|
2862
3015
|
props: {
|
|
2863
|
-
...
|
|
3016
|
+
...Yi,
|
|
2864
3017
|
titre: {
|
|
2865
3018
|
type: String,
|
|
2866
3019
|
default: "Nouvelle sollicitation"
|
|
@@ -2870,36 +3023,36 @@ var $ = /*#__PURE__*/ F(pi, [["render", gi]]), _i = {
|
|
|
2870
3023
|
default: !0
|
|
2871
3024
|
}
|
|
2872
3025
|
},
|
|
2873
|
-
emits: [...
|
|
3026
|
+
emits: [...Zi, "close"],
|
|
2874
3027
|
computed: {
|
|
2875
3028
|
formProps() {
|
|
2876
|
-
return Object.fromEntries(
|
|
3029
|
+
return Object.fromEntries(Xi.map((e) => [e, this[e]]));
|
|
2877
3030
|
},
|
|
2878
3031
|
formListeners() {
|
|
2879
|
-
return Object.fromEntries(
|
|
3032
|
+
return Object.fromEntries(Zi.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
|
|
2880
3033
|
}
|
|
2881
3034
|
},
|
|
2882
3035
|
methods: { onCreated(...e) {
|
|
2883
3036
|
this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
|
|
2884
3037
|
} }
|
|
2885
|
-
},
|
|
2886
|
-
function
|
|
2887
|
-
let
|
|
2888
|
-
return
|
|
3038
|
+
}, ia = { class: "fw-medium fs-5" };
|
|
3039
|
+
function aa(e, t, n, r, i, a) {
|
|
3040
|
+
let o = P("creer-sollicitation-form"), s = P("amsom-modal");
|
|
3041
|
+
return k(), y(s, {
|
|
2889
3042
|
"close-option": "",
|
|
2890
3043
|
size: "xl",
|
|
2891
3044
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
2892
3045
|
}, {
|
|
2893
|
-
default:
|
|
3046
|
+
default: R(() => [S("span", ia, F(n.titre), 1), T(o, fe({ class: "pt-3" }, a.formProps, me(a.formListeners), { onCreated: a.onCreated }), C({ _: 2 }, [M(e.$slots, (t, n) => ({
|
|
2894
3047
|
name: n,
|
|
2895
|
-
fn:
|
|
3048
|
+
fn: R((t) => [N(e.$slots, n, O(E(t ?? {})))])
|
|
2896
3049
|
}))]), 1040, ["onCreated"])]),
|
|
2897
3050
|
_: 3
|
|
2898
3051
|
});
|
|
2899
3052
|
}
|
|
2900
|
-
var
|
|
2901
|
-
CreerSollicitationModal:
|
|
2902
|
-
CreerSollicitationForm:
|
|
3053
|
+
var oa = /*#__PURE__*/ K(ra, [["render", aa]]), sa = {
|
|
3054
|
+
CreerSollicitationModal: oa,
|
|
3055
|
+
CreerSollicitationForm: na
|
|
2903
3056
|
};
|
|
2904
3057
|
//#endregion
|
|
2905
|
-
export {
|
|
3058
|
+
export { na as CreerSollicitationForm, oa as CreerSollicitationModal, Te as DEFAULT_PROVENANCE_CONTACT, we as PROVENANCES_CONTACT_DEFAUT, V as PROVENANCE_CONTACT_ICONS, Ne as READONLY_FIELDS, Qe as configureCresol, sa as default, Pe as getDefaultDraft, Me as getDefaultLigne, W as getDefaultPatrimoine, Et as resetCresolCache };
|