@amsom-habitat/cresol 0.2.5 → 0.2.7
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 +2 -1
- package/dist/cresol.js +804 -796
- package/dist/cresol.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cresol.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
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
|
|
16
|
+
var V = {
|
|
13
17
|
T: "phone",
|
|
14
18
|
M: "envelope",
|
|
15
19
|
G: "user-shield",
|
|
16
20
|
V: "building",
|
|
17
21
|
IP: "exclamation-triangle",
|
|
18
22
|
C: "envelope-open"
|
|
19
|
-
},
|
|
23
|
+
}, Se = "comment-dots", Ce = (e) => V[e] ?? "comment-dots", we = Object.keys(V), Te = "T", H = {
|
|
20
24
|
locataire: {
|
|
21
25
|
libelle: "Locataire",
|
|
22
26
|
icon: "house-user",
|
|
@@ -52,14 +56,14 @@ var k = {
|
|
|
52
56
|
icon: "circle-question",
|
|
53
57
|
couleur: "danger"
|
|
54
58
|
}
|
|
55
|
-
},
|
|
56
|
-
...Object.fromEntries(
|
|
59
|
+
}, Ee = ["L", "P"], De = {
|
|
60
|
+
...Object.fromEntries(Ee.map((e) => [e, "locataire"])),
|
|
57
61
|
D: "demandeur",
|
|
58
62
|
T: "tiers",
|
|
59
63
|
U: "autre",
|
|
60
64
|
F: "fournisseur",
|
|
61
65
|
E: "personnel"
|
|
62
|
-
},
|
|
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 = () => ({
|
|
63
67
|
idCommune: null,
|
|
64
68
|
commune: null,
|
|
65
69
|
idEntree: null,
|
|
@@ -74,7 +78,7 @@ var k = {
|
|
|
74
78
|
typeContratActuel: null,
|
|
75
79
|
idContratActuel: null,
|
|
76
80
|
occupantActuel: null
|
|
77
|
-
}),
|
|
81
|
+
}), Me = () => ({
|
|
78
82
|
idMotif: null,
|
|
79
83
|
idCategorie: null,
|
|
80
84
|
idType: null,
|
|
@@ -92,7 +96,7 @@ var k = {
|
|
|
92
96
|
dateFaits: null,
|
|
93
97
|
dateFaitsOverride: !1,
|
|
94
98
|
fichier: null
|
|
95
|
-
}),
|
|
99
|
+
}), Ne = [
|
|
96
100
|
"reclamant",
|
|
97
101
|
"provenance",
|
|
98
102
|
"motif",
|
|
@@ -101,19 +105,19 @@ var k = {
|
|
|
101
105
|
"dateFaits",
|
|
102
106
|
"responsable",
|
|
103
107
|
"fichier"
|
|
104
|
-
],
|
|
108
|
+
], Pe = (e = "T") => ({
|
|
105
109
|
reclamant: {
|
|
106
110
|
type: null,
|
|
107
111
|
id: null
|
|
108
112
|
},
|
|
109
113
|
provenance: e,
|
|
110
114
|
lignes: [{
|
|
111
|
-
...
|
|
115
|
+
...Me(),
|
|
112
116
|
cibleMode: "contrat",
|
|
113
|
-
patrimoine:
|
|
117
|
+
patrimoine: W(),
|
|
114
118
|
description: ""
|
|
115
119
|
}]
|
|
116
|
-
}),
|
|
120
|
+
}), Fe = (e) => e?.id ?? e ?? null, Ie = (e) => {
|
|
117
121
|
if (!e) return "Cible non définie";
|
|
118
122
|
let t = [
|
|
119
123
|
e.commune,
|
|
@@ -121,17 +125,17 @@ var k = {
|
|
|
121
125
|
e.libelleModule
|
|
122
126
|
].filter(Boolean);
|
|
123
127
|
return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
|
|
124
|
-
},
|
|
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 = {}) => {
|
|
125
129
|
let t = {
|
|
126
|
-
...
|
|
130
|
+
...Me(),
|
|
127
131
|
...e
|
|
128
132
|
};
|
|
129
133
|
return e.patrimoine && (t.patrimoine = {
|
|
130
|
-
...
|
|
134
|
+
...W(),
|
|
131
135
|
...e.patrimoine
|
|
132
136
|
}), t;
|
|
133
|
-
},
|
|
134
|
-
let t =
|
|
137
|
+
}, Ve = (e) => {
|
|
138
|
+
let t = Pe();
|
|
135
139
|
if (!e) return t;
|
|
136
140
|
let n = Array.isArray(e.lignes) && e.lignes.length ? e.lignes : null;
|
|
137
141
|
return {
|
|
@@ -144,168 +148,168 @@ var k = {
|
|
|
144
148
|
provenance: e.provenance ?? t.provenance,
|
|
145
149
|
lignes: n ? n.map((e, n) => n === 0 ? {
|
|
146
150
|
...t.lignes[0],
|
|
147
|
-
...
|
|
148
|
-
} :
|
|
151
|
+
...Be(e)
|
|
152
|
+
} : Be(e)) : t.lignes
|
|
149
153
|
};
|
|
150
154
|
};
|
|
151
|
-
function
|
|
152
|
-
let
|
|
153
|
-
let e =
|
|
154
|
-
return e === !0 ?
|
|
155
|
-
}),
|
|
156
|
-
let e =
|
|
157
|
-
return !e ||
|
|
158
|
-
}),
|
|
159
|
-
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);
|
|
160
164
|
return (r == null ? null : e.find((e) => String(e.idModule) === String(r))) ?? e.find((e) => e.estModulePrincipal) ?? e[0] ?? null;
|
|
161
|
-
}),
|
|
162
|
-
draft:
|
|
163
|
-
lignePrincipale:
|
|
164
|
-
lignesAssociees:
|
|
165
|
-
reclamantsFournis:
|
|
166
|
-
reclamantsDisponibles:
|
|
167
|
-
reclamantSelectionne:
|
|
168
|
-
moduleReclamantPrincipal:
|
|
169
|
-
reclamantEstContrat:
|
|
170
|
-
ciblesValid:
|
|
171
|
-
detailsValid:
|
|
172
|
-
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,
|
|
173
177
|
reset(e = null) {
|
|
174
|
-
let t =
|
|
175
|
-
Object.assign(
|
|
178
|
+
let t = Ve(e);
|
|
179
|
+
Object.assign(i, t), i.lignes = t.lignes;
|
|
176
180
|
},
|
|
177
181
|
setProvenance(e) {
|
|
178
|
-
|
|
182
|
+
i.provenance = e;
|
|
179
183
|
},
|
|
180
184
|
syncReclamant() {
|
|
181
|
-
let e =
|
|
182
|
-
|
|
185
|
+
let e = p.value;
|
|
186
|
+
h.setReclamant({
|
|
183
187
|
type: e?.type ?? null,
|
|
184
188
|
id: e?.id ?? null
|
|
185
189
|
});
|
|
186
190
|
},
|
|
187
191
|
selectReclamant(e) {
|
|
188
|
-
e && (
|
|
192
|
+
e && (l.value.some((t) => d(t, e)) || (u.value = e), h.setReclamant(e));
|
|
189
193
|
},
|
|
190
194
|
setReclamant({ type: e, id: t }) {
|
|
191
|
-
if (
|
|
195
|
+
if (i.reclamant = {
|
|
192
196
|
type: e ?? null,
|
|
193
197
|
id: t ?? null
|
|
194
|
-
},
|
|
195
|
-
let n =
|
|
196
|
-
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());
|
|
197
201
|
},
|
|
198
202
|
prefillCiblePrincipale() {
|
|
199
|
-
if (
|
|
200
|
-
let e =
|
|
201
|
-
e &&
|
|
203
|
+
if (o("cible")) return;
|
|
204
|
+
let e = ee.value;
|
|
205
|
+
e && h.prefillFromModule(0, e);
|
|
202
206
|
},
|
|
203
207
|
_resetAfterNomenclature() {
|
|
204
|
-
|
|
208
|
+
i.lignes[0].responsable = null, i.lignes.splice(1);
|
|
205
209
|
},
|
|
206
210
|
setCategorie(e) {
|
|
207
|
-
let t =
|
|
208
|
-
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();
|
|
209
213
|
},
|
|
210
214
|
setType(e) {
|
|
211
|
-
let t =
|
|
212
|
-
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();
|
|
213
217
|
},
|
|
214
218
|
setNature(e) {
|
|
215
|
-
let t =
|
|
216
|
-
t.idNature = e, t.idMotif = null,
|
|
219
|
+
let t = i.lignes[0];
|
|
220
|
+
t.idNature = e, t.idMotif = null, h._resetAfterNomenclature();
|
|
217
221
|
},
|
|
218
222
|
setMotif(e) {
|
|
219
|
-
|
|
223
|
+
i.lignes[0].idMotif = e, h._resetAfterNomenclature();
|
|
220
224
|
},
|
|
221
225
|
selectMotifChain(e) {
|
|
222
|
-
let t =
|
|
223
|
-
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();
|
|
224
228
|
},
|
|
225
229
|
toggleLigneAssociee(e, t = {}) {
|
|
226
|
-
let n =
|
|
227
|
-
n === -1 ?
|
|
228
|
-
...
|
|
230
|
+
let n = i.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
|
|
231
|
+
n === -1 ? i.lignes.push({
|
|
232
|
+
...Me(),
|
|
229
233
|
idMotif: e,
|
|
230
234
|
...t
|
|
231
|
-
}) :
|
|
235
|
+
}) : i.lignes.splice(n, 1);
|
|
232
236
|
},
|
|
233
237
|
_patrimoine(e) {
|
|
234
|
-
return
|
|
238
|
+
return i.lignes[e]?.patrimoine ?? null;
|
|
235
239
|
},
|
|
236
240
|
setCibleMode(e, t) {
|
|
237
|
-
let n =
|
|
238
|
-
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());
|
|
239
243
|
},
|
|
240
244
|
setModulePrecis(e, t) {
|
|
241
|
-
let n =
|
|
242
|
-
n && (n.modulePrecis = !!t, n.modulePrecis ||
|
|
245
|
+
let n = i.lignes[e];
|
|
246
|
+
n && (n.modulePrecis = !!t, n.modulePrecis || h.setPatrimoineModule(e, null));
|
|
243
247
|
},
|
|
244
248
|
toggleContratReclamant(e, t) {
|
|
245
|
-
let n =
|
|
246
|
-
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));
|
|
247
251
|
},
|
|
248
252
|
setContratCible(e, t) {
|
|
249
|
-
let n =
|
|
253
|
+
let n = i.lignes[e];
|
|
250
254
|
n && (n.contratCible = t ? {
|
|
251
255
|
typeContrat: t.typeContrat,
|
|
252
256
|
idContrat: t.idContrat,
|
|
253
257
|
libelle: t.libelle ?? null
|
|
254
|
-
} : null,
|
|
258
|
+
} : null, h.setPatrimoineModule(e, null));
|
|
255
259
|
},
|
|
256
260
|
setPatrimoineCommune(e, t) {
|
|
257
|
-
let n =
|
|
258
|
-
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));
|
|
259
263
|
},
|
|
260
264
|
setPatrimoineEntree(e, t) {
|
|
261
|
-
let n =
|
|
262
|
-
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));
|
|
263
267
|
},
|
|
264
268
|
setPatrimoineEtage(e, t) {
|
|
265
|
-
let n =
|
|
266
|
-
n && (n.etage = t,
|
|
269
|
+
let n = h._patrimoine(e);
|
|
270
|
+
n && (n.etage = t, h.setPatrimoineModule(e, null));
|
|
267
271
|
},
|
|
268
272
|
setPatrimoineModule(e, t) {
|
|
269
|
-
let n =
|
|
273
|
+
let n = h._patrimoine(e);
|
|
270
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)));
|
|
271
275
|
},
|
|
272
276
|
prefillFromModule(e, t) {
|
|
273
|
-
let n =
|
|
277
|
+
let n = h._patrimoine(e);
|
|
274
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);
|
|
275
279
|
},
|
|
276
280
|
toggleCibleOverride(e) {
|
|
277
|
-
let t =
|
|
281
|
+
let t = i.lignes[e];
|
|
278
282
|
if (!t) return;
|
|
279
|
-
let n =
|
|
283
|
+
let n = i.lignes[0];
|
|
280
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);
|
|
281
285
|
},
|
|
282
286
|
setReprendreLocataireActuel(e, t) {
|
|
283
|
-
let n =
|
|
287
|
+
let n = i.lignes[e];
|
|
284
288
|
n && (n.reprendreLocataireActuel = !!t);
|
|
285
289
|
},
|
|
286
290
|
setDescription(e, t) {
|
|
287
|
-
let n =
|
|
291
|
+
let n = i.lignes[e];
|
|
288
292
|
n && (n.description = t);
|
|
289
293
|
},
|
|
290
294
|
setDateFaits(e, t) {
|
|
291
|
-
let n =
|
|
295
|
+
let n = i.lignes[e];
|
|
292
296
|
n && (n.dateFaits = t);
|
|
293
297
|
},
|
|
294
298
|
setResponsable(e, t) {
|
|
295
|
-
let n =
|
|
299
|
+
let n = i.lignes[e];
|
|
296
300
|
n && (n.responsable = t);
|
|
297
301
|
},
|
|
298
302
|
setFichier(e, t) {
|
|
299
|
-
let n =
|
|
303
|
+
let n = i.lignes[e];
|
|
300
304
|
n && (n.fichier = t);
|
|
301
305
|
},
|
|
302
306
|
toggleDescriptionOverride(e) {
|
|
303
|
-
let t =
|
|
307
|
+
let t = i.lignes[e];
|
|
304
308
|
t && (t.description = t.description == null ? "" : null);
|
|
305
309
|
},
|
|
306
310
|
toggleDateFaitsOverride(e) {
|
|
307
|
-
let t =
|
|
308
|
-
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);
|
|
309
313
|
},
|
|
310
314
|
_patrimoinePayload(e) {
|
|
311
315
|
return e.idModule == null ? {
|
|
@@ -317,26 +321,26 @@ function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
|
|
|
317
321
|
} : { idModule: e.idModule };
|
|
318
322
|
},
|
|
319
323
|
_lignePayload(e, t) {
|
|
320
|
-
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 = {
|
|
321
325
|
categorie: e.idCategorie,
|
|
322
326
|
type: e.idType,
|
|
323
327
|
nature: e.idNature,
|
|
324
328
|
motif: e.idMotif,
|
|
325
|
-
description:
|
|
329
|
+
description: a,
|
|
326
330
|
dateFaits: o,
|
|
327
|
-
responsable:
|
|
331
|
+
responsable: Fe(e.responsable)
|
|
328
332
|
};
|
|
329
333
|
if (r.cibleMode === "demande") return {
|
|
330
334
|
...c,
|
|
331
335
|
codeTypeCible: "D",
|
|
332
|
-
idCible:
|
|
336
|
+
idCible: i.reclamant.id,
|
|
333
337
|
deduireCible: !1
|
|
334
338
|
};
|
|
335
|
-
let l =
|
|
339
|
+
let l = h._patrimoinePayload(r.patrimoine);
|
|
336
340
|
if (r.cibleMode === "contrat" && !r.reprendreLocataireActuel) {
|
|
337
|
-
let e = r.contratReclamant &&
|
|
338
|
-
typeContrat:
|
|
339
|
-
idContrat:
|
|
341
|
+
let e = r.contratReclamant && m.value ? {
|
|
342
|
+
typeContrat: i.reclamant.type,
|
|
343
|
+
idContrat: i.reclamant.id
|
|
340
344
|
} : r.contratCible;
|
|
341
345
|
return {
|
|
342
346
|
...c,
|
|
@@ -355,57 +359,57 @@ function we({ reclamants: e, modules: t, idModulePrefere: n = y(null), readonly:
|
|
|
355
359
|
};
|
|
356
360
|
},
|
|
357
361
|
cibleResume(e) {
|
|
358
|
-
let t =
|
|
362
|
+
let t = i.lignes[0], n = e !== t && !e.cibleOverride ? t : e;
|
|
359
363
|
if (n.cibleMode === "demande") return "La demande";
|
|
360
|
-
let r =
|
|
364
|
+
let r = Ie(n.patrimoine);
|
|
361
365
|
if (n.cibleMode === "patrimoine" && !n.modulePrecis) return `Parties communes — ${r}`;
|
|
362
366
|
if (n.cibleMode !== "contrat") return r;
|
|
363
|
-
let
|
|
364
|
-
if (n.contratReclamant &&
|
|
367
|
+
let a = "Contrat non défini";
|
|
368
|
+
if (n.contratReclamant && m.value) a = "Contrat du réclamant";
|
|
365
369
|
else if (n.contratCible) {
|
|
366
370
|
let e = n.contratCible;
|
|
367
|
-
|
|
371
|
+
a = `${e.libelle ?? "Contrat"} (${e.typeContrat}/${e.idContrat})`;
|
|
368
372
|
}
|
|
369
|
-
return `${
|
|
373
|
+
return `${a} — ${r}`;
|
|
370
374
|
},
|
|
371
375
|
lignesPayload() {
|
|
372
|
-
return
|
|
376
|
+
return i.lignes.map((e, t) => h._lignePayload(e, t));
|
|
373
377
|
},
|
|
374
378
|
creationPayload() {
|
|
375
|
-
let e =
|
|
379
|
+
let e = p.value;
|
|
376
380
|
return {
|
|
377
381
|
typeReclamant: e?.type ?? null,
|
|
378
382
|
reclamant: e?.id ?? null,
|
|
379
|
-
lignes:
|
|
380
|
-
provenance:
|
|
383
|
+
lignes: h.lignesPayload(),
|
|
384
|
+
provenance: i.provenance
|
|
381
385
|
};
|
|
382
386
|
}
|
|
383
387
|
};
|
|
384
|
-
return
|
|
388
|
+
return A(h);
|
|
385
389
|
}
|
|
386
|
-
function
|
|
387
|
-
return
|
|
390
|
+
function Ue(e) {
|
|
391
|
+
return pe(je, e), e;
|
|
388
392
|
}
|
|
389
|
-
function
|
|
390
|
-
let e =
|
|
393
|
+
function G() {
|
|
394
|
+
let e = de(je, null);
|
|
391
395
|
if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
|
|
392
396
|
return e;
|
|
393
397
|
}
|
|
394
398
|
//#endregion
|
|
395
399
|
//#region \0plugin-vue:export-helper
|
|
396
|
-
var
|
|
400
|
+
var K = (e, t) => {
|
|
397
401
|
let n = e.__vccOpts || e;
|
|
398
402
|
for (let [e, r] of t) n[e] = r;
|
|
399
403
|
return n;
|
|
400
|
-
},
|
|
404
|
+
}, We = {
|
|
401
405
|
name: "AsideBlock",
|
|
402
|
-
components: { AmsomNavTabsHorizontal:
|
|
406
|
+
components: { AmsomNavTabsHorizontal: _e },
|
|
403
407
|
props: { nbSimilaires: {
|
|
404
408
|
type: Number,
|
|
405
409
|
default: 0
|
|
406
410
|
} },
|
|
407
411
|
setup() {
|
|
408
|
-
return { draft:
|
|
412
|
+
return { draft: G() };
|
|
409
413
|
},
|
|
410
414
|
data() {
|
|
411
415
|
return { activeTab: null };
|
|
@@ -441,44 +445,44 @@ var z = (e, t) => {
|
|
|
441
445
|
e.some((e) => e.id === this.activeTab) || (this.activeTab = e[0]?.id ?? null);
|
|
442
446
|
}
|
|
443
447
|
} }
|
|
444
|
-
},
|
|
448
|
+
}, Ge = {
|
|
445
449
|
key: 0,
|
|
446
450
|
class: "badge bg-danger ms-1"
|
|
447
|
-
},
|
|
448
|
-
function
|
|
449
|
-
let
|
|
450
|
-
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, {
|
|
451
455
|
key: 0,
|
|
452
|
-
modelValue:
|
|
453
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
454
|
-
items:
|
|
456
|
+
modelValue: i.activeTab,
|
|
457
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.activeTab = e,
|
|
458
|
+
items: a.tabs,
|
|
455
459
|
"item-key": "id",
|
|
456
460
|
"tab-spacing": 1
|
|
457
461
|
}, {
|
|
458
|
-
libelle:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
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)
|
|
462
466
|
]),
|
|
463
|
-
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)])]),
|
|
464
468
|
_: 3
|
|
465
|
-
}, 8, ["modelValue", "items"])) :
|
|
469
|
+
}, 8, ["modelValue", "items"])) : b("", !0);
|
|
466
470
|
}
|
|
467
|
-
var
|
|
471
|
+
var Xe = /*#__PURE__*/ K(We, [["render", Ye]]), Ze = {
|
|
468
472
|
baseUrl: "",
|
|
469
|
-
getToken: () =>
|
|
470
|
-
setToken: (e) =>
|
|
471
|
-
logout: () =>
|
|
472
|
-
goToLoginPage: () =>
|
|
473
|
+
getToken: () => B.getToken(),
|
|
474
|
+
setToken: (e) => B.setToken(e),
|
|
475
|
+
logout: () => B.logout(),
|
|
476
|
+
goToLoginPage: () => B.goToLoginPage()
|
|
473
477
|
};
|
|
474
|
-
function
|
|
475
|
-
Object.assign(
|
|
478
|
+
function Qe(e = {}) {
|
|
479
|
+
Object.assign(Ze, e);
|
|
476
480
|
}
|
|
477
|
-
var
|
|
481
|
+
var $e = () => Ze;
|
|
478
482
|
//#endregion
|
|
479
483
|
//#region src/api/transport/axiosOverlayConnector.js
|
|
480
|
-
function
|
|
481
|
-
let n =
|
|
484
|
+
function et(e, t = {}) {
|
|
485
|
+
let n = $e(), r = {
|
|
482
486
|
getToken: () => n.getToken?.() ?? null,
|
|
483
487
|
setToken: (e) => n.setToken?.(e),
|
|
484
488
|
logout: () => n.logout?.(),
|
|
@@ -500,74 +504,74 @@ function Fe(e, t = {}) {
|
|
|
500
504
|
}, t.functions.errorsHandlers = {
|
|
501
505
|
...r.errorsHandlers,
|
|
502
506
|
...t.functions.errorsHandlers ?? {}
|
|
503
|
-
},
|
|
507
|
+
}, ye(e, t);
|
|
504
508
|
}
|
|
505
509
|
//#endregion
|
|
506
510
|
//#region src/api/transport/httpClient.js
|
|
507
|
-
var
|
|
508
|
-
let n = t ||
|
|
511
|
+
var tt = (e, t) => {
|
|
512
|
+
let n = t || $e().baseUrl;
|
|
509
513
|
if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
|
|
510
514
|
return `${n}${e}`;
|
|
511
|
-
},
|
|
515
|
+
}, nt = (e = {}) => {
|
|
512
516
|
let t = new URLSearchParams();
|
|
513
517
|
Object.entries(e).forEach(([e, n]) => {
|
|
514
518
|
n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
|
|
515
519
|
});
|
|
516
520
|
let n = t.toString();
|
|
517
521
|
return n ? `?${n}` : "";
|
|
518
|
-
},
|
|
519
|
-
url:
|
|
522
|
+
}, rt = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => et({
|
|
523
|
+
url: tt(`${t}${nt(n)}`, a),
|
|
520
524
|
method: e,
|
|
521
525
|
...r === void 0 ? {} : { data: r },
|
|
522
526
|
...i ? { signal: i } : {}
|
|
523
|
-
}, o),
|
|
527
|
+
}, o), q = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => rt({
|
|
524
528
|
method: "GET",
|
|
525
529
|
path: e,
|
|
526
530
|
params: t,
|
|
527
531
|
signal: n,
|
|
528
532
|
baseUrl: i
|
|
529
|
-
}, r).then((e) => e.data),
|
|
533
|
+
}, r).then((e) => e.data), it = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => rt({
|
|
530
534
|
method: "POST",
|
|
531
535
|
path: e,
|
|
532
536
|
params: n,
|
|
533
537
|
data: t,
|
|
534
538
|
signal: r,
|
|
535
539
|
baseUrl: a
|
|
536
|
-
}, i).then((e) => e.data),
|
|
540
|
+
}, i).then((e) => e.data), at = { mustBeAuthenticated: !1 }, J = (e, { signal: t, baseUrl: n } = {}) => q(e, {
|
|
537
541
|
signal: t,
|
|
538
542
|
baseUrl: n,
|
|
539
|
-
overlay:
|
|
540
|
-
}),
|
|
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", {
|
|
541
545
|
params: { estDesactive: !1 },
|
|
542
546
|
signal: e,
|
|
543
547
|
baseUrl: t,
|
|
544
|
-
overlay:
|
|
545
|
-
}),
|
|
548
|
+
overlay: at
|
|
549
|
+
}), ft = ({ signal: e, baseUrl: t } = {}) => q("/collaborateurs", {
|
|
546
550
|
params: { actif: !0 },
|
|
547
551
|
signal: e,
|
|
548
552
|
baseUrl: t
|
|
549
|
-
}),
|
|
553
|
+
}), pt = async ({ signal: e, baseUrl: t } = {}) => (await q("/v2/patrimoine/communes", {
|
|
550
554
|
signal: e,
|
|
551
555
|
baseUrl: t
|
|
552
556
|
}) ?? []).map((e) => ({
|
|
553
557
|
idCommune: e.id,
|
|
554
558
|
commune: e.libelle
|
|
555
|
-
})),
|
|
559
|
+
})), mt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/entrees", {
|
|
556
560
|
params: { idCommune: e },
|
|
557
561
|
signal: t,
|
|
558
562
|
baseUrl: n
|
|
559
|
-
}),
|
|
563
|
+
}), ht = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/modules", {
|
|
560
564
|
params: { codeProgramme: e },
|
|
561
565
|
signal: t,
|
|
562
566
|
baseUrl: n
|
|
563
|
-
}),
|
|
567
|
+
}), gt = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => q("/v2/patrimoine/contrat_modules", {
|
|
564
568
|
params: {
|
|
565
569
|
idContrat: e,
|
|
566
570
|
typeContrat: t
|
|
567
571
|
},
|
|
568
572
|
signal: n,
|
|
569
573
|
baseUrl: r
|
|
570
|
-
}),
|
|
574
|
+
}), _t = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => q("/v2/sollicitation/responsables", {
|
|
571
575
|
params: {
|
|
572
576
|
motif: e,
|
|
573
577
|
categorie: t,
|
|
@@ -576,11 +580,11 @@ var Ie = (e, t) => {
|
|
|
576
580
|
},
|
|
577
581
|
signal: i,
|
|
578
582
|
baseUrl: a
|
|
579
|
-
}),
|
|
583
|
+
}), vt = (e, { signal: t, baseUrl: n } = {}) => q("/v2/patrimoine/contrat_module_rechercher", {
|
|
580
584
|
params: { recherche: e },
|
|
581
585
|
signal: t,
|
|
582
586
|
baseUrl: n
|
|
583
|
-
}),
|
|
587
|
+
}), yt = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => q("/v2/cresol/reclamant_rechercher", {
|
|
584
588
|
params: {
|
|
585
589
|
categorie: e,
|
|
586
590
|
recherche: t
|
|
@@ -590,11 +594,11 @@ var Ie = (e, t) => {
|
|
|
590
594
|
});
|
|
591
595
|
//#endregion
|
|
592
596
|
//#region src/utils/apiError.js
|
|
593
|
-
function
|
|
597
|
+
function bt(e) {
|
|
594
598
|
let t = e?.response?.data;
|
|
595
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";
|
|
596
600
|
}
|
|
597
|
-
var
|
|
601
|
+
var xt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", St = Symbol("cresol:data"), Ct = () => ({
|
|
598
602
|
motifs: null,
|
|
599
603
|
categories: null,
|
|
600
604
|
types: null,
|
|
@@ -607,71 +611,71 @@ var tt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", nt = Sy
|
|
|
607
611
|
modulesByProgramme: {},
|
|
608
612
|
modulesByContrat: {},
|
|
609
613
|
responsablesByMotif: {}
|
|
610
|
-
}),
|
|
611
|
-
function
|
|
612
|
-
|
|
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();
|
|
613
617
|
}
|
|
614
|
-
var
|
|
615
|
-
function
|
|
616
|
-
let n =
|
|
617
|
-
let
|
|
618
|
-
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);
|
|
619
623
|
n.value += 1;
|
|
620
|
-
let o = Promise.resolve().then(r).catch((t) => (
|
|
621
|
-
--n.value,
|
|
624
|
+
let o = Promise.resolve().then(r).catch((t) => (xt(t) || e?.(bt(t)), null)).finally(() => {
|
|
625
|
+
--n.value, Y.delete(a);
|
|
622
626
|
});
|
|
623
|
-
return
|
|
624
|
-
},
|
|
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 = {
|
|
625
629
|
get cache() {
|
|
626
|
-
return
|
|
630
|
+
return a();
|
|
627
631
|
},
|
|
628
632
|
loading: n,
|
|
629
|
-
isLoading:
|
|
633
|
+
isLoading: v(() => n.value > 0),
|
|
630
634
|
loadNomenclature() {
|
|
631
635
|
return Promise.all([
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
636
|
+
s("motifs", ot),
|
|
637
|
+
s("categories", st),
|
|
638
|
+
s("types", ct),
|
|
639
|
+
s("natures", lt),
|
|
640
|
+
s("etats", ut)
|
|
637
641
|
]);
|
|
638
642
|
},
|
|
639
|
-
loadCollaborateurs: () =>
|
|
640
|
-
loadProvenances: () =>
|
|
643
|
+
loadCollaborateurs: () => s("collaborateurs", ft),
|
|
644
|
+
loadProvenances: () => s("provenances", dt),
|
|
641
645
|
loadCommunes() {
|
|
642
|
-
return
|
|
646
|
+
return a().communes?.length ? Promise.resolve(a().communes) : o("communes", async () => (a().communes = await pt(r()), a().communes));
|
|
643
647
|
},
|
|
644
648
|
loadAdresses(e) {
|
|
645
|
-
return e == null ? Promise.resolve([]) :
|
|
646
|
-
let t = await
|
|
647
|
-
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;
|
|
648
652
|
});
|
|
649
653
|
},
|
|
650
654
|
loadModulesOfProgramme(e) {
|
|
651
|
-
return e == null ? Promise.resolve([]) :
|
|
652
|
-
let t = await
|
|
653
|
-
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;
|
|
654
658
|
});
|
|
655
659
|
},
|
|
656
660
|
loadModulesOfContrat({ idContrat: e, typeContrat: t }) {
|
|
657
661
|
if (e == null) return Promise.resolve([]);
|
|
658
662
|
let n = `${t ?? ""}|${e}`;
|
|
659
|
-
return
|
|
660
|
-
let
|
|
663
|
+
return a().modulesByContrat[n] ? Promise.resolve(a().modulesByContrat[n]) : o(`contratModules:${n}`, async () => {
|
|
664
|
+
let i = await gt({
|
|
661
665
|
idContrat: e,
|
|
662
666
|
typeContrat: t
|
|
663
|
-
},
|
|
664
|
-
return
|
|
667
|
+
}, r());
|
|
668
|
+
return a().modulesByContrat[n] = i ?? [], i;
|
|
665
669
|
});
|
|
666
670
|
},
|
|
667
671
|
async searchContrats(e, { signal: t } = {}) {
|
|
668
672
|
let n = (e ?? "").trim();
|
|
669
673
|
if (!n) return [];
|
|
670
|
-
let
|
|
671
|
-
...
|
|
674
|
+
let i = await vt(n, {
|
|
675
|
+
...r(),
|
|
672
676
|
signal: t
|
|
673
677
|
}), a = /* @__PURE__ */ new Map();
|
|
674
|
-
for (let e of
|
|
678
|
+
for (let e of i ?? []) {
|
|
675
679
|
let t = `${e.typeContrat}|${e.idContrat}`;
|
|
676
680
|
(!a.has(t) || e.estModulePrincipal) && a.set(t, {
|
|
677
681
|
typeContrat: e.typeContrat,
|
|
@@ -687,13 +691,13 @@ function ot({ onError: e, baseUrl: t } = {}) {
|
|
|
687
691
|
return [...a.values()].sort((e, t) => Number(e.estSorti) - Number(t.estSorti) || (e.libelle ?? "").localeCompare(t.libelle ?? ""));
|
|
688
692
|
},
|
|
689
693
|
async searchReclamants(e, t, { signal: n } = {}) {
|
|
690
|
-
let
|
|
691
|
-
if (!
|
|
692
|
-
let a = await
|
|
694
|
+
let i = (t ?? "").trim();
|
|
695
|
+
if (!i) return [];
|
|
696
|
+
let a = await yt({
|
|
693
697
|
categorie: e,
|
|
694
|
-
recherche:
|
|
698
|
+
recherche: i
|
|
695
699
|
}, {
|
|
696
|
-
...
|
|
700
|
+
...r(),
|
|
697
701
|
signal: n
|
|
698
702
|
}), o = /* @__PURE__ */ new Map();
|
|
699
703
|
for (let t of a ?? []) {
|
|
@@ -723,25 +727,25 @@ function ot({ onError: e, baseUrl: t } = {}) {
|
|
|
723
727
|
};
|
|
724
728
|
});
|
|
725
729
|
},
|
|
726
|
-
loadResponsables({ motif: e, categorie: t, type: n, nature:
|
|
727
|
-
return e == null ? Promise.resolve([]) :
|
|
728
|
-
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({
|
|
729
733
|
motif: e,
|
|
730
734
|
categorie: t,
|
|
731
735
|
type: n,
|
|
732
|
-
nature:
|
|
733
|
-
},
|
|
734
|
-
return
|
|
736
|
+
nature: i
|
|
737
|
+
}, r());
|
|
738
|
+
return a().responsablesByMotif[e] = o ?? [], o;
|
|
735
739
|
});
|
|
736
740
|
},
|
|
737
|
-
adressesOfCommune: (e) =>
|
|
738
|
-
modulesOfProgramme: (e) =>
|
|
739
|
-
modulesOfContrat: ({ idContrat: e, typeContrat: t }) =>
|
|
740
|
-
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(),
|
|
741
745
|
getResponsableSuggere({ idMotif: e, codeProgramme: t, codeTranche: n, codeBatiment: r, codeEscalier: i }) {
|
|
742
|
-
let
|
|
743
|
-
if (!
|
|
744
|
-
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));
|
|
745
749
|
if (!s.length) return null;
|
|
746
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);
|
|
747
751
|
return {
|
|
@@ -749,54 +753,54 @@ function ot({ onError: e, baseUrl: t } = {}) {
|
|
|
749
753
|
libelle: l.libelleResponsable
|
|
750
754
|
};
|
|
751
755
|
},
|
|
752
|
-
motifLibelle: (e) =>
|
|
753
|
-
categorieLibelle: (e) =>
|
|
754
|
-
typeLibelle: (e) =>
|
|
755
|
-
natureLibelle: (e) =>
|
|
756
|
-
etatLibelle: (e) =>
|
|
757
|
-
motifIcon: (e) =>
|
|
758
|
-
categorieIcon: (e) =>
|
|
759
|
-
typeIcon: (e) =>
|
|
760
|
-
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)
|
|
761
765
|
};
|
|
762
|
-
return
|
|
766
|
+
return A(c);
|
|
763
767
|
}
|
|
764
|
-
function
|
|
765
|
-
return
|
|
768
|
+
function kt(e) {
|
|
769
|
+
return pe(St, e), e;
|
|
766
770
|
}
|
|
767
|
-
function
|
|
768
|
-
let e =
|
|
771
|
+
function Z() {
|
|
772
|
+
let e = de(St, null);
|
|
769
773
|
if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
|
|
770
774
|
return e;
|
|
771
775
|
}
|
|
772
776
|
//#endregion
|
|
773
777
|
//#region src/utils/fontAwesomeIcons.js
|
|
774
|
-
var
|
|
775
|
-
async function
|
|
776
|
-
let
|
|
777
|
-
[...new Set(
|
|
778
|
-
let
|
|
779
|
-
|
|
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);
|
|
780
784
|
});
|
|
781
785
|
}
|
|
782
786
|
//#endregion
|
|
783
787
|
//#region src/utils/date.js
|
|
784
|
-
function
|
|
788
|
+
function Mt(e) {
|
|
785
789
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
786
790
|
}
|
|
787
|
-
function
|
|
791
|
+
function Nt(e) {
|
|
788
792
|
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
789
793
|
}
|
|
790
|
-
function
|
|
794
|
+
function Pt(e) {
|
|
791
795
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
|
|
792
796
|
}
|
|
793
797
|
//#endregion
|
|
794
798
|
//#region src/composables/useCresolContext.js
|
|
795
|
-
var
|
|
796
|
-
|
|
797
|
-
|
|
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;
|
|
798
802
|
});
|
|
799
|
-
var
|
|
803
|
+
var Rt = {
|
|
800
804
|
name: "ReclamantTypeBadgeComponent",
|
|
801
805
|
props: {
|
|
802
806
|
reclamant: {
|
|
@@ -809,29 +813,29 @@ var mt = {
|
|
|
809
813
|
}
|
|
810
814
|
},
|
|
811
815
|
setup() {
|
|
812
|
-
return { iconsReady:
|
|
816
|
+
return { iconsReady: Lt };
|
|
813
817
|
},
|
|
814
818
|
computed: { type() {
|
|
815
|
-
return
|
|
819
|
+
return Ae(this.reclamant);
|
|
816
820
|
} }
|
|
817
|
-
},
|
|
818
|
-
function
|
|
819
|
-
let
|
|
820
|
-
return
|
|
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", {
|
|
821
825
|
key: 0,
|
|
822
|
-
class:
|
|
823
|
-
title:
|
|
824
|
-
}, [r.iconsReady ? (
|
|
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, {
|
|
825
829
|
key: 0,
|
|
826
|
-
icon:
|
|
830
|
+
icon: a.type.icon,
|
|
827
831
|
"fixed-width": ""
|
|
828
|
-
}, null, 8, ["icon"])) :
|
|
832
|
+
}, null, 8, ["icon"])) : b("", !0), n.iconOnly ? b("", !0) : (k(), x("span", Bt, F(a.type.libelle), 1))], 10, zt)) : b("", !0);
|
|
829
833
|
}
|
|
830
|
-
var
|
|
834
|
+
var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
831
835
|
{
|
|
832
836
|
key: "locataire",
|
|
833
837
|
label: "Locataire",
|
|
834
|
-
icon:
|
|
838
|
+
icon: H.locataire.icon,
|
|
835
839
|
recherche: "Rechercher un locataire",
|
|
836
840
|
aucun: "Aucun locataire trouvé.",
|
|
837
841
|
placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
|
|
@@ -839,7 +843,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
839
843
|
{
|
|
840
844
|
key: "demandeur",
|
|
841
845
|
label: "Demandeur",
|
|
842
|
-
icon:
|
|
846
|
+
icon: H.demandeur.icon,
|
|
843
847
|
recherche: "Rechercher un demandeur",
|
|
844
848
|
aucun: "Aucun demandeur trouvé.",
|
|
845
849
|
placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
|
|
@@ -847,7 +851,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
847
851
|
{
|
|
848
852
|
key: "tiers",
|
|
849
853
|
label: "Tiers",
|
|
850
|
-
icon:
|
|
854
|
+
icon: H.tiers.icon,
|
|
851
855
|
recherche: "Rechercher un tiers",
|
|
852
856
|
aucun: "Aucun tiers trouvé.",
|
|
853
857
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -855,7 +859,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
855
859
|
{
|
|
856
860
|
key: "autre",
|
|
857
861
|
label: "Autre",
|
|
858
|
-
icon:
|
|
862
|
+
icon: H.autre.icon,
|
|
859
863
|
recherche: "Rechercher un individu « Autre »",
|
|
860
864
|
aucun: "Aucun individu « Autre » trouvé.",
|
|
861
865
|
placeholder: "Nom, prénom, adresse, téléphone ou mail…"
|
|
@@ -863,7 +867,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
863
867
|
{
|
|
864
868
|
key: "fournisseur",
|
|
865
869
|
label: "Fournisseur",
|
|
866
|
-
icon:
|
|
870
|
+
icon: H.fournisseur.icon,
|
|
867
871
|
recherche: "Rechercher un fournisseur",
|
|
868
872
|
aucun: "Aucun fournisseur trouvé.",
|
|
869
873
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -871,7 +875,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
871
875
|
{
|
|
872
876
|
key: "personnel",
|
|
873
877
|
label: "Personnel",
|
|
874
|
-
icon:
|
|
878
|
+
icon: H.personnel.icon,
|
|
875
879
|
recherche: "Rechercher un collaborateur",
|
|
876
880
|
aucun: "Aucun collaborateur trouvé.",
|
|
877
881
|
placeholder: "Nom, prénom, téléphone ou mail…"
|
|
@@ -884,21 +888,21 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
884
888
|
aucun: "Aucun réclamant trouvé.",
|
|
885
889
|
placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
|
|
886
890
|
}
|
|
887
|
-
],
|
|
891
|
+
], Wt = {
|
|
888
892
|
signataire: "Signataire",
|
|
889
893
|
occupant: "Occupant",
|
|
890
894
|
demandeur: "Demandeur"
|
|
891
|
-
},
|
|
895
|
+
}, Gt = {
|
|
892
896
|
name: "ReclamantRechercheBlock",
|
|
893
897
|
components: {
|
|
894
|
-
AmsomAutocomplete:
|
|
895
|
-
ReclamantTypeBadgeComponent:
|
|
898
|
+
AmsomAutocomplete: z,
|
|
899
|
+
ReclamantTypeBadgeComponent: Ht
|
|
896
900
|
},
|
|
897
901
|
setup() {
|
|
898
902
|
return {
|
|
899
|
-
draft:
|
|
900
|
-
data:
|
|
901
|
-
options:
|
|
903
|
+
draft: G(),
|
|
904
|
+
data: Z(),
|
|
905
|
+
options: Q()
|
|
902
906
|
};
|
|
903
907
|
},
|
|
904
908
|
data() {
|
|
@@ -912,16 +916,16 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
912
916
|
},
|
|
913
917
|
computed: {
|
|
914
918
|
typesAutorises() {
|
|
915
|
-
return this.options.typesReclamant ??
|
|
919
|
+
return this.options.typesReclamant ?? U;
|
|
916
920
|
},
|
|
917
921
|
autorisees() {
|
|
918
|
-
return
|
|
922
|
+
return Oe(this.typesAutorises);
|
|
919
923
|
},
|
|
920
924
|
categories() {
|
|
921
|
-
return
|
|
925
|
+
return Ut.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
|
|
922
926
|
},
|
|
923
927
|
categorieCourante() {
|
|
924
|
-
return
|
|
928
|
+
return Ut.find((e) => e.key === this.categorie);
|
|
925
929
|
},
|
|
926
930
|
selectionne() {
|
|
927
931
|
return this.draft.reclamantSelectionne;
|
|
@@ -936,7 +940,7 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
936
940
|
}
|
|
937
941
|
},
|
|
938
942
|
async created() {
|
|
939
|
-
this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await
|
|
943
|
+
this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await jt(Ut.map((e) => e.icon)), this.iconsReady = !0;
|
|
940
944
|
},
|
|
941
945
|
beforeUnmount() {
|
|
942
946
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
@@ -963,11 +967,11 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
963
967
|
return e ? `${e.type}|${e.id}` : null;
|
|
964
968
|
},
|
|
965
969
|
categorieOf(e) {
|
|
966
|
-
let t =
|
|
970
|
+
let t = ke(e);
|
|
967
971
|
return this.autorisees.includes(t) ? t : null;
|
|
968
972
|
},
|
|
969
973
|
sortiLibelle(e) {
|
|
970
|
-
return e?.dateSortie == null ? "sorti" : `sorti le ${
|
|
974
|
+
return e?.dateSortie == null ? "sorti" : `sorti le ${Pt(e.dateSortie)}`;
|
|
971
975
|
},
|
|
972
976
|
nomsOf(e) {
|
|
973
977
|
return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
|
|
@@ -980,72 +984,72 @@ var vt = /*#__PURE__*/ z(mt, [["render", _t]]), Q = [
|
|
|
980
984
|
referenceOf(e) {
|
|
981
985
|
if (!e?.individus) return "";
|
|
982
986
|
let t = this.categorieOf(e);
|
|
983
|
-
return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" :
|
|
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;
|
|
984
988
|
},
|
|
985
989
|
detailOf(e) {
|
|
986
990
|
let t = e?.individus ?? [];
|
|
987
|
-
if (!["locataire", "demandeur"].includes(
|
|
991
|
+
if (!["locataire", "demandeur"].includes(ke(e))) {
|
|
988
992
|
let e = t[0];
|
|
989
993
|
return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
|
|
990
994
|
}
|
|
991
995
|
return t.map((t) => {
|
|
992
|
-
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(", ");
|
|
993
997
|
return i ? `${n} (${i})` : n;
|
|
994
998
|
}).join(", ");
|
|
995
999
|
}
|
|
996
1000
|
}
|
|
997
|
-
},
|
|
1001
|
+
}, Kt = {
|
|
998
1002
|
key: 0,
|
|
999
1003
|
class: "d-flex flex-column gap-3"
|
|
1000
|
-
},
|
|
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 = {
|
|
1001
1005
|
key: 0,
|
|
1002
1006
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
1003
|
-
},
|
|
1007
|
+
}, Qt = { class: "text-muted d-block text-truncate" }, $t = { key: 0 }, en = {
|
|
1004
1008
|
key: 0,
|
|
1005
1009
|
class: "text-muted d-block text-truncate"
|
|
1006
|
-
},
|
|
1010
|
+
}, tn = {
|
|
1007
1011
|
key: 0,
|
|
1008
1012
|
class: "text-muted"
|
|
1009
1013
|
};
|
|
1010
|
-
function
|
|
1011
|
-
let
|
|
1012
|
-
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", {
|
|
1013
1017
|
key: e.key,
|
|
1014
1018
|
type: "button",
|
|
1015
|
-
class:
|
|
1016
|
-
onClick: (t) =>
|
|
1017
|
-
}, [
|
|
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, {
|
|
1018
1022
|
icon: e.icon,
|
|
1019
1023
|
"fixed-width": ""
|
|
1020
|
-
}, null, 8, ["icon"]),
|
|
1021
|
-
|
|
1022
|
-
(
|
|
1023
|
-
key:
|
|
1024
|
-
modelValue:
|
|
1025
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1026
|
-
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,
|
|
1027
1031
|
"filtering-function": ({ items: e }) => e,
|
|
1028
|
-
loading:
|
|
1029
|
-
"get-id":
|
|
1032
|
+
loading: i.rechercheEnCours,
|
|
1033
|
+
"get-id": a.cleReclamant,
|
|
1030
1034
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1031
|
-
placeholder:
|
|
1035
|
+
placeholder: a.categorieCourante.placeholder,
|
|
1032
1036
|
"input-size": "sm",
|
|
1033
1037
|
"hide-choices": "",
|
|
1034
1038
|
"debounce-delay": 0,
|
|
1035
|
-
onSearch:
|
|
1039
|
+
onSearch: a.rechercherPlusTard
|
|
1036
1040
|
}, {
|
|
1037
|
-
options:
|
|
1038
|
-
|
|
1039
|
-
|
|
1041
|
+
options: R((e) => [S("div", Xt, [
|
|
1042
|
+
S("div", { class: D(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
|
|
1043
|
+
T(s, {
|
|
1040
1044
|
reclamant: e,
|
|
1041
1045
|
"icon-only": "",
|
|
1042
1046
|
class: "me-1"
|
|
1043
1047
|
}, null, 8, ["reclamant"]),
|
|
1044
|
-
|
|
1045
|
-
e?.estActif ?
|
|
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))
|
|
1046
1050
|
], 2),
|
|
1047
|
-
|
|
1048
|
-
|
|
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)
|
|
1049
1053
|
])]),
|
|
1050
1054
|
_: 1
|
|
1051
1055
|
}, 8, [
|
|
@@ -1058,16 +1062,16 @@ function jt(e, t, r, c, d, f) {
|
|
|
1058
1062
|
"placeholder",
|
|
1059
1063
|
"onSearch"
|
|
1060
1064
|
])),
|
|
1061
|
-
|
|
1062
|
-
])])) :
|
|
1065
|
+
i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (k(), x("small", tn, F(a.categorieCourante.aucun), 1)) : b("", !0)
|
|
1066
|
+
])])) : b("", !0);
|
|
1063
1067
|
}
|
|
1064
|
-
var
|
|
1068
|
+
var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
|
|
1065
1069
|
name: "ProvenanceSelecteurBlock",
|
|
1066
1070
|
setup() {
|
|
1067
1071
|
return {
|
|
1068
|
-
draft:
|
|
1069
|
-
data:
|
|
1070
|
-
options:
|
|
1072
|
+
draft: G(),
|
|
1073
|
+
data: Z(),
|
|
1074
|
+
options: Q()
|
|
1071
1075
|
};
|
|
1072
1076
|
},
|
|
1073
1077
|
data() {
|
|
@@ -1091,62 +1095,62 @@ var Mt = /*#__PURE__*/ z(bt, [["render", jt]]), Nt = {
|
|
|
1091
1095
|
}
|
|
1092
1096
|
},
|
|
1093
1097
|
async created() {
|
|
1094
|
-
await
|
|
1098
|
+
await jt([...Object.values(V), Se]), this.iconsReady = !0;
|
|
1095
1099
|
},
|
|
1096
|
-
methods: { iconOf:
|
|
1097
|
-
},
|
|
1100
|
+
methods: { iconOf: Ce }
|
|
1101
|
+
}, on = {
|
|
1098
1102
|
key: 0,
|
|
1099
1103
|
class: "fs-7 text-muted"
|
|
1100
|
-
},
|
|
1104
|
+
}, sn = { class: "fw-medium" }, cn = { key: 1 }, ln = { class: "d-flex flex-wrap gap-2" }, un = ["onClick"], dn = {
|
|
1101
1105
|
key: 0,
|
|
1102
1106
|
class: "fs-7 text-danger mt-1"
|
|
1103
1107
|
};
|
|
1104
|
-
function
|
|
1105
|
-
let
|
|
1106
|
-
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, {
|
|
1107
1111
|
key: 0,
|
|
1108
|
-
icon:
|
|
1112
|
+
icon: a.iconOf(a.selected),
|
|
1109
1113
|
"fixed-width": ""
|
|
1110
|
-
}, null, 8, ["icon"])) :
|
|
1111
|
-
t[1] ||=
|
|
1112
|
-
|
|
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", {
|
|
1113
1117
|
key: e.id,
|
|
1114
1118
|
type: "button",
|
|
1115
|
-
class:
|
|
1116
|
-
onClick: (t) =>
|
|
1117
|
-
}, [
|
|
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, {
|
|
1118
1122
|
key: 0,
|
|
1119
1123
|
icon: e.icon,
|
|
1120
1124
|
"fixed-width": ""
|
|
1121
|
-
}, null, 8, ["icon"])) :
|
|
1122
|
-
|
|
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)
|
|
1123
1127
|
]));
|
|
1124
1128
|
}
|
|
1125
|
-
var
|
|
1129
|
+
var pn = /*#__PURE__*/ K(an, [["render", fn]]), mn = {
|
|
1126
1130
|
name: "EtapeReclamantBlock",
|
|
1127
1131
|
components: {
|
|
1128
|
-
ReclamantRechercheBlock:
|
|
1129
|
-
ProvenanceSelecteurBlock:
|
|
1132
|
+
ReclamantRechercheBlock: rn,
|
|
1133
|
+
ProvenanceSelecteurBlock: pn
|
|
1130
1134
|
},
|
|
1131
1135
|
props: { premiere: {
|
|
1132
1136
|
type: Boolean,
|
|
1133
1137
|
default: !1
|
|
1134
1138
|
} },
|
|
1135
1139
|
setup() {
|
|
1136
|
-
return { draft:
|
|
1140
|
+
return { draft: G() };
|
|
1137
1141
|
}
|
|
1138
|
-
},
|
|
1139
|
-
function
|
|
1140
|
-
let
|
|
1141
|
-
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", {
|
|
1142
1146
|
reclamant: r.draft.reclamantSelectionne,
|
|
1143
1147
|
select: r.draft.selectReclamant
|
|
1144
|
-
}, () => [
|
|
1148
|
+
}, () => [S("div", gn, [T(s, {
|
|
1145
1149
|
icon: "user",
|
|
1146
1150
|
class: "text-primary me-2"
|
|
1147
|
-
}), t[0] ||=
|
|
1151
|
+
}), t[0] ||= w(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), T(c)])]);
|
|
1148
1152
|
}
|
|
1149
|
-
var
|
|
1153
|
+
var vn = /*#__PURE__*/ K(mn, [["render", _n]]);
|
|
1150
1154
|
//#endregion
|
|
1151
1155
|
//#region src/utils/text.js
|
|
1152
1156
|
function $(e, t = !0) {
|
|
@@ -1156,11 +1160,11 @@ function $(e, t = !0) {
|
|
|
1156
1160
|
}
|
|
1157
1161
|
//#endregion
|
|
1158
1162
|
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1159
|
-
var
|
|
1163
|
+
var yn = {
|
|
1160
1164
|
name: "ReclamantSelecteurBlock",
|
|
1161
1165
|
components: {
|
|
1162
|
-
AmsomAutocomplete:
|
|
1163
|
-
ReclamantTypeBadgeComponent:
|
|
1166
|
+
AmsomAutocomplete: z,
|
|
1167
|
+
ReclamantTypeBadgeComponent: Ht
|
|
1164
1168
|
},
|
|
1165
1169
|
props: {
|
|
1166
1170
|
mode: {
|
|
@@ -1174,8 +1178,8 @@ var qt = {
|
|
|
1174
1178
|
},
|
|
1175
1179
|
setup() {
|
|
1176
1180
|
return {
|
|
1177
|
-
draft:
|
|
1178
|
-
options:
|
|
1181
|
+
draft: G(),
|
|
1182
|
+
options: Q()
|
|
1179
1183
|
};
|
|
1180
1184
|
},
|
|
1181
1185
|
computed: {
|
|
@@ -1205,42 +1209,42 @@ var qt = {
|
|
|
1205
1209
|
return n ? t.filter((e) => ($(e?.libelle) ?? "").includes(n)) : t;
|
|
1206
1210
|
}
|
|
1207
1211
|
}
|
|
1208
|
-
},
|
|
1212
|
+
}, bn = {
|
|
1209
1213
|
key: 0,
|
|
1210
1214
|
class: "fs-7 text-muted"
|
|
1211
|
-
},
|
|
1215
|
+
}, xn = { class: "fw-medium" }, Sn = {
|
|
1212
1216
|
key: 0,
|
|
1213
1217
|
class: "btn-group btn-group-sm",
|
|
1214
1218
|
role: "group"
|
|
1215
|
-
},
|
|
1216
|
-
function
|
|
1217
|
-
let
|
|
1218
|
-
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", {
|
|
1219
1223
|
key: 1,
|
|
1220
|
-
class:
|
|
1221
|
-
}, [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", {
|
|
1222
1226
|
key: t,
|
|
1223
1227
|
type: "button",
|
|
1224
|
-
class:
|
|
1225
|
-
onClick: (t) =>
|
|
1226
|
-
},
|
|
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, {
|
|
1227
1231
|
key: 1,
|
|
1228
|
-
"model-value":
|
|
1229
|
-
items:
|
|
1230
|
-
"get-id":
|
|
1232
|
+
"model-value": a.reclamantSelectionne,
|
|
1233
|
+
items: a.reclamants,
|
|
1234
|
+
"get-id": a.reclamantId,
|
|
1231
1235
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1232
|
-
"filtering-function":
|
|
1236
|
+
"filtering-function": a.filterReclamants,
|
|
1233
1237
|
placeholder: "Rechercher un réclamant…",
|
|
1234
1238
|
"input-size": "sm",
|
|
1235
1239
|
"hide-choices": "",
|
|
1236
|
-
class:
|
|
1237
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1240
|
+
class: D(n.inline ? "" : "w-100"),
|
|
1241
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.select(e)
|
|
1238
1242
|
}, {
|
|
1239
|
-
options:
|
|
1243
|
+
options: R((e) => [T(o, {
|
|
1240
1244
|
reclamant: e,
|
|
1241
1245
|
"icon-only": "",
|
|
1242
1246
|
class: "me-1"
|
|
1243
|
-
}, null, 8, ["reclamant"]),
|
|
1247
|
+
}, null, 8, ["reclamant"]), w(" " + F(e?.libelle), 1)]),
|
|
1244
1248
|
_: 1
|
|
1245
1249
|
}, 8, [
|
|
1246
1250
|
"model-value",
|
|
@@ -1249,25 +1253,25 @@ function en(e, t, r, a, c, d) {
|
|
|
1249
1253
|
"get-input-libelle",
|
|
1250
1254
|
"filtering-function",
|
|
1251
1255
|
"class"
|
|
1252
|
-
])) : (
|
|
1256
|
+
])) : (k(), x("select", {
|
|
1253
1257
|
key: 2,
|
|
1254
|
-
class:
|
|
1255
|
-
value:
|
|
1256
|
-
onChange: t[1] ||= (e) =>
|
|
1257
|
-
}, [(
|
|
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", {
|
|
1258
1262
|
key: t,
|
|
1259
1263
|
value: t
|
|
1260
|
-
},
|
|
1264
|
+
}, F(e.libelle), 9, Tn))), 128))], 42, wn))], 2));
|
|
1261
1265
|
}
|
|
1262
1266
|
//#endregion
|
|
1263
1267
|
//#region src/components/EtapeCategorieBlock.vue
|
|
1264
|
-
var
|
|
1268
|
+
var Dn = {
|
|
1265
1269
|
name: "EtapeCategorieBlock",
|
|
1266
1270
|
components: {
|
|
1267
|
-
AmsomOverlay:
|
|
1268
|
-
AmsomAutocomplete:
|
|
1269
|
-
ReclamantSelecteurBlock: /* @__PURE__ */
|
|
1270
|
-
ProvenanceSelecteurBlock:
|
|
1271
|
+
AmsomOverlay: g,
|
|
1272
|
+
AmsomAutocomplete: z,
|
|
1273
|
+
ReclamantSelecteurBlock: /* @__PURE__ */ K(yn, [["render", En]]),
|
|
1274
|
+
ProvenanceSelecteurBlock: pn
|
|
1271
1275
|
},
|
|
1272
1276
|
props: { premiere: {
|
|
1273
1277
|
type: Boolean,
|
|
@@ -1275,9 +1279,9 @@ var tn = {
|
|
|
1275
1279
|
} },
|
|
1276
1280
|
setup() {
|
|
1277
1281
|
return {
|
|
1278
|
-
draft:
|
|
1279
|
-
data:
|
|
1280
|
-
options:
|
|
1282
|
+
draft: G(),
|
|
1283
|
+
data: Z(),
|
|
1284
|
+
options: Q()
|
|
1281
1285
|
};
|
|
1282
1286
|
},
|
|
1283
1287
|
data() {
|
|
@@ -1394,7 +1398,7 @@ var tn = {
|
|
|
1394
1398
|
});
|
|
1395
1399
|
},
|
|
1396
1400
|
registerIcons() {
|
|
1397
|
-
return
|
|
1401
|
+
return jt([
|
|
1398
1402
|
...this.data.cache.categories ?? [],
|
|
1399
1403
|
...this.data.cache.types ?? [],
|
|
1400
1404
|
...this.data.cache.natures ?? [],
|
|
@@ -1429,57 +1433,57 @@ var tn = {
|
|
|
1429
1433
|
return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
|
|
1430
1434
|
}
|
|
1431
1435
|
}
|
|
1432
|
-
},
|
|
1436
|
+
}, On = {
|
|
1433
1437
|
key: 0,
|
|
1434
1438
|
class: "d-flex flex-column gap-3"
|
|
1435
|
-
},
|
|
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 = {
|
|
1436
1440
|
key: 4,
|
|
1437
1441
|
class: "d-flex align-items-center gap-2 text-muted fs-7"
|
|
1438
|
-
},
|
|
1442
|
+
}, Rn = {
|
|
1439
1443
|
key: 5,
|
|
1440
1444
|
class: "d-flex flex-wrap align-items-center gap-2"
|
|
1441
|
-
},
|
|
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 = {
|
|
1442
1446
|
key: 0,
|
|
1443
1447
|
class: "col-12 text-muted fs-7"
|
|
1444
|
-
},
|
|
1448
|
+
}, Kn = [
|
|
1445
1449
|
"id",
|
|
1446
1450
|
"checked",
|
|
1447
1451
|
"disabled",
|
|
1448
1452
|
"onChange"
|
|
1449
|
-
],
|
|
1450
|
-
function
|
|
1451
|
-
let
|
|
1452
|
-
return
|
|
1453
|
-
default:
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
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, {
|
|
1457
1461
|
key: 0,
|
|
1458
1462
|
icon: "fa-solid fa-chevron-right",
|
|
1459
1463
|
class: "text-muted fs-7"
|
|
1460
|
-
})) :
|
|
1464
|
+
})) : b("", !0), S("span", jn, [e.icon ? (k(), y(c, {
|
|
1461
1465
|
key: 0,
|
|
1462
1466
|
icon: e.icon,
|
|
1463
1467
|
"fixed-width": ""
|
|
1464
|
-
}, null, 8, ["icon"])) :
|
|
1465
|
-
|
|
1466
|
-
modelValue:
|
|
1467
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1468
|
-
items:
|
|
1469
|
-
"get-id":
|
|
1470
|
-
"get-input-libelle":
|
|
1471
|
-
"get-input-libelle-from-id":
|
|
1472
|
-
"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,
|
|
1473
1477
|
placeholder: "Rechercher (motif, catégorie, type, nature)…",
|
|
1474
1478
|
"input-size": "sm",
|
|
1475
1479
|
"hide-choices": ""
|
|
1476
1480
|
}, {
|
|
1477
|
-
options:
|
|
1481
|
+
options: R((e) => [S("div", Nn, [e?.icon ? (k(), y(c, {
|
|
1478
1482
|
key: 0,
|
|
1479
1483
|
icon: e.icon,
|
|
1480
1484
|
class: "text-primary",
|
|
1481
1485
|
"fixed-width": ""
|
|
1482
|
-
}, 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)])])]),
|
|
1483
1487
|
_: 1
|
|
1484
1488
|
}, 8, [
|
|
1485
1489
|
"modelValue",
|
|
@@ -1489,67 +1493,67 @@ function Cn(e, t, r, c, d, f) {
|
|
|
1489
1493
|
"get-input-libelle-from-id",
|
|
1490
1494
|
"filtering-function"
|
|
1491
1495
|
])])),
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
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)
|
|
1496
1500
|
]])),
|
|
1497
|
-
!
|
|
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, {
|
|
1498
1502
|
key: 0,
|
|
1499
1503
|
icon: "fa-solid fa-chevron-right",
|
|
1500
1504
|
class: "text-muted fs-7"
|
|
1501
|
-
})) :
|
|
1505
|
+
})) : b("", !0), S("button", {
|
|
1502
1506
|
type: "button",
|
|
1503
1507
|
class: "btn btn-sm btn-primary rounded-pill d-inline-flex align-items-center gap-2",
|
|
1504
|
-
onClick: (t) =>
|
|
1508
|
+
onClick: (t) => a.goBackTo(e.level)
|
|
1505
1509
|
}, [
|
|
1506
|
-
e.icon ? (
|
|
1510
|
+
e.icon ? (k(), y(c, {
|
|
1507
1511
|
key: 0,
|
|
1508
1512
|
icon: e.icon,
|
|
1509
1513
|
"fixed-width": ""
|
|
1510
|
-
}, null, 8, ["icon"])) :
|
|
1511
|
-
|
|
1512
|
-
|
|
1514
|
+
}, null, 8, ["icon"])) : b("", !0),
|
|
1515
|
+
S("span", null, F(e.libelle), 1),
|
|
1516
|
+
T(c, {
|
|
1513
1517
|
icon: "fa-solid fa-xmark",
|
|
1514
1518
|
class: "fs-7 opacity-75"
|
|
1515
1519
|
})
|
|
1516
|
-
], 8,
|
|
1517
|
-
!
|
|
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", {
|
|
1518
1522
|
key: e.id,
|
|
1519
1523
|
class: "col-3 text-center"
|
|
1520
|
-
}, [
|
|
1524
|
+
}, [S("button", {
|
|
1521
1525
|
type: "button",
|
|
1522
1526
|
class: "btn btn-lg btn-outline-primary btn-circle d-flex align-items-center justify-content-center mx-auto",
|
|
1523
1527
|
title: e.libelle,
|
|
1524
|
-
onClick: (t) =>
|
|
1525
|
-
}, [e.icon ? (
|
|
1528
|
+
onClick: (t) => a.currentLevel.select(e.id)
|
|
1529
|
+
}, [e.icon ? (k(), y(c, {
|
|
1526
1530
|
key: 0,
|
|
1527
1531
|
icon: e.icon,
|
|
1528
1532
|
size: "lg"
|
|
1529
|
-
}, null, 8, ["icon"])) :
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
], -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", {
|
|
1535
1539
|
key: e.idMotif,
|
|
1536
1540
|
class: "form-check form-switch"
|
|
1537
|
-
}, [
|
|
1541
|
+
}, [S("input", {
|
|
1538
1542
|
id: `assoc-${e.idMotif}`,
|
|
1539
1543
|
class: "form-check-input",
|
|
1540
1544
|
type: "checkbox",
|
|
1541
|
-
checked:
|
|
1542
|
-
disabled:
|
|
1543
|
-
onChange: (t) =>
|
|
1544
|
-
}, null, 40,
|
|
1545
|
+
checked: a.isActive(e.idMotif),
|
|
1546
|
+
disabled: a.motifFige,
|
|
1547
|
+
onChange: (t) => a.toggleMotifAssocie(e)
|
|
1548
|
+
}, null, 40, Kn), S("label", {
|
|
1545
1549
|
class: "form-check-label fs-7",
|
|
1546
1550
|
for: `assoc-${e.idMotif}`
|
|
1547
|
-
},
|
|
1548
|
-
])) :
|
|
1551
|
+
}, F(e.libelle) + " ? ", 9, qn)]))), 128))], 64)) : b("", !0)
|
|
1552
|
+
])) : b("", !0)]),
|
|
1549
1553
|
_: 1
|
|
1550
1554
|
}, 8, ["loading"]);
|
|
1551
1555
|
}
|
|
1552
|
-
var
|
|
1556
|
+
var Yn = /*#__PURE__*/ K(Dn, [["render", Jn]]), Xn = {
|
|
1553
1557
|
B: "briefcase",
|
|
1554
1558
|
M: "store",
|
|
1555
1559
|
W: "dungeon",
|
|
@@ -1559,17 +1563,17 @@ var wn = /*#__PURE__*/ z(tn, [["render", Cn]]), Tn = {
|
|
|
1559
1563
|
S: "square-parking",
|
|
1560
1564
|
V: "hands-holding"
|
|
1561
1565
|
};
|
|
1562
|
-
function
|
|
1563
|
-
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;
|
|
1564
1568
|
}
|
|
1565
|
-
function
|
|
1569
|
+
function Qn(e) {
|
|
1566
1570
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1567
1571
|
}
|
|
1568
1572
|
//#endregion
|
|
1569
1573
|
//#region src/components/CiblePickerBlock.vue
|
|
1570
|
-
var
|
|
1574
|
+
var $n = 0, er = {
|
|
1571
1575
|
name: "CiblePickerBlock",
|
|
1572
|
-
components: { AmsomAutocomplete:
|
|
1576
|
+
components: { AmsomAutocomplete: z },
|
|
1573
1577
|
props: {
|
|
1574
1578
|
patrimoine: {
|
|
1575
1579
|
type: Object,
|
|
@@ -1620,11 +1624,11 @@ var On = 0, kn = {
|
|
|
1620
1624
|
"set-module-precis"
|
|
1621
1625
|
],
|
|
1622
1626
|
setup() {
|
|
1623
|
-
return { data:
|
|
1627
|
+
return { data: Z() };
|
|
1624
1628
|
},
|
|
1625
1629
|
data() {
|
|
1626
1630
|
return {
|
|
1627
|
-
uid:
|
|
1631
|
+
uid: ++$n,
|
|
1628
1632
|
rechercheContrat: "",
|
|
1629
1633
|
contratsTrouves: [],
|
|
1630
1634
|
rechercheEnCours: !1,
|
|
@@ -1771,7 +1775,7 @@ var On = 0, kn = {
|
|
|
1771
1775
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
1772
1776
|
},
|
|
1773
1777
|
methods: {
|
|
1774
|
-
formatDate:
|
|
1778
|
+
formatDate: Pt,
|
|
1775
1779
|
rechercherPlusTard(e) {
|
|
1776
1780
|
clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
|
|
1777
1781
|
},
|
|
@@ -1799,8 +1803,8 @@ var On = 0, kn = {
|
|
|
1799
1803
|
let n = ($(e) ?? "").trim();
|
|
1800
1804
|
return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || ($(this.moduleInputLibelle(e)) ?? "").includes(n) || ($(e?._autreLibelle) ?? "").includes(n)) : t;
|
|
1801
1805
|
},
|
|
1802
|
-
getCategorieModuleIcon:
|
|
1803
|
-
categorieLibelle:
|
|
1806
|
+
getCategorieModuleIcon: Zn,
|
|
1807
|
+
categorieLibelle: Qn,
|
|
1804
1808
|
moduleLibelle(e) {
|
|
1805
1809
|
return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
|
|
1806
1810
|
},
|
|
@@ -1812,84 +1816,84 @@ var On = 0, kn = {
|
|
|
1812
1816
|
return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
|
|
1813
1817
|
}
|
|
1814
1818
|
}
|
|
1815
|
-
},
|
|
1819
|
+
}, tr = { class: "d-flex flex-column gap-3" }, nr = {
|
|
1816
1820
|
class: "btn-group w-100",
|
|
1817
1821
|
role: "group"
|
|
1818
|
-
},
|
|
1822
|
+
}, rr = ["onClick"], ir = { class: "text-muted d-block mt-1" }, ar = {
|
|
1819
1823
|
key: 0,
|
|
1820
1824
|
class: "form-check"
|
|
1821
|
-
},
|
|
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 = {
|
|
1822
1826
|
key: 0,
|
|
1823
1827
|
class: "badge bg-info"
|
|
1824
|
-
},
|
|
1828
|
+
}, mr = {
|
|
1825
1829
|
key: 1,
|
|
1826
1830
|
class: "badge bg-warning"
|
|
1827
|
-
},
|
|
1831
|
+
}, hr = {
|
|
1828
1832
|
key: 0,
|
|
1829
1833
|
class: "text-muted d-block text-truncate"
|
|
1830
|
-
},
|
|
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 = {
|
|
1831
1835
|
key: 2,
|
|
1832
1836
|
class: "row g-3"
|
|
1833
|
-
},
|
|
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 = {
|
|
1834
1838
|
key: 0,
|
|
1835
1839
|
class: "col-12 col-md-6"
|
|
1836
|
-
},
|
|
1840
|
+
}, Ar = { class: "d-flex flex-wrap align-items-center gap-1" }, jr = ["title"], Mr = { class: "text-muted" }, Nr = {
|
|
1837
1841
|
key: 1,
|
|
1838
1842
|
class: "d-block text-truncate"
|
|
1839
|
-
},
|
|
1843
|
+
}, Pr = {
|
|
1840
1844
|
key: 2,
|
|
1841
1845
|
class: "text-muted d-block"
|
|
1842
|
-
},
|
|
1846
|
+
}, Fr = {
|
|
1843
1847
|
key: 0,
|
|
1844
1848
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1845
|
-
},
|
|
1846
|
-
function
|
|
1847
|
-
let
|
|
1848
|
-
return
|
|
1849
|
-
|
|
1850
|
-
t[7] ||=
|
|
1851
|
-
|
|
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", {
|
|
1852
1856
|
key: t.key,
|
|
1853
1857
|
type: "button",
|
|
1854
|
-
class:
|
|
1858
|
+
class: D(["btn btn-sm", n.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
1855
1859
|
onClick: (n) => e.$emit("change-mode", t.key)
|
|
1856
|
-
}, [
|
|
1860
|
+
}, [T(o, {
|
|
1857
1861
|
icon: t.icon,
|
|
1858
1862
|
class: "me-1"
|
|
1859
|
-
}, null, 8, ["icon"]),
|
|
1860
|
-
|
|
1863
|
+
}, null, 8, ["icon"]), w(" " + F(t.label), 1)], 10, rr))), 128))]),
|
|
1864
|
+
S("small", ir, F(a.currentMode?.aide), 1)
|
|
1861
1865
|
]),
|
|
1862
|
-
|
|
1863
|
-
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}`,
|
|
1864
1868
|
class: "form-check-input",
|
|
1865
1869
|
type: "checkbox",
|
|
1866
|
-
checked:
|
|
1870
|
+
checked: n.contratReclamant,
|
|
1867
1871
|
onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
|
|
1868
|
-
}, null, 40,
|
|
1872
|
+
}, null, 40, or), S("label", {
|
|
1869
1873
|
class: "form-check-label fs-7",
|
|
1870
|
-
for: `contrat-reclamant-${
|
|
1871
|
-
}, " Contrat du réclamant ", 8,
|
|
1872
|
-
modelValue:
|
|
1873
|
-
"onUpdate:modelValue": t[1] ||= (e) =>
|
|
1874
|
-
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,
|
|
1875
1879
|
"filtering-function": ({ items: e }) => e,
|
|
1876
|
-
loading:
|
|
1880
|
+
loading: i.rechercheEnCours,
|
|
1877
1881
|
"get-id": (e) => e ? `${e.typeContrat}|${e.idContrat}` : null,
|
|
1878
|
-
"get-input-libelle":
|
|
1882
|
+
"get-input-libelle": a.contratInputLibelle,
|
|
1879
1883
|
placeholder: "N° de contrat, locataire, module ou adresse…",
|
|
1880
1884
|
"input-size": "sm",
|
|
1881
1885
|
"hide-choices": "",
|
|
1882
1886
|
"debounce-delay": 0,
|
|
1883
|
-
onSearch:
|
|
1887
|
+
onSearch: a.rechercherPlusTard
|
|
1884
1888
|
}, {
|
|
1885
|
-
options:
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
e?.nbModules > 1 ? (
|
|
1890
|
-
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)
|
|
1891
1895
|
]),
|
|
1892
|
-
|
|
1896
|
+
a.contratAdresse(e) ? (k(), x("small", hr, F(a.contratAdresse(e)), 1)) : b("", !0)
|
|
1893
1897
|
])]),
|
|
1894
1898
|
_: 1
|
|
1895
1899
|
}, 8, [
|
|
@@ -1900,28 +1904,28 @@ function mr(e, t, r, c, d, f) {
|
|
|
1900
1904
|
"get-id",
|
|
1901
1905
|
"get-input-libelle",
|
|
1902
1906
|
"onSearch"
|
|
1903
|
-
])]))], 64)) :
|
|
1904
|
-
|
|
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", {
|
|
1905
1909
|
key: t.titre,
|
|
1906
1910
|
class: "col-12 col-md-6"
|
|
1907
|
-
}, [
|
|
1911
|
+
}, [S("button", {
|
|
1908
1912
|
type: "button",
|
|
1909
|
-
class:
|
|
1910
|
-
"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,
|
|
1911
1915
|
onClick: (n) => e.$emit("set-module-precis", t.modulePrecis)
|
|
1912
|
-
}, [
|
|
1916
|
+
}, [T(o, {
|
|
1913
1917
|
icon: t.icon,
|
|
1914
1918
|
class: "fs-4",
|
|
1915
1919
|
"fixed-width": ""
|
|
1916
|
-
}, null, 8, ["icon"]),
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
modelValue:
|
|
1920
|
-
"onUpdate:modelValue": t[2] ||= (e) =>
|
|
1921
|
-
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 || [],
|
|
1922
1926
|
"get-id": (e) => e?.idCommune,
|
|
1923
1927
|
"get-input-libelle": (e) => e?.commune ?? "",
|
|
1924
|
-
"filtering-function":
|
|
1928
|
+
"filtering-function": a.filterOn("commune"),
|
|
1925
1929
|
placeholder: "Rechercher une commune…",
|
|
1926
1930
|
"input-size": "sm",
|
|
1927
1931
|
"hide-choices": ""
|
|
@@ -1932,19 +1936,19 @@ function mr(e, t, r, c, d, f) {
|
|
|
1932
1936
|
"get-input-libelle",
|
|
1933
1937
|
"filtering-function"
|
|
1934
1938
|
])]),
|
|
1935
|
-
|
|
1936
|
-
modelValue:
|
|
1937
|
-
"onUpdate:modelValue": t[3] ||= (e) =>
|
|
1938
|
-
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,
|
|
1939
1943
|
"get-id": (e) => e?.idEntree,
|
|
1940
1944
|
"get-input-libelle": (e) => e?.entree ?? "",
|
|
1941
|
-
"filtering-function":
|
|
1942
|
-
disabled: !
|
|
1945
|
+
"filtering-function": a.filterOn("entree"),
|
|
1946
|
+
disabled: !n.patrimoine.idCommune,
|
|
1943
1947
|
placeholder: "Rechercher une adresse…",
|
|
1944
1948
|
"input-size": "sm",
|
|
1945
1949
|
"hide-choices": ""
|
|
1946
1950
|
}, {
|
|
1947
|
-
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)])]),
|
|
1948
1952
|
_: 1
|
|
1949
1953
|
}, 8, [
|
|
1950
1954
|
"modelValue",
|
|
@@ -1954,13 +1958,13 @@ function mr(e, t, r, c, d, f) {
|
|
|
1954
1958
|
"filtering-function",
|
|
1955
1959
|
"disabled"
|
|
1956
1960
|
])]),
|
|
1957
|
-
|
|
1958
|
-
modelValue:
|
|
1959
|
-
"onUpdate:modelValue": t[4] ||= (e) =>
|
|
1960
|
-
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,
|
|
1961
1965
|
"get-id": (e) => e?.id,
|
|
1962
1966
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1963
|
-
disabled: !
|
|
1967
|
+
disabled: !n.patrimoine.idEntree,
|
|
1964
1968
|
placeholder: "Tous les étages…",
|
|
1965
1969
|
"input-size": "sm",
|
|
1966
1970
|
"hide-choices": ""
|
|
@@ -1971,50 +1975,50 @@ function mr(e, t, r, c, d, f) {
|
|
|
1971
1975
|
"get-input-libelle",
|
|
1972
1976
|
"disabled"
|
|
1973
1977
|
])])
|
|
1974
|
-
], 64)) : (
|
|
1975
|
-
|
|
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", {
|
|
1976
1980
|
class: "form-control form-control-sm",
|
|
1977
1981
|
disabled: "",
|
|
1978
|
-
value:
|
|
1979
|
-
}, null, 8,
|
|
1980
|
-
|
|
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", {
|
|
1981
1985
|
class: "form-control form-control-sm",
|
|
1982
1986
|
disabled: "",
|
|
1983
|
-
value:
|
|
1984
|
-
}, null, 8,
|
|
1985
|
-
|
|
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", {
|
|
1986
1990
|
class: "form-control form-control-sm",
|
|
1987
1991
|
disabled: "",
|
|
1988
|
-
value:
|
|
1989
|
-
}, null, 8,
|
|
1990
|
-
], 64))], 2),
|
|
1991
|
-
t[16] ||=
|
|
1992
|
-
|
|
1993
|
-
modelValue:
|
|
1994
|
-
"onUpdate:modelValue": t[5] ||= (e) =>
|
|
1995
|
-
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,
|
|
1996
2000
|
"get-id": (e) => e?.idModule,
|
|
1997
|
-
"get-input-libelle": (e) =>
|
|
1998
|
-
"filtering-function":
|
|
1999
|
-
disabled:
|
|
2001
|
+
"get-input-libelle": (e) => a.moduleInputLibelle(e),
|
|
2002
|
+
"filtering-function": a.filterModules,
|
|
2003
|
+
disabled: a.areModulesLocked,
|
|
2000
2004
|
placeholder: "Rechercher un module…",
|
|
2001
2005
|
"input-size": "sm",
|
|
2002
2006
|
"hide-choices": ""
|
|
2003
2007
|
}, {
|
|
2004
|
-
options:
|
|
2005
|
-
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, {
|
|
2006
2010
|
key: 0,
|
|
2007
2011
|
icon: "building",
|
|
2008
2012
|
class: "position-absolute top-0 end-0 m-1 text-muted",
|
|
2009
2013
|
title: "Autre adresse ou étage du même programme"
|
|
2010
|
-
})) :
|
|
2011
|
-
|
|
2012
|
-
|
|
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", {
|
|
2013
2017
|
key: 0,
|
|
2014
2018
|
class: "badge bg-info",
|
|
2015
2019
|
title: e?.categorieModule
|
|
2016
|
-
}, [
|
|
2017
|
-
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))
|
|
2018
2022
|
], 2)]),
|
|
2019
2023
|
_: 1
|
|
2020
2024
|
}, 8, [
|
|
@@ -2025,35 +2029,35 @@ function mr(e, t, r, c, d, f) {
|
|
|
2025
2029
|
"filtering-function",
|
|
2026
2030
|
"disabled"
|
|
2027
2031
|
]),
|
|
2028
|
-
|
|
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, {
|
|
2029
2033
|
icon: "circle-info",
|
|
2030
2034
|
class: "mt-1"
|
|
2031
|
-
}),
|
|
2032
|
-
id: `locataire-actuel-${
|
|
2035
|
+
}), S("span", null, F(n.locataireActuelOption.hint), 1)], 2), S("div", Ir, [S("input", {
|
|
2036
|
+
id: `locataire-actuel-${i.uid}`,
|
|
2033
2037
|
class: "form-check-input",
|
|
2034
2038
|
type: "checkbox",
|
|
2035
|
-
checked:
|
|
2039
|
+
checked: n.locataireActuelOption.reprendre,
|
|
2036
2040
|
onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
|
|
2037
|
-
}, null, 40,
|
|
2041
|
+
}, null, 40, Lr), S("label", {
|
|
2038
2042
|
class: "form-check-label fs-7",
|
|
2039
|
-
for: `locataire-actuel-${
|
|
2040
|
-
}, " Rattacher au locataire actuel du module ", 8,
|
|
2041
|
-
])) :
|
|
2043
|
+
for: `locataire-actuel-${i.uid}`
|
|
2044
|
+
}, " Rattacher au locataire actuel du module ", 8, Rr)])])) : b("", !0)
|
|
2045
|
+
])) : b("", !0)])) : b("", !0)
|
|
2042
2046
|
]);
|
|
2043
2047
|
}
|
|
2044
2048
|
//#endregion
|
|
2045
2049
|
//#region src/components/EtapeCibleBlock.vue
|
|
2046
|
-
var
|
|
2050
|
+
var Br = {
|
|
2047
2051
|
name: "EtapeCibleBlock",
|
|
2048
2052
|
components: {
|
|
2049
|
-
AmsomOverlay:
|
|
2050
|
-
CiblePickerBlock: /* @__PURE__ */
|
|
2053
|
+
AmsomOverlay: g,
|
|
2054
|
+
CiblePickerBlock: /* @__PURE__ */ K(er, [["render", zr]])
|
|
2051
2055
|
},
|
|
2052
2056
|
setup() {
|
|
2053
2057
|
return {
|
|
2054
|
-
draft:
|
|
2055
|
-
data:
|
|
2056
|
-
options:
|
|
2058
|
+
draft: G(),
|
|
2059
|
+
data: Z(),
|
|
2060
|
+
options: Q()
|
|
2057
2061
|
};
|
|
2058
2062
|
},
|
|
2059
2063
|
computed: {
|
|
@@ -2153,78 +2157,78 @@ var hr = {
|
|
|
2153
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));
|
|
2154
2158
|
}
|
|
2155
2159
|
}
|
|
2156
|
-
},
|
|
2160
|
+
}, Vr = { class: "d-flex flex-column gap-3" }, Hr = {
|
|
2157
2161
|
key: 0,
|
|
2158
2162
|
class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
|
|
2159
|
-
},
|
|
2163
|
+
}, Ur = { class: "fs-7" }, Wr = {
|
|
2160
2164
|
key: 1,
|
|
2161
2165
|
class: "d-flex flex-column gap-1"
|
|
2162
|
-
},
|
|
2166
|
+
}, Gr = {
|
|
2163
2167
|
key: 0,
|
|
2164
2168
|
class: "text-muted me-1"
|
|
2165
|
-
},
|
|
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 = [
|
|
2166
2170
|
"id",
|
|
2167
2171
|
"checked",
|
|
2168
2172
|
"onChange"
|
|
2169
|
-
],
|
|
2173
|
+
], Xr = ["for"], Zr = {
|
|
2170
2174
|
key: 0,
|
|
2171
2175
|
class: "mt-2"
|
|
2172
2176
|
};
|
|
2173
|
-
function
|
|
2174
|
-
let
|
|
2175
|
-
return
|
|
2176
|
-
default:
|
|
2177
|
-
|
|
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, {
|
|
2178
2182
|
icon: "tag",
|
|
2179
2183
|
class: "text-primary"
|
|
2180
|
-
}),
|
|
2181
|
-
|
|
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", {
|
|
2182
2186
|
key: t,
|
|
2183
2187
|
class: "fs-7"
|
|
2184
2188
|
}, [
|
|
2185
|
-
|
|
2189
|
+
T(o, {
|
|
2186
2190
|
icon: "location-dot",
|
|
2187
2191
|
class: "text-primary me-2"
|
|
2188
2192
|
}),
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
]))), 128))])) : (
|
|
2192
|
-
onChangeMode: t[0] ||= (e) =>
|
|
2193
|
-
onSelectCommune: t[1] ||= (e) =>
|
|
2194
|
-
onSelectAdresse: t[2] ||= (e) =>
|
|
2195
|
-
onSelectEtage: t[3] ||= (e) =>
|
|
2196
|
-
onSelectModule: t[4] ||= (e) =>
|
|
2197
|
-
onSelectContrat: t[5] ||= (e) =>
|
|
2198
|
-
onToggleContratReclamant: t[6] ||= (e) =>
|
|
2199
|
-
onToggleReprendreLocataireActuel: t[7] ||= (e) =>
|
|
2200
|
-
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)
|
|
2201
2205
|
}), null, 16)),
|
|
2202
|
-
!
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
], -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", {
|
|
2207
2211
|
key: e.idMotif,
|
|
2208
2212
|
class: "border rounded p-2"
|
|
2209
|
-
}, [
|
|
2213
|
+
}, [S("div", Kr, [S("span", qr, F(e.libelle), 1), S("div", Jr, [S("input", {
|
|
2210
2214
|
id: `memecible-${e.idMotif}`,
|
|
2211
2215
|
class: "form-check-input",
|
|
2212
2216
|
type: "checkbox",
|
|
2213
2217
|
checked: !e.patrimoine,
|
|
2214
|
-
onChange: (e) =>
|
|
2215
|
-
}, null, 40,
|
|
2218
|
+
onChange: (e) => r.draft.toggleCibleOverride(t + 1)
|
|
2219
|
+
}, null, 40, Yr), S("label", {
|
|
2216
2220
|
class: "form-check-label fs-7",
|
|
2217
2221
|
for: `memecible-${e.idMotif}`
|
|
2218
|
-
}, " Même cible que la ligne principale ", 8,
|
|
2219
|
-
onChangeMode: (e) =>
|
|
2220
|
-
onSelectCommune: (e) =>
|
|
2221
|
-
onSelectAdresse: (e) =>
|
|
2222
|
-
onSelectEtage: (e) =>
|
|
2223
|
-
onSelectModule: (e) =>
|
|
2224
|
-
onSelectContrat: (e) =>
|
|
2225
|
-
onToggleContratReclamant: (e) =>
|
|
2226
|
-
onToggleReprendreLocataireActuel: (e) =>
|
|
2227
|
-
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)
|
|
2228
2232
|
}), null, 16, [
|
|
2229
2233
|
"onChangeMode",
|
|
2230
2234
|
"onSelectCommune",
|
|
@@ -2235,14 +2239,14 @@ function Dr(e, t, r, c, d, f) {
|
|
|
2235
2239
|
"onToggleContratReclamant",
|
|
2236
2240
|
"onToggleReprendreLocataireActuel",
|
|
2237
2241
|
"onSetModulePrecis"
|
|
2238
|
-
])])) :
|
|
2242
|
+
])])) : b("", !0)]))), 128))], 64)) : b("", !0)
|
|
2239
2243
|
])]),
|
|
2240
2244
|
_: 1
|
|
2241
2245
|
}, 8, ["loading"]);
|
|
2242
2246
|
}
|
|
2243
|
-
var
|
|
2247
|
+
var $r = /*#__PURE__*/ K(Br, [["render", Qr]]), ei = {
|
|
2244
2248
|
name: "LigneDocumentBlock",
|
|
2245
|
-
components: { AmsomUploadFile:
|
|
2249
|
+
components: { AmsomUploadFile: xe },
|
|
2246
2250
|
props: {
|
|
2247
2251
|
index: {
|
|
2248
2252
|
type: Number,
|
|
@@ -2259,9 +2263,9 @@ var Or = /*#__PURE__*/ z(hr, [["render", Dr]]), kr = {
|
|
|
2259
2263
|
},
|
|
2260
2264
|
emits: ["update"]
|
|
2261
2265
|
};
|
|
2262
|
-
function
|
|
2263
|
-
let
|
|
2264
|
-
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, {
|
|
2265
2269
|
"model-value": n.fichier,
|
|
2266
2270
|
renameable: "",
|
|
2267
2271
|
"output-format": "object",
|
|
@@ -2275,12 +2279,12 @@ function Ar(e, t, n, r, i, a) {
|
|
|
2275
2279
|
"read-only"
|
|
2276
2280
|
])]);
|
|
2277
2281
|
}
|
|
2278
|
-
var
|
|
2282
|
+
var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
|
|
2279
2283
|
name: "LigneDetailBlock",
|
|
2280
2284
|
components: {
|
|
2281
|
-
AmsomAutocomplete:
|
|
2282
|
-
AmsomTextarea:
|
|
2283
|
-
LigneDocumentBlock:
|
|
2285
|
+
AmsomAutocomplete: z,
|
|
2286
|
+
AmsomTextarea: be,
|
|
2287
|
+
LigneDocumentBlock: ni
|
|
2284
2288
|
},
|
|
2285
2289
|
props: { index: {
|
|
2286
2290
|
type: Number,
|
|
@@ -2288,12 +2292,12 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
|
|
|
2288
2292
|
} },
|
|
2289
2293
|
setup() {
|
|
2290
2294
|
return {
|
|
2291
|
-
draft:
|
|
2292
|
-
data:
|
|
2295
|
+
draft: G(),
|
|
2296
|
+
data: Z()
|
|
2293
2297
|
};
|
|
2294
2298
|
},
|
|
2295
2299
|
computed: {
|
|
2296
|
-
descriptionMaxLength: () =>
|
|
2300
|
+
descriptionMaxLength: () => ri,
|
|
2297
2301
|
isPrincipale() {
|
|
2298
2302
|
return this.index === 0;
|
|
2299
2303
|
},
|
|
@@ -2310,9 +2314,12 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
|
|
|
2310
2314
|
return this.isPrincipale || this.ligne.dateFaitsOverride ? this.ligne.dateFaits : this.lignePrincipale.dateFaits;
|
|
2311
2315
|
}
|
|
2312
2316
|
},
|
|
2317
|
+
mounted() {
|
|
2318
|
+
this.isPrincipale && this.$refs.description?.$el.querySelector("textarea")?.focus();
|
|
2319
|
+
},
|
|
2313
2320
|
methods: {
|
|
2314
|
-
timestampToDateInput:
|
|
2315
|
-
dateInputToTimestamp:
|
|
2321
|
+
timestampToDateInput: Mt,
|
|
2322
|
+
dateInputToTimestamp: Nt,
|
|
2316
2323
|
responsableLibelle(e) {
|
|
2317
2324
|
let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
|
|
2318
2325
|
return t ? `${t.prenom} ${t.nom}` : "";
|
|
@@ -2322,96 +2329,97 @@ var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
|
|
|
2322
2329
|
return n ? t.filter((e) => ($(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
|
|
2323
2330
|
}
|
|
2324
2331
|
}
|
|
2325
|
-
},
|
|
2332
|
+
}, 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 = {
|
|
2326
2333
|
key: 0,
|
|
2327
2334
|
class: "ms-1 text-danger"
|
|
2328
|
-
},
|
|
2335
|
+
}, li = {
|
|
2329
2336
|
key: 0,
|
|
2330
2337
|
class: "form-check form-switch mb-0"
|
|
2331
|
-
},
|
|
2338
|
+
}, ui = [
|
|
2332
2339
|
"id",
|
|
2333
2340
|
"checked",
|
|
2334
2341
|
"disabled"
|
|
2335
|
-
],
|
|
2342
|
+
], di = ["for"], fi = {
|
|
2336
2343
|
key: 1,
|
|
2337
2344
|
class: "text-muted d-block",
|
|
2338
2345
|
style: { "white-space": "pre-line" }
|
|
2339
|
-
},
|
|
2346
|
+
}, pi = { class: "row g-3" }, mi = { class: "col-6" }, hi = { class: "d-flex align-items-center gap-2 mb-1" }, gi = {
|
|
2340
2347
|
key: 0,
|
|
2341
2348
|
class: "form-check form-switch mb-0"
|
|
2342
|
-
},
|
|
2349
|
+
}, _i = [
|
|
2343
2350
|
"id",
|
|
2344
2351
|
"checked",
|
|
2345
2352
|
"disabled"
|
|
2346
|
-
],
|
|
2353
|
+
], vi = ["for"], yi = ["value"], bi = {
|
|
2347
2354
|
key: 1,
|
|
2348
2355
|
class: "text-muted d-block"
|
|
2349
|
-
},
|
|
2356
|
+
}, xi = {
|
|
2350
2357
|
key: 0,
|
|
2351
2358
|
class: "text-muted d-block"
|
|
2352
|
-
},
|
|
2359
|
+
}, Si = { class: "min-w-0" }, Ci = { class: "fw-medium text-truncate" }, wi = {
|
|
2353
2360
|
key: 0,
|
|
2354
2361
|
class: "text-muted d-block"
|
|
2355
|
-
},
|
|
2362
|
+
}, Ti = {
|
|
2356
2363
|
key: 2,
|
|
2357
2364
|
class: "text-muted"
|
|
2358
|
-
},
|
|
2359
|
-
function
|
|
2360
|
-
let
|
|
2361
|
-
return
|
|
2362
|
-
id: `memedetail-${
|
|
2365
|
+
}, Ei = { class: "col-12 col-md-6" };
|
|
2366
|
+
function Di(e, t, n, r, i, a) {
|
|
2367
|
+
let o = P("amsom-textarea"), s = P("amsom-autocomplete"), c = P("ligne-document-block");
|
|
2368
|
+
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", {
|
|
2369
|
+
id: `memedetail-${a.ligne.idMotif}`,
|
|
2363
2370
|
class: "form-check-input",
|
|
2364
2371
|
type: "checkbox",
|
|
2365
|
-
checked:
|
|
2372
|
+
checked: a.ligne.description == null,
|
|
2366
2373
|
disabled: r.draft.isReadonly("description"),
|
|
2367
2374
|
onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
|
|
2368
|
-
}, null, 40,
|
|
2375
|
+
}, null, 40, ui), S("label", {
|
|
2369
2376
|
class: "form-check-label fs-7",
|
|
2370
|
-
for: `memedetail-${
|
|
2371
|
-
}, " Même description ", 8,
|
|
2377
|
+
for: `memedetail-${a.ligne.idMotif}`
|
|
2378
|
+
}, " Même description ", 8, di)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (k(), y(o, {
|
|
2372
2379
|
key: 0,
|
|
2373
|
-
|
|
2380
|
+
ref: "description",
|
|
2381
|
+
"model-value": a.ligne.description,
|
|
2374
2382
|
"input-size": "sm",
|
|
2375
|
-
rows:
|
|
2376
|
-
maxlength:
|
|
2377
|
-
placeholder:
|
|
2383
|
+
rows: a.isPrincipale ? 7 : 5,
|
|
2384
|
+
maxlength: a.descriptionMaxLength,
|
|
2385
|
+
placeholder: a.isPrincipale ? "Décrivez la sollicitation…" : "Décrivez ce motif…",
|
|
2378
2386
|
"onUpdate:modelValue": t[1] ||= (e) => r.draft.setDescription(n.index, e)
|
|
2379
2387
|
}, null, 8, [
|
|
2380
2388
|
"model-value",
|
|
2381
2389
|
"rows",
|
|
2382
2390
|
"maxlength",
|
|
2383
2391
|
"placeholder"
|
|
2384
|
-
])) : (
|
|
2385
|
-
id: `memedate-${
|
|
2392
|
+
])) : (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", {
|
|
2393
|
+
id: `memedate-${a.ligne.idMotif}`,
|
|
2386
2394
|
class: "form-check-input",
|
|
2387
2395
|
type: "checkbox",
|
|
2388
|
-
checked: !
|
|
2396
|
+
checked: !a.ligne.dateFaitsOverride,
|
|
2389
2397
|
disabled: r.draft.isReadonly("dateFaits"),
|
|
2390
2398
|
onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
|
|
2391
|
-
}, null, 40,
|
|
2399
|
+
}, null, 40, _i), S("label", {
|
|
2392
2400
|
class: "form-check-label fs-7",
|
|
2393
|
-
for: `memedate-${
|
|
2394
|
-
}, " Même date ", 8,
|
|
2401
|
+
for: `memedate-${a.ligne.idMotif}`
|
|
2402
|
+
}, " Même date ", 8, vi)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (k(), x("input", {
|
|
2395
2403
|
key: 0,
|
|
2396
|
-
value:
|
|
2404
|
+
value: a.timestampToDateInput(a.ligne.dateFaits),
|
|
2397
2405
|
type: "date",
|
|
2398
2406
|
class: "form-control form-control-sm",
|
|
2399
|
-
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index,
|
|
2400
|
-
}, null, 40,
|
|
2401
|
-
t[8] ||=
|
|
2402
|
-
r.draft.isReadonly("responsable") ? (
|
|
2407
|
+
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, a.dateInputToTimestamp(e.target.value))
|
|
2408
|
+
}, null, 40, yi)) : (k(), x("small", bi, F(a.timestampToDateInput(a.dateFaits) || "—"), 1))]), S("div", null, [
|
|
2409
|
+
t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
|
|
2410
|
+
r.draft.isReadonly("responsable") ? (k(), x("small", xi, F(a.responsableLibelle(a.ligne.responsable) || "Déterminé automatiquement"), 1)) : (k(), y(s, {
|
|
2403
2411
|
key: 1,
|
|
2404
|
-
"model-value":
|
|
2405
|
-
items:
|
|
2412
|
+
"model-value": a.ligne.responsable,
|
|
2413
|
+
items: a.collaborateurs,
|
|
2406
2414
|
"get-id": (e) => e?.id,
|
|
2407
|
-
"get-input-libelle":
|
|
2408
|
-
"filtering-function":
|
|
2415
|
+
"get-input-libelle": a.responsableLibelle,
|
|
2416
|
+
"filtering-function": a.filterCollaborateurs,
|
|
2409
2417
|
placeholder: "Rechercher un responsable…",
|
|
2410
2418
|
"input-size": "sm",
|
|
2411
2419
|
"hide-choices": "",
|
|
2412
2420
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2413
2421
|
}, {
|
|
2414
|
-
options:
|
|
2422
|
+
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)])]),
|
|
2415
2423
|
_: 1
|
|
2416
2424
|
}, 8, [
|
|
2417
2425
|
"model-value",
|
|
@@ -2420,10 +2428,10 @@ function ni(e, t, n, r, c, d) {
|
|
|
2420
2428
|
"get-input-libelle",
|
|
2421
2429
|
"filtering-function"
|
|
2422
2430
|
])),
|
|
2423
|
-
|
|
2424
|
-
])]),
|
|
2431
|
+
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)
|
|
2432
|
+
])]), S("div", Ei, [T(c, {
|
|
2425
2433
|
index: n.index,
|
|
2426
|
-
fichier:
|
|
2434
|
+
fichier: a.ligne.fichier,
|
|
2427
2435
|
readonly: r.draft.isReadonly("fichier"),
|
|
2428
2436
|
onUpdate: t[5] ||= (e) => r.draft.setFichier(n.index, e)
|
|
2429
2437
|
}, null, 8, [
|
|
@@ -2434,16 +2442,16 @@ function ni(e, t, n, r, c, d) {
|
|
|
2434
2442
|
}
|
|
2435
2443
|
//#endregion
|
|
2436
2444
|
//#region src/components/EtapeDetailsBlock.vue
|
|
2437
|
-
var
|
|
2445
|
+
var Oi = {
|
|
2438
2446
|
name: "EtapeDetailsBlock",
|
|
2439
2447
|
components: {
|
|
2440
|
-
AmsomOverlay:
|
|
2441
|
-
LigneDetailBlock: /* @__PURE__ */
|
|
2448
|
+
AmsomOverlay: g,
|
|
2449
|
+
LigneDetailBlock: /* @__PURE__ */ K(ii, [["render", Di]])
|
|
2442
2450
|
},
|
|
2443
2451
|
setup() {
|
|
2444
2452
|
return {
|
|
2445
|
-
draft:
|
|
2446
|
-
data:
|
|
2453
|
+
draft: G(),
|
|
2454
|
+
data: Z()
|
|
2447
2455
|
};
|
|
2448
2456
|
},
|
|
2449
2457
|
computed: {
|
|
@@ -2494,67 +2502,67 @@ var ri = {
|
|
|
2494
2502
|
}
|
|
2495
2503
|
}
|
|
2496
2504
|
}
|
|
2497
|
-
},
|
|
2505
|
+
}, 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 = {
|
|
2498
2506
|
key: 0,
|
|
2499
2507
|
class: "fs-7"
|
|
2500
|
-
},
|
|
2501
|
-
function
|
|
2502
|
-
let
|
|
2503
|
-
return
|
|
2504
|
-
default:
|
|
2505
|
-
|
|
2506
|
-
|
|
2508
|
+
}, 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" };
|
|
2509
|
+
function Ii(e, t, n, r, i, a) {
|
|
2510
|
+
let o = P("font-awesome-icon"), s = P("ligne-detail-block"), c = P("amsom-overlay");
|
|
2511
|
+
return k(), y(c, { loading: r.data.isLoading && !r.data.cache.collaborateurs }, {
|
|
2512
|
+
default: R(() => [S("div", ki, [
|
|
2513
|
+
S("div", Ai, [a.motifLibelle ? (k(), x("span", ji, [
|
|
2514
|
+
T(o, {
|
|
2507
2515
|
icon: "tag",
|
|
2508
2516
|
class: "text-primary me-2"
|
|
2509
2517
|
}),
|
|
2510
|
-
t[0] ||=
|
|
2511
|
-
|
|
2512
|
-
])) :
|
|
2513
|
-
|
|
2518
|
+
t[0] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2519
|
+
w(F(a.motifLibelle), 1)
|
|
2520
|
+
])) : b("", !0), S("span", Mi, [
|
|
2521
|
+
T(o, {
|
|
2514
2522
|
icon: "location-dot",
|
|
2515
2523
|
class: "text-primary me-2"
|
|
2516
2524
|
}),
|
|
2517
|
-
t[1] ||=
|
|
2518
|
-
|
|
2525
|
+
t[1] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2526
|
+
w(" " + F(r.draft.cibleResume(a.lignePrincipale)), 1)
|
|
2519
2527
|
])]),
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
], -1), (
|
|
2528
|
+
T(s, { index: 0 }),
|
|
2529
|
+
a.lignesAssociees.length ? (k(), x(_, { key: 0 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
2530
|
+
S("hr", { class: "flex-grow-1 my-0" }),
|
|
2531
|
+
S("span", null, "Détail des autres motifs"),
|
|
2532
|
+
S("hr", { class: "flex-grow-1 my-0" })
|
|
2533
|
+
], -1), (k(!0), x(_, null, M(a.lignesAssociees, (e, n) => (k(), x("div", {
|
|
2526
2534
|
key: e.idMotif,
|
|
2527
2535
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2528
|
-
}, [
|
|
2529
|
-
|
|
2536
|
+
}, [S("div", Ni, [S("span", Pi, [
|
|
2537
|
+
T(o, {
|
|
2530
2538
|
icon: "tag",
|
|
2531
2539
|
class: "text-primary me-2"
|
|
2532
2540
|
}),
|
|
2533
|
-
t[2] ||=
|
|
2534
|
-
|
|
2535
|
-
]),
|
|
2536
|
-
|
|
2541
|
+
t[2] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2542
|
+
w(" " + F(e.libelle), 1)
|
|
2543
|
+
]), S("span", Fi, [
|
|
2544
|
+
T(o, {
|
|
2537
2545
|
icon: "location-dot",
|
|
2538
2546
|
class: "text-primary me-2"
|
|
2539
2547
|
}),
|
|
2540
|
-
t[3] ||=
|
|
2541
|
-
|
|
2542
|
-
])]),
|
|
2548
|
+
t[3] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2549
|
+
w(" " + F(r.draft.cibleResume(e)), 1)
|
|
2550
|
+
])]), T(s, { index: n + 1 }, null, 8, ["index"])]))), 128))], 64)) : b("", !0)
|
|
2543
2551
|
])]),
|
|
2544
2552
|
_: 1
|
|
2545
2553
|
}, 8, ["loading"]);
|
|
2546
2554
|
}
|
|
2547
2555
|
//#endregion
|
|
2548
2556
|
//#region src/components/StepperBlock.vue
|
|
2549
|
-
var
|
|
2557
|
+
var Li = {
|
|
2550
2558
|
name: "StepperBlock",
|
|
2551
2559
|
components: {
|
|
2552
|
-
AmsomHorizontalStepper:
|
|
2553
|
-
AmsomOverlay:
|
|
2554
|
-
EtapeReclamantBlock:
|
|
2555
|
-
EtapeCategorieBlock:
|
|
2556
|
-
EtapeCibleBlock:
|
|
2557
|
-
EtapeDetailsBlock: /* @__PURE__ */
|
|
2560
|
+
AmsomHorizontalStepper: ve,
|
|
2561
|
+
AmsomOverlay: g,
|
|
2562
|
+
EtapeReclamantBlock: vn,
|
|
2563
|
+
EtapeCategorieBlock: Yn,
|
|
2564
|
+
EtapeCibleBlock: $r,
|
|
2565
|
+
EtapeDetailsBlock: /* @__PURE__ */ K(Oi, [["render", Ii]])
|
|
2558
2566
|
},
|
|
2559
2567
|
props: {
|
|
2560
2568
|
step: {
|
|
@@ -2573,9 +2581,9 @@ var fi = {
|
|
|
2573
2581
|
],
|
|
2574
2582
|
setup() {
|
|
2575
2583
|
return {
|
|
2576
|
-
draft:
|
|
2577
|
-
data:
|
|
2578
|
-
options:
|
|
2584
|
+
draft: G(),
|
|
2585
|
+
data: Z(),
|
|
2586
|
+
options: Q()
|
|
2579
2587
|
};
|
|
2580
2588
|
},
|
|
2581
2589
|
computed: {
|
|
@@ -2669,73 +2677,73 @@ var fi = {
|
|
|
2669
2677
|
}));
|
|
2670
2678
|
}
|
|
2671
2679
|
}
|
|
2672
|
-
},
|
|
2680
|
+
}, Ri = { class: "d-flex flex-column gap-3" }, zi = {
|
|
2673
2681
|
key: 0,
|
|
2674
2682
|
class: "w-100 fs-6 fw-medium my-3 alert alert-info",
|
|
2675
2683
|
style: { "white-space": "pre-line" }
|
|
2676
|
-
},
|
|
2677
|
-
function
|
|
2678
|
-
let
|
|
2679
|
-
return
|
|
2680
|
-
default:
|
|
2681
|
-
|
|
2682
|
-
steps:
|
|
2684
|
+
}, Bi = { style: { "min-height": "260px" } }, Vi = { class: "d-flex justify-content-between" }, Hi = { key: 1 }, Ui = ["disabled"], Wi = ["disabled"];
|
|
2685
|
+
function Gi(e, t, n, r, i, a) {
|
|
2686
|
+
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");
|
|
2687
|
+
return k(), y(f, { loading: n.creating }, {
|
|
2688
|
+
default: R(() => [S("div", Ri, [
|
|
2689
|
+
T(o, {
|
|
2690
|
+
steps: a.stepperSteps,
|
|
2683
2691
|
size: "md",
|
|
2684
|
-
onStepClick:
|
|
2692
|
+
onStepClick: a.onStepClick
|
|
2685
2693
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2686
|
-
|
|
2694
|
+
a.aideMotif ? (k(), x("div", zi, [T(s, {
|
|
2687
2695
|
icon: "circle-info",
|
|
2688
2696
|
class: "text-info-emphasis me-2"
|
|
2689
|
-
}),
|
|
2690
|
-
|
|
2697
|
+
}), S("span", null, F(a.aideMotif), 1)])) : b("", !0),
|
|
2698
|
+
S("div", Bi, [a.currentKey === "reclamant" ? (k(), y(c, {
|
|
2691
2699
|
key: 0,
|
|
2692
2700
|
premiere: n.step === 1
|
|
2693
|
-
},
|
|
2701
|
+
}, C({ _: 2 }, [e.$slots.reclamant ? {
|
|
2694
2702
|
name: "reclamant",
|
|
2695
|
-
fn:
|
|
2703
|
+
fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
|
|
2696
2704
|
key: "0"
|
|
2697
|
-
} : void 0]), 1032, ["premiere"])) :
|
|
2705
|
+
} : void 0]), 1032, ["premiere"])) : a.currentKey === "categorie" ? (k(), y(l, {
|
|
2698
2706
|
key: 1,
|
|
2699
2707
|
premiere: n.step === 1
|
|
2700
|
-
}, null, 8, ["premiere"])) :
|
|
2701
|
-
|
|
2708
|
+
}, null, 8, ["premiere"])) : a.currentKey === "cible" ? (k(), y(u, { key: 2 })) : a.currentKey === "details" ? (k(), y(d, { key: 3 })) : b("", !0)]),
|
|
2709
|
+
S("div", Vi, [n.step > 1 ? (k(), x("button", {
|
|
2702
2710
|
key: 0,
|
|
2703
2711
|
class: "btn btn-sm btn-outline-secondary",
|
|
2704
|
-
onClick: t[0] ||= (...e) =>
|
|
2705
|
-
}, [
|
|
2712
|
+
onClick: t[0] ||= (...e) => a.goPrevious && a.goPrevious(...e)
|
|
2713
|
+
}, [T(s, {
|
|
2706
2714
|
icon: "chevron-left",
|
|
2707
2715
|
class: "me-1"
|
|
2708
|
-
}), t[3] ||=
|
|
2716
|
+
}), t[3] ||= w(" Précédent ", -1)])) : (k(), x("span", Hi)), n.step < a.steps.length ? (k(), x("button", {
|
|
2709
2717
|
key: 2,
|
|
2710
2718
|
class: "btn btn-sm btn-primary",
|
|
2711
|
-
disabled: !
|
|
2712
|
-
onClick: t[1] ||= (...e) =>
|
|
2713
|
-
}, [t[4] ||=
|
|
2719
|
+
disabled: !a.canGoNext,
|
|
2720
|
+
onClick: t[1] ||= (...e) => a.goNext && a.goNext(...e)
|
|
2721
|
+
}, [t[4] ||= w(" Suivant ", -1), T(s, {
|
|
2714
2722
|
icon: "chevron-right",
|
|
2715
2723
|
class: "ms-1"
|
|
2716
|
-
})], 8,
|
|
2724
|
+
})], 8, Ui)) : (k(), x("button", {
|
|
2717
2725
|
key: 3,
|
|
2718
2726
|
class: "btn btn-sm btn-success",
|
|
2719
|
-
disabled: !
|
|
2727
|
+
disabled: !a.canCreer || n.creating,
|
|
2720
2728
|
onClick: t[2] ||= (t) => e.$emit("submit")
|
|
2721
|
-
}, [
|
|
2729
|
+
}, [T(s, {
|
|
2722
2730
|
icon: "check",
|
|
2723
2731
|
class: "me-1"
|
|
2724
|
-
}), t[5] ||=
|
|
2732
|
+
}), t[5] ||= w(" Créer la sollicitation ", -1)], 8, Wi))])
|
|
2725
2733
|
])]),
|
|
2726
2734
|
_: 3
|
|
2727
2735
|
}, 8, ["loading"]);
|
|
2728
2736
|
}
|
|
2729
|
-
var
|
|
2737
|
+
var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n } = {}) => it("/v2/cresol/creer_sollicitation", e, {
|
|
2730
2738
|
signal: t,
|
|
2731
2739
|
baseUrl: n
|
|
2732
|
-
}),
|
|
2740
|
+
}), Ji = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => it("/v2/cresol/upload_sollicitation_ged", {
|
|
2733
2741
|
idSollicitation: e,
|
|
2734
2742
|
pj: t
|
|
2735
2743
|
}, {
|
|
2736
2744
|
signal: n,
|
|
2737
2745
|
baseUrl: r
|
|
2738
|
-
}),
|
|
2746
|
+
}), Yi = {
|
|
2739
2747
|
modelValue: {
|
|
2740
2748
|
type: Object,
|
|
2741
2749
|
default: null
|
|
@@ -2757,16 +2765,16 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2757
2765
|
typesReclamant: {
|
|
2758
2766
|
type: Array,
|
|
2759
2767
|
default: null,
|
|
2760
|
-
validator: (e) => e.every((e) =>
|
|
2768
|
+
validator: (e) => e.every((e) => U.includes(e))
|
|
2761
2769
|
},
|
|
2762
2770
|
typesReclamantExclus: {
|
|
2763
2771
|
type: Array,
|
|
2764
2772
|
default: () => [],
|
|
2765
|
-
validator: (e) => e.every((e) =>
|
|
2773
|
+
validator: (e) => e.every((e) => U.includes(e))
|
|
2766
2774
|
},
|
|
2767
2775
|
provenances: {
|
|
2768
2776
|
type: Array,
|
|
2769
|
-
default: () => [...
|
|
2777
|
+
default: () => [...we]
|
|
2770
2778
|
},
|
|
2771
2779
|
provenancesExclues: {
|
|
2772
2780
|
type: Array,
|
|
@@ -2775,7 +2783,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2775
2783
|
readonly: {
|
|
2776
2784
|
type: [Boolean, Array],
|
|
2777
2785
|
default: !1,
|
|
2778
|
-
validator: (e) => typeof e == "boolean" || e.every((e) =>
|
|
2786
|
+
validator: (e) => typeof e == "boolean" || e.every((e) => Ne.includes(e))
|
|
2779
2787
|
},
|
|
2780
2788
|
modules: {
|
|
2781
2789
|
type: Array,
|
|
@@ -2801,7 +2809,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2801
2809
|
type: String,
|
|
2802
2810
|
default: null
|
|
2803
2811
|
}
|
|
2804
|
-
},
|
|
2812
|
+
}, Xi = Object.keys(Yi), Zi = [
|
|
2805
2813
|
"update:modelValue",
|
|
2806
2814
|
"reclamantChange",
|
|
2807
2815
|
"motifChange",
|
|
@@ -2810,44 +2818,44 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2810
2818
|
"created",
|
|
2811
2819
|
"createError",
|
|
2812
2820
|
"error"
|
|
2813
|
-
],
|
|
2821
|
+
], Qi = {
|
|
2814
2822
|
name: "CreerSollicitationForm",
|
|
2815
2823
|
components: {
|
|
2816
|
-
AsideBlock:
|
|
2817
|
-
StepperBlock:
|
|
2824
|
+
AsideBlock: Xe,
|
|
2825
|
+
StepperBlock: Ki
|
|
2818
2826
|
},
|
|
2819
|
-
props: { ...
|
|
2820
|
-
emits: [...
|
|
2827
|
+
props: { ...Yi },
|
|
2828
|
+
emits: [...Zi],
|
|
2821
2829
|
setup(e, { emit: t }) {
|
|
2822
|
-
let n = (e) => t("error", e),
|
|
2830
|
+
let n = (e) => t("error", e), r = { baseUrl: I(e, "baseUrl") }, i = kt(Ot({
|
|
2823
2831
|
onError: n,
|
|
2824
|
-
...
|
|
2825
|
-
})),
|
|
2826
|
-
reclamants:
|
|
2827
|
-
modules:
|
|
2828
|
-
idModulePrefere:
|
|
2829
|
-
readonly:
|
|
2832
|
+
...r
|
|
2833
|
+
})), a = j(null), o = v(() => a.value ?? e.modules ?? []), s = Ue(He({
|
|
2834
|
+
reclamants: v(() => e.reclamantMode === "step" ? [] : e.reclamants),
|
|
2835
|
+
modules: o,
|
|
2836
|
+
idModulePrefere: I(e, "idModule"),
|
|
2837
|
+
readonly: I(e, "readonly")
|
|
2830
2838
|
}));
|
|
2831
|
-
return
|
|
2832
|
-
nomenclatureFilter:
|
|
2833
|
-
reclamantMode:
|
|
2834
|
-
typesReclamant:
|
|
2835
|
-
provenances:
|
|
2836
|
-
let t =
|
|
2839
|
+
return It(A({
|
|
2840
|
+
nomenclatureFilter: I(e, "nomenclatureFilter"),
|
|
2841
|
+
reclamantMode: I(e, "reclamantMode"),
|
|
2842
|
+
typesReclamant: v(() => (e.typesReclamant ?? U).filter((t) => !e.typesReclamantExclus.includes(t))),
|
|
2843
|
+
provenances: v(() => {
|
|
2844
|
+
let t = i.cache.provenances ?? [];
|
|
2837
2845
|
return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
|
|
2838
2846
|
let n = t.find((t) => t.id === e);
|
|
2839
2847
|
return n ? [{
|
|
2840
2848
|
...n,
|
|
2841
|
-
icon:
|
|
2849
|
+
icon: Ce(e)
|
|
2842
2850
|
}] : [];
|
|
2843
2851
|
});
|
|
2844
2852
|
}),
|
|
2845
|
-
modulesReclamant:
|
|
2846
|
-
...
|
|
2853
|
+
modulesReclamant: o,
|
|
2854
|
+
...r
|
|
2847
2855
|
})), {
|
|
2848
|
-
data:
|
|
2849
|
-
draft:
|
|
2850
|
-
modulesCharges:
|
|
2856
|
+
data: i,
|
|
2857
|
+
draft: s,
|
|
2858
|
+
modulesCharges: a,
|
|
2851
2859
|
onError: n
|
|
2852
2860
|
};
|
|
2853
2861
|
},
|
|
@@ -2903,10 +2911,10 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2903
2911
|
if (!await this.autoriserCreation(e)) return;
|
|
2904
2912
|
let t;
|
|
2905
2913
|
try {
|
|
2906
|
-
t = await
|
|
2914
|
+
t = await qi(e, this.requestOptions) ?? [];
|
|
2907
2915
|
} catch (t) {
|
|
2908
|
-
if (
|
|
2909
|
-
let n =
|
|
2916
|
+
if (xt(t)) return;
|
|
2917
|
+
let n = bt(t);
|
|
2910
2918
|
this.$emit("createError", {
|
|
2911
2919
|
error: t,
|
|
2912
2920
|
message: n,
|
|
@@ -2956,7 +2964,7 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2956
2964
|
message: t
|
|
2957
2965
|
};
|
|
2958
2966
|
};
|
|
2959
|
-
return a?.id ?
|
|
2967
|
+
return a?.id ? Ji({
|
|
2960
2968
|
idSollicitation: a.id,
|
|
2961
2969
|
pj: {
|
|
2962
2970
|
name: n.name,
|
|
@@ -2967,34 +2975,34 @@ var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n
|
|
|
2967
2975
|
...o,
|
|
2968
2976
|
ok: !0,
|
|
2969
2977
|
message: null
|
|
2970
|
-
})).catch((e) => s(
|
|
2978
|
+
})).catch((e) => s(bt(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
|
|
2971
2979
|
});
|
|
2972
2980
|
return Promise.all(n);
|
|
2973
2981
|
}
|
|
2974
2982
|
}
|
|
2975
|
-
},
|
|
2983
|
+
}, $i = { class: "row g-3" }, ea = {
|
|
2976
2984
|
key: 0,
|
|
2977
2985
|
class: "col-12 col-lg-4"
|
|
2978
2986
|
};
|
|
2979
|
-
function
|
|
2980
|
-
let
|
|
2981
|
-
return
|
|
2987
|
+
function ta(e, t, n, r, i, a) {
|
|
2988
|
+
let o = P("aside-block"), s = P("stepper-block");
|
|
2989
|
+
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"] ? {
|
|
2982
2990
|
name: "similaires",
|
|
2983
|
-
fn:
|
|
2991
|
+
fn: R((t) => [N(e.$slots, "aside-similaires", O(E(t)))]),
|
|
2984
2992
|
key: "0"
|
|
2985
2993
|
} : void 0, e.$slots["aside-evenements"] ? {
|
|
2986
2994
|
name: "evenements",
|
|
2987
|
-
fn:
|
|
2995
|
+
fn: R(() => [N(e.$slots, "aside-evenements")]),
|
|
2988
2996
|
key: "1"
|
|
2989
|
-
} : void 0]), 1032, ["nb-similaires"])])])) :
|
|
2997
|
+
} : void 0]), 1032, ["nb-similaires"])])])) : b("", !0), S("div", { class: D(["col-12", e.aside ? "col-lg-8" : ""]) }, [T(s, {
|
|
2990
2998
|
step: i.currentStep,
|
|
2991
2999
|
"onUpdate:step": t[0] ||= (e) => i.currentStep = e,
|
|
2992
3000
|
creating: i.creating,
|
|
2993
3001
|
onStepChange: t[1] ||= (t) => e.$emit("stepChange", t),
|
|
2994
|
-
onSubmit:
|
|
2995
|
-
},
|
|
3002
|
+
onSubmit: a.creer
|
|
3003
|
+
}, C({ _: 2 }, [e.$slots.reclamant ? {
|
|
2996
3004
|
name: "reclamant",
|
|
2997
|
-
fn:
|
|
3005
|
+
fn: R((t) => [N(e.$slots, "reclamant", O(E(t)))]),
|
|
2998
3006
|
key: "0"
|
|
2999
3007
|
} : void 0]), 1032, [
|
|
3000
3008
|
"step",
|
|
@@ -3002,14 +3010,14 @@ function Ai(e, t, n, r, i, l) {
|
|
|
3002
3010
|
"onSubmit"
|
|
3003
3011
|
])], 2)]);
|
|
3004
3012
|
}
|
|
3005
|
-
var
|
|
3013
|
+
var na = /*#__PURE__*/ K(Qi, [["render", ta]]), ra = {
|
|
3006
3014
|
name: "CreerSollicitationModal",
|
|
3007
3015
|
components: {
|
|
3008
|
-
AmsomModal:
|
|
3009
|
-
CreerSollicitationForm:
|
|
3016
|
+
AmsomModal: ue,
|
|
3017
|
+
CreerSollicitationForm: na
|
|
3010
3018
|
},
|
|
3011
3019
|
props: {
|
|
3012
|
-
...
|
|
3020
|
+
...Yi,
|
|
3013
3021
|
titre: {
|
|
3014
3022
|
type: String,
|
|
3015
3023
|
default: "Nouvelle sollicitation"
|
|
@@ -3019,36 +3027,36 @@ var ji = /*#__PURE__*/ z(Di, [["render", Ai]]), Mi = {
|
|
|
3019
3027
|
default: !0
|
|
3020
3028
|
}
|
|
3021
3029
|
},
|
|
3022
|
-
emits: [...
|
|
3030
|
+
emits: [...Zi, "close"],
|
|
3023
3031
|
computed: {
|
|
3024
3032
|
formProps() {
|
|
3025
|
-
return Object.fromEntries(
|
|
3033
|
+
return Object.fromEntries(Xi.map((e) => [e, this[e]]));
|
|
3026
3034
|
},
|
|
3027
3035
|
formListeners() {
|
|
3028
|
-
return Object.fromEntries(
|
|
3036
|
+
return Object.fromEntries(Zi.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
|
|
3029
3037
|
}
|
|
3030
3038
|
},
|
|
3031
3039
|
methods: { onCreated(...e) {
|
|
3032
3040
|
this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
|
|
3033
3041
|
} }
|
|
3034
|
-
},
|
|
3035
|
-
function
|
|
3036
|
-
let
|
|
3037
|
-
return
|
|
3042
|
+
}, ia = { class: "fw-medium fs-5" };
|
|
3043
|
+
function aa(e, t, n, r, i, a) {
|
|
3044
|
+
let o = P("creer-sollicitation-form"), s = P("amsom-modal");
|
|
3045
|
+
return k(), y(s, {
|
|
3038
3046
|
"close-option": "",
|
|
3039
3047
|
size: "xl",
|
|
3040
3048
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
3041
3049
|
}, {
|
|
3042
|
-
default:
|
|
3050
|
+
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) => ({
|
|
3043
3051
|
name: n,
|
|
3044
|
-
fn:
|
|
3052
|
+
fn: R((t) => [N(e.$slots, n, O(E(t ?? {})))])
|
|
3045
3053
|
}))]), 1040, ["onCreated"])]),
|
|
3046
3054
|
_: 3
|
|
3047
3055
|
});
|
|
3048
3056
|
}
|
|
3049
|
-
var
|
|
3050
|
-
CreerSollicitationModal:
|
|
3051
|
-
CreerSollicitationForm:
|
|
3057
|
+
var oa = /*#__PURE__*/ K(ra, [["render", aa]]), sa = {
|
|
3058
|
+
CreerSollicitationModal: oa,
|
|
3059
|
+
CreerSollicitationForm: na
|
|
3052
3060
|
};
|
|
3053
3061
|
//#endregion
|
|
3054
|
-
export {
|
|
3062
|
+
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 };
|