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