@amsom-habitat/cresol 0.2.6 → 0.2.8
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 +20 -15
- package/dist/cresol.js +354 -339
- package/dist/cresol.umd.cjs +1 -1
- package/package.json +10 -10
package/dist/cresol.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { library as e } from "@fortawesome/fontawesome-svg-core";
|
|
2
2
|
import { faBriefcase as t, faBuilding as n, faBuildingShield as r, faCheck as i, faChevronLeft as a, faChevronRight as o, faCircleExclamation as s, faCircleInfo as c, faCircleQuestion as l, faDungeon as u, faFileSignature as d, faHandsHolding as f, faHourglass as p, faHouse as ee, faInfo as m, faLayerGroup as h, faLocationDot as te, faMagnifyingGlass as ne, faPersonShelter as re, faSquareParking as ie, faStore as ae, faTag as oe, faUser as se, faUserGraduate as ce, faXmark as le } from "@fortawesome/free-solid-svg-icons";
|
|
3
3
|
import { AmsomModal as ue, AmsomOverlay as g } from "@amsom-habitat/ui";
|
|
4
|
-
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as
|
|
5
|
-
import { AmsomNavTabsHorizontal as
|
|
6
|
-
import
|
|
7
|
-
import { AmsomAutocomplete as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { AmsomTextarea as
|
|
11
|
-
import { AmsomUploadFile as
|
|
12
|
-
|
|
4
|
+
import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as de, createTextVNode as C, createVNode as w, guardReactiveProps as T, inject as fe, mergeProps as pe, normalizeClass as E, normalizeProps as D, openBlock as O, provide as me, reactive as k, ref as A, renderList as j, renderSlot as M, resolveComponent as N, toDisplayString as P, toHandlers as he, toRef as F, unref as I, vShow as ge, withCtx as L, withDirectives as _e } from "vue";
|
|
5
|
+
import { AmsomNavTabsHorizontal as ve } from "@amsom-habitat/nav-tabs";
|
|
6
|
+
import ye from "@amsom-habitat/horizontal-stepper";
|
|
7
|
+
import { AmsomAutocomplete as R } from "@amsom-habitat/amsom-autocomplete";
|
|
8
|
+
import be from "@amsom-habitat/axios-overlay";
|
|
9
|
+
import z from "@amsom-habitat/user-manager";
|
|
10
|
+
import { AmsomTextarea as xe } from "@amsom-habitat/amsom-textarea";
|
|
11
|
+
import { AmsomUploadFile as Se } from "@amsom-habitat/file-manager";
|
|
12
|
+
// src/icons.js
|
|
13
13
|
e.add(t, n, r, i, a, o, s, c, l, u, d, f, p, ee, m, h, te, ne, re, ie, ae, oe, se, ce, le);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
var V = {
|
|
14
|
+
// src/utils/provenanceContact.js
|
|
15
|
+
var B = {
|
|
17
16
|
T: "phone",
|
|
18
17
|
M: "envelope",
|
|
19
18
|
G: "user-shield",
|
|
20
19
|
V: "building",
|
|
21
20
|
IP: "exclamation-triangle",
|
|
22
21
|
C: "envelope-open"
|
|
23
|
-
},
|
|
22
|
+
}, Ce = "comment-dots", we = (e) => B[e] ?? "comment-dots", Te = Object.keys(B), Ee = "T", V = {
|
|
24
23
|
locataire: {
|
|
25
24
|
libelle: "Locataire",
|
|
26
25
|
icon: "house-user",
|
|
@@ -56,14 +55,14 @@ var V = {
|
|
|
56
55
|
icon: "circle-question",
|
|
57
56
|
couleur: "danger"
|
|
58
57
|
}
|
|
59
|
-
},
|
|
60
|
-
...Object.fromEntries(
|
|
58
|
+
}, De = ["L", "P"], Oe = {
|
|
59
|
+
...Object.fromEntries(De.map((e) => [e, "locataire"])),
|
|
61
60
|
D: "demandeur",
|
|
62
61
|
T: "tiers",
|
|
63
62
|
U: "autre",
|
|
64
63
|
F: "fournisseur",
|
|
65
64
|
E: "personnel"
|
|
66
|
-
},
|
|
65
|
+
}, H = Object.keys(Oe), ke = (e) => [...new Set(e.map((e) => Oe[e]))], Ae = (e) => e ? V[e.categorie] ? e.categorie : Oe[e.type] ?? "inconnu" : null, je = (e) => V[Ae(e)] ?? null, Me = Symbol("cresol:draft"), U = () => ({
|
|
67
66
|
idCommune: null,
|
|
68
67
|
commune: null,
|
|
69
68
|
idEntree: null,
|
|
@@ -78,7 +77,7 @@ var V = {
|
|
|
78
77
|
typeContratActuel: null,
|
|
79
78
|
idContratActuel: null,
|
|
80
79
|
occupantActuel: null
|
|
81
|
-
}),
|
|
80
|
+
}), W = () => ({
|
|
82
81
|
idMotif: null,
|
|
83
82
|
idCategorie: null,
|
|
84
83
|
idType: null,
|
|
@@ -112,9 +111,9 @@ var V = {
|
|
|
112
111
|
},
|
|
113
112
|
provenance: e,
|
|
114
113
|
lignes: [{
|
|
115
|
-
...
|
|
114
|
+
...W(),
|
|
116
115
|
cibleMode: "contrat",
|
|
117
|
-
patrimoine:
|
|
116
|
+
patrimoine: U(),
|
|
118
117
|
description: ""
|
|
119
118
|
}]
|
|
120
119
|
}), Fe = (e) => e?.id ?? e ?? null, Ie = (e) => {
|
|
@@ -127,11 +126,11 @@ var V = {
|
|
|
127
126
|
return e.etage != null && !e.libelleModule && t.push(`Étage ${e.etage}`), t.length ? t.join(" — ") : "Cible non définie";
|
|
128
127
|
}, Le = (e) => !!e && (e.idModule != null || e.idEntree != null), Re = (e, t) => e.cibleMode === "demande" || !e.cibleOverride && e.patrimoine == null ? !0 : e.cibleMode === "contrat" ? !!(e.contratReclamant && t || e.contratCible) && e.patrimoine?.idModule != null : e.modulePrecis ? e.patrimoine?.idModule != null : Le(e.patrimoine), ze = (e, t) => e.description == null ? !t : e.description.trim().length > 0, Be = (e = {}) => {
|
|
129
128
|
let t = {
|
|
130
|
-
...
|
|
129
|
+
...W(),
|
|
131
130
|
...e
|
|
132
131
|
};
|
|
133
132
|
return e.patrimoine && (t.patrimoine = {
|
|
134
|
-
...
|
|
133
|
+
...U(),
|
|
135
134
|
...e.patrimoine
|
|
136
135
|
}), t;
|
|
137
136
|
}, Ve = (e) => {
|
|
@@ -152,17 +151,17 @@ var V = {
|
|
|
152
151
|
} : Be(e)) : t.lignes
|
|
153
152
|
};
|
|
154
153
|
};
|
|
155
|
-
function He({ reclamants: e, modules: t, idModulePrefere: n =
|
|
156
|
-
let i =
|
|
157
|
-
let e =
|
|
154
|
+
function He({ reclamants: e, modules: t, idModulePrefere: n = A(null), readonly: r = A(!1) } = {}) {
|
|
155
|
+
let i = k(Pe()), a = v(() => {
|
|
156
|
+
let e = I(r);
|
|
158
157
|
return e === !0 ? Ne : Array.isArray(e) ? e : [];
|
|
159
|
-
}), o = (e) => a.value.includes(e), s = v(() => i.lignes[0]), c = v(() => i.lignes.slice(1)), l = v(() =>
|
|
158
|
+
}), o = (e) => a.value.includes(e), s = v(() => i.lignes[0]), c = v(() => i.lignes.slice(1)), l = v(() => I(e) ?? []), u = A(null), d = (e, t) => e.type === t.type && String(e.id) === String(t.id), f = v(() => {
|
|
160
159
|
let e = u.value;
|
|
161
160
|
return !e || l.value.some((t) => d(t, e)) ? l.value : [...l.value, e];
|
|
162
161
|
}), p = v(() => f.value.find((e) => d(e, i.reclamant)) ?? f.value[0] ?? null), ee = v(() => {
|
|
163
|
-
let e =
|
|
162
|
+
let e = I(t) ?? [], r = I(n);
|
|
164
163
|
return (r == null ? null : e.find((e) => String(e.idModule) === String(r))) ?? e.find((e) => e.estModulePrincipal) ?? e[0] ?? null;
|
|
165
|
-
}), m = v(() => !!p.value &&
|
|
164
|
+
}), m = v(() => !!p.value && De.includes(p.value.type)), h = {
|
|
166
165
|
draft: i,
|
|
167
166
|
lignePrincipale: s,
|
|
168
167
|
lignesAssociees: c,
|
|
@@ -197,7 +196,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly:
|
|
|
197
196
|
id: t ?? null
|
|
198
197
|
}, o("cible")) return;
|
|
199
198
|
let n = i.lignes[0];
|
|
200
|
-
e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = m.value ? "contrat" : "patrimoine", n.contratReclamant = m.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine =
|
|
199
|
+
e === "D" ? (n.cibleMode = "demande", n.patrimoine = null) : (n.cibleMode = m.value ? "contrat" : "patrimoine", n.contratReclamant = m.value, n.contratCible = null, n.reprendreLocataireActuel = !1, n.patrimoine = U(), h.prefillCiblePrincipale());
|
|
201
200
|
},
|
|
202
201
|
prefillCiblePrincipale() {
|
|
203
202
|
if (o("cible")) return;
|
|
@@ -229,7 +228,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly:
|
|
|
229
228
|
toggleLigneAssociee(e, t = {}) {
|
|
230
229
|
let n = i.lignes.findIndex((t, n) => n > 0 && t.idMotif === e);
|
|
231
230
|
n === -1 ? i.lignes.push({
|
|
232
|
-
...
|
|
231
|
+
...W(),
|
|
233
232
|
idMotif: e,
|
|
234
233
|
...t
|
|
235
234
|
}) : i.lignes.splice(n, 1);
|
|
@@ -239,7 +238,7 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly:
|
|
|
239
238
|
},
|
|
240
239
|
setCibleMode(e, t) {
|
|
241
240
|
let n = i.lignes[e];
|
|
242
|
-
n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && m.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??=
|
|
241
|
+
n && (n.cibleMode = t, n.reprendreLocataireActuel = !1, n.modulePrecis = !0, n.contratReclamant = t === "contrat" && m.value, n.contratCible = null, t === "demande" ? n.patrimoine = null : n.patrimoine ??= U());
|
|
243
242
|
},
|
|
244
243
|
setModulePrecis(e, t) {
|
|
245
244
|
let n = i.lignes[e];
|
|
@@ -385,25 +384,24 @@ function He({ reclamants: e, modules: t, idModulePrefere: n = j(null), readonly:
|
|
|
385
384
|
};
|
|
386
385
|
}
|
|
387
386
|
};
|
|
388
|
-
return
|
|
387
|
+
return k(h);
|
|
389
388
|
}
|
|
390
389
|
function Ue(e) {
|
|
391
|
-
return
|
|
390
|
+
return me(Me, e), e;
|
|
392
391
|
}
|
|
393
392
|
function G() {
|
|
394
|
-
let e =
|
|
393
|
+
let e = fe(Me, null);
|
|
395
394
|
if (!e) throw Error("useSollicitationDraft() hors de <creer-sollicitation-form>");
|
|
396
395
|
return e;
|
|
397
396
|
}
|
|
398
|
-
|
|
399
|
-
//#region \0plugin-vue:export-helper
|
|
397
|
+
// \0plugin-vue:export-helper
|
|
400
398
|
var K = (e, t) => {
|
|
401
399
|
let n = e.__vccOpts || e;
|
|
402
400
|
for (let [e, r] of t) n[e] = r;
|
|
403
401
|
return n;
|
|
404
402
|
}, We = {
|
|
405
403
|
name: "AsideBlock",
|
|
406
|
-
components: { AmsomNavTabsHorizontal:
|
|
404
|
+
components: { AmsomNavTabsHorizontal: ve },
|
|
407
405
|
props: { nbSimilaires: {
|
|
408
406
|
type: Number,
|
|
409
407
|
default: 0
|
|
@@ -450,8 +448,8 @@ var K = (e, t) => {
|
|
|
450
448
|
class: "badge bg-danger ms-1"
|
|
451
449
|
}, Ke = { style: { "min-height": "320px" } }, qe = { key: 0 }, Je = { key: 1 };
|
|
452
450
|
function Ye(e, t, n, r, i, a) {
|
|
453
|
-
let o =
|
|
454
|
-
return a.tabs.length ? (
|
|
451
|
+
let o = N("font-awesome-icon"), s = N("amsom-nav-tabs-horizontal");
|
|
452
|
+
return a.tabs.length ? (O(), y(s, {
|
|
455
453
|
key: 0,
|
|
456
454
|
modelValue: i.activeTab,
|
|
457
455
|
"onUpdate:modelValue": t[0] ||= (e) => i.activeTab = e,
|
|
@@ -459,28 +457,27 @@ function Ye(e, t, n, r, i, a) {
|
|
|
459
457
|
"item-key": "id",
|
|
460
458
|
"tab-spacing": 1
|
|
461
459
|
}, {
|
|
462
|
-
libelle:
|
|
463
|
-
|
|
464
|
-
S("span", null,
|
|
465
|
-
e.id === "similarite" && n.nbSimilaires > 0 ? (
|
|
460
|
+
libelle: L(({ item: e }) => [
|
|
461
|
+
w(o, { icon: e.icon }, null, 8, ["icon"]),
|
|
462
|
+
S("span", null, P(e.label), 1),
|
|
463
|
+
e.id === "similarite" && n.nbSimilaires > 0 ? (O(), x("span", Ge, P(n.nbSimilaires), 1)) : b("", !0)
|
|
466
464
|
]),
|
|
467
|
-
content:
|
|
465
|
+
content: L(() => [S("div", Ke, [e.$slots.similaires ? _e((O(), x("div", qe, [M(e.$slots, "similaires", D(T(a.scope)))], 512)), [[ge, i.activeTab === "similarite"]]) : b("", !0), e.$slots.evenements ? _e((O(), x("div", Je, [M(e.$slots, "evenements")], 512)), [[ge, i.activeTab === "evenements"]]) : b("", !0)])]),
|
|
468
466
|
_: 3
|
|
469
467
|
}, 8, ["modelValue", "items"])) : b("", !0);
|
|
470
468
|
}
|
|
471
469
|
var Xe = /*#__PURE__*/ K(We, [["render", Ye]]), Ze = {
|
|
472
470
|
baseUrl: "",
|
|
473
|
-
getToken: () =>
|
|
474
|
-
setToken: (e) =>
|
|
475
|
-
logout: () =>
|
|
476
|
-
goToLoginPage: () =>
|
|
471
|
+
getToken: () => z.getToken(),
|
|
472
|
+
setToken: (e) => z.setToken(e),
|
|
473
|
+
logout: () => z.logout(),
|
|
474
|
+
goToLoginPage: () => z.goToLoginPage()
|
|
477
475
|
};
|
|
478
476
|
function Qe(e = {}) {
|
|
479
477
|
Object.assign(Ze, e);
|
|
480
478
|
}
|
|
481
479
|
var $e = () => Ze;
|
|
482
|
-
|
|
483
|
-
//#region src/api/transport/axiosOverlayConnector.js
|
|
480
|
+
// src/api/transport/axiosOverlayConnector.js
|
|
484
481
|
function et(e, t = {}) {
|
|
485
482
|
let n = $e(), r = {
|
|
486
483
|
getToken: () => n.getToken?.() ?? null,
|
|
@@ -504,10 +501,9 @@ function et(e, t = {}) {
|
|
|
504
501
|
}, t.functions.errorsHandlers = {
|
|
505
502
|
...r.errorsHandlers,
|
|
506
503
|
...t.functions.errorsHandlers ?? {}
|
|
507
|
-
},
|
|
504
|
+
}, be(e, t);
|
|
508
505
|
}
|
|
509
|
-
|
|
510
|
-
//#region src/api/transport/httpClient.js
|
|
506
|
+
// src/api/transport/httpClient.js
|
|
511
507
|
var tt = (e, t) => {
|
|
512
508
|
let n = t || $e().baseUrl;
|
|
513
509
|
if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
|
|
@@ -592,8 +588,7 @@ var tt = (e, t) => {
|
|
|
592
588
|
signal: n,
|
|
593
589
|
baseUrl: r
|
|
594
590
|
});
|
|
595
|
-
|
|
596
|
-
//#region src/utils/apiError.js
|
|
591
|
+
// src/utils/apiError.js
|
|
597
592
|
function bt(e) {
|
|
598
593
|
let t = e?.response?.data;
|
|
599
594
|
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";
|
|
@@ -611,13 +606,13 @@ var xt = (e) => e?.name === "AbortError" || e?.name === "CanceledError", St = Sy
|
|
|
611
606
|
modulesByProgramme: {},
|
|
612
607
|
modulesByContrat: {},
|
|
613
608
|
responsablesByMotif: {}
|
|
614
|
-
}), wt = /* @__PURE__ */ new Map(), Tt = (e) => (wt.has(e) || wt.set(e,
|
|
609
|
+
}), wt = /* @__PURE__ */ new Map(), Tt = (e) => (wt.has(e) || wt.set(e, k(Ct())), wt.get(e)), Y = /* @__PURE__ */ new Map();
|
|
615
610
|
function Et() {
|
|
616
611
|
wt.clear(), Y.clear();
|
|
617
612
|
}
|
|
618
613
|
var X = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, Dt = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
|
|
619
614
|
function Ot({ onError: e, baseUrl: t } = {}) {
|
|
620
|
-
let n =
|
|
615
|
+
let n = A(0), r = () => ({ baseUrl: I(t) || null }), i = () => I(t) || $e().baseUrl || "", a = () => Tt(i()), o = (t, r) => {
|
|
621
616
|
let a = `${i()}|${t}`;
|
|
622
617
|
if (Y.has(a)) return Y.get(a);
|
|
623
618
|
n.value += 1;
|
|
@@ -763,18 +758,17 @@ function Ot({ onError: e, baseUrl: t } = {}) {
|
|
|
763
758
|
typeIcon: (e) => Dt(a().types, "id", e),
|
|
764
759
|
natureIcon: (e) => Dt(a().natures, "id", e)
|
|
765
760
|
};
|
|
766
|
-
return
|
|
761
|
+
return k(c);
|
|
767
762
|
}
|
|
768
763
|
function kt(e) {
|
|
769
|
-
return
|
|
764
|
+
return me(St, e), e;
|
|
770
765
|
}
|
|
771
766
|
function Z() {
|
|
772
|
-
let e =
|
|
767
|
+
let e = fe(St, null);
|
|
773
768
|
if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
|
|
774
769
|
return e;
|
|
775
770
|
}
|
|
776
|
-
|
|
777
|
-
//#region src/utils/fontAwesomeIcons.js
|
|
771
|
+
// src/utils/fontAwesomeIcons.js
|
|
778
772
|
var At = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
779
773
|
async function jt(t) {
|
|
780
774
|
let n = await import("@fortawesome/free-solid-svg-icons");
|
|
@@ -783,8 +777,7 @@ async function jt(t) {
|
|
|
783
777
|
r && e.add(r);
|
|
784
778
|
});
|
|
785
779
|
}
|
|
786
|
-
|
|
787
|
-
//#region src/utils/date.js
|
|
780
|
+
// src/utils/date.js
|
|
788
781
|
function Mt(e) {
|
|
789
782
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
790
783
|
}
|
|
@@ -794,10 +787,9 @@ function Nt(e) {
|
|
|
794
787
|
function Pt(e) {
|
|
795
788
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
|
|
796
789
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
jt(Object.values(H).map((e) => e.icon)).then(() => {
|
|
790
|
+
// src/composables/useCresolContext.js
|
|
791
|
+
var Ft = Symbol("cresol:options"), It = (e) => me(Ft, e), Q = () => fe(Ft, {}), Lt = A(!1);
|
|
792
|
+
jt(Object.values(V).map((e) => e.icon)).then(() => {
|
|
801
793
|
Lt.value = !0;
|
|
802
794
|
});
|
|
803
795
|
var Rt = {
|
|
@@ -816,26 +808,26 @@ var Rt = {
|
|
|
816
808
|
return { iconsReady: Lt };
|
|
817
809
|
},
|
|
818
810
|
computed: { type() {
|
|
819
|
-
return
|
|
811
|
+
return je(this.reclamant);
|
|
820
812
|
} }
|
|
821
813
|
}, zt = ["title"], Bt = { key: 1 };
|
|
822
814
|
function Vt(e, t, n, r, i, a) {
|
|
823
|
-
let o =
|
|
824
|
-
return a.type ? (
|
|
815
|
+
let o = N("font-awesome-icon");
|
|
816
|
+
return a.type ? (O(), x("span", {
|
|
825
817
|
key: 0,
|
|
826
|
-
class:
|
|
818
|
+
class: E(["badge d-inline-flex align-items-center gap-1 border flex-shrink-0", `bg-${a.type.couleur}-subtle text-${a.type.couleur}-emphasis border-${a.type.couleur}-subtle`]),
|
|
827
819
|
title: a.type.libelle
|
|
828
|
-
}, [r.iconsReady ? (
|
|
820
|
+
}, [r.iconsReady ? (O(), y(o, {
|
|
829
821
|
key: 0,
|
|
830
822
|
icon: a.type.icon,
|
|
831
823
|
"fixed-width": ""
|
|
832
|
-
}, null, 8, ["icon"])) : b("", !0), n.iconOnly ? b("", !0) : (
|
|
824
|
+
}, null, 8, ["icon"])) : b("", !0), n.iconOnly ? b("", !0) : (O(), x("span", Bt, P(a.type.libelle), 1))], 10, zt)) : b("", !0);
|
|
833
825
|
}
|
|
834
826
|
var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
835
827
|
{
|
|
836
828
|
key: "locataire",
|
|
837
829
|
label: "Locataire",
|
|
838
|
-
icon:
|
|
830
|
+
icon: V.locataire.icon,
|
|
839
831
|
recherche: "Rechercher un locataire",
|
|
840
832
|
aucun: "Aucun locataire trouvé.",
|
|
841
833
|
placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
|
|
@@ -843,7 +835,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
843
835
|
{
|
|
844
836
|
key: "demandeur",
|
|
845
837
|
label: "Demandeur",
|
|
846
|
-
icon:
|
|
838
|
+
icon: V.demandeur.icon,
|
|
847
839
|
recherche: "Rechercher un demandeur",
|
|
848
840
|
aucun: "Aucun demandeur trouvé.",
|
|
849
841
|
placeholder: "Nom, prénom, n° de demande ou unique, téléphone ou mail…"
|
|
@@ -851,7 +843,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
851
843
|
{
|
|
852
844
|
key: "tiers",
|
|
853
845
|
label: "Tiers",
|
|
854
|
-
icon:
|
|
846
|
+
icon: V.tiers.icon,
|
|
855
847
|
recherche: "Rechercher un tiers",
|
|
856
848
|
aucun: "Aucun tiers trouvé.",
|
|
857
849
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -859,7 +851,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
859
851
|
{
|
|
860
852
|
key: "autre",
|
|
861
853
|
label: "Autre",
|
|
862
|
-
icon:
|
|
854
|
+
icon: V.autre.icon,
|
|
863
855
|
recherche: "Rechercher un individu « Autre »",
|
|
864
856
|
aucun: "Aucun individu « Autre » trouvé.",
|
|
865
857
|
placeholder: "Nom, prénom, adresse, téléphone ou mail…"
|
|
@@ -867,7 +859,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
867
859
|
{
|
|
868
860
|
key: "fournisseur",
|
|
869
861
|
label: "Fournisseur",
|
|
870
|
-
icon:
|
|
862
|
+
icon: V.fournisseur.icon,
|
|
871
863
|
recherche: "Rechercher un fournisseur",
|
|
872
864
|
aucun: "Aucun fournisseur trouvé.",
|
|
873
865
|
placeholder: "Raison sociale, adresse, téléphone ou mail…"
|
|
@@ -875,7 +867,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
875
867
|
{
|
|
876
868
|
key: "personnel",
|
|
877
869
|
label: "Personnel",
|
|
878
|
-
icon:
|
|
870
|
+
icon: V.personnel.icon,
|
|
879
871
|
recherche: "Rechercher un collaborateur",
|
|
880
872
|
aucun: "Aucun collaborateur trouvé.",
|
|
881
873
|
placeholder: "Nom, prénom, téléphone ou mail…"
|
|
@@ -895,7 +887,8 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
895
887
|
}, Gt = {
|
|
896
888
|
name: "ReclamantRechercheBlock",
|
|
897
889
|
components: {
|
|
898
|
-
AmsomAutocomplete:
|
|
890
|
+
AmsomAutocomplete: R,
|
|
891
|
+
AmsomOverlay: g,
|
|
899
892
|
ReclamantTypeBadgeComponent: Ht
|
|
900
893
|
},
|
|
901
894
|
setup() {
|
|
@@ -916,10 +909,10 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
916
909
|
},
|
|
917
910
|
computed: {
|
|
918
911
|
typesAutorises() {
|
|
919
|
-
return this.options.typesReclamant ??
|
|
912
|
+
return this.options.typesReclamant ?? H;
|
|
920
913
|
},
|
|
921
914
|
autorisees() {
|
|
922
|
-
return
|
|
915
|
+
return ke(this.typesAutorises);
|
|
923
916
|
},
|
|
924
917
|
categories() {
|
|
925
918
|
return Ut.filter((e) => e.key === "tout" ? this.autorisees.length > 1 : this.autorisees.includes(e.key));
|
|
@@ -939,6 +932,9 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
939
932
|
}
|
|
940
933
|
}
|
|
941
934
|
},
|
|
935
|
+
watch: { selectionne(e) {
|
|
936
|
+
this.categorie !== "tout" && (this.categorie = this.categorieOf(e) ?? this.categorie);
|
|
937
|
+
} },
|
|
942
938
|
async created() {
|
|
943
939
|
this.categorie = this.categorieOf(this.selectionne) ?? this.categories[0]?.key ?? null, await jt(Ut.map((e) => e.icon)), this.iconsReady = !0;
|
|
944
940
|
},
|
|
@@ -947,7 +943,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
947
943
|
},
|
|
948
944
|
methods: {
|
|
949
945
|
select(e) {
|
|
950
|
-
e &&
|
|
946
|
+
e && this.draft.selectReclamant(e);
|
|
951
947
|
},
|
|
952
948
|
setCategorie(e) {
|
|
953
949
|
e !== this.categorie && (this.categorie = e, clearTimeout(this.rechercheTimeout), this.controller?.abort(), this.trouves = [], this.rechercheEnCours = !1, this.rechercheFaite = !1);
|
|
@@ -967,7 +963,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
967
963
|
return e ? `${e.type}|${e.id}` : null;
|
|
968
964
|
},
|
|
969
965
|
categorieOf(e) {
|
|
970
|
-
let t =
|
|
966
|
+
let t = Ae(e);
|
|
971
967
|
return this.autorisees.includes(t) ? t : null;
|
|
972
968
|
},
|
|
973
969
|
sortiLibelle(e) {
|
|
@@ -984,11 +980,11 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
984
980
|
referenceOf(e) {
|
|
985
981
|
if (!e?.individus) return "";
|
|
986
982
|
let t = this.categorieOf(e);
|
|
987
|
-
return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" :
|
|
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 »" : je(e).libelle;
|
|
988
984
|
},
|
|
989
985
|
detailOf(e) {
|
|
990
986
|
let t = e?.individus ?? [];
|
|
991
|
-
if (!["locataire", "demandeur"].includes(
|
|
987
|
+
if (!["locataire", "demandeur"].includes(Ae(e))) {
|
|
992
988
|
let e = t[0];
|
|
993
989
|
return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
|
|
994
990
|
}
|
|
@@ -998,10 +994,7 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
998
994
|
}).join(", ");
|
|
999
995
|
}
|
|
1000
996
|
}
|
|
1001
|
-
}, Kt = {
|
|
1002
|
-
key: 0,
|
|
1003
|
-
class: "d-flex flex-column gap-3"
|
|
1004
|
-
}, qt = { class: "d-flex flex-wrap gap-2" }, Jt = ["onClick"], Yt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Xt = { class: "min-w-0" }, Zt = {
|
|
997
|
+
}, Kt = { class: "d-flex flex-column gap-3" }, qt = { class: "d-flex flex-wrap gap-2" }, Jt = ["onClick"], Yt = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Xt = { class: "min-w-0" }, Zt = {
|
|
1005
998
|
key: 0,
|
|
1006
999
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
1007
1000
|
}, Qt = { class: "text-muted d-block text-truncate" }, $t = { key: 0 }, en = {
|
|
@@ -1012,58 +1005,64 @@ var Ht = /*#__PURE__*/ K(Rt, [["render", Vt]]), Ut = [
|
|
|
1012
1005
|
class: "text-muted"
|
|
1013
1006
|
};
|
|
1014
1007
|
function nn(e, t, n, r, i, a) {
|
|
1015
|
-
let o =
|
|
1016
|
-
return i.iconsReady ? (
|
|
1017
|
-
key:
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
"
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1008
|
+
let o = N("font-awesome-icon"), s = N("reclamant-type-badge-component"), c = N("amsom-autocomplete"), l = N("amsom-overlay");
|
|
1009
|
+
return i.iconsReady ? (O(), y(l, {
|
|
1010
|
+
key: 0,
|
|
1011
|
+
loading: r.options.repriseReclamant
|
|
1012
|
+
}, {
|
|
1013
|
+
default: L(() => [S("div", Kt, [S("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le réclamant est… ", -1), S("div", qt, [(O(!0), x(_, null, j(a.categories, (e) => (O(), x("button", {
|
|
1014
|
+
key: e.key,
|
|
1015
|
+
type: "button",
|
|
1016
|
+
class: E(["btn btn-sm d-inline-flex align-items-center gap-2", i.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
|
|
1017
|
+
onClick: (t) => a.setCategorie(e.key)
|
|
1018
|
+
}, [w(o, {
|
|
1019
|
+
icon: e.icon,
|
|
1020
|
+
"fixed-width": ""
|
|
1021
|
+
}, null, 8, ["icon"]), S("span", null, P(e.label), 1)], 10, Jt))), 128))])]), S("div", null, [
|
|
1022
|
+
S("label", Yt, P(a.categorieCourante.recherche), 1),
|
|
1023
|
+
(O(), y(c, {
|
|
1024
|
+
key: i.categorie,
|
|
1025
|
+
modelValue: a.selectedTrouve,
|
|
1026
|
+
"onUpdate:modelValue": t[0] ||= (e) => a.selectedTrouve = e,
|
|
1027
|
+
items: i.trouves,
|
|
1028
|
+
"filtering-function": ({ items: e }) => e,
|
|
1029
|
+
loading: i.rechercheEnCours,
|
|
1030
|
+
"get-id": a.cleReclamant,
|
|
1031
|
+
"get-input-libelle": (e) => e?.libelle ?? "",
|
|
1032
|
+
placeholder: a.categorieCourante.placeholder,
|
|
1033
|
+
"input-size": "sm",
|
|
1034
|
+
"hide-choices": "",
|
|
1035
|
+
"debounce-delay": 0,
|
|
1036
|
+
onSearch: a.rechercherPlusTard
|
|
1037
|
+
}, {
|
|
1038
|
+
options: L((e) => [S("div", Xt, [
|
|
1039
|
+
S("div", { class: E(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [
|
|
1040
|
+
w(s, {
|
|
1041
|
+
reclamant: e,
|
|
1042
|
+
"icon-only": "",
|
|
1043
|
+
class: "me-1"
|
|
1044
|
+
}, null, 8, ["reclamant"]),
|
|
1045
|
+
C(" " + P(a.titreOf(e)) + " ", 1),
|
|
1046
|
+
e?.estActif ? b("", !0) : (O(), x("span", Zt, P(a.categorieOf(e) === "demandeur" ? "inactive" : a.sortiLibelle(e)), 1))
|
|
1047
|
+
], 2),
|
|
1048
|
+
S("small", Qt, [C(P(a.referenceOf(e)) + " ", 1), e?.adresse ? (O(), x("span", $t, " — " + P(e.adresse), 1)) : b("", !0)]),
|
|
1049
|
+
a.detailOf(e) ? (O(), x("small", en, P(a.detailOf(e)), 1)) : b("", !0)
|
|
1050
|
+
])]),
|
|
1051
|
+
_: 1
|
|
1052
|
+
}, 8, [
|
|
1053
|
+
"modelValue",
|
|
1054
|
+
"items",
|
|
1055
|
+
"filtering-function",
|
|
1056
|
+
"loading",
|
|
1057
|
+
"get-id",
|
|
1058
|
+
"get-input-libelle",
|
|
1059
|
+
"placeholder",
|
|
1060
|
+
"onSearch"
|
|
1061
|
+
])),
|
|
1062
|
+
i.rechercheFaite && !i.rechercheEnCours && !i.trouves.length ? (O(), x("small", tn, P(a.categorieCourante.aucun), 1)) : b("", !0)
|
|
1063
|
+
])])]),
|
|
1064
|
+
_: 1
|
|
1065
|
+
}, 8, ["loading"])) : b("", !0);
|
|
1067
1066
|
}
|
|
1068
1067
|
var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
|
|
1069
1068
|
name: "ProvenanceSelecteurBlock",
|
|
@@ -1095,9 +1094,9 @@ var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
|
|
|
1095
1094
|
}
|
|
1096
1095
|
},
|
|
1097
1096
|
async created() {
|
|
1098
|
-
await jt([...Object.values(
|
|
1097
|
+
await jt([...Object.values(B), Ce]), this.iconsReady = !0;
|
|
1099
1098
|
},
|
|
1100
|
-
methods: { iconOf:
|
|
1099
|
+
methods: { iconOf: we }
|
|
1101
1100
|
}, on = {
|
|
1102
1101
|
key: 0,
|
|
1103
1102
|
class: "fs-7 text-muted"
|
|
@@ -1106,24 +1105,24 @@ var rn = /*#__PURE__*/ K(Gt, [["render", nn]]), an = {
|
|
|
1106
1105
|
class: "fs-7 text-danger mt-1"
|
|
1107
1106
|
};
|
|
1108
1107
|
function fn(e, t, n, r, i, a) {
|
|
1109
|
-
let o =
|
|
1110
|
-
return r.draft.isReadonly("provenance") ? (
|
|
1108
|
+
let o = N("font-awesome-icon");
|
|
1109
|
+
return r.draft.isReadonly("provenance") ? (O(), x("div", on, [t[0] ||= C(" Provenance du contact : ", -1), S("span", sn, [i.iconsReady && a.selected ? (O(), y(o, {
|
|
1111
1110
|
key: 0,
|
|
1112
1111
|
icon: a.iconOf(a.selected),
|
|
1113
1112
|
"fixed-width": ""
|
|
1114
|
-
}, null, 8, ["icon"])) : b("", !0),
|
|
1115
|
-
t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [
|
|
1116
|
-
S("div", ln, [(
|
|
1113
|
+
}, null, 8, ["icon"])) : b("", !0), C(" " + P(a.libelleFige), 1)])])) : (O(), x("div", cn, [
|
|
1114
|
+
t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, [C(" Provenance du contact "), S("span", { class: "text-danger" }, "*")], -1),
|
|
1115
|
+
S("div", ln, [(O(!0), x(_, null, j(a.provenances, (e) => (O(), x("button", {
|
|
1117
1116
|
key: e.id,
|
|
1118
1117
|
type: "button",
|
|
1119
|
-
class:
|
|
1118
|
+
class: E(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === a.selected ? "btn-primary" : "btn-outline-primary"]),
|
|
1120
1119
|
onClick: (t) => r.draft.setProvenance(e.id)
|
|
1121
|
-
}, [i.iconsReady ? (
|
|
1120
|
+
}, [i.iconsReady ? (O(), y(o, {
|
|
1122
1121
|
key: 0,
|
|
1123
1122
|
icon: e.icon,
|
|
1124
1123
|
"fixed-width": ""
|
|
1125
|
-
}, null, 8, ["icon"])) : b("", !0), S("span", null,
|
|
1126
|
-
a.loaded && !a.provenanceChoisie ? (
|
|
1124
|
+
}, null, 8, ["icon"])) : b("", !0), S("span", null, P(e.libelle), 1)], 10, un))), 128))]),
|
|
1125
|
+
a.loaded && !a.provenanceChoisie ? (O(), x("div", dn, " Sélectionnez par quel canal la sollicitation vous est parvenue. ")) : b("", !0)
|
|
1127
1126
|
]));
|
|
1128
1127
|
}
|
|
1129
1128
|
var pn = /*#__PURE__*/ K(an, [["render", fn]]), mn = {
|
|
@@ -1141,29 +1140,27 @@ var pn = /*#__PURE__*/ K(an, [["render", fn]]), mn = {
|
|
|
1141
1140
|
}
|
|
1142
1141
|
}, hn = { class: "d-flex flex-column gap-3" }, gn = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
|
|
1143
1142
|
function _n(e, t, n, r, i, a) {
|
|
1144
|
-
let o =
|
|
1145
|
-
return
|
|
1143
|
+
let o = N("provenance-selecteur-block"), s = N("font-awesome-icon"), c = N("reclamant-recherche-block");
|
|
1144
|
+
return O(), x("div", hn, [n.premiere ? (O(), y(o, { key: 0 })) : b("", !0), M(e.$slots, "reclamant", {
|
|
1146
1145
|
reclamant: r.draft.reclamantSelectionne,
|
|
1147
1146
|
select: r.draft.selectReclamant
|
|
1148
|
-
}, () => [S("div", gn, [
|
|
1147
|
+
}, () => [S("div", gn, [w(s, {
|
|
1149
1148
|
icon: "user",
|
|
1150
1149
|
class: "text-primary me-2"
|
|
1151
|
-
}), t[0] ||=
|
|
1150
|
+
}), t[0] ||= C(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), w(c)])]);
|
|
1152
1151
|
}
|
|
1153
1152
|
var vn = /*#__PURE__*/ K(mn, [["render", _n]]);
|
|
1154
|
-
|
|
1155
|
-
//#region src/utils/text.js
|
|
1153
|
+
// src/utils/text.js
|
|
1156
1154
|
function $(e, t = !0) {
|
|
1157
1155
|
if (!e) return null;
|
|
1158
1156
|
let n = e.toString().normalize("NFD").replace(/[̀-ͯ]/g, "");
|
|
1159
1157
|
return t ? n.toLowerCase() : n;
|
|
1160
1158
|
}
|
|
1161
|
-
|
|
1162
|
-
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1159
|
+
// src/components/ReclamantSelecteurBlock.vue
|
|
1163
1160
|
var yn = {
|
|
1164
1161
|
name: "ReclamantSelecteurBlock",
|
|
1165
1162
|
components: {
|
|
1166
|
-
AmsomAutocomplete:
|
|
1163
|
+
AmsomAutocomplete: R,
|
|
1167
1164
|
ReclamantTypeBadgeComponent: Ht
|
|
1168
1165
|
},
|
|
1169
1166
|
props: {
|
|
@@ -1218,16 +1215,16 @@ var yn = {
|
|
|
1218
1215
|
role: "group"
|
|
1219
1216
|
}, Cn = ["onClick"], wn = ["value"], Tn = ["value"];
|
|
1220
1217
|
function En(e, t, n, r, i, a) {
|
|
1221
|
-
let o =
|
|
1222
|
-
return a.estFige ? (
|
|
1218
|
+
let o = N("reclamant-type-badge-component"), s = N("amsom-autocomplete");
|
|
1219
|
+
return a.estFige ? (O(), x("div", bn, [t[2] ||= C(" Réclamant : ", -1), S("span", xn, P(a.reclamantSelectionne?.libelle), 1)])) : (O(), x("div", {
|
|
1223
1220
|
key: 1,
|
|
1224
|
-
class:
|
|
1225
|
-
}, [t[3] ||= S("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), a.presentation === "switch" ? (
|
|
1221
|
+
class: E(n.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
|
|
1222
|
+
}, [t[3] ||= S("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), a.presentation === "switch" ? (O(), x("div", Sn, [(O(!0), x(_, null, j(a.reclamants, (e, t) => (O(), x("button", {
|
|
1226
1223
|
key: t,
|
|
1227
1224
|
type: "button",
|
|
1228
|
-
class:
|
|
1225
|
+
class: E(["btn btn-sm py-0", e === a.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
|
|
1229
1226
|
onClick: (t) => a.select(e)
|
|
1230
|
-
},
|
|
1227
|
+
}, P(e.libelle), 11, Cn))), 128))])) : a.presentation === "autocomplete" ? (O(), y(s, {
|
|
1231
1228
|
key: 1,
|
|
1232
1229
|
"model-value": a.reclamantSelectionne,
|
|
1233
1230
|
items: a.reclamants,
|
|
@@ -1237,14 +1234,14 @@ function En(e, t, n, r, i, a) {
|
|
|
1237
1234
|
placeholder: "Rechercher un réclamant…",
|
|
1238
1235
|
"input-size": "sm",
|
|
1239
1236
|
"hide-choices": "",
|
|
1240
|
-
class:
|
|
1237
|
+
class: E(n.inline ? "" : "w-100"),
|
|
1241
1238
|
"onUpdate:modelValue": t[0] ||= (e) => a.select(e)
|
|
1242
1239
|
}, {
|
|
1243
|
-
options:
|
|
1240
|
+
options: L((e) => [w(o, {
|
|
1244
1241
|
reclamant: e,
|
|
1245
1242
|
"icon-only": "",
|
|
1246
1243
|
class: "me-1"
|
|
1247
|
-
}, null, 8, ["reclamant"]),
|
|
1244
|
+
}, null, 8, ["reclamant"]), C(" " + P(e?.libelle), 1)]),
|
|
1248
1245
|
_: 1
|
|
1249
1246
|
}, 8, [
|
|
1250
1247
|
"model-value",
|
|
@@ -1253,23 +1250,22 @@ function En(e, t, n, r, i, a) {
|
|
|
1253
1250
|
"get-input-libelle",
|
|
1254
1251
|
"filtering-function",
|
|
1255
1252
|
"class"
|
|
1256
|
-
])) : (
|
|
1253
|
+
])) : (O(), x("select", {
|
|
1257
1254
|
key: 2,
|
|
1258
|
-
class:
|
|
1255
|
+
class: E(["form-select form-select-sm", n.inline ? "w-auto" : ""]),
|
|
1259
1256
|
value: a.reclamants.indexOf(a.reclamantSelectionne),
|
|
1260
1257
|
onChange: t[1] ||= (e) => a.select(a.reclamants[e.target.value])
|
|
1261
|
-
}, [(
|
|
1258
|
+
}, [(O(!0), x(_, null, j(a.reclamants, (e, t) => (O(), x("option", {
|
|
1262
1259
|
key: t,
|
|
1263
1260
|
value: t
|
|
1264
|
-
},
|
|
1261
|
+
}, P(e.libelle), 9, Tn))), 128))], 42, wn))], 2));
|
|
1265
1262
|
}
|
|
1266
|
-
|
|
1267
|
-
//#region src/components/EtapeCategorieBlock.vue
|
|
1263
|
+
// src/components/EtapeCategorieBlock.vue
|
|
1268
1264
|
var Dn = {
|
|
1269
1265
|
name: "EtapeCategorieBlock",
|
|
1270
1266
|
components: {
|
|
1271
1267
|
AmsomOverlay: g,
|
|
1272
|
-
AmsomAutocomplete:
|
|
1268
|
+
AmsomAutocomplete: R,
|
|
1273
1269
|
ReclamantSelecteurBlock: /* @__PURE__ */ K(yn, [["render", En]]),
|
|
1274
1270
|
ProvenanceSelecteurBlock: pn
|
|
1275
1271
|
},
|
|
@@ -1452,21 +1448,21 @@ var Dn = {
|
|
|
1452
1448
|
"onChange"
|
|
1453
1449
|
], qn = ["for"];
|
|
1454
1450
|
function Jn(e, t, n, r, i, a) {
|
|
1455
|
-
let o =
|
|
1456
|
-
return
|
|
1457
|
-
default:
|
|
1458
|
-
n.premiere ? (
|
|
1459
|
-
r.options.reclamantMode === "step" ? b("", !0) : (
|
|
1460
|
-
a.motifFige && a.selectionChain.length ? (
|
|
1451
|
+
let o = N("provenance-selecteur-block"), s = N("reclamant-selecteur-block"), c = N("font-awesome-icon"), l = N("amsom-autocomplete"), u = N("amsom-overlay");
|
|
1452
|
+
return O(), y(u, { loading: r.data.isLoading && !r.data.cache.motifs || !i.iconsReady }, {
|
|
1453
|
+
default: L(() => [i.iconsReady ? (O(), x("div", On, [
|
|
1454
|
+
n.premiere ? (O(), y(o, { key: 0 })) : b("", !0),
|
|
1455
|
+
r.options.reclamantMode === "step" ? b("", !0) : (O(), y(s, { key: 1 })),
|
|
1456
|
+
a.motifFige && a.selectionChain.length ? (O(), x("div", kn, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), S("div", An, [(O(!0), x(_, null, j(a.selectionChain, (e, t) => (O(), x(_, { key: e.level }, [t > 0 ? (O(), y(c, {
|
|
1461
1457
|
key: 0,
|
|
1462
1458
|
icon: "fa-solid fa-chevron-right",
|
|
1463
1459
|
class: "text-muted fs-7"
|
|
1464
|
-
})) : b("", !0), S("span", jn, [e.icon ? (
|
|
1460
|
+
})) : b("", !0), S("span", jn, [e.icon ? (O(), y(c, {
|
|
1465
1461
|
key: 0,
|
|
1466
1462
|
icon: e.icon,
|
|
1467
1463
|
"fixed-width": ""
|
|
1468
|
-
}, null, 8, ["icon"])) : b("", !0),
|
|
1469
|
-
a.motifFige ? b("", !0) : (
|
|
1464
|
+
}, null, 8, ["icon"])) : b("", !0), C(" " + P(e.libelle), 1)])], 64))), 128))])])) : b("", !0),
|
|
1465
|
+
a.motifFige ? b("", !0) : (O(), x("div", Mn, [t[2] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), w(l, {
|
|
1470
1466
|
modelValue: a.motifRecherche,
|
|
1471
1467
|
"onUpdate:modelValue": t[0] ||= (e) => a.motifRecherche = e,
|
|
1472
1468
|
items: a.allowedMotifs,
|
|
@@ -1478,12 +1474,12 @@ function Jn(e, t, n, r, i, a) {
|
|
|
1478
1474
|
"input-size": "sm",
|
|
1479
1475
|
"hide-choices": ""
|
|
1480
1476
|
}, {
|
|
1481
|
-
options:
|
|
1477
|
+
options: L((e) => [S("div", Nn, [e?.icon ? (O(), y(c, {
|
|
1482
1478
|
key: 0,
|
|
1483
1479
|
icon: e.icon,
|
|
1484
1480
|
class: "text-primary",
|
|
1485
1481
|
"fixed-width": ""
|
|
1486
|
-
}, null, 8, ["icon"])) : b("", !0), S("div", Pn, [S("div", Fn,
|
|
1482
|
+
}, null, 8, ["icon"])) : b("", !0), S("div", Pn, [S("div", Fn, P(e?.libelle), 1), S("small", In, P(e?.categorie) + " › " + P(e?.type) + " › " + P(e?.nature), 1)])])]),
|
|
1487
1483
|
_: 1
|
|
1488
1484
|
}, 8, [
|
|
1489
1485
|
"modelValue",
|
|
@@ -1493,12 +1489,12 @@ function Jn(e, t, n, r, i, a) {
|
|
|
1493
1489
|
"get-input-libelle-from-id",
|
|
1494
1490
|
"filtering-function"
|
|
1495
1491
|
])])),
|
|
1496
|
-
a.motifFige ? b("", !0) : (
|
|
1492
|
+
a.motifFige ? b("", !0) : (O(), x("div", Ln, [...t[3] ||= [
|
|
1497
1493
|
S("hr", { class: "flex-grow-1 my-0" }, null, -1),
|
|
1498
1494
|
S("span", null, "ou sélection guidée", -1),
|
|
1499
1495
|
S("hr", { class: "flex-grow-1 my-0" }, null, -1)
|
|
1500
1496
|
]])),
|
|
1501
|
-
!a.motifFige && a.selectionChain.length ? (
|
|
1497
|
+
!a.motifFige && a.selectionChain.length ? (O(), x("div", Rn, [(O(!0), x(_, null, j(a.selectionChain, (e, t) => (O(), x(_, { key: e.level }, [t > 0 ? (O(), y(c, {
|
|
1502
1498
|
key: 0,
|
|
1503
1499
|
icon: "fa-solid fa-chevron-right",
|
|
1504
1500
|
class: "text-muted fs-7"
|
|
@@ -1507,18 +1503,18 @@ function Jn(e, t, n, r, i, a) {
|
|
|
1507
1503
|
class: "btn btn-sm btn-primary rounded-pill d-inline-flex align-items-center gap-2",
|
|
1508
1504
|
onClick: (t) => a.goBackTo(e.level)
|
|
1509
1505
|
}, [
|
|
1510
|
-
e.icon ? (
|
|
1506
|
+
e.icon ? (O(), y(c, {
|
|
1511
1507
|
key: 0,
|
|
1512
1508
|
icon: e.icon,
|
|
1513
1509
|
"fixed-width": ""
|
|
1514
1510
|
}, null, 8, ["icon"])) : b("", !0),
|
|
1515
|
-
S("span", null,
|
|
1516
|
-
|
|
1511
|
+
S("span", null, P(e.libelle), 1),
|
|
1512
|
+
w(c, {
|
|
1517
1513
|
icon: "fa-solid fa-xmark",
|
|
1518
1514
|
class: "fs-7 opacity-75"
|
|
1519
1515
|
})
|
|
1520
1516
|
], 8, zn)], 64))), 128))])) : b("", !0),
|
|
1521
|
-
!a.motifFige && a.currentLevel ? (
|
|
1517
|
+
!a.motifFige && a.currentLevel ? (O(), x("div", Bn, [S("label", Vn, P(a.currentLevel.title), 1), S("div", Hn, [(O(!0), x(_, null, j(a.currentLevel.options, (e) => (O(), x("div", {
|
|
1522
1518
|
key: e.id,
|
|
1523
1519
|
class: "col-3 text-center"
|
|
1524
1520
|
}, [S("button", {
|
|
@@ -1526,16 +1522,16 @@ function Jn(e, t, n, r, i, a) {
|
|
|
1526
1522
|
class: "btn btn-lg btn-outline-primary btn-circle d-flex align-items-center justify-content-center mx-auto",
|
|
1527
1523
|
title: e.libelle,
|
|
1528
1524
|
onClick: (t) => a.currentLevel.select(e.id)
|
|
1529
|
-
}, [e.icon ? (
|
|
1525
|
+
}, [e.icon ? (O(), y(c, {
|
|
1530
1526
|
key: 0,
|
|
1531
1527
|
icon: e.icon,
|
|
1532
1528
|
size: "lg"
|
|
1533
|
-
}, null, 8, ["icon"])) : b("", !0)], 8, Un), S("div", Wn,
|
|
1534
|
-
a.motifsAssocies.length ? (
|
|
1529
|
+
}, null, 8, ["icon"])) : b("", !0)], 8, Un), S("div", Wn, P(e.libelle), 1)]))), 128)), a.currentLevel.options.length ? b("", !0) : (O(), x("div", Gn, " Aucun choix disponible "))])])) : b("", !0),
|
|
1530
|
+
a.motifsAssocies.length ? (O(), x(_, { key: 7 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
1535
1531
|
S("hr", { class: "flex-grow-1 my-0" }),
|
|
1536
1532
|
S("span", null, "Autres motifs liés"),
|
|
1537
1533
|
S("hr", { class: "flex-grow-1 my-0" })
|
|
1538
|
-
], -1), (
|
|
1534
|
+
], -1), (O(!0), x(_, null, j(a.motifsAssocies, (e) => (O(), x("div", {
|
|
1539
1535
|
key: e.idMotif,
|
|
1540
1536
|
class: "form-check form-switch"
|
|
1541
1537
|
}, [S("input", {
|
|
@@ -1548,7 +1544,7 @@ function Jn(e, t, n, r, i, a) {
|
|
|
1548
1544
|
}, null, 40, Kn), S("label", {
|
|
1549
1545
|
class: "form-check-label fs-7",
|
|
1550
1546
|
for: `assoc-${e.idMotif}`
|
|
1551
|
-
},
|
|
1547
|
+
}, P(e.libelle) + " ? ", 9, qn)]))), 128))], 64)) : b("", !0)
|
|
1552
1548
|
])) : b("", !0)]),
|
|
1553
1549
|
_: 1
|
|
1554
1550
|
}, 8, ["loading"]);
|
|
@@ -1569,11 +1565,10 @@ function Zn(e, t = !1, n = "circle-question") {
|
|
|
1569
1565
|
function Qn(e) {
|
|
1570
1566
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1571
1567
|
}
|
|
1572
|
-
|
|
1573
|
-
//#region src/components/CiblePickerBlock.vue
|
|
1568
|
+
// src/components/CiblePickerBlock.vue
|
|
1574
1569
|
var $n = 0, er = {
|
|
1575
1570
|
name: "CiblePickerBlock",
|
|
1576
|
-
components: { AmsomAutocomplete:
|
|
1571
|
+
components: { AmsomAutocomplete: R },
|
|
1577
1572
|
props: {
|
|
1578
1573
|
patrimoine: {
|
|
1579
1574
|
type: Object,
|
|
@@ -1848,22 +1843,22 @@ var $n = 0, er = {
|
|
|
1848
1843
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1849
1844
|
}, Ir = { class: "form-check mb-0 ms-3" }, Lr = ["id", "checked"], Rr = ["for"];
|
|
1850
1845
|
function zr(e, t, n, r, i, a) {
|
|
1851
|
-
let o =
|
|
1852
|
-
return
|
|
1846
|
+
let o = N("font-awesome-icon"), s = N("amsom-autocomplete");
|
|
1847
|
+
return O(), x("div", tr, [
|
|
1853
1848
|
S("div", null, [
|
|
1854
1849
|
t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
|
|
1855
|
-
S("div", nr, [(
|
|
1850
|
+
S("div", nr, [(O(!0), x(_, null, j(a.availableModes, (t) => (O(), x("button", {
|
|
1856
1851
|
key: t.key,
|
|
1857
1852
|
type: "button",
|
|
1858
|
-
class:
|
|
1853
|
+
class: E(["btn btn-sm", n.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
1859
1854
|
onClick: (n) => e.$emit("change-mode", t.key)
|
|
1860
|
-
}, [
|
|
1855
|
+
}, [w(o, {
|
|
1861
1856
|
icon: t.icon,
|
|
1862
1857
|
class: "me-1"
|
|
1863
|
-
}, null, 8, ["icon"]),
|
|
1864
|
-
S("small", ir,
|
|
1858
|
+
}, null, 8, ["icon"]), C(" " + P(t.label), 1)], 10, rr))), 128))]),
|
|
1859
|
+
S("small", ir, P(a.currentMode?.aide), 1)
|
|
1865
1860
|
]),
|
|
1866
|
-
n.cibleMode === "contrat" ? (
|
|
1861
|
+
n.cibleMode === "contrat" ? (O(), x(_, { key: 0 }, [n.afficheCaseContratReclamant ? (O(), x("div", ar, [S("input", {
|
|
1867
1862
|
id: `contrat-reclamant-${i.uid}`,
|
|
1868
1863
|
class: "form-check-input",
|
|
1869
1864
|
type: "checkbox",
|
|
@@ -1872,7 +1867,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
1872
1867
|
}, null, 40, or), S("label", {
|
|
1873
1868
|
class: "form-check-label fs-7",
|
|
1874
1869
|
for: `contrat-reclamant-${i.uid}`
|
|
1875
|
-
}, " Contrat du réclamant ", 8, sr)])) : b("", !0), n.contratReclamant ? b("", !0) : (
|
|
1870
|
+
}, " Contrat du réclamant ", 8, sr)])) : b("", !0), n.contratReclamant ? b("", !0) : (O(), x("div", cr, [t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), w(s, {
|
|
1876
1871
|
modelValue: a.selectedContrat,
|
|
1877
1872
|
"onUpdate:modelValue": t[1] ||= (e) => a.selectedContrat = e,
|
|
1878
1873
|
items: i.contratsTrouves,
|
|
@@ -1886,14 +1881,14 @@ function zr(e, t, n, r, i, a) {
|
|
|
1886
1881
|
"debounce-delay": 0,
|
|
1887
1882
|
onSearch: a.rechercherPlusTard
|
|
1888
1883
|
}, {
|
|
1889
|
-
options:
|
|
1890
|
-
S("div", ur,
|
|
1884
|
+
options: L((e) => [S("div", lr, [
|
|
1885
|
+
S("div", ur, P(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
|
|
1891
1886
|
S("div", dr, [
|
|
1892
|
-
S("small", fr, "N° " +
|
|
1893
|
-
e?.nbModules > 1 ? (
|
|
1894
|
-
e?.estSorti ? (
|
|
1887
|
+
S("small", fr, "N° " + P(e?.typeContrat) + "/" + P(e?.idContrat), 1),
|
|
1888
|
+
e?.nbModules > 1 ? (O(), x("span", pr, P(e.nbModules) + " modules", 1)) : b("", !0),
|
|
1889
|
+
e?.estSorti ? (O(), x("span", mr, P(e.dateSortie ? `Sorti le ${a.formatDate(e.dateSortie)}` : "Sorti"), 1)) : b("", !0)
|
|
1895
1890
|
]),
|
|
1896
|
-
a.contratAdresse(e) ? (
|
|
1891
|
+
a.contratAdresse(e) ? (O(), x("small", hr, P(a.contratAdresse(e)), 1)) : b("", !0)
|
|
1897
1892
|
])]),
|
|
1898
1893
|
_: 1
|
|
1899
1894
|
}, 8, [
|
|
@@ -1905,21 +1900,21 @@ function zr(e, t, n, r, i, a) {
|
|
|
1905
1900
|
"get-input-libelle",
|
|
1906
1901
|
"onSearch"
|
|
1907
1902
|
])]))], 64)) : b("", !0),
|
|
1908
|
-
n.cibleMode === "patrimoine" ? (
|
|
1903
|
+
n.cibleMode === "patrimoine" ? (O(), x("div", gr, [t[9] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), S("div", _r, [(O(!0), x(_, null, j(a.portees, (t) => (O(), x("div", {
|
|
1909
1904
|
key: t.titre,
|
|
1910
1905
|
class: "col-12 col-md-6"
|
|
1911
1906
|
}, [S("button", {
|
|
1912
1907
|
type: "button",
|
|
1913
|
-
class:
|
|
1908
|
+
class: E(["btn w-100 h-100 text-start d-flex align-items-center gap-3 p-3 rounded border text-primary", t.modulePrecis === n.modulePrecis ? "border-primary bg-light" : "bg-white"]),
|
|
1914
1909
|
"aria-pressed": t.modulePrecis === n.modulePrecis,
|
|
1915
1910
|
onClick: (n) => e.$emit("set-module-precis", t.modulePrecis)
|
|
1916
|
-
}, [
|
|
1911
|
+
}, [w(o, {
|
|
1917
1912
|
icon: t.icon,
|
|
1918
1913
|
class: "fs-4",
|
|
1919
1914
|
"fixed-width": ""
|
|
1920
|
-
}, null, 8, ["icon"]), S("span", yr, [S("span", br,
|
|
1921
|
-
n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (
|
|
1922
|
-
S("div", null, [t[10] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1),
|
|
1915
|
+
}, null, 8, ["icon"]), S("span", yr, [S("span", br, P(t.titre), 1), S("small", xr, P(t.aide), 1)])], 10, vr)]))), 128))])])) : b("", !0),
|
|
1916
|
+
n.cibleMode === "contrat" || n.cibleMode === "patrimoine" ? (O(), x("div", Sr, [S("div", { class: E(["col-12 d-flex flex-column gap-3", { "col-md-6": a.afficheModule }]) }, [n.cibleMode === "patrimoine" ? (O(), x(_, { key: 0 }, [
|
|
1917
|
+
S("div", null, [t[10] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), w(s, {
|
|
1923
1918
|
modelValue: a.selectedCommune,
|
|
1924
1919
|
"onUpdate:modelValue": t[2] ||= (e) => a.selectedCommune = e,
|
|
1925
1920
|
items: r.data.cache.communes || [],
|
|
@@ -1936,7 +1931,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
1936
1931
|
"get-input-libelle",
|
|
1937
1932
|
"filtering-function"
|
|
1938
1933
|
])]),
|
|
1939
|
-
S("div", null, [t[11] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1),
|
|
1934
|
+
S("div", null, [t[11] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Adresse ", -1), w(s, {
|
|
1940
1935
|
modelValue: a.selectedAdresse,
|
|
1941
1936
|
"onUpdate:modelValue": t[3] ||= (e) => a.selectedAdresse = e,
|
|
1942
1937
|
items: a.adresses,
|
|
@@ -1948,7 +1943,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
1948
1943
|
"input-size": "sm",
|
|
1949
1944
|
"hide-choices": ""
|
|
1950
1945
|
}, {
|
|
1951
|
-
options:
|
|
1946
|
+
options: L((e) => [S("div", Cr, [S("div", wr, P(e?.entree), 1), S("small", Tr, P(e?.commune) + " — Programme " + P(e?.codeProgramme), 1)])]),
|
|
1952
1947
|
_: 1
|
|
1953
1948
|
}, 8, [
|
|
1954
1949
|
"modelValue",
|
|
@@ -1958,7 +1953,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
1958
1953
|
"filtering-function",
|
|
1959
1954
|
"disabled"
|
|
1960
1955
|
])]),
|
|
1961
|
-
S("div", null, [t[12] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1),
|
|
1956
|
+
S("div", null, [t[12] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), w(s, {
|
|
1962
1957
|
modelValue: a.selectedEtage,
|
|
1963
1958
|
"onUpdate:modelValue": t[4] ||= (e) => a.selectedEtage = e,
|
|
1964
1959
|
items: a.etages,
|
|
@@ -1975,7 +1970,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
1975
1970
|
"get-input-libelle",
|
|
1976
1971
|
"disabled"
|
|
1977
1972
|
])])
|
|
1978
|
-
], 64)) : (
|
|
1973
|
+
], 64)) : (O(), x(_, { key: 1 }, [
|
|
1979
1974
|
S("div", null, [t[13] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Commune ", -1), S("input", {
|
|
1980
1975
|
class: "form-control form-control-sm",
|
|
1981
1976
|
disabled: "",
|
|
@@ -1991,9 +1986,9 @@ function zr(e, t, n, r, i, a) {
|
|
|
1991
1986
|
disabled: "",
|
|
1992
1987
|
value: n.patrimoine.etage ?? "—"
|
|
1993
1988
|
}, null, 8, Or)])
|
|
1994
|
-
], 64))], 2), a.afficheModule ? (
|
|
1989
|
+
], 64))], 2), a.afficheModule ? (O(), x("div", kr, [
|
|
1995
1990
|
t[16] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
|
|
1996
|
-
|
|
1991
|
+
w(s, {
|
|
1997
1992
|
modelValue: a.selectedModule,
|
|
1998
1993
|
"onUpdate:modelValue": t[5] ||= (e) => a.selectedModule = e,
|
|
1999
1994
|
items: a.modules,
|
|
@@ -2005,20 +2000,20 @@ function zr(e, t, n, r, i, a) {
|
|
|
2005
2000
|
"input-size": "sm",
|
|
2006
2001
|
"hide-choices": ""
|
|
2007
2002
|
}, {
|
|
2008
|
-
options:
|
|
2009
|
-
e?._autreLibelle ? (
|
|
2003
|
+
options: L((e) => [S("div", { class: E(["min-w-0 w-100 rounded position-relative", e?._autreLibelle ? "bg-yellow-subtle p-2" : ""]) }, [
|
|
2004
|
+
e?._autreLibelle ? (O(), y(o, {
|
|
2010
2005
|
key: 0,
|
|
2011
2006
|
icon: "building",
|
|
2012
2007
|
class: "position-absolute top-0 end-0 m-1 text-muted",
|
|
2013
2008
|
title: "Autre adresse ou étage du même programme"
|
|
2014
2009
|
})) : b("", !0),
|
|
2015
|
-
S("div", { class:
|
|
2016
|
-
S("div", Ar, [a.categorieLibelle(e) ? (
|
|
2010
|
+
S("div", { class: E(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", a.isExit(e) ? "text-decoration-line-through" : ""]]) }, P(a.moduleLibelle(e)), 3),
|
|
2011
|
+
S("div", Ar, [a.categorieLibelle(e) ? (O(), x("span", {
|
|
2017
2012
|
key: 0,
|
|
2018
2013
|
class: "badge bg-info",
|
|
2019
2014
|
title: e?.categorieModule
|
|
2020
|
-
}, [
|
|
2021
|
-
e?._autreLibelle ? (
|
|
2015
|
+
}, [w(o, { icon: a.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, jr)) : b("", !0), S("small", Mr, "N° " + P(e?.idModule), 1)]),
|
|
2016
|
+
e?._autreLibelle ? (O(), x("small", Nr, P(e._autreLibelle), 1)) : e?.etage == null ? b("", !0) : (O(), x("small", Pr, " Étage " + P(e.etage), 1))
|
|
2022
2017
|
], 2)]),
|
|
2023
2018
|
_: 1
|
|
2024
2019
|
}, 8, [
|
|
@@ -2029,10 +2024,10 @@ function zr(e, t, n, r, i, a) {
|
|
|
2029
2024
|
"filtering-function",
|
|
2030
2025
|
"disabled"
|
|
2031
2026
|
]),
|
|
2032
|
-
n.locataireActuelOption ? (
|
|
2027
|
+
n.locataireActuelOption ? (O(), x("div", Fr, [S("div", { class: E(["alert d-flex align-items-start gap-2 py-2 px-3 mt-2 mb-0 fs-7", n.locataireActuelOption.reprendre ? "alert-warning" : "alert-secondary border"]) }, [w(o, {
|
|
2033
2028
|
icon: "circle-info",
|
|
2034
2029
|
class: "mt-1"
|
|
2035
|
-
}), S("span", null,
|
|
2030
|
+
}), S("span", null, P(n.locataireActuelOption.hint), 1)], 2), S("div", Ir, [S("input", {
|
|
2036
2031
|
id: `locataire-actuel-${i.uid}`,
|
|
2037
2032
|
class: "form-check-input",
|
|
2038
2033
|
type: "checkbox",
|
|
@@ -2045,8 +2040,7 @@ function zr(e, t, n, r, i, a) {
|
|
|
2045
2040
|
])) : b("", !0)])) : b("", !0)
|
|
2046
2041
|
]);
|
|
2047
2042
|
}
|
|
2048
|
-
|
|
2049
|
-
//#region src/components/EtapeCibleBlock.vue
|
|
2043
|
+
// src/components/EtapeCibleBlock.vue
|
|
2050
2044
|
var Br = {
|
|
2051
2045
|
name: "EtapeCibleBlock",
|
|
2052
2046
|
components: {
|
|
@@ -2175,24 +2169,24 @@ var Br = {
|
|
|
2175
2169
|
class: "mt-2"
|
|
2176
2170
|
};
|
|
2177
2171
|
function Qr(e, t, n, r, i, a) {
|
|
2178
|
-
let o =
|
|
2179
|
-
return
|
|
2180
|
-
default:
|
|
2181
|
-
a.motifLibelle ? (
|
|
2172
|
+
let o = N("font-awesome-icon"), s = N("cible-picker-block"), c = N("amsom-overlay");
|
|
2173
|
+
return O(), y(c, { loading: r.data.isLoading }, {
|
|
2174
|
+
default: L(() => [S("div", Vr, [
|
|
2175
|
+
a.motifLibelle ? (O(), x("div", Hr, [w(o, {
|
|
2182
2176
|
icon: "tag",
|
|
2183
2177
|
class: "text-primary"
|
|
2184
|
-
}), S("span", Ur, [t[9] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2185
|
-
a.cibleFigee ? (
|
|
2178
|
+
}), S("span", Ur, [t[9] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), C(P(a.motifLibelle), 1)])])) : b("", !0),
|
|
2179
|
+
a.cibleFigee ? (O(), x("div", Wr, [(O(!0), x(_, null, j(r.draft.draft.lignes, (e, t) => (O(), x("span", {
|
|
2186
2180
|
key: t,
|
|
2187
2181
|
class: "fs-7"
|
|
2188
2182
|
}, [
|
|
2189
|
-
|
|
2183
|
+
w(o, {
|
|
2190
2184
|
icon: "location-dot",
|
|
2191
2185
|
class: "text-primary me-2"
|
|
2192
2186
|
}),
|
|
2193
|
-
a.lignesAssociees.length ? (
|
|
2194
|
-
|
|
2195
|
-
]))), 128))])) : (
|
|
2187
|
+
a.lignesAssociees.length ? (O(), x("span", Gr, P(t === 0 ? a.motifLibelle : e.libelle) + " : ", 1)) : b("", !0),
|
|
2188
|
+
C(" " + P(r.draft.cibleResume(e)), 1)
|
|
2189
|
+
]))), 128))])) : (O(), y(s, pe({ key: 2 }, a.pickerProps(a.lignePrincipale), {
|
|
2196
2190
|
onChangeMode: t[0] ||= (e) => a.onChangeMode(e),
|
|
2197
2191
|
onSelectCommune: t[1] ||= (e) => a.onSelectCommune(e),
|
|
2198
2192
|
onSelectAdresse: t[2] ||= (e) => a.onSelectAdresse(e),
|
|
@@ -2203,14 +2197,14 @@ function Qr(e, t, n, r, i, a) {
|
|
|
2203
2197
|
onToggleReprendreLocataireActuel: t[7] ||= (e) => a.onToggleReprendre(e),
|
|
2204
2198
|
onSetModulePrecis: t[8] ||= (e) => r.draft.setModulePrecis(0, e)
|
|
2205
2199
|
}), null, 16)),
|
|
2206
|
-
!a.cibleFigee && a.lignesAssociees.length && a.reclamantType !== "D" ? (
|
|
2200
|
+
!a.cibleFigee && a.lignesAssociees.length && a.reclamantType !== "D" ? (O(), x(_, { key: 3 }, [t[10] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
2207
2201
|
S("hr", { class: "flex-grow-1 my-0" }),
|
|
2208
2202
|
S("span", null, "Cible des autres motifs"),
|
|
2209
2203
|
S("hr", { class: "flex-grow-1 my-0" })
|
|
2210
|
-
], -1), (
|
|
2204
|
+
], -1), (O(!0), x(_, null, j(a.lignesAssociees, (e, t) => (O(), x("div", {
|
|
2211
2205
|
key: e.idMotif,
|
|
2212
2206
|
class: "border rounded p-2"
|
|
2213
|
-
}, [S("div", Kr, [S("span", qr,
|
|
2207
|
+
}, [S("div", Kr, [S("span", qr, P(e.libelle), 1), S("div", Jr, [S("input", {
|
|
2214
2208
|
id: `memecible-${e.idMotif}`,
|
|
2215
2209
|
class: "form-check-input",
|
|
2216
2210
|
type: "checkbox",
|
|
@@ -2219,7 +2213,7 @@ function Qr(e, t, n, r, i, a) {
|
|
|
2219
2213
|
}, null, 40, Yr), S("label", {
|
|
2220
2214
|
class: "form-check-label fs-7",
|
|
2221
2215
|
for: `memecible-${e.idMotif}`
|
|
2222
|
-
}, " Même cible que la ligne principale ", 8, Xr)])]), e.patrimoine ? (
|
|
2216
|
+
}, " Même cible que la ligne principale ", 8, Xr)])]), e.patrimoine ? (O(), x("div", Zr, [w(s, pe({ ref_for: !0 }, a.pickerProps(e), {
|
|
2223
2217
|
onChangeMode: (e) => a.onChangeMode(e, t + 1),
|
|
2224
2218
|
onSelectCommune: (e) => a.onSelectCommune(e, t + 1),
|
|
2225
2219
|
onSelectAdresse: (e) => a.onSelectAdresse(e, t + 1),
|
|
@@ -2246,7 +2240,7 @@ function Qr(e, t, n, r, i, a) {
|
|
|
2246
2240
|
}
|
|
2247
2241
|
var $r = /*#__PURE__*/ K(Br, [["render", Qr]]), ei = {
|
|
2248
2242
|
name: "LigneDocumentBlock",
|
|
2249
|
-
components: { AmsomUploadFile:
|
|
2243
|
+
components: { AmsomUploadFile: Se },
|
|
2250
2244
|
props: {
|
|
2251
2245
|
index: {
|
|
2252
2246
|
type: Number,
|
|
@@ -2264,8 +2258,8 @@ var $r = /*#__PURE__*/ K(Br, [["render", Qr]]), ei = {
|
|
|
2264
2258
|
emits: ["update"]
|
|
2265
2259
|
};
|
|
2266
2260
|
function ti(e, t, n, r, i, a) {
|
|
2267
|
-
let o =
|
|
2268
|
-
return
|
|
2261
|
+
let o = N("amsom-upload-file");
|
|
2262
|
+
return O(), x("div", null, [t[1] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Document", -1), w(o, {
|
|
2269
2263
|
"model-value": n.fichier,
|
|
2270
2264
|
renameable: "",
|
|
2271
2265
|
"output-format": "object",
|
|
@@ -2282,8 +2276,8 @@ function ti(e, t, n, r, i, a) {
|
|
|
2282
2276
|
var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
|
|
2283
2277
|
name: "LigneDetailBlock",
|
|
2284
2278
|
components: {
|
|
2285
|
-
AmsomAutocomplete:
|
|
2286
|
-
AmsomTextarea:
|
|
2279
|
+
AmsomAutocomplete: R,
|
|
2280
|
+
AmsomTextarea: xe,
|
|
2287
2281
|
LigneDocumentBlock: ni
|
|
2288
2282
|
},
|
|
2289
2283
|
props: { index: {
|
|
@@ -2314,6 +2308,9 @@ var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
|
|
|
2314
2308
|
return this.isPrincipale || this.ligne.dateFaitsOverride ? this.ligne.dateFaits : this.lignePrincipale.dateFaits;
|
|
2315
2309
|
}
|
|
2316
2310
|
},
|
|
2311
|
+
mounted() {
|
|
2312
|
+
this.isPrincipale && this.$refs.description?.$el.querySelector("textarea")?.focus();
|
|
2313
|
+
},
|
|
2317
2314
|
methods: {
|
|
2318
2315
|
timestampToDateInput: Mt,
|
|
2319
2316
|
dateInputToTimestamp: Nt,
|
|
@@ -2361,8 +2358,8 @@ var ni = /*#__PURE__*/ K(ei, [["render", ti]]), ri = 4e3, ii = {
|
|
|
2361
2358
|
class: "text-muted"
|
|
2362
2359
|
}, Ei = { class: "col-12 col-md-6" };
|
|
2363
2360
|
function Di(e, t, n, r, i, a) {
|
|
2364
|
-
let o =
|
|
2365
|
-
return
|
|
2361
|
+
let o = N("amsom-textarea"), s = N("amsom-autocomplete"), c = N("ligne-document-block");
|
|
2362
|
+
return O(), x("div", ai, [S("div", null, [S("div", oi, [S("label", si, [t[6] ||= C(" Description", -1), a.isPrincipale ? (O(), x("span", ci, "*")) : b("", !0)]), a.isPrincipale ? b("", !0) : (O(), x("div", li, [S("input", {
|
|
2366
2363
|
id: `memedetail-${a.ligne.idMotif}`,
|
|
2367
2364
|
class: "form-check-input",
|
|
2368
2365
|
type: "checkbox",
|
|
@@ -2372,11 +2369,12 @@ function Di(e, t, n, r, i, a) {
|
|
|
2372
2369
|
}, null, 40, ui), S("label", {
|
|
2373
2370
|
class: "form-check-label fs-7",
|
|
2374
2371
|
for: `memedetail-${a.ligne.idMotif}`
|
|
2375
|
-
}, " Même description ", 8, di)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (
|
|
2372
|
+
}, " Même description ", 8, di)]))]), !r.draft.isReadonly("description") && (a.isPrincipale || a.ligne.description != null) ? (O(), y(o, {
|
|
2376
2373
|
key: 0,
|
|
2374
|
+
ref: "description",
|
|
2377
2375
|
"model-value": a.ligne.description,
|
|
2378
2376
|
"input-size": "sm",
|
|
2379
|
-
rows: a.isPrincipale ?
|
|
2377
|
+
rows: a.isPrincipale ? 7 : 5,
|
|
2380
2378
|
maxlength: a.descriptionMaxLength,
|
|
2381
2379
|
placeholder: a.isPrincipale ? "Décrivez la sollicitation…" : "Décrivez ce motif…",
|
|
2382
2380
|
"onUpdate:modelValue": t[1] ||= (e) => r.draft.setDescription(n.index, e)
|
|
@@ -2385,7 +2383,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2385
2383
|
"rows",
|
|
2386
2384
|
"maxlength",
|
|
2387
2385
|
"placeholder"
|
|
2388
|
-
])) : (
|
|
2386
|
+
])) : (O(), x("small", fi, P((a.ligne.description ?? a.lignePrincipale.description) || "—"), 1))]), S("div", pi, [S("div", mi, [S("div", null, [S("div", hi, [t[7] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, " Date des faits ", -1), a.isPrincipale ? b("", !0) : (O(), x("div", gi, [S("input", {
|
|
2389
2387
|
id: `memedate-${a.ligne.idMotif}`,
|
|
2390
2388
|
class: "form-check-input",
|
|
2391
2389
|
type: "checkbox",
|
|
@@ -2395,15 +2393,15 @@ function Di(e, t, n, r, i, a) {
|
|
|
2395
2393
|
}, null, 40, _i), S("label", {
|
|
2396
2394
|
class: "form-check-label fs-7",
|
|
2397
2395
|
for: `memedate-${a.ligne.idMotif}`
|
|
2398
|
-
}, " Même date ", 8, vi)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (
|
|
2396
|
+
}, " Même date ", 8, vi)]))]), !r.draft.isReadonly("dateFaits") && (a.isPrincipale || a.ligne.dateFaitsOverride) ? (O(), x("input", {
|
|
2399
2397
|
key: 0,
|
|
2400
2398
|
value: a.timestampToDateInput(a.ligne.dateFaits),
|
|
2401
2399
|
type: "date",
|
|
2402
2400
|
class: "form-control form-control-sm",
|
|
2403
2401
|
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, a.dateInputToTimestamp(e.target.value))
|
|
2404
|
-
}, null, 40, yi)) : (
|
|
2402
|
+
}, null, 40, yi)) : (O(), x("small", bi, P(a.timestampToDateInput(a.dateFaits) || "—"), 1))]), S("div", null, [
|
|
2405
2403
|
t[8] ||= S("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
|
|
2406
|
-
r.draft.isReadonly("responsable") ? (
|
|
2404
|
+
r.draft.isReadonly("responsable") ? (O(), x("small", xi, P(a.responsableLibelle(a.ligne.responsable) || "Déterminé automatiquement"), 1)) : (O(), y(s, {
|
|
2407
2405
|
key: 1,
|
|
2408
2406
|
"model-value": a.ligne.responsable,
|
|
2409
2407
|
items: a.collaborateurs,
|
|
@@ -2415,7 +2413,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2415
2413
|
"hide-choices": "",
|
|
2416
2414
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2417
2415
|
}, {
|
|
2418
|
-
options:
|
|
2416
|
+
options: L((e) => [S("div", Si, [S("div", Ci, P(e?.prenom) + " " + P(e?.nom), 1), e?.service ? (O(), x("small", wi, P(e.service), 1)) : b("", !0)])]),
|
|
2419
2417
|
_: 1
|
|
2420
2418
|
}, 8, [
|
|
2421
2419
|
"model-value",
|
|
@@ -2424,8 +2422,8 @@ function Di(e, t, n, r, i, a) {
|
|
|
2424
2422
|
"get-input-libelle",
|
|
2425
2423
|
"filtering-function"
|
|
2426
2424
|
])),
|
|
2427
|
-
a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (
|
|
2428
|
-
])]), S("div", Ei, [
|
|
2425
|
+
a.isPrincipale && !a.ligne.responsable && !r.draft.isReadonly("responsable") ? (O(), x("small", Ti, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : b("", !0)
|
|
2426
|
+
])]), S("div", Ei, [w(c, {
|
|
2429
2427
|
index: n.index,
|
|
2430
2428
|
fichier: a.ligne.fichier,
|
|
2431
2429
|
readonly: r.draft.isReadonly("fichier"),
|
|
@@ -2436,8 +2434,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2436
2434
|
"readonly"
|
|
2437
2435
|
])])])]);
|
|
2438
2436
|
}
|
|
2439
|
-
|
|
2440
|
-
//#region src/components/EtapeDetailsBlock.vue
|
|
2437
|
+
// src/components/EtapeDetailsBlock.vue
|
|
2441
2438
|
var Oi = {
|
|
2442
2439
|
name: "EtapeDetailsBlock",
|
|
2443
2440
|
components: {
|
|
@@ -2503,57 +2500,56 @@ var Oi = {
|
|
|
2503
2500
|
class: "fs-7"
|
|
2504
2501
|
}, Mi = { class: "fs-7" }, Ni = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, Pi = { class: "fs-7" }, Fi = { class: "fs-7" };
|
|
2505
2502
|
function Ii(e, t, n, r, i, a) {
|
|
2506
|
-
let o =
|
|
2507
|
-
return
|
|
2508
|
-
default:
|
|
2509
|
-
S("div", Ai, [a.motifLibelle ? (
|
|
2510
|
-
|
|
2503
|
+
let o = N("font-awesome-icon"), s = N("ligne-detail-block"), c = N("amsom-overlay");
|
|
2504
|
+
return O(), y(c, { loading: r.data.isLoading && !r.data.cache.collaborateurs }, {
|
|
2505
|
+
default: L(() => [S("div", ki, [
|
|
2506
|
+
S("div", Ai, [a.motifLibelle ? (O(), x("span", ji, [
|
|
2507
|
+
w(o, {
|
|
2511
2508
|
icon: "tag",
|
|
2512
2509
|
class: "text-primary me-2"
|
|
2513
2510
|
}),
|
|
2514
2511
|
t[0] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2515
|
-
|
|
2512
|
+
C(P(a.motifLibelle), 1)
|
|
2516
2513
|
])) : b("", !0), S("span", Mi, [
|
|
2517
|
-
|
|
2514
|
+
w(o, {
|
|
2518
2515
|
icon: "location-dot",
|
|
2519
2516
|
class: "text-primary me-2"
|
|
2520
2517
|
}),
|
|
2521
2518
|
t[1] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2522
|
-
|
|
2519
|
+
C(" " + P(r.draft.cibleResume(a.lignePrincipale)), 1)
|
|
2523
2520
|
])]),
|
|
2524
|
-
|
|
2525
|
-
a.lignesAssociees.length ? (
|
|
2521
|
+
w(s, { index: 0 }),
|
|
2522
|
+
a.lignesAssociees.length ? (O(), x(_, { key: 0 }, [t[4] ||= S("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
2526
2523
|
S("hr", { class: "flex-grow-1 my-0" }),
|
|
2527
2524
|
S("span", null, "Détail des autres motifs"),
|
|
2528
2525
|
S("hr", { class: "flex-grow-1 my-0" })
|
|
2529
|
-
], -1), (
|
|
2526
|
+
], -1), (O(!0), x(_, null, j(a.lignesAssociees, (e, n) => (O(), x("div", {
|
|
2530
2527
|
key: e.idMotif,
|
|
2531
2528
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2532
2529
|
}, [S("div", Ni, [S("span", Pi, [
|
|
2533
|
-
|
|
2530
|
+
w(o, {
|
|
2534
2531
|
icon: "tag",
|
|
2535
2532
|
class: "text-primary me-2"
|
|
2536
2533
|
}),
|
|
2537
2534
|
t[2] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2538
|
-
|
|
2535
|
+
C(" " + P(e.libelle), 1)
|
|
2539
2536
|
]), S("span", Fi, [
|
|
2540
|
-
|
|
2537
|
+
w(o, {
|
|
2541
2538
|
icon: "location-dot",
|
|
2542
2539
|
class: "text-primary me-2"
|
|
2543
2540
|
}),
|
|
2544
2541
|
t[3] ||= S("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Cible", -1),
|
|
2545
|
-
|
|
2546
|
-
])]),
|
|
2542
|
+
C(" " + P(r.draft.cibleResume(e)), 1)
|
|
2543
|
+
])]), w(s, { index: n + 1 }, null, 8, ["index"])]))), 128))], 64)) : b("", !0)
|
|
2547
2544
|
])]),
|
|
2548
2545
|
_: 1
|
|
2549
2546
|
}, 8, ["loading"]);
|
|
2550
2547
|
}
|
|
2551
|
-
|
|
2552
|
-
//#region src/components/StepperBlock.vue
|
|
2548
|
+
// src/components/StepperBlock.vue
|
|
2553
2549
|
var Li = {
|
|
2554
2550
|
name: "StepperBlock",
|
|
2555
2551
|
components: {
|
|
2556
|
-
AmsomHorizontalStepper:
|
|
2552
|
+
AmsomHorizontalStepper: ye,
|
|
2557
2553
|
AmsomOverlay: g,
|
|
2558
2554
|
EtapeReclamantBlock: vn,
|
|
2559
2555
|
EtapeCategorieBlock: Yn,
|
|
@@ -2679,53 +2675,53 @@ var Li = {
|
|
|
2679
2675
|
style: { "white-space": "pre-line" }
|
|
2680
2676
|
}, Bi = { style: { "min-height": "260px" } }, Vi = { class: "d-flex justify-content-between" }, Hi = { key: 1 }, Ui = ["disabled"], Wi = ["disabled"];
|
|
2681
2677
|
function Gi(e, t, n, r, i, a) {
|
|
2682
|
-
let o =
|
|
2683
|
-
return
|
|
2684
|
-
default:
|
|
2685
|
-
|
|
2678
|
+
let o = N("amsom-horizontal-stepper"), s = N("font-awesome-icon"), c = N("etape-reclamant-block"), l = N("etape-categorie-block"), u = N("etape-cible-block"), d = N("etape-details-block"), f = N("amsom-overlay");
|
|
2679
|
+
return O(), y(f, { loading: n.creating }, {
|
|
2680
|
+
default: L(() => [S("div", Ri, [
|
|
2681
|
+
w(o, {
|
|
2686
2682
|
steps: a.stepperSteps,
|
|
2687
2683
|
size: "md",
|
|
2688
2684
|
onStepClick: a.onStepClick
|
|
2689
2685
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2690
|
-
a.aideMotif ? (
|
|
2686
|
+
a.aideMotif ? (O(), x("div", zi, [w(s, {
|
|
2691
2687
|
icon: "circle-info",
|
|
2692
2688
|
class: "text-info-emphasis me-2"
|
|
2693
|
-
}), S("span", null,
|
|
2694
|
-
S("div", Bi, [a.currentKey === "reclamant" ? (
|
|
2689
|
+
}), S("span", null, P(a.aideMotif), 1)])) : b("", !0),
|
|
2690
|
+
S("div", Bi, [a.currentKey === "reclamant" ? (O(), y(c, {
|
|
2695
2691
|
key: 0,
|
|
2696
2692
|
premiere: n.step === 1
|
|
2697
|
-
},
|
|
2693
|
+
}, de({ _: 2 }, [e.$slots.reclamant ? {
|
|
2698
2694
|
name: "reclamant",
|
|
2699
|
-
fn:
|
|
2695
|
+
fn: L((t) => [M(e.$slots, "reclamant", D(T(t)))]),
|
|
2700
2696
|
key: "0"
|
|
2701
|
-
} : void 0]), 1032, ["premiere"])) : a.currentKey === "categorie" ? (
|
|
2697
|
+
} : void 0]), 1032, ["premiere"])) : a.currentKey === "categorie" ? (O(), y(l, {
|
|
2702
2698
|
key: 1,
|
|
2703
2699
|
premiere: n.step === 1
|
|
2704
|
-
}, null, 8, ["premiere"])) : a.currentKey === "cible" ? (
|
|
2705
|
-
S("div", Vi, [n.step > 1 ? (
|
|
2700
|
+
}, null, 8, ["premiere"])) : a.currentKey === "cible" ? (O(), y(u, { key: 2 })) : a.currentKey === "details" ? (O(), y(d, { key: 3 })) : b("", !0)]),
|
|
2701
|
+
S("div", Vi, [n.step > 1 ? (O(), x("button", {
|
|
2706
2702
|
key: 0,
|
|
2707
2703
|
class: "btn btn-sm btn-outline-secondary",
|
|
2708
2704
|
onClick: t[0] ||= (...e) => a.goPrevious && a.goPrevious(...e)
|
|
2709
|
-
}, [
|
|
2705
|
+
}, [w(s, {
|
|
2710
2706
|
icon: "chevron-left",
|
|
2711
2707
|
class: "me-1"
|
|
2712
|
-
}), t[3] ||=
|
|
2708
|
+
}), t[3] ||= C(" Précédent ", -1)])) : (O(), x("span", Hi)), n.step < a.steps.length ? (O(), x("button", {
|
|
2713
2709
|
key: 2,
|
|
2714
2710
|
class: "btn btn-sm btn-primary",
|
|
2715
2711
|
disabled: !a.canGoNext,
|
|
2716
2712
|
onClick: t[1] ||= (...e) => a.goNext && a.goNext(...e)
|
|
2717
|
-
}, [t[4] ||=
|
|
2713
|
+
}, [t[4] ||= C(" Suivant ", -1), w(s, {
|
|
2718
2714
|
icon: "chevron-right",
|
|
2719
2715
|
class: "ms-1"
|
|
2720
|
-
})], 8, Ui)) : (
|
|
2716
|
+
})], 8, Ui)) : (O(), x("button", {
|
|
2721
2717
|
key: 3,
|
|
2722
2718
|
class: "btn btn-sm btn-success",
|
|
2723
2719
|
disabled: !a.canCreer || n.creating,
|
|
2724
2720
|
onClick: t[2] ||= (t) => e.$emit("submit")
|
|
2725
|
-
}, [
|
|
2721
|
+
}, [w(s, {
|
|
2726
2722
|
icon: "check",
|
|
2727
2723
|
class: "me-1"
|
|
2728
|
-
}), t[5] ||=
|
|
2724
|
+
}), t[5] ||= C(" Créer la sollicitation ", -1)], 8, Wi))])
|
|
2729
2725
|
])]),
|
|
2730
2726
|
_: 3
|
|
2731
2727
|
}, 8, ["loading"]);
|
|
@@ -2761,16 +2757,16 @@ var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n
|
|
|
2761
2757
|
typesReclamant: {
|
|
2762
2758
|
type: Array,
|
|
2763
2759
|
default: null,
|
|
2764
|
-
validator: (e) => e.every((e) =>
|
|
2760
|
+
validator: (e) => e.every((e) => H.includes(e))
|
|
2765
2761
|
},
|
|
2766
2762
|
typesReclamantExclus: {
|
|
2767
2763
|
type: Array,
|
|
2768
2764
|
default: () => [],
|
|
2769
|
-
validator: (e) => e.every((e) =>
|
|
2765
|
+
validator: (e) => e.every((e) => H.includes(e))
|
|
2770
2766
|
},
|
|
2771
2767
|
provenances: {
|
|
2772
2768
|
type: Array,
|
|
2773
|
-
default: () => [...
|
|
2769
|
+
default: () => [...Te]
|
|
2774
2770
|
},
|
|
2775
2771
|
provenancesExclues: {
|
|
2776
2772
|
type: Array,
|
|
@@ -2823,35 +2819,37 @@ var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n
|
|
|
2823
2819
|
props: { ...Yi },
|
|
2824
2820
|
emits: [...Zi],
|
|
2825
2821
|
setup(e, { emit: t }) {
|
|
2826
|
-
let n = (e) => t("error", e), r = { baseUrl:
|
|
2822
|
+
let n = (e) => t("error", e), r = { baseUrl: F(e, "baseUrl") }, i = kt(Ot({
|
|
2827
2823
|
onError: n,
|
|
2828
2824
|
...r
|
|
2829
|
-
})), a =
|
|
2825
|
+
})), a = A(null), o = A(!1), s = v(() => a.value ?? e.modules ?? []), c = Ue(He({
|
|
2830
2826
|
reclamants: v(() => e.reclamantMode === "step" ? [] : e.reclamants),
|
|
2831
|
-
modules:
|
|
2832
|
-
idModulePrefere:
|
|
2833
|
-
readonly:
|
|
2827
|
+
modules: s,
|
|
2828
|
+
idModulePrefere: F(e, "idModule"),
|
|
2829
|
+
readonly: F(e, "readonly")
|
|
2834
2830
|
}));
|
|
2835
|
-
return It(
|
|
2836
|
-
nomenclatureFilter:
|
|
2837
|
-
reclamantMode:
|
|
2838
|
-
typesReclamant: v(() => (e.typesReclamant ??
|
|
2831
|
+
return It(k({
|
|
2832
|
+
nomenclatureFilter: F(e, "nomenclatureFilter"),
|
|
2833
|
+
reclamantMode: F(e, "reclamantMode"),
|
|
2834
|
+
typesReclamant: v(() => (e.typesReclamant ?? H).filter((t) => !e.typesReclamantExclus.includes(t))),
|
|
2839
2835
|
provenances: v(() => {
|
|
2840
2836
|
let t = i.cache.provenances ?? [];
|
|
2841
2837
|
return (e.provenances ?? t.map((e) => e.id)).filter((t) => !e.provenancesExclues.includes(t)).flatMap((e) => {
|
|
2842
2838
|
let n = t.find((t) => t.id === e);
|
|
2843
2839
|
return n ? [{
|
|
2844
2840
|
...n,
|
|
2845
|
-
icon:
|
|
2841
|
+
icon: we(e)
|
|
2846
2842
|
}] : [];
|
|
2847
2843
|
});
|
|
2848
2844
|
}),
|
|
2849
|
-
modulesReclamant:
|
|
2845
|
+
modulesReclamant: s,
|
|
2846
|
+
repriseReclamant: o,
|
|
2850
2847
|
...r
|
|
2851
2848
|
})), {
|
|
2852
2849
|
data: i,
|
|
2853
|
-
draft:
|
|
2850
|
+
draft: c,
|
|
2854
2851
|
modulesCharges: a,
|
|
2852
|
+
repriseReclamant: o,
|
|
2855
2853
|
onError: n
|
|
2856
2854
|
};
|
|
2857
2855
|
},
|
|
@@ -2883,13 +2881,31 @@ var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n
|
|
|
2883
2881
|
}
|
|
2884
2882
|
} },
|
|
2885
2883
|
async created() {
|
|
2886
|
-
this.draft.reset(this.modelValue), this.draft.syncReclamant();
|
|
2884
|
+
this.data.loadNomenclature(), this.data.loadProvenances(), this.draft.reset(this.modelValue), this.reclamantMode === "step" && await this.reprendreReclamantFourni(), this.draft.syncReclamant();
|
|
2887
2885
|
let e = this.draft.reclamantSelectionne;
|
|
2888
2886
|
this.$watch("draft.reclamantSelectionne", async (t) => {
|
|
2889
2887
|
this.$emit("reclamantChange", t), await this.chargerModulesReclamant(t, e) && this.draft.syncReclamant();
|
|
2890
|
-
}), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)),
|
|
2888
|
+
}), this.$watch(() => JSON.stringify(this.motifChoisi), () => this.$emit("motifChange", this.motifChoisi)), await this.chargerModulesReclamant(e, e) && this.draft.prefillCiblePrincipale();
|
|
2891
2889
|
},
|
|
2892
2890
|
methods: {
|
|
2891
|
+
async reprendreReclamantFourni() {
|
|
2892
|
+
let { type: e, id: t } = this.draft.draft.reclamant;
|
|
2893
|
+
if (!e || t == null) return;
|
|
2894
|
+
let n = (n) => n.type === e && String(n.id) === String(t), [r] = ke([e]), i = null;
|
|
2895
|
+
if (r) {
|
|
2896
|
+
this.repriseReclamant = !0;
|
|
2897
|
+
try {
|
|
2898
|
+
i = (await this.data.searchReclamants(r, String(t)) ?? []).find(n) ?? null;
|
|
2899
|
+
} catch {} finally {
|
|
2900
|
+
this.repriseReclamant = !1;
|
|
2901
|
+
}
|
|
2902
|
+
}
|
|
2903
|
+
n(this.draft.draft.reclamant) && this.draft.selectReclamant(i ?? {
|
|
2904
|
+
type: e,
|
|
2905
|
+
id: t,
|
|
2906
|
+
libelle: `${e}/${t}`
|
|
2907
|
+
});
|
|
2908
|
+
},
|
|
2893
2909
|
async chargerModulesReclamant(e, t) {
|
|
2894
2910
|
if (this.modules && e === t) return this.modulesCharges = null, !0;
|
|
2895
2911
|
if (!this.draft.reclamantEstContrat) return this.modulesCharges = [], !0;
|
|
@@ -2981,24 +2997,24 @@ var Ki = /*#__PURE__*/ K(Li, [["render", Gi]]), qi = (e, { signal: t, baseUrl: n
|
|
|
2981
2997
|
class: "col-12 col-lg-4"
|
|
2982
2998
|
};
|
|
2983
2999
|
function ta(e, t, n, r, i, a) {
|
|
2984
|
-
let o =
|
|
2985
|
-
return
|
|
3000
|
+
let o = N("aside-block"), s = N("stepper-block");
|
|
3001
|
+
return O(), x("div", $i, [e.aside ? (O(), x("div", ea, [M(e.$slots, "aside", {}, () => [w(o, { "nb-similaires": e.nbSimilaires }, de({ _: 2 }, [e.$slots["aside-similaires"] ? {
|
|
2986
3002
|
name: "similaires",
|
|
2987
|
-
fn:
|
|
3003
|
+
fn: L((t) => [M(e.$slots, "aside-similaires", D(T(t)))]),
|
|
2988
3004
|
key: "0"
|
|
2989
3005
|
} : void 0, e.$slots["aside-evenements"] ? {
|
|
2990
3006
|
name: "evenements",
|
|
2991
|
-
fn:
|
|
3007
|
+
fn: L(() => [M(e.$slots, "aside-evenements")]),
|
|
2992
3008
|
key: "1"
|
|
2993
|
-
} : void 0]), 1032, ["nb-similaires"])])])) : b("", !0), S("div", { class:
|
|
3009
|
+
} : void 0]), 1032, ["nb-similaires"])])])) : b("", !0), S("div", { class: E(["col-12", e.aside ? "col-lg-8" : ""]) }, [w(s, {
|
|
2994
3010
|
step: i.currentStep,
|
|
2995
3011
|
"onUpdate:step": t[0] ||= (e) => i.currentStep = e,
|
|
2996
3012
|
creating: i.creating,
|
|
2997
3013
|
onStepChange: t[1] ||= (t) => e.$emit("stepChange", t),
|
|
2998
3014
|
onSubmit: a.creer
|
|
2999
|
-
},
|
|
3015
|
+
}, de({ _: 2 }, [e.$slots.reclamant ? {
|
|
3000
3016
|
name: "reclamant",
|
|
3001
|
-
fn:
|
|
3017
|
+
fn: L((t) => [M(e.$slots, "reclamant", D(T(t)))]),
|
|
3002
3018
|
key: "0"
|
|
3003
3019
|
} : void 0]), 1032, [
|
|
3004
3020
|
"step",
|
|
@@ -3037,15 +3053,15 @@ var na = /*#__PURE__*/ K(Qi, [["render", ta]]), ra = {
|
|
|
3037
3053
|
} }
|
|
3038
3054
|
}, ia = { class: "fw-medium fs-5" };
|
|
3039
3055
|
function aa(e, t, n, r, i, a) {
|
|
3040
|
-
let o =
|
|
3041
|
-
return
|
|
3056
|
+
let o = N("creer-sollicitation-form"), s = N("amsom-modal");
|
|
3057
|
+
return O(), y(s, {
|
|
3042
3058
|
"close-option": "",
|
|
3043
3059
|
size: "xl",
|
|
3044
3060
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
3045
3061
|
}, {
|
|
3046
|
-
default:
|
|
3062
|
+
default: L(() => [S("span", ia, P(n.titre), 1), w(o, pe({ class: "pt-3" }, a.formProps, he(a.formListeners), { onCreated: a.onCreated }), de({ _: 2 }, [j(e.$slots, (t, n) => ({
|
|
3047
3063
|
name: n,
|
|
3048
|
-
fn:
|
|
3064
|
+
fn: L((t) => [M(e.$slots, n, D(T(t ?? {})))])
|
|
3049
3065
|
}))]), 1040, ["onCreated"])]),
|
|
3050
3066
|
_: 3
|
|
3051
3067
|
});
|
|
@@ -3054,5 +3070,4 @@ var oa = /*#__PURE__*/ K(ra, [["render", aa]]), sa = {
|
|
|
3054
3070
|
CreerSollicitationModal: oa,
|
|
3055
3071
|
CreerSollicitationForm: na
|
|
3056
3072
|
};
|
|
3057
|
-
|
|
3058
|
-
export { na as CreerSollicitationForm, oa as CreerSollicitationModal, Te as DEFAULT_PROVENANCE_CONTACT, we as PROVENANCES_CONTACT_DEFAUT, V as PROVENANCE_CONTACT_ICONS, Ne as READONLY_FIELDS, Qe as configureCresol, sa as default, Pe as getDefaultDraft, Me as getDefaultLigne, W as getDefaultPatrimoine, Et as resetCresolCache };
|
|
3073
|
+
export { na as CreerSollicitationForm, oa as CreerSollicitationModal, Ee as DEFAULT_PROVENANCE_CONTACT, Te as PROVENANCES_CONTACT_DEFAUT, B as PROVENANCE_CONTACT_ICONS, Ne as READONLY_FIELDS, Qe as configureCresol, sa as default, Pe as getDefaultDraft, W as getDefaultLigne, U as getDefaultPatrimoine, Et as resetCresolCache };
|