@amsom-habitat/cresol 0.2.3 → 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 +629 -475
- 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 te, withCtx as E, withDirectives 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,
|
|
@@ -443,27 +458,27 @@ function Ee(e, t, n, r, c, l) {
|
|
|
443
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: E(() => [s("div",
|
|
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 Ae(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 je = (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 je = (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
|
}, {
|
|
@@ -681,6 +704,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
681
704
|
categorie: t.categorie?.toLowerCase() ?? e,
|
|
682
705
|
libelleReclamant: t.libelleReclamant,
|
|
683
706
|
adresse: t.adresse,
|
|
707
|
+
idModule: t.idModule,
|
|
684
708
|
estActif: !1,
|
|
685
709
|
individus: []
|
|
686
710
|
});
|
|
@@ -688,19 +712,20 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
688
712
|
r.estActif ||= !!t.estActif, r.individus.push(t);
|
|
689
713
|
}
|
|
690
714
|
return [...o.values()].sort((e, t) => Number(t.estActif) - Number(e.estActif)).map((e) => {
|
|
691
|
-
let t = e.individus.map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", "),
|
|
692
|
-
locataire: `${e.libelleReclamant ||
|
|
693
|
-
demandeur: `${
|
|
715
|
+
let t = e.individus.map((e) => e.dateSortie), n = t.every((e) => e != null) ? Math.max(...t) : null, r = e.individus.map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", "), i = {
|
|
716
|
+
locataire: `${e.libelleReclamant || r} — Contrat ${e.type}/${e.id}`,
|
|
717
|
+
demandeur: `${r} — ${e.libelleReclamant}`
|
|
694
718
|
}[e.categorie];
|
|
695
719
|
return {
|
|
696
720
|
...e,
|
|
697
|
-
|
|
721
|
+
dateSortie: n,
|
|
722
|
+
libelle: i ?? e.libelleReclamant
|
|
698
723
|
};
|
|
699
724
|
});
|
|
700
725
|
},
|
|
701
726
|
loadResponsables({ motif: e, categorie: t, type: n, nature: r }) {
|
|
702
727
|
return e == null ? Promise.resolve([]) : o().responsablesByMotif[e] ? Promise.resolve(o().responsablesByMotif[e]) : s(`responsables:${e}`, async () => {
|
|
703
|
-
let a = await
|
|
728
|
+
let a = await Qe({
|
|
704
729
|
motif: e,
|
|
705
730
|
categorie: t,
|
|
706
731
|
type: n,
|
|
@@ -724,51 +749,97 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
724
749
|
libelle: l.libelleResponsable
|
|
725
750
|
};
|
|
726
751
|
},
|
|
727
|
-
motifLibelle: (e) =>
|
|
728
|
-
categorieLibelle: (e) =>
|
|
729
|
-
typeLibelle: (e) =>
|
|
730
|
-
natureLibelle: (e) =>
|
|
731
|
-
etatLibelle: (e) =>
|
|
732
|
-
motifIcon: (e) =>
|
|
733
|
-
categorieIcon: (e) =>
|
|
734
|
-
typeIcon: (e) =>
|
|
735
|
-
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)
|
|
736
761
|
};
|
|
737
762
|
return v(l);
|
|
738
763
|
}
|
|
739
|
-
function
|
|
740
|
-
return _(
|
|
764
|
+
function st(e) {
|
|
765
|
+
return _(nt, e), e;
|
|
741
766
|
}
|
|
742
|
-
function
|
|
743
|
-
let e = f(
|
|
767
|
+
function J() {
|
|
768
|
+
let e = f(nt, null);
|
|
744
769
|
if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
|
|
745
770
|
return e;
|
|
746
771
|
}
|
|
747
772
|
//#endregion
|
|
748
773
|
//#region src/utils/fontAwesomeIcons.js
|
|
749
|
-
var
|
|
750
|
-
async function
|
|
774
|
+
var ct = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
775
|
+
async function Y(e) {
|
|
751
776
|
let t = await import("@fortawesome/free-solid-svg-icons");
|
|
752
777
|
[...new Set(e.filter(Boolean))].forEach((e) => {
|
|
753
|
-
let n = t[
|
|
754
|
-
n &&
|
|
778
|
+
let n = t[ct(e)];
|
|
779
|
+
n && oe.add(n);
|
|
755
780
|
});
|
|
756
781
|
}
|
|
757
782
|
//#endregion
|
|
758
|
-
//#region src/
|
|
759
|
-
|
|
783
|
+
//#region src/utils/date.js
|
|
784
|
+
function lt(e) {
|
|
785
|
+
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
786
|
+
}
|
|
787
|
+
function ut(e) {
|
|
788
|
+
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
789
|
+
}
|
|
790
|
+
function X(e) {
|
|
791
|
+
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
|
|
792
|
+
}
|
|
793
|
+
//#endregion
|
|
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 = [
|
|
760
831
|
{
|
|
761
832
|
key: "locataire",
|
|
762
833
|
label: "Locataire",
|
|
763
|
-
icon:
|
|
834
|
+
icon: A.locataire.icon,
|
|
764
835
|
recherche: "Rechercher un locataire",
|
|
765
836
|
aucun: "Aucun locataire trouvé.",
|
|
766
|
-
placeholder: "Nom, prénom, n° de contrat, adresse, téléphone ou mail…"
|
|
837
|
+
placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
|
|
767
838
|
},
|
|
768
839
|
{
|
|
769
840
|
key: "demandeur",
|
|
770
841
|
label: "Demandeur",
|
|
771
|
-
icon:
|
|
842
|
+
icon: A.demandeur.icon,
|
|
772
843
|
recherche: "Rechercher un demandeur",
|
|
773
844
|
aucun: "Aucun demandeur trouvé.",
|
|
774
845
|
placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
|
|
@@ -776,7 +847,7 @@ var q = [
|
|
|
776
847
|
{
|
|
777
848
|
key: "tiers",
|
|
778
849
|
label: "Tiers",
|
|
779
|
-
icon:
|
|
850
|
+
icon: A.tiers.icon,
|
|
780
851
|
recherche: "Rechercher un tiers",
|
|
781
852
|
aucun: "Aucun tiers trouvé.",
|
|
782
853
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -784,58 +855,80 @@ var q = [
|
|
|
784
855
|
{
|
|
785
856
|
key: "autre",
|
|
786
857
|
label: "Autre",
|
|
787
|
-
icon:
|
|
858
|
+
icon: A.autre.icon,
|
|
788
859
|
recherche: "Rechercher un individu « Autre »",
|
|
789
860
|
aucun: "Aucun individu « Autre » trouvé.",
|
|
790
861
|
placeholder: "Nom, prénom, adresse, téléphone ou mail…"
|
|
791
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
|
+
},
|
|
792
879
|
{
|
|
793
880
|
key: "tout",
|
|
794
881
|
label: "Tout",
|
|
795
882
|
icon: "magnifying-glass",
|
|
796
883
|
recherche: "Rechercher parmi tous les réclamants",
|
|
797
884
|
aucun: "Aucun réclamant trouvé.",
|
|
798
|
-
placeholder: "Nom, prénom, n° de contrat ou de demande, adresse, téléphone ou mail…"
|
|
885
|
+
placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
|
|
799
886
|
}
|
|
800
|
-
],
|
|
887
|
+
], yt = {
|
|
801
888
|
signataire: "Signataire",
|
|
802
889
|
occupant: "Occupant",
|
|
803
890
|
demandeur: "Demandeur"
|
|
804
|
-
},
|
|
805
|
-
D: "demandeur",
|
|
806
|
-
T: "tiers",
|
|
807
|
-
U: "autre"
|
|
808
|
-
}[e.type] ?? "locataire" : null, rt = {
|
|
891
|
+
}, bt = {
|
|
809
892
|
name: "ReclamantRechercheBlock",
|
|
810
|
-
components: {
|
|
893
|
+
components: {
|
|
894
|
+
AmsomAutocomplete: D,
|
|
895
|
+
ReclamantTypeBadgeComponent: vt
|
|
896
|
+
},
|
|
811
897
|
setup() {
|
|
812
898
|
return {
|
|
813
|
-
draft:
|
|
814
|
-
data:
|
|
899
|
+
draft: R(),
|
|
900
|
+
data: J(),
|
|
901
|
+
options: Z()
|
|
815
902
|
};
|
|
816
903
|
},
|
|
817
904
|
data() {
|
|
818
905
|
return {
|
|
819
906
|
iconsReady: !1,
|
|
820
|
-
categorie:
|
|
907
|
+
categorie: null,
|
|
821
908
|
trouves: [],
|
|
822
909
|
rechercheEnCours: !1,
|
|
823
910
|
rechercheFaite: !1
|
|
824
911
|
};
|
|
825
912
|
},
|
|
826
913
|
computed: {
|
|
914
|
+
typesAutorises() {
|
|
915
|
+
return this.options.typesReclamant ?? M;
|
|
916
|
+
},
|
|
917
|
+
autorisees() {
|
|
918
|
+
return me(this.typesAutorises);
|
|
919
|
+
},
|
|
827
920
|
categories() {
|
|
828
|
-
return
|
|
921
|
+
return Q.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
|
|
829
922
|
},
|
|
830
923
|
categorieCourante() {
|
|
831
|
-
return
|
|
924
|
+
return Q.find((e) => e.key === this.categorie);
|
|
832
925
|
},
|
|
833
926
|
selectionne() {
|
|
834
927
|
return this.draft.reclamantSelectionne;
|
|
835
928
|
},
|
|
836
929
|
selectedTrouve: {
|
|
837
930
|
get() {
|
|
838
|
-
return this.categorie === "tout" ||
|
|
931
|
+
return this.categorie === "tout" || this.categorieOf(this.selectionne) === this.categorie ? this.selectionne : null;
|
|
839
932
|
},
|
|
840
933
|
set(e) {
|
|
841
934
|
this.select(e);
|
|
@@ -843,14 +936,14 @@ var q = [
|
|
|
843
936
|
}
|
|
844
937
|
},
|
|
845
938
|
async created() {
|
|
846
|
-
await
|
|
939
|
+
this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await Y(Q.map((e) => e.icon)), this.iconsReady = !0;
|
|
847
940
|
},
|
|
848
941
|
beforeUnmount() {
|
|
849
942
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
850
943
|
},
|
|
851
944
|
methods: {
|
|
852
945
|
select(e) {
|
|
853
|
-
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));
|
|
854
947
|
},
|
|
855
948
|
setCategorie(e) {
|
|
856
949
|
e !== this.categorie && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
|
|
@@ -860,8 +953,8 @@ var q = [
|
|
|
860
953
|
},
|
|
861
954
|
rechercher(e) {
|
|
862
955
|
let t = (e ?? "").trim();
|
|
863
|
-
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) => {
|
|
864
|
-
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;
|
|
865
958
|
}).catch(() => {
|
|
866
959
|
this.rechercheEnCours = !1;
|
|
867
960
|
}));
|
|
@@ -869,51 +962,54 @@ var q = [
|
|
|
869
962
|
cleReclamant(e) {
|
|
870
963
|
return e ? `${e.type}|${e.id}` : null;
|
|
871
964
|
},
|
|
872
|
-
categorieOf
|
|
873
|
-
|
|
874
|
-
return
|
|
965
|
+
categorieOf(e) {
|
|
966
|
+
let t = N(e);
|
|
967
|
+
return this.autorisees.includes(t) ? t : null;
|
|
968
|
+
},
|
|
969
|
+
sortiLibelle(e) {
|
|
970
|
+
return e?.dateSortie == null ? "sorti" : `sorti le ${X(e.dateSortie)}`;
|
|
875
971
|
},
|
|
876
972
|
nomsOf(e) {
|
|
877
973
|
return (e?.individus ?? []).map((e) => [e.nom, e.prenom].filter(Boolean).join(" ")).filter(Boolean).join(", ");
|
|
878
974
|
},
|
|
879
975
|
titreOf(e) {
|
|
880
976
|
if (!e?.individus) return e?.libelle ?? "";
|
|
881
|
-
let t =
|
|
977
|
+
let t = this.categorieOf(e);
|
|
882
978
|
return t === "locataire" ? e.libelleReclamant || this.nomsOf(e) : t === "demandeur" ? this.nomsOf(e) : e.libelleReclamant;
|
|
883
979
|
},
|
|
884
980
|
referenceOf(e) {
|
|
885
981
|
if (!e?.individus) return "";
|
|
886
|
-
let t =
|
|
887
|
-
return t === "locataire" ? `Contrat ${e.type}/${e.id}` : 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;
|
|
888
984
|
},
|
|
889
985
|
detailOf(e) {
|
|
890
986
|
let t = e?.individus ?? [];
|
|
891
|
-
if (["
|
|
987
|
+
if (!["locataire", "demandeur"].includes(N(e))) {
|
|
892
988
|
let e = t[0];
|
|
893
989
|
return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
|
|
894
990
|
}
|
|
895
|
-
return t.map((
|
|
896
|
-
let
|
|
897
|
-
return
|
|
991
|
+
return t.map((t) => {
|
|
992
|
+
let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${X(t.dateSortie)}` : null, i = [yt[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
|
|
993
|
+
return i ? `${n} (${i})` : n;
|
|
898
994
|
}).join(", ");
|
|
899
995
|
}
|
|
900
996
|
}
|
|
901
|
-
},
|
|
997
|
+
}, xt = {
|
|
902
998
|
key: 0,
|
|
903
999
|
class: "d-flex flex-column gap-3"
|
|
904
|
-
},
|
|
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 = {
|
|
905
1001
|
key: 0,
|
|
906
1002
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
907
|
-
},
|
|
1003
|
+
}, Dt = { class: "text-muted d-block text-truncate" }, Ot = { key: 0 }, kt = {
|
|
908
1004
|
key: 0,
|
|
909
1005
|
class: "text-muted d-block text-truncate"
|
|
910
|
-
},
|
|
1006
|
+
}, At = {
|
|
911
1007
|
key: 0,
|
|
912
1008
|
class: "text-muted"
|
|
913
1009
|
};
|
|
914
|
-
function
|
|
915
|
-
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
916
|
-
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", {
|
|
917
1013
|
key: e.key,
|
|
918
1014
|
type: "button",
|
|
919
1015
|
class: m(["btn btn-sm d-inline-flex align-items-center gap-2", d.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -921,9 +1017,9 @@ function mt(e, t, r, c, d, f) {
|
|
|
921
1017
|
}, [u(p, {
|
|
922
1018
|
icon: e.icon,
|
|
923
1019
|
"fixed-width": ""
|
|
924
|
-
}, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10,
|
|
925
|
-
s("label",
|
|
926
|
-
(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(_, {
|
|
927
1023
|
key: d.categorie,
|
|
928
1024
|
modelValue: f.selectedTrouve,
|
|
929
1025
|
"onUpdate:modelValue": t[0] ||= (e) => f.selectedTrouve = e,
|
|
@@ -938,10 +1034,18 @@ function mt(e, t, r, c, d, f) {
|
|
|
938
1034
|
"debounce-delay": 0,
|
|
939
1035
|
onSearch: f.rechercherPlusTard
|
|
940
1036
|
}, {
|
|
941
|
-
options: E((e) => [s("div",
|
|
942
|
-
s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
|
|
943
|
-
|
|
944
|
-
|
|
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)
|
|
945
1049
|
])]),
|
|
946
1050
|
_: 1
|
|
947
1051
|
}, 8, [
|
|
@@ -954,89 +1058,110 @@ function mt(e, t, r, c, d, f) {
|
|
|
954
1058
|
"placeholder",
|
|
955
1059
|
"onSearch"
|
|
956
1060
|
])),
|
|
957
|
-
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)
|
|
958
1062
|
])])) : a("", !0);
|
|
959
1063
|
}
|
|
960
|
-
var
|
|
1064
|
+
var Mt = /*#__PURE__*/ z(bt, [["render", jt]]), Nt = {
|
|
961
1065
|
name: "ProvenanceSelecteurBlock",
|
|
962
1066
|
setup() {
|
|
963
|
-
return {
|
|
1067
|
+
return {
|
|
1068
|
+
draft: R(),
|
|
1069
|
+
data: J(),
|
|
1070
|
+
options: Z()
|
|
1071
|
+
};
|
|
1072
|
+
},
|
|
1073
|
+
data() {
|
|
1074
|
+
return { iconsReady: !1 };
|
|
964
1075
|
},
|
|
965
1076
|
computed: {
|
|
966
1077
|
provenances() {
|
|
967
|
-
return
|
|
1078
|
+
return this.options.provenances;
|
|
1079
|
+
},
|
|
1080
|
+
loaded() {
|
|
1081
|
+
return this.data.cache.provenances != null;
|
|
968
1082
|
},
|
|
969
1083
|
selected() {
|
|
970
1084
|
return this.draft.draft.provenance;
|
|
971
1085
|
},
|
|
1086
|
+
libelleFige() {
|
|
1087
|
+
return this.data.cache.provenances?.find((e) => e.id === this.selected)?.libelle ?? this.selected ?? "—";
|
|
1088
|
+
},
|
|
972
1089
|
provenanceChoisie() {
|
|
973
1090
|
return this.provenances.find((e) => e.id === this.selected) ?? null;
|
|
974
1091
|
}
|
|
975
|
-
}
|
|
976
|
-
|
|
1092
|
+
},
|
|
1093
|
+
async created() {
|
|
1094
|
+
await Y([...Object.values(k), le]), this.iconsReady = !0;
|
|
1095
|
+
},
|
|
1096
|
+
methods: { iconOf: ue }
|
|
1097
|
+
}, Pt = {
|
|
977
1098
|
key: 0,
|
|
978
1099
|
class: "fs-7 text-muted"
|
|
979
|
-
},
|
|
1100
|
+
}, Ft = { class: "fw-medium" }, It = { key: 1 }, Lt = { class: "d-flex flex-wrap gap-2" }, Rt = ["onClick"], zt = {
|
|
980
1101
|
key: 0,
|
|
981
1102
|
class: "fs-7 text-danger mt-1"
|
|
982
1103
|
};
|
|
983
|
-
function
|
|
984
|
-
let
|
|
985
|
-
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, {
|
|
986
1107
|
key: 0,
|
|
987
|
-
icon:
|
|
1108
|
+
icon: d.iconOf(d.selected),
|
|
988
1109
|
"fixed-width": ""
|
|
989
|
-
}, null, 8, ["icon"])) : a("", !0), l(" " + C(
|
|
1110
|
+
}, null, 8, ["icon"])) : a("", !0), l(" " + C(d.libelleFige), 1)])])) : (g(), o("div", It, [
|
|
990
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),
|
|
991
|
-
s("div",
|
|
1112
|
+
s("div", Lt, [(g(!0), o(n, null, b(d.provenances, (e) => (g(), o("button", {
|
|
992
1113
|
key: e.id,
|
|
993
1114
|
type: "button",
|
|
994
|
-
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"]),
|
|
995
1116
|
onClick: (t) => c.draft.setProvenance(e.id)
|
|
996
|
-
}, [u(
|
|
1117
|
+
}, [u.iconsReady ? (g(), i(f, {
|
|
1118
|
+
key: 0,
|
|
997
1119
|
icon: e.icon,
|
|
998
1120
|
"fixed-width": ""
|
|
999
|
-
}, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10,
|
|
1000
|
-
|
|
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)
|
|
1001
1123
|
]));
|
|
1002
1124
|
}
|
|
1003
|
-
var
|
|
1125
|
+
var Vt = /*#__PURE__*/ z(Nt, [["render", Bt]]), Ht = {
|
|
1004
1126
|
name: "EtapeReclamantBlock",
|
|
1005
1127
|
components: {
|
|
1006
|
-
ReclamantRechercheBlock:
|
|
1007
|
-
ProvenanceSelecteurBlock:
|
|
1128
|
+
ReclamantRechercheBlock: Mt,
|
|
1129
|
+
ProvenanceSelecteurBlock: Vt
|
|
1008
1130
|
},
|
|
1009
1131
|
props: { premiere: {
|
|
1010
1132
|
type: Boolean,
|
|
1011
1133
|
default: !1
|
|
1012
1134
|
} },
|
|
1013
1135
|
setup() {
|
|
1014
|
-
return { draft:
|
|
1136
|
+
return { draft: R() };
|
|
1015
1137
|
}
|
|
1016
|
-
},
|
|
1017
|
-
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) {
|
|
1018
1140
|
let f = S("provenance-selecteur-block"), p = S("font-awesome-icon"), m = S("reclamant-recherche-block");
|
|
1019
|
-
return g(), o("div",
|
|
1141
|
+
return g(), o("div", Ut, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
|
|
1020
1142
|
reclamant: r.draft.reclamantSelectionne,
|
|
1021
1143
|
select: r.draft.selectReclamant
|
|
1022
|
-
}, () => [s("div",
|
|
1144
|
+
}, () => [s("div", Wt, [u(p, {
|
|
1023
1145
|
icon: "user",
|
|
1024
1146
|
class: "text-primary me-2"
|
|
1025
1147
|
}), t[0] ||= l(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), u(m)])]);
|
|
1026
1148
|
}
|
|
1027
|
-
var
|
|
1149
|
+
var Kt = /*#__PURE__*/ z(Ht, [["render", Gt]]);
|
|
1028
1150
|
//#endregion
|
|
1029
1151
|
//#region src/utils/text.js
|
|
1030
|
-
function
|
|
1152
|
+
function $(e, t = !0) {
|
|
1031
1153
|
if (!e) return null;
|
|
1032
1154
|
let n = e.toString().normalize("NFD").replace(/[̀-ͯ]/g, "");
|
|
1033
1155
|
return t ? n.toLowerCase() : n;
|
|
1034
1156
|
}
|
|
1035
1157
|
//#endregion
|
|
1036
1158
|
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1037
|
-
var
|
|
1159
|
+
var qt = {
|
|
1038
1160
|
name: "ReclamantSelecteurBlock",
|
|
1039
|
-
components: {
|
|
1161
|
+
components: {
|
|
1162
|
+
AmsomAutocomplete: D,
|
|
1163
|
+
ReclamantTypeBadgeComponent: vt
|
|
1164
|
+
},
|
|
1040
1165
|
props: {
|
|
1041
1166
|
mode: {
|
|
1042
1167
|
type: String,
|
|
@@ -1049,8 +1174,8 @@ var Mt = {
|
|
|
1049
1174
|
},
|
|
1050
1175
|
setup() {
|
|
1051
1176
|
return {
|
|
1052
|
-
draft:
|
|
1053
|
-
options:
|
|
1177
|
+
draft: R(),
|
|
1178
|
+
options: Z()
|
|
1054
1179
|
};
|
|
1055
1180
|
},
|
|
1056
1181
|
computed: {
|
|
@@ -1076,41 +1201,48 @@ var Mt = {
|
|
|
1076
1201
|
this.draft.selectReclamant(e);
|
|
1077
1202
|
},
|
|
1078
1203
|
filterReclamants({ search: e, items: t }) {
|
|
1079
|
-
let n = (
|
|
1080
|
-
return n ? t.filter((e) => (
|
|
1204
|
+
let n = ($(e) ?? "").trim();
|
|
1205
|
+
return n ? t.filter((e) => ($(e?.libelle) ?? "").includes(n)) : t;
|
|
1081
1206
|
}
|
|
1082
1207
|
}
|
|
1083
|
-
},
|
|
1208
|
+
}, Jt = {
|
|
1084
1209
|
key: 0,
|
|
1085
1210
|
class: "fs-7 text-muted"
|
|
1086
|
-
},
|
|
1211
|
+
}, Yt = { class: "fw-medium" }, Xt = {
|
|
1087
1212
|
key: 0,
|
|
1088
1213
|
class: "btn-group btn-group-sm",
|
|
1089
1214
|
role: "group"
|
|
1090
|
-
},
|
|
1091
|
-
function
|
|
1092
|
-
let
|
|
1093
|
-
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", {
|
|
1094
1219
|
key: 1,
|
|
1095
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")
|
|
1096
|
-
}, [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", {
|
|
1097
1222
|
key: t,
|
|
1098
1223
|
type: "button",
|
|
1099
|
-
class: m(["btn btn-sm py-0", e ===
|
|
1100
|
-
onClick: (t) =>
|
|
1101
|
-
}, 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, {
|
|
1102
1227
|
key: 1,
|
|
1103
|
-
"model-value":
|
|
1104
|
-
items:
|
|
1105
|
-
"get-id":
|
|
1228
|
+
"model-value": d.reclamantSelectionne,
|
|
1229
|
+
items: d.reclamants,
|
|
1230
|
+
"get-id": d.reclamantId,
|
|
1106
1231
|
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1107
|
-
"filtering-function":
|
|
1232
|
+
"filtering-function": d.filterReclamants,
|
|
1108
1233
|
placeholder: "Rechercher un réclamant…",
|
|
1109
1234
|
"input-size": "sm",
|
|
1110
1235
|
"hide-choices": "",
|
|
1111
1236
|
class: m(r.inline ? "" : "w-100"),
|
|
1112
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
1113
|
-
},
|
|
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, [
|
|
1114
1246
|
"model-value",
|
|
1115
1247
|
"items",
|
|
1116
1248
|
"get-id",
|
|
@@ -1120,22 +1252,22 @@ function zt(e, t, r, a, c, u) {
|
|
|
1120
1252
|
])) : (g(), o("select", {
|
|
1121
1253
|
key: 2,
|
|
1122
1254
|
class: m(["form-select form-select-sm", r.inline ? "w-auto" : ""]),
|
|
1123
|
-
value:
|
|
1124
|
-
onChange: t[1] ||= (e) =>
|
|
1125
|
-
}, [(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", {
|
|
1126
1258
|
key: t,
|
|
1127
1259
|
value: t
|
|
1128
|
-
}, C(e.libelle), 9,
|
|
1260
|
+
}, C(e.libelle), 9, $t))), 128))], 42, Qt))], 2));
|
|
1129
1261
|
}
|
|
1130
1262
|
//#endregion
|
|
1131
1263
|
//#region src/components/EtapeCategorieBlock.vue
|
|
1132
|
-
var
|
|
1264
|
+
var tn = {
|
|
1133
1265
|
name: "EtapeCategorieBlock",
|
|
1134
1266
|
components: {
|
|
1135
1267
|
AmsomOverlay: t,
|
|
1136
|
-
AmsomAutocomplete:
|
|
1137
|
-
ReclamantSelecteurBlock: /* @__PURE__ */
|
|
1138
|
-
ProvenanceSelecteurBlock:
|
|
1268
|
+
AmsomAutocomplete: D,
|
|
1269
|
+
ReclamantSelecteurBlock: /* @__PURE__ */ z(qt, [["render", en]]),
|
|
1270
|
+
ProvenanceSelecteurBlock: Vt
|
|
1139
1271
|
},
|
|
1140
1272
|
props: { premiere: {
|
|
1141
1273
|
type: Boolean,
|
|
@@ -1143,9 +1275,9 @@ var Bt = {
|
|
|
1143
1275
|
} },
|
|
1144
1276
|
setup() {
|
|
1145
1277
|
return {
|
|
1146
|
-
draft:
|
|
1147
|
-
data:
|
|
1148
|
-
options:
|
|
1278
|
+
draft: R(),
|
|
1279
|
+
data: J(),
|
|
1280
|
+
options: Z()
|
|
1149
1281
|
};
|
|
1150
1282
|
},
|
|
1151
1283
|
data() {
|
|
@@ -1262,7 +1394,7 @@ var Bt = {
|
|
|
1262
1394
|
});
|
|
1263
1395
|
},
|
|
1264
1396
|
registerIcons() {
|
|
1265
|
-
return
|
|
1397
|
+
return Y([
|
|
1266
1398
|
...this.data.cache.categories ?? [],
|
|
1267
1399
|
...this.data.cache.types ?? [],
|
|
1268
1400
|
...this.data.cache.natures ?? [],
|
|
@@ -1270,11 +1402,11 @@ var Bt = {
|
|
|
1270
1402
|
].map((e) => e.icon));
|
|
1271
1403
|
},
|
|
1272
1404
|
filterMotifs({ search: e, items: t }) {
|
|
1273
|
-
let n = (
|
|
1405
|
+
let n = ($(e) ?? "").trim();
|
|
1274
1406
|
if (!n) return t;
|
|
1275
1407
|
let r = n.split(/\s+/);
|
|
1276
1408
|
return t.filter((e) => {
|
|
1277
|
-
let t =
|
|
1409
|
+
let t = $(`${e.libelle} ${e.categorie} ${e.type} ${e.nature}`) ?? "";
|
|
1278
1410
|
return r.every((e) => t.includes(e));
|
|
1279
1411
|
});
|
|
1280
1412
|
},
|
|
@@ -1297,40 +1429,40 @@ var Bt = {
|
|
|
1297
1429
|
return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
|
|
1298
1430
|
}
|
|
1299
1431
|
}
|
|
1300
|
-
},
|
|
1432
|
+
}, nn = {
|
|
1301
1433
|
key: 0,
|
|
1302
1434
|
class: "d-flex flex-column gap-3"
|
|
1303
|
-
},
|
|
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 = {
|
|
1304
1436
|
key: 4,
|
|
1305
1437
|
class: "d-flex align-items-center gap-2 text-muted fs-7"
|
|
1306
|
-
},
|
|
1438
|
+
}, pn = {
|
|
1307
1439
|
key: 5,
|
|
1308
1440
|
class: "d-flex flex-wrap align-items-center gap-2"
|
|
1309
|
-
},
|
|
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 = {
|
|
1310
1442
|
key: 0,
|
|
1311
1443
|
class: "col-12 text-muted fs-7"
|
|
1312
|
-
},
|
|
1444
|
+
}, xn = [
|
|
1313
1445
|
"id",
|
|
1314
1446
|
"checked",
|
|
1315
1447
|
"disabled",
|
|
1316
1448
|
"onChange"
|
|
1317
|
-
],
|
|
1318
|
-
function
|
|
1449
|
+
], Sn = ["for"];
|
|
1450
|
+
function Cn(e, t, r, c, d, f) {
|
|
1319
1451
|
let p = S("provenance-selecteur-block"), m = S("reclamant-selecteur-block"), h = S("font-awesome-icon"), _ = S("amsom-autocomplete"), v = S("amsom-overlay");
|
|
1320
1452
|
return g(), i(v, { loading: c.data.isLoading && !c.data.cache.motifs || !d.iconsReady }, {
|
|
1321
|
-
default: E(() => [d.iconsReady ? (g(), o("div",
|
|
1453
|
+
default: E(() => [d.iconsReady ? (g(), o("div", nn, [
|
|
1322
1454
|
r.premiere ? (g(), i(p, { key: 0 })) : a("", !0),
|
|
1323
1455
|
c.options.reclamantMode === "step" ? a("", !0) : (g(), i(m, { key: 1 })),
|
|
1324
|
-
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, {
|
|
1325
1457
|
key: 0,
|
|
1326
1458
|
icon: "fa-solid fa-chevron-right",
|
|
1327
1459
|
class: "text-muted fs-7"
|
|
1328
|
-
})) : a("", !0), s("span",
|
|
1460
|
+
})) : a("", !0), s("span", on, [e.icon ? (g(), i(h, {
|
|
1329
1461
|
key: 0,
|
|
1330
1462
|
icon: e.icon,
|
|
1331
1463
|
"fixed-width": ""
|
|
1332
1464
|
}, null, 8, ["icon"])) : a("", !0), l(" " + C(e.libelle), 1)])], 64))), 128))])])) : a("", !0),
|
|
1333
|
-
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(_, {
|
|
1334
1466
|
modelValue: f.motifRecherche,
|
|
1335
1467
|
"onUpdate:modelValue": t[0] ||= (e) => f.motifRecherche = e,
|
|
1336
1468
|
items: f.allowedMotifs,
|
|
@@ -1342,12 +1474,12 @@ function cn(e, t, r, c, d, f) {
|
|
|
1342
1474
|
"input-size": "sm",
|
|
1343
1475
|
"hide-choices": ""
|
|
1344
1476
|
}, {
|
|
1345
|
-
options: E((e) => [s("div",
|
|
1477
|
+
options: E((e) => [s("div", cn, [e?.icon ? (g(), i(h, {
|
|
1346
1478
|
key: 0,
|
|
1347
1479
|
icon: e.icon,
|
|
1348
1480
|
class: "text-primary",
|
|
1349
1481
|
"fixed-width": ""
|
|
1350
|
-
}, 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)])])]),
|
|
1351
1483
|
_: 1
|
|
1352
1484
|
}, 8, [
|
|
1353
1485
|
"modelValue",
|
|
@@ -1357,12 +1489,12 @@ function cn(e, t, r, c, d, f) {
|
|
|
1357
1489
|
"get-input-libelle-from-id",
|
|
1358
1490
|
"filtering-function"
|
|
1359
1491
|
])])),
|
|
1360
|
-
f.motifFige ? a("", !0) : (g(), o("div",
|
|
1492
|
+
f.motifFige ? a("", !0) : (g(), o("div", fn, [...t[3] ||= [
|
|
1361
1493
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1),
|
|
1362
1494
|
s("span", null, "ou sélection guidée", -1),
|
|
1363
1495
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1)
|
|
1364
1496
|
]])),
|
|
1365
|
-
!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, {
|
|
1366
1498
|
key: 0,
|
|
1367
1499
|
icon: "fa-solid fa-chevron-right",
|
|
1368
1500
|
class: "text-muted fs-7"
|
|
@@ -1381,8 +1513,8 @@ function cn(e, t, r, c, d, f) {
|
|
|
1381
1513
|
icon: "fa-solid fa-xmark",
|
|
1382
1514
|
class: "fs-7 opacity-75"
|
|
1383
1515
|
})
|
|
1384
|
-
], 8,
|
|
1385
|
-
!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", {
|
|
1386
1518
|
key: e.id,
|
|
1387
1519
|
class: "col-3 text-center"
|
|
1388
1520
|
}, [s("button", {
|
|
@@ -1394,7 +1526,7 @@ function cn(e, t, r, c, d, f) {
|
|
|
1394
1526
|
key: 0,
|
|
1395
1527
|
icon: e.icon,
|
|
1396
1528
|
size: "lg"
|
|
1397
|
-
}, 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),
|
|
1398
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" }, [
|
|
1399
1531
|
s("hr", { class: "flex-grow-1 my-0" }),
|
|
1400
1532
|
s("span", null, "Autres motifs liés"),
|
|
@@ -1409,15 +1541,15 @@ function cn(e, t, r, c, d, f) {
|
|
|
1409
1541
|
checked: f.isActive(e.idMotif),
|
|
1410
1542
|
disabled: f.motifFige,
|
|
1411
1543
|
onChange: (t) => f.toggleMotifAssocie(e)
|
|
1412
|
-
}, null, 40,
|
|
1544
|
+
}, null, 40, xn), s("label", {
|
|
1413
1545
|
class: "form-check-label fs-7",
|
|
1414
1546
|
for: `assoc-${e.idMotif}`
|
|
1415
|
-
}, C(e.libelle) + " ? ", 9,
|
|
1547
|
+
}, C(e.libelle) + " ? ", 9, Sn)]))), 128))], 64)) : a("", !0)
|
|
1416
1548
|
])) : a("", !0)]),
|
|
1417
1549
|
_: 1
|
|
1418
1550
|
}, 8, ["loading"]);
|
|
1419
1551
|
}
|
|
1420
|
-
var
|
|
1552
|
+
var wn = /*#__PURE__*/ z(tn, [["render", Cn]]), Tn = {
|
|
1421
1553
|
B: "briefcase",
|
|
1422
1554
|
M: "store",
|
|
1423
1555
|
W: "dungeon",
|
|
@@ -1427,17 +1559,17 @@ var ln = /*#__PURE__*/ F(Bt, [["render", cn]]), un = {
|
|
|
1427
1559
|
S: "square-parking",
|
|
1428
1560
|
V: "hands-holding"
|
|
1429
1561
|
};
|
|
1430
|
-
function
|
|
1431
|
-
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;
|
|
1432
1564
|
}
|
|
1433
|
-
function
|
|
1565
|
+
function Dn(e) {
|
|
1434
1566
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1435
1567
|
}
|
|
1436
1568
|
//#endregion
|
|
1437
1569
|
//#region src/components/CiblePickerBlock.vue
|
|
1438
|
-
var
|
|
1570
|
+
var On = 0, kn = {
|
|
1439
1571
|
name: "CiblePickerBlock",
|
|
1440
|
-
components: { AmsomAutocomplete:
|
|
1572
|
+
components: { AmsomAutocomplete: D },
|
|
1441
1573
|
props: {
|
|
1442
1574
|
patrimoine: {
|
|
1443
1575
|
type: Object,
|
|
@@ -1488,11 +1620,11 @@ var pn = 0, mn = {
|
|
|
1488
1620
|
"set-module-precis"
|
|
1489
1621
|
],
|
|
1490
1622
|
setup() {
|
|
1491
|
-
return { data:
|
|
1623
|
+
return { data: J() };
|
|
1492
1624
|
},
|
|
1493
1625
|
data() {
|
|
1494
1626
|
return {
|
|
1495
|
-
uid: ++
|
|
1627
|
+
uid: ++On,
|
|
1496
1628
|
rechercheContrat: "",
|
|
1497
1629
|
contratsTrouves: [],
|
|
1498
1630
|
rechercheEnCours: !1,
|
|
@@ -1639,6 +1771,7 @@ var pn = 0, mn = {
|
|
|
1639
1771
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
1640
1772
|
},
|
|
1641
1773
|
methods: {
|
|
1774
|
+
formatDate: X,
|
|
1642
1775
|
rechercherPlusTard(e) {
|
|
1643
1776
|
clearTimeout(this.rechercheTimeout), this.rechercheTimeout = setTimeout(() => this.rechercherContrat(e), 400);
|
|
1644
1777
|
},
|
|
@@ -1658,16 +1791,16 @@ var pn = 0, mn = {
|
|
|
1658
1791
|
},
|
|
1659
1792
|
filterOn(e) {
|
|
1660
1793
|
return ({ search: t, items: n }) => {
|
|
1661
|
-
let r = (
|
|
1662
|
-
return r ? n.filter((t) => (
|
|
1794
|
+
let r = ($(t) ?? "").trim();
|
|
1795
|
+
return r ? n.filter((t) => ($(t?.[e]) ?? "").includes(r)) : n;
|
|
1663
1796
|
};
|
|
1664
1797
|
},
|
|
1665
1798
|
filterModules({ search: e, items: t }) {
|
|
1666
|
-
let n = (
|
|
1667
|
-
return n ? t.filter((e) => (
|
|
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;
|
|
1668
1801
|
},
|
|
1669
|
-
getCategorieModuleIcon:
|
|
1670
|
-
categorieLibelle:
|
|
1802
|
+
getCategorieModuleIcon: En,
|
|
1803
|
+
categorieLibelle: Dn,
|
|
1671
1804
|
moduleLibelle(e) {
|
|
1672
1805
|
return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
|
|
1673
1806
|
},
|
|
@@ -1679,43 +1812,43 @@ var pn = 0, mn = {
|
|
|
1679
1812
|
return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
|
|
1680
1813
|
}
|
|
1681
1814
|
}
|
|
1682
|
-
},
|
|
1815
|
+
}, An = { class: "d-flex flex-column gap-3" }, jn = {
|
|
1683
1816
|
class: "btn-group w-100",
|
|
1684
1817
|
role: "group"
|
|
1685
|
-
},
|
|
1818
|
+
}, Mn = ["onClick"], Nn = { class: "text-muted d-block mt-1" }, Pn = {
|
|
1686
1819
|
key: 0,
|
|
1687
1820
|
class: "form-check"
|
|
1688
|
-
},
|
|
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 = {
|
|
1689
1822
|
key: 0,
|
|
1690
1823
|
class: "badge bg-info"
|
|
1691
|
-
},
|
|
1824
|
+
}, Un = {
|
|
1692
1825
|
key: 1,
|
|
1693
1826
|
class: "badge bg-warning"
|
|
1694
|
-
},
|
|
1827
|
+
}, Wn = {
|
|
1695
1828
|
key: 0,
|
|
1696
1829
|
class: "text-muted d-block text-truncate"
|
|
1697
|
-
},
|
|
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 = {
|
|
1698
1831
|
key: 2,
|
|
1699
1832
|
class: "row g-3"
|
|
1700
|
-
},
|
|
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 = {
|
|
1701
1834
|
key: 0,
|
|
1702
1835
|
class: "col-12 col-md-6"
|
|
1703
|
-
},
|
|
1836
|
+
}, ar = { class: "d-flex flex-wrap align-items-center gap-1" }, or = ["title"], sr = { class: "text-muted" }, cr = {
|
|
1704
1837
|
key: 1,
|
|
1705
1838
|
class: "d-block text-truncate"
|
|
1706
|
-
},
|
|
1839
|
+
}, lr = {
|
|
1707
1840
|
key: 2,
|
|
1708
1841
|
class: "text-muted d-block"
|
|
1709
|
-
},
|
|
1842
|
+
}, ur = {
|
|
1710
1843
|
key: 0,
|
|
1711
1844
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1712
|
-
},
|
|
1713
|
-
function
|
|
1845
|
+
}, dr = { class: "form-check mb-0 ms-3" }, fr = ["id", "checked"], pr = ["for"];
|
|
1846
|
+
function mr(e, t, r, c, d, f) {
|
|
1714
1847
|
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
1715
|
-
return g(), o("div",
|
|
1848
|
+
return g(), o("div", An, [
|
|
1716
1849
|
s("div", null, [
|
|
1717
1850
|
t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
|
|
1718
|
-
s("div",
|
|
1851
|
+
s("div", jn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
|
|
1719
1852
|
key: t.key,
|
|
1720
1853
|
type: "button",
|
|
1721
1854
|
class: m(["btn btn-sm", r.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -1723,19 +1856,19 @@ function $n(e, t, r, c, d, f) {
|
|
|
1723
1856
|
}, [u(p, {
|
|
1724
1857
|
icon: t.icon,
|
|
1725
1858
|
class: "me-1"
|
|
1726
|
-
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10,
|
|
1727
|
-
s("small",
|
|
1859
|
+
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, Mn))), 128))]),
|
|
1860
|
+
s("small", Nn, C(f.currentMode?.aide), 1)
|
|
1728
1861
|
]),
|
|
1729
|
-
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", {
|
|
1730
1863
|
id: `contrat-reclamant-${d.uid}`,
|
|
1731
1864
|
class: "form-check-input",
|
|
1732
1865
|
type: "checkbox",
|
|
1733
1866
|
checked: r.contratReclamant,
|
|
1734
1867
|
onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
|
|
1735
|
-
}, null, 40,
|
|
1868
|
+
}, null, 40, Fn), s("label", {
|
|
1736
1869
|
class: "form-check-label fs-7",
|
|
1737
1870
|
for: `contrat-reclamant-${d.uid}`
|
|
1738
|
-
}, " 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, {
|
|
1739
1872
|
modelValue: f.selectedContrat,
|
|
1740
1873
|
"onUpdate:modelValue": t[1] ||= (e) => f.selectedContrat = e,
|
|
1741
1874
|
items: d.contratsTrouves,
|
|
@@ -1749,14 +1882,14 @@ function $n(e, t, r, c, d, f) {
|
|
|
1749
1882
|
"debounce-delay": 0,
|
|
1750
1883
|
onSearch: f.rechercherPlusTard
|
|
1751
1884
|
}, {
|
|
1752
|
-
options: E((e) => [s("div",
|
|
1753
|
-
s("div",
|
|
1754
|
-
s("div",
|
|
1755
|
-
s("small",
|
|
1756
|
-
e?.nbModules > 1 ? (g(), o("span",
|
|
1757
|
-
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)
|
|
1758
1891
|
]),
|
|
1759
|
-
f.contratAdresse(e) ? (g(), o("small",
|
|
1892
|
+
f.contratAdresse(e) ? (g(), o("small", Wn, C(f.contratAdresse(e)), 1)) : a("", !0)
|
|
1760
1893
|
])]),
|
|
1761
1894
|
_: 1
|
|
1762
1895
|
}, 8, [
|
|
@@ -1768,7 +1901,7 @@ function $n(e, t, r, c, d, f) {
|
|
|
1768
1901
|
"get-input-libelle",
|
|
1769
1902
|
"onSearch"
|
|
1770
1903
|
])]))], 64)) : a("", !0),
|
|
1771
|
-
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", {
|
|
1772
1905
|
key: t.titre,
|
|
1773
1906
|
class: "col-12 col-md-6"
|
|
1774
1907
|
}, [s("button", {
|
|
@@ -1780,8 +1913,8 @@ function $n(e, t, r, c, d, f) {
|
|
|
1780
1913
|
icon: t.icon,
|
|
1781
1914
|
class: "fs-4",
|
|
1782
1915
|
"fixed-width": ""
|
|
1783
|
-
}, null, 8, ["icon"]), s("span",
|
|
1784
|
-
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 }, [
|
|
1785
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, {
|
|
1786
1919
|
modelValue: f.selectedCommune,
|
|
1787
1920
|
"onUpdate:modelValue": t[2] ||= (e) => f.selectedCommune = e,
|
|
@@ -1811,7 +1944,7 @@ function $n(e, t, r, c, d, f) {
|
|
|
1811
1944
|
"input-size": "sm",
|
|
1812
1945
|
"hide-choices": ""
|
|
1813
1946
|
}, {
|
|
1814
|
-
options: E((e) => [s("div",
|
|
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)])]),
|
|
1815
1948
|
_: 1
|
|
1816
1949
|
}, 8, [
|
|
1817
1950
|
"modelValue",
|
|
@@ -1843,18 +1976,18 @@ function $n(e, t, r, c, d, f) {
|
|
|
1843
1976
|
class: "form-control form-control-sm",
|
|
1844
1977
|
disabled: "",
|
|
1845
1978
|
value: r.patrimoine.commune ?? "—"
|
|
1846
|
-
}, null, 8,
|
|
1979
|
+
}, null, 8, tr)]),
|
|
1847
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", {
|
|
1848
1981
|
class: "form-control form-control-sm",
|
|
1849
1982
|
disabled: "",
|
|
1850
1983
|
value: r.patrimoine.entree ?? "—"
|
|
1851
|
-
}, null, 8,
|
|
1984
|
+
}, null, 8, nr)]),
|
|
1852
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", {
|
|
1853
1986
|
class: "form-control form-control-sm",
|
|
1854
1987
|
disabled: "",
|
|
1855
1988
|
value: r.patrimoine.etage ?? "—"
|
|
1856
|
-
}, null, 8,
|
|
1857
|
-
], 64))], 2), f.afficheModule ? (g(), o("div",
|
|
1989
|
+
}, null, 8, rr)])
|
|
1990
|
+
], 64))], 2), f.afficheModule ? (g(), o("div", ir, [
|
|
1858
1991
|
t[16] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
|
|
1859
1992
|
u(h, {
|
|
1860
1993
|
modelValue: f.selectedModule,
|
|
@@ -1876,12 +2009,12 @@ function $n(e, t, r, c, d, f) {
|
|
|
1876
2009
|
title: "Autre adresse ou étage du même programme"
|
|
1877
2010
|
})) : a("", !0),
|
|
1878
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),
|
|
1879
|
-
s("div",
|
|
2012
|
+
s("div", ar, [f.categorieLibelle(e) ? (g(), o("span", {
|
|
1880
2013
|
key: 0,
|
|
1881
2014
|
class: "badge bg-info",
|
|
1882
2015
|
title: e?.categorieModule
|
|
1883
|
-
}, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8,
|
|
1884
|
-
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))
|
|
1885
2018
|
], 2)]),
|
|
1886
2019
|
_: 1
|
|
1887
2020
|
}, 8, [
|
|
@@ -1892,35 +2025,35 @@ function $n(e, t, r, c, d, f) {
|
|
|
1892
2025
|
"filtering-function",
|
|
1893
2026
|
"disabled"
|
|
1894
2027
|
]),
|
|
1895
|
-
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, {
|
|
1896
2029
|
icon: "circle-info",
|
|
1897
2030
|
class: "mt-1"
|
|
1898
|
-
}), 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", {
|
|
1899
2032
|
id: `locataire-actuel-${d.uid}`,
|
|
1900
2033
|
class: "form-check-input",
|
|
1901
2034
|
type: "checkbox",
|
|
1902
2035
|
checked: r.locataireActuelOption.reprendre,
|
|
1903
2036
|
onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
|
|
1904
|
-
}, null, 40,
|
|
2037
|
+
}, null, 40, fr), s("label", {
|
|
1905
2038
|
class: "form-check-label fs-7",
|
|
1906
2039
|
for: `locataire-actuel-${d.uid}`
|
|
1907
|
-
}, " Rattacher au locataire actuel du module ", 8,
|
|
2040
|
+
}, " Rattacher au locataire actuel du module ", 8, pr)])])) : a("", !0)
|
|
1908
2041
|
])) : a("", !0)])) : a("", !0)
|
|
1909
2042
|
]);
|
|
1910
2043
|
}
|
|
1911
2044
|
//#endregion
|
|
1912
2045
|
//#region src/components/EtapeCibleBlock.vue
|
|
1913
|
-
var
|
|
2046
|
+
var hr = {
|
|
1914
2047
|
name: "EtapeCibleBlock",
|
|
1915
2048
|
components: {
|
|
1916
2049
|
AmsomOverlay: t,
|
|
1917
|
-
CiblePickerBlock: /* @__PURE__ */
|
|
2050
|
+
CiblePickerBlock: /* @__PURE__ */ z(kn, [["render", mr]])
|
|
1918
2051
|
},
|
|
1919
2052
|
setup() {
|
|
1920
2053
|
return {
|
|
1921
|
-
draft:
|
|
1922
|
-
data:
|
|
1923
|
-
options:
|
|
2054
|
+
draft: R(),
|
|
2055
|
+
data: J(),
|
|
2056
|
+
options: Z()
|
|
1924
2057
|
};
|
|
1925
2058
|
},
|
|
1926
2059
|
computed: {
|
|
@@ -2020,32 +2153,32 @@ var er = {
|
|
|
2020
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));
|
|
2021
2154
|
}
|
|
2022
2155
|
}
|
|
2023
|
-
},
|
|
2156
|
+
}, gr = { class: "d-flex flex-column gap-3" }, _r = {
|
|
2024
2157
|
key: 0,
|
|
2025
2158
|
class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
|
|
2026
|
-
},
|
|
2159
|
+
}, vr = { class: "fs-7" }, yr = {
|
|
2027
2160
|
key: 1,
|
|
2028
2161
|
class: "d-flex flex-column gap-1"
|
|
2029
|
-
},
|
|
2162
|
+
}, br = {
|
|
2030
2163
|
key: 0,
|
|
2031
2164
|
class: "text-muted me-1"
|
|
2032
|
-
},
|
|
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 = [
|
|
2033
2166
|
"id",
|
|
2034
2167
|
"checked",
|
|
2035
2168
|
"onChange"
|
|
2036
|
-
],
|
|
2169
|
+
], Tr = ["for"], Er = {
|
|
2037
2170
|
key: 0,
|
|
2038
2171
|
class: "mt-2"
|
|
2039
2172
|
};
|
|
2040
|
-
function
|
|
2173
|
+
function Dr(e, t, r, c, d, f) {
|
|
2041
2174
|
let m = S("font-awesome-icon"), h = S("cible-picker-block"), _ = S("amsom-overlay");
|
|
2042
2175
|
return g(), i(_, { loading: c.data.isLoading }, {
|
|
2043
|
-
default: E(() => [s("div",
|
|
2044
|
-
f.motifLibelle ? (g(), o("div",
|
|
2176
|
+
default: E(() => [s("div", gr, [
|
|
2177
|
+
f.motifLibelle ? (g(), o("div", _r, [u(m, {
|
|
2045
2178
|
icon: "tag",
|
|
2046
2179
|
class: "text-primary"
|
|
2047
|
-
}), s("span",
|
|
2048
|
-
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", {
|
|
2049
2182
|
key: t,
|
|
2050
2183
|
class: "fs-7"
|
|
2051
2184
|
}, [
|
|
@@ -2053,7 +2186,7 @@ function fr(e, t, r, c, d, f) {
|
|
|
2053
2186
|
icon: "location-dot",
|
|
2054
2187
|
class: "text-primary me-2"
|
|
2055
2188
|
}),
|
|
2056
|
-
f.lignesAssociees.length ? (g(), o("span",
|
|
2189
|
+
f.lignesAssociees.length ? (g(), o("span", br, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
|
|
2057
2190
|
l(" " + C(c.draft.cibleResume(e)), 1)
|
|
2058
2191
|
]))), 128))])) : (g(), i(h, p({ key: 2 }, f.pickerProps(f.lignePrincipale), {
|
|
2059
2192
|
onChangeMode: t[0] ||= (e) => f.onChangeMode(e),
|
|
@@ -2073,16 +2206,16 @@ function fr(e, t, r, c, d, f) {
|
|
|
2073
2206
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, t) => (g(), o("div", {
|
|
2074
2207
|
key: e.idMotif,
|
|
2075
2208
|
class: "border rounded p-2"
|
|
2076
|
-
}, [s("div",
|
|
2209
|
+
}, [s("div", xr, [s("span", Sr, C(e.libelle), 1), s("div", Cr, [s("input", {
|
|
2077
2210
|
id: `memecible-${e.idMotif}`,
|
|
2078
2211
|
class: "form-check-input",
|
|
2079
2212
|
type: "checkbox",
|
|
2080
2213
|
checked: !e.patrimoine,
|
|
2081
2214
|
onChange: (e) => c.draft.toggleCibleOverride(t + 1)
|
|
2082
|
-
}, null, 40,
|
|
2215
|
+
}, null, 40, wr), s("label", {
|
|
2083
2216
|
class: "form-check-label fs-7",
|
|
2084
2217
|
for: `memecible-${e.idMotif}`
|
|
2085
|
-
}, " 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), {
|
|
2086
2219
|
onChangeMode: (e) => f.onChangeMode(e, t + 1),
|
|
2087
2220
|
onSelectCommune: (e) => f.onSelectCommune(e, t + 1),
|
|
2088
2221
|
onSelectAdresse: (e) => f.onSelectAdresse(e, t + 1),
|
|
@@ -2107,9 +2240,9 @@ function fr(e, t, r, c, d, f) {
|
|
|
2107
2240
|
_: 1
|
|
2108
2241
|
}, 8, ["loading"]);
|
|
2109
2242
|
}
|
|
2110
|
-
var
|
|
2243
|
+
var Or = /*#__PURE__*/ z(hr, [["render", Dr]]), kr = {
|
|
2111
2244
|
name: "LigneDocumentBlock",
|
|
2112
|
-
components: { AmsomUploadFile:
|
|
2245
|
+
components: { AmsomUploadFile: ce },
|
|
2113
2246
|
props: {
|
|
2114
2247
|
index: {
|
|
2115
2248
|
type: Number,
|
|
@@ -2126,7 +2259,7 @@ var pr = /*#__PURE__*/ F(er, [["render", fr]]), mr = {
|
|
|
2126
2259
|
},
|
|
2127
2260
|
emits: ["update"]
|
|
2128
2261
|
};
|
|
2129
|
-
function
|
|
2262
|
+
function Ar(e, t, n, r, i, a) {
|
|
2130
2263
|
let c = S("amsom-upload-file");
|
|
2131
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, {
|
|
2132
2265
|
"model-value": n.fichier,
|
|
@@ -2142,23 +2275,12 @@ function hr(e, t, n, r, i, a) {
|
|
|
2142
2275
|
"read-only"
|
|
2143
2276
|
])]);
|
|
2144
2277
|
}
|
|
2145
|
-
var
|
|
2146
|
-
//#endregion
|
|
2147
|
-
//#region src/utils/date.js
|
|
2148
|
-
function _r(e) {
|
|
2149
|
-
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
2150
|
-
}
|
|
2151
|
-
function vr(e) {
|
|
2152
|
-
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
2153
|
-
}
|
|
2154
|
-
//#endregion
|
|
2155
|
-
//#region src/components/LigneDetailBlock.vue
|
|
2156
|
-
var yr = 4e3, br = {
|
|
2278
|
+
var jr = /*#__PURE__*/ z(kr, [["render", Ar]]), Mr = 4e3, Nr = {
|
|
2157
2279
|
name: "LigneDetailBlock",
|
|
2158
2280
|
components: {
|
|
2159
|
-
AmsomAutocomplete:
|
|
2160
|
-
AmsomTextarea:
|
|
2161
|
-
LigneDocumentBlock:
|
|
2281
|
+
AmsomAutocomplete: D,
|
|
2282
|
+
AmsomTextarea: se,
|
|
2283
|
+
LigneDocumentBlock: jr
|
|
2162
2284
|
},
|
|
2163
2285
|
props: { index: {
|
|
2164
2286
|
type: Number,
|
|
@@ -2166,12 +2288,12 @@ var yr = 4e3, br = {
|
|
|
2166
2288
|
} },
|
|
2167
2289
|
setup() {
|
|
2168
2290
|
return {
|
|
2169
|
-
draft:
|
|
2170
|
-
data:
|
|
2291
|
+
draft: R(),
|
|
2292
|
+
data: J()
|
|
2171
2293
|
};
|
|
2172
2294
|
},
|
|
2173
2295
|
computed: {
|
|
2174
|
-
descriptionMaxLength: () =>
|
|
2296
|
+
descriptionMaxLength: () => Mr,
|
|
2175
2297
|
isPrincipale() {
|
|
2176
2298
|
return this.index === 0;
|
|
2177
2299
|
},
|
|
@@ -2189,64 +2311,64 @@ var yr = 4e3, br = {
|
|
|
2189
2311
|
}
|
|
2190
2312
|
},
|
|
2191
2313
|
methods: {
|
|
2192
|
-
timestampToDateInput:
|
|
2193
|
-
dateInputToTimestamp:
|
|
2314
|
+
timestampToDateInput: lt,
|
|
2315
|
+
dateInputToTimestamp: ut,
|
|
2194
2316
|
responsableLibelle(e) {
|
|
2195
2317
|
let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
|
|
2196
2318
|
return t ? `${t.prenom} ${t.nom}` : "";
|
|
2197
2319
|
},
|
|
2198
2320
|
filterCollaborateurs({ search: e, items: t }) {
|
|
2199
|
-
let n = (
|
|
2200
|
-
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;
|
|
2201
2323
|
}
|
|
2202
2324
|
}
|
|
2203
|
-
},
|
|
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 = {
|
|
2204
2326
|
key: 0,
|
|
2205
2327
|
class: "ms-1 text-danger"
|
|
2206
|
-
},
|
|
2328
|
+
}, Rr = {
|
|
2207
2329
|
key: 0,
|
|
2208
2330
|
class: "form-check form-switch mb-0"
|
|
2209
|
-
},
|
|
2331
|
+
}, zr = [
|
|
2210
2332
|
"id",
|
|
2211
2333
|
"checked",
|
|
2212
2334
|
"disabled"
|
|
2213
|
-
],
|
|
2335
|
+
], Br = ["for"], Vr = {
|
|
2214
2336
|
key: 1,
|
|
2215
2337
|
class: "text-muted d-block",
|
|
2216
2338
|
style: { "white-space": "pre-line" }
|
|
2217
|
-
},
|
|
2339
|
+
}, Hr = { class: "row g-3" }, Ur = { class: "col-6" }, Wr = { class: "d-flex align-items-center gap-2 mb-1" }, Gr = {
|
|
2218
2340
|
key: 0,
|
|
2219
2341
|
class: "form-check form-switch mb-0"
|
|
2220
|
-
},
|
|
2342
|
+
}, Kr = [
|
|
2221
2343
|
"id",
|
|
2222
2344
|
"checked",
|
|
2223
2345
|
"disabled"
|
|
2224
|
-
],
|
|
2346
|
+
], qr = ["for"], Jr = ["value"], Yr = {
|
|
2225
2347
|
key: 1,
|
|
2226
2348
|
class: "text-muted d-block"
|
|
2227
|
-
},
|
|
2349
|
+
}, Xr = {
|
|
2228
2350
|
key: 0,
|
|
2229
2351
|
class: "text-muted d-block"
|
|
2230
|
-
},
|
|
2352
|
+
}, Zr = { class: "min-w-0" }, Qr = { class: "fw-medium text-truncate" }, $r = {
|
|
2231
2353
|
key: 0,
|
|
2232
2354
|
class: "text-muted d-block"
|
|
2233
|
-
},
|
|
2355
|
+
}, ei = {
|
|
2234
2356
|
key: 2,
|
|
2235
2357
|
class: "text-muted"
|
|
2236
|
-
},
|
|
2237
|
-
function
|
|
2358
|
+
}, ti = { class: "col-12 col-md-6" };
|
|
2359
|
+
function ni(e, t, n, r, c, d) {
|
|
2238
2360
|
let f = S("amsom-textarea"), p = S("amsom-autocomplete"), m = S("ligne-document-block");
|
|
2239
|
-
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", {
|
|
2240
2362
|
id: `memedetail-${d.ligne.idMotif}`,
|
|
2241
2363
|
class: "form-check-input",
|
|
2242
2364
|
type: "checkbox",
|
|
2243
2365
|
checked: d.ligne.description == null,
|
|
2244
2366
|
disabled: r.draft.isReadonly("description"),
|
|
2245
2367
|
onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
|
|
2246
|
-
}, null, 40,
|
|
2368
|
+
}, null, 40, zr), s("label", {
|
|
2247
2369
|
class: "form-check-label fs-7",
|
|
2248
2370
|
for: `memedetail-${d.ligne.idMotif}`
|
|
2249
|
-
}, " Même description ", 8,
|
|
2371
|
+
}, " Même description ", 8, Br)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
|
|
2250
2372
|
key: 0,
|
|
2251
2373
|
"model-value": d.ligne.description,
|
|
2252
2374
|
"input-size": "sm",
|
|
@@ -2259,25 +2381,25 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2259
2381
|
"rows",
|
|
2260
2382
|
"maxlength",
|
|
2261
2383
|
"placeholder"
|
|
2262
|
-
])) : (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", {
|
|
2263
2385
|
id: `memedate-${d.ligne.idMotif}`,
|
|
2264
2386
|
class: "form-check-input",
|
|
2265
2387
|
type: "checkbox",
|
|
2266
2388
|
checked: !d.ligne.dateFaitsOverride,
|
|
2267
2389
|
disabled: r.draft.isReadonly("dateFaits"),
|
|
2268
2390
|
onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
|
|
2269
|
-
}, null, 40,
|
|
2391
|
+
}, null, 40, Kr), s("label", {
|
|
2270
2392
|
class: "form-check-label fs-7",
|
|
2271
2393
|
for: `memedate-${d.ligne.idMotif}`
|
|
2272
|
-
}, " Même date ", 8,
|
|
2394
|
+
}, " Même date ", 8, qr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
|
|
2273
2395
|
key: 0,
|
|
2274
2396
|
value: d.timestampToDateInput(d.ligne.dateFaits),
|
|
2275
2397
|
type: "date",
|
|
2276
2398
|
class: "form-control form-control-sm",
|
|
2277
2399
|
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, d.dateInputToTimestamp(e.target.value))
|
|
2278
|
-
}, null, 40,
|
|
2400
|
+
}, null, 40, Jr)) : (g(), o("small", Yr, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
|
|
2279
2401
|
t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
|
|
2280
|
-
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, {
|
|
2281
2403
|
key: 1,
|
|
2282
2404
|
"model-value": d.ligne.responsable,
|
|
2283
2405
|
items: d.collaborateurs,
|
|
@@ -2289,7 +2411,7 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2289
2411
|
"hide-choices": "",
|
|
2290
2412
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2291
2413
|
}, {
|
|
2292
|
-
options: E((e) => [s("div",
|
|
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)])]),
|
|
2293
2415
|
_: 1
|
|
2294
2416
|
}, 8, [
|
|
2295
2417
|
"model-value",
|
|
@@ -2298,8 +2420,8 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2298
2420
|
"get-input-libelle",
|
|
2299
2421
|
"filtering-function"
|
|
2300
2422
|
])),
|
|
2301
|
-
d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small",
|
|
2302
|
-
])]), 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, {
|
|
2303
2425
|
index: n.index,
|
|
2304
2426
|
fichier: d.ligne.fichier,
|
|
2305
2427
|
readonly: r.draft.isReadonly("fichier"),
|
|
@@ -2312,16 +2434,16 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2312
2434
|
}
|
|
2313
2435
|
//#endregion
|
|
2314
2436
|
//#region src/components/EtapeDetailsBlock.vue
|
|
2315
|
-
var
|
|
2437
|
+
var ri = {
|
|
2316
2438
|
name: "EtapeDetailsBlock",
|
|
2317
2439
|
components: {
|
|
2318
2440
|
AmsomOverlay: t,
|
|
2319
|
-
LigneDetailBlock: /* @__PURE__ */
|
|
2441
|
+
LigneDetailBlock: /* @__PURE__ */ z(Nr, [["render", ni]])
|
|
2320
2442
|
},
|
|
2321
2443
|
setup() {
|
|
2322
2444
|
return {
|
|
2323
|
-
draft:
|
|
2324
|
-
data:
|
|
2445
|
+
draft: R(),
|
|
2446
|
+
data: J()
|
|
2325
2447
|
};
|
|
2326
2448
|
},
|
|
2327
2449
|
computed: {
|
|
@@ -2372,22 +2494,22 @@ var Wr = {
|
|
|
2372
2494
|
}
|
|
2373
2495
|
}
|
|
2374
2496
|
}
|
|
2375
|
-
},
|
|
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 = {
|
|
2376
2498
|
key: 0,
|
|
2377
2499
|
class: "fs-7"
|
|
2378
|
-
},
|
|
2379
|
-
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) {
|
|
2380
2502
|
let p = S("font-awesome-icon"), m = S("ligne-detail-block"), h = S("amsom-overlay");
|
|
2381
2503
|
return g(), i(h, { loading: c.data.isLoading && !c.data.cache.collaborateurs }, {
|
|
2382
|
-
default: E(() => [s("div",
|
|
2383
|
-
s("div",
|
|
2504
|
+
default: E(() => [s("div", ii, [
|
|
2505
|
+
s("div", ai, [f.motifLibelle ? (g(), o("span", oi, [
|
|
2384
2506
|
u(p, {
|
|
2385
2507
|
icon: "tag",
|
|
2386
2508
|
class: "text-primary me-2"
|
|
2387
2509
|
}),
|
|
2388
2510
|
t[0] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2389
2511
|
l(C(f.motifLibelle), 1)
|
|
2390
|
-
])) : a("", !0), s("span",
|
|
2512
|
+
])) : a("", !0), s("span", si, [
|
|
2391
2513
|
u(p, {
|
|
2392
2514
|
icon: "location-dot",
|
|
2393
2515
|
class: "text-primary me-2"
|
|
@@ -2403,14 +2525,14 @@ function Qr(e, t, r, c, d, f) {
|
|
|
2403
2525
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, n) => (g(), o("div", {
|
|
2404
2526
|
key: e.idMotif,
|
|
2405
2527
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2406
|
-
}, [s("div",
|
|
2528
|
+
}, [s("div", ci, [s("span", li, [
|
|
2407
2529
|
u(p, {
|
|
2408
2530
|
icon: "tag",
|
|
2409
2531
|
class: "text-primary me-2"
|
|
2410
2532
|
}),
|
|
2411
2533
|
t[2] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2412
2534
|
l(" " + C(e.libelle), 1)
|
|
2413
|
-
]), s("span",
|
|
2535
|
+
]), s("span", ui, [
|
|
2414
2536
|
u(p, {
|
|
2415
2537
|
icon: "location-dot",
|
|
2416
2538
|
class: "text-primary me-2"
|
|
@@ -2424,15 +2546,15 @@ function Qr(e, t, r, c, d, f) {
|
|
|
2424
2546
|
}
|
|
2425
2547
|
//#endregion
|
|
2426
2548
|
//#region src/components/StepperBlock.vue
|
|
2427
|
-
var
|
|
2549
|
+
var fi = {
|
|
2428
2550
|
name: "StepperBlock",
|
|
2429
2551
|
components: {
|
|
2430
|
-
AmsomHorizontalStepper:
|
|
2552
|
+
AmsomHorizontalStepper: ie,
|
|
2431
2553
|
AmsomOverlay: t,
|
|
2432
|
-
EtapeReclamantBlock:
|
|
2433
|
-
EtapeCategorieBlock:
|
|
2434
|
-
EtapeCibleBlock:
|
|
2435
|
-
EtapeDetailsBlock: /* @__PURE__ */
|
|
2554
|
+
EtapeReclamantBlock: Kt,
|
|
2555
|
+
EtapeCategorieBlock: wn,
|
|
2556
|
+
EtapeCibleBlock: Or,
|
|
2557
|
+
EtapeDetailsBlock: /* @__PURE__ */ z(ri, [["render", di]])
|
|
2436
2558
|
},
|
|
2437
2559
|
props: {
|
|
2438
2560
|
step: {
|
|
@@ -2451,9 +2573,9 @@ var $r = {
|
|
|
2451
2573
|
],
|
|
2452
2574
|
setup() {
|
|
2453
2575
|
return {
|
|
2454
|
-
draft:
|
|
2455
|
-
data:
|
|
2456
|
-
options:
|
|
2576
|
+
draft: R(),
|
|
2577
|
+
data: J(),
|
|
2578
|
+
options: Z()
|
|
2457
2579
|
};
|
|
2458
2580
|
},
|
|
2459
2581
|
computed: {
|
|
@@ -2491,11 +2613,14 @@ var $r = {
|
|
|
2491
2613
|
let e = this.lignePrincipale.idMotif;
|
|
2492
2614
|
return e ? this.data.cache.motifs?.find((t) => t.id === e)?.aide ?? null : null;
|
|
2493
2615
|
},
|
|
2616
|
+
provenanceValid() {
|
|
2617
|
+
return this.options.provenances.some((e) => e.id === this.draft.draft.provenance);
|
|
2618
|
+
},
|
|
2494
2619
|
canGoNext() {
|
|
2495
2620
|
return this.gatePassed(this.currentKey);
|
|
2496
2621
|
},
|
|
2497
2622
|
canCreer() {
|
|
2498
|
-
return !!this.lignePrincipale.idMotif &&
|
|
2623
|
+
return !!this.lignePrincipale.idMotif && this.provenanceValid && this.draft.ciblesValid && this.draft.detailsValid && this.draft.reclamantSelectionne != null;
|
|
2499
2624
|
},
|
|
2500
2625
|
stepperSteps() {
|
|
2501
2626
|
return this.steps.map((e, t) => {
|
|
@@ -2524,7 +2649,7 @@ var $r = {
|
|
|
2524
2649
|
} },
|
|
2525
2650
|
methods: {
|
|
2526
2651
|
gatePassed(e) {
|
|
2527
|
-
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;
|
|
2528
2653
|
},
|
|
2529
2654
|
onStepClick(e) {
|
|
2530
2655
|
e < this.step && this.$emit("update:step", e);
|
|
@@ -2544,25 +2669,25 @@ var $r = {
|
|
|
2544
2669
|
}));
|
|
2545
2670
|
}
|
|
2546
2671
|
}
|
|
2547
|
-
},
|
|
2672
|
+
}, pi = { class: "d-flex flex-column gap-3" }, mi = {
|
|
2548
2673
|
key: 0,
|
|
2549
2674
|
class: "w-100 fs-6 fw-medium my-3 alert alert-info",
|
|
2550
2675
|
style: { "white-space": "pre-line" }
|
|
2551
|
-
},
|
|
2552
|
-
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) {
|
|
2553
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");
|
|
2554
2679
|
return g(), i(w, { loading: n.creating }, {
|
|
2555
|
-
default: E(() => [s("div",
|
|
2680
|
+
default: E(() => [s("div", pi, [
|
|
2556
2681
|
u(m, {
|
|
2557
2682
|
steps: p.stepperSteps,
|
|
2558
2683
|
size: "md",
|
|
2559
2684
|
onStepClick: p.onStepClick
|
|
2560
2685
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2561
|
-
p.aideMotif ? (g(), o("div",
|
|
2686
|
+
p.aideMotif ? (g(), o("div", mi, [u(_, {
|
|
2562
2687
|
icon: "circle-info",
|
|
2563
2688
|
class: "text-info-emphasis me-2"
|
|
2564
2689
|
}), s("span", null, C(p.aideMotif), 1)])) : a("", !0),
|
|
2565
|
-
s("div",
|
|
2690
|
+
s("div", hi, [p.currentKey === "reclamant" ? (g(), i(v, {
|
|
2566
2691
|
key: 0,
|
|
2567
2692
|
premiere: n.step === 1
|
|
2568
2693
|
}, c({ _: 2 }, [e.$slots.reclamant ? {
|
|
@@ -2573,14 +2698,14 @@ function si(e, t, n, r, f, p) {
|
|
|
2573
2698
|
key: 1,
|
|
2574
2699
|
premiere: n.step === 1
|
|
2575
2700
|
}, null, 8, ["premiere"])) : p.currentKey === "cible" ? (g(), i(b, { key: 2 })) : p.currentKey === "details" ? (g(), i(ee, { key: 3 })) : a("", !0)]),
|
|
2576
|
-
s("div",
|
|
2701
|
+
s("div", gi, [n.step > 1 ? (g(), o("button", {
|
|
2577
2702
|
key: 0,
|
|
2578
2703
|
class: "btn btn-sm btn-outline-secondary",
|
|
2579
2704
|
onClick: t[0] ||= (...e) => p.goPrevious && p.goPrevious(...e)
|
|
2580
2705
|
}, [u(_, {
|
|
2581
2706
|
icon: "chevron-left",
|
|
2582
2707
|
class: "me-1"
|
|
2583
|
-
}), 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", {
|
|
2584
2709
|
key: 2,
|
|
2585
2710
|
class: "btn btn-sm btn-primary",
|
|
2586
2711
|
disabled: !p.canGoNext,
|
|
@@ -2588,7 +2713,7 @@ function si(e, t, n, r, f, p) {
|
|
|
2588
2713
|
}, [t[4] ||= l(" Suivant ", -1), u(_, {
|
|
2589
2714
|
icon: "chevron-right",
|
|
2590
2715
|
class: "ms-1"
|
|
2591
|
-
})], 8,
|
|
2716
|
+
})], 8, vi)) : (g(), o("button", {
|
|
2592
2717
|
key: 3,
|
|
2593
2718
|
class: "btn btn-sm btn-success",
|
|
2594
2719
|
disabled: !p.canCreer || n.creating,
|
|
@@ -2596,21 +2721,21 @@ function si(e, t, n, r, f, p) {
|
|
|
2596
2721
|
}, [u(_, {
|
|
2597
2722
|
icon: "check",
|
|
2598
2723
|
class: "me-1"
|
|
2599
|
-
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8,
|
|
2724
|
+
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8, yi))])
|
|
2600
2725
|
])]),
|
|
2601
2726
|
_: 3
|
|
2602
2727
|
}, 8, ["loading"]);
|
|
2603
2728
|
}
|
|
2604
|
-
var
|
|
2729
|
+
var xi = /*#__PURE__*/ z(fi, [["render", bi]]), Si = (e, { signal: t, baseUrl: n } = {}) => ze("/v2/cresol/creer_sollicitation", e, {
|
|
2605
2730
|
signal: t,
|
|
2606
2731
|
baseUrl: n
|
|
2607
|
-
}),
|
|
2732
|
+
}), Ci = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => ze("/v2/cresol/upload_sollicitation_ged", {
|
|
2608
2733
|
idSollicitation: e,
|
|
2609
2734
|
pj: t
|
|
2610
2735
|
}, {
|
|
2611
2736
|
signal: n,
|
|
2612
2737
|
baseUrl: r
|
|
2613
|
-
}),
|
|
2738
|
+
}), wi = {
|
|
2614
2739
|
modelValue: {
|
|
2615
2740
|
type: Object,
|
|
2616
2741
|
default: null
|
|
@@ -2629,10 +2754,28 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2629
2754
|
"step"
|
|
2630
2755
|
].includes(e)
|
|
2631
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
|
+
},
|
|
2632
2775
|
readonly: {
|
|
2633
2776
|
type: [Boolean, Array],
|
|
2634
2777
|
default: !1,
|
|
2635
|
-
validator: (e) => typeof e == "boolean" || e.every((e) =>
|
|
2778
|
+
validator: (e) => typeof e == "boolean" || e.every((e) => I.includes(e))
|
|
2636
2779
|
},
|
|
2637
2780
|
modules: {
|
|
2638
2781
|
type: Array,
|
|
@@ -2658,7 +2801,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2658
2801
|
type: String,
|
|
2659
2802
|
default: null
|
|
2660
2803
|
}
|
|
2661
|
-
},
|
|
2804
|
+
}, Ti = Object.keys(wi), Ei = [
|
|
2662
2805
|
"update:modelValue",
|
|
2663
2806
|
"reclamantChange",
|
|
2664
2807
|
"motifChange",
|
|
@@ -2667,27 +2810,38 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2667
2810
|
"created",
|
|
2668
2811
|
"createError",
|
|
2669
2812
|
"error"
|
|
2670
|
-
],
|
|
2813
|
+
], Di = {
|
|
2671
2814
|
name: "CreerSollicitationForm",
|
|
2672
2815
|
components: {
|
|
2673
|
-
AsideBlock:
|
|
2674
|
-
StepperBlock:
|
|
2816
|
+
AsideBlock: Me,
|
|
2817
|
+
StepperBlock: xi
|
|
2675
2818
|
},
|
|
2676
|
-
props: { ...
|
|
2677
|
-
emits: [...
|
|
2819
|
+
props: { ...wi },
|
|
2820
|
+
emits: [...Ei],
|
|
2678
2821
|
setup(e, { emit: t }) {
|
|
2679
|
-
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({
|
|
2680
2823
|
onError: n,
|
|
2681
2824
|
...i
|
|
2682
|
-
})), o = y(null), s = r(() => o.value ?? e.modules ?? []), c =
|
|
2825
|
+
})), o = y(null), s = r(() => o.value ?? e.modules ?? []), c = Te(we({
|
|
2683
2826
|
reclamants: r(() => e.reclamantMode === "step" ? [] : e.reclamants),
|
|
2684
2827
|
modules: s,
|
|
2685
2828
|
idModulePrefere: w(e, "idModule"),
|
|
2686
2829
|
readonly: w(e, "readonly")
|
|
2687
2830
|
}));
|
|
2688
|
-
return
|
|
2831
|
+
return ft(v({
|
|
2689
2832
|
nomenclatureFilter: w(e, "nomenclatureFilter"),
|
|
2690
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
|
+
}),
|
|
2691
2845
|
modulesReclamant: s,
|
|
2692
2846
|
...i
|
|
2693
2847
|
})), {
|
|
@@ -2729,7 +2883,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2729
2883
|
let e = this.draft.reclamantSelectionne;
|
|
2730
2884
|
this.$watch("draft.reclamantSelectionne", async (t) => {
|
|
2731
2885
|
this.$emit("reclamantChange", t), await this.chargerModulesReclamant(t, e) && this.draft.syncReclamant();
|
|
2732
|
-
}), 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();
|
|
2733
2887
|
},
|
|
2734
2888
|
methods: {
|
|
2735
2889
|
async chargerModulesReclamant(e, t) {
|
|
@@ -2749,10 +2903,10 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2749
2903
|
if (!await this.autoriserCreation(e)) return;
|
|
2750
2904
|
let t;
|
|
2751
2905
|
try {
|
|
2752
|
-
t = await
|
|
2906
|
+
t = await Si(e, this.requestOptions) ?? [];
|
|
2753
2907
|
} catch (t) {
|
|
2754
|
-
if (
|
|
2755
|
-
let n =
|
|
2908
|
+
if (tt(t)) return;
|
|
2909
|
+
let n = U(t);
|
|
2756
2910
|
this.$emit("createError", {
|
|
2757
2911
|
error: t,
|
|
2758
2912
|
message: n,
|
|
@@ -2802,7 +2956,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2802
2956
|
message: t
|
|
2803
2957
|
};
|
|
2804
2958
|
};
|
|
2805
|
-
return a?.id ?
|
|
2959
|
+
return a?.id ? Ci({
|
|
2806
2960
|
idSollicitation: a.id,
|
|
2807
2961
|
pj: {
|
|
2808
2962
|
name: n.name,
|
|
@@ -2813,18 +2967,18 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2813
2967
|
...o,
|
|
2814
2968
|
ok: !0,
|
|
2815
2969
|
message: null
|
|
2816
|
-
})).catch((e) => s(
|
|
2970
|
+
})).catch((e) => s(U(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
|
|
2817
2971
|
});
|
|
2818
2972
|
return Promise.all(n);
|
|
2819
2973
|
}
|
|
2820
2974
|
}
|
|
2821
|
-
},
|
|
2975
|
+
}, Oi = { class: "row g-3" }, ki = {
|
|
2822
2976
|
key: 0,
|
|
2823
2977
|
class: "col-12 col-lg-4"
|
|
2824
2978
|
};
|
|
2825
|
-
function
|
|
2979
|
+
function Ai(e, t, n, r, i, l) {
|
|
2826
2980
|
let f = S("aside-block"), p = S("stepper-block");
|
|
2827
|
-
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"] ? {
|
|
2828
2982
|
name: "similaires",
|
|
2829
2983
|
fn: E((t) => [x(e.$slots, "aside-similaires", h(d(t)))]),
|
|
2830
2984
|
key: "0"
|
|
@@ -2848,14 +3002,14 @@ function hi(e, t, n, r, i, l) {
|
|
|
2848
3002
|
"onSubmit"
|
|
2849
3003
|
])], 2)]);
|
|
2850
3004
|
}
|
|
2851
|
-
var
|
|
3005
|
+
var ji = /*#__PURE__*/ z(Di, [["render", Ai]]), Mi = {
|
|
2852
3006
|
name: "CreerSollicitationModal",
|
|
2853
3007
|
components: {
|
|
2854
3008
|
AmsomModal: e,
|
|
2855
|
-
CreerSollicitationForm:
|
|
3009
|
+
CreerSollicitationForm: ji
|
|
2856
3010
|
},
|
|
2857
3011
|
props: {
|
|
2858
|
-
...
|
|
3012
|
+
...wi,
|
|
2859
3013
|
titre: {
|
|
2860
3014
|
type: String,
|
|
2861
3015
|
default: "Nouvelle sollicitation"
|
|
@@ -2865,36 +3019,36 @@ var $ = /*#__PURE__*/ F(fi, [["render", hi]]), gi = {
|
|
|
2865
3019
|
default: !0
|
|
2866
3020
|
}
|
|
2867
3021
|
},
|
|
2868
|
-
emits: [...
|
|
3022
|
+
emits: [...Ei, "close"],
|
|
2869
3023
|
computed: {
|
|
2870
3024
|
formProps() {
|
|
2871
|
-
return Object.fromEntries(
|
|
3025
|
+
return Object.fromEntries(Ti.map((e) => [e, this[e]]));
|
|
2872
3026
|
},
|
|
2873
3027
|
formListeners() {
|
|
2874
|
-
return Object.fromEntries(
|
|
3028
|
+
return Object.fromEntries(Ei.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
|
|
2875
3029
|
}
|
|
2876
3030
|
},
|
|
2877
3031
|
methods: { onCreated(...e) {
|
|
2878
3032
|
this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
|
|
2879
3033
|
} }
|
|
2880
|
-
},
|
|
2881
|
-
function
|
|
3034
|
+
}, Ni = { class: "fw-medium fs-5" };
|
|
3035
|
+
function Pi(e, t, n, r, a, o) {
|
|
2882
3036
|
let l = S("creer-sollicitation-form"), f = S("amsom-modal");
|
|
2883
3037
|
return g(), i(f, {
|
|
2884
3038
|
"close-option": "",
|
|
2885
3039
|
size: "xl",
|
|
2886
3040
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
2887
3041
|
}, {
|
|
2888
|
-
default: E(() => [s("span",
|
|
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) => ({
|
|
2889
3043
|
name: n,
|
|
2890
3044
|
fn: E((t) => [x(e.$slots, n, h(d(t ?? {})))])
|
|
2891
3045
|
}))]), 1040, ["onCreated"])]),
|
|
2892
3046
|
_: 3
|
|
2893
3047
|
});
|
|
2894
3048
|
}
|
|
2895
|
-
var
|
|
2896
|
-
CreerSollicitationModal:
|
|
2897
|
-
CreerSollicitationForm:
|
|
3049
|
+
var Fi = /*#__PURE__*/ z(Mi, [["render", Pi]]), Ii = {
|
|
3050
|
+
CreerSollicitationModal: Fi,
|
|
3051
|
+
CreerSollicitationForm: ji
|
|
2898
3052
|
};
|
|
2899
3053
|
//#endregion
|
|
2900
|
-
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 };
|