@amsom-habitat/cresol 0.2.3 → 0.2.4
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/dist/cresol.js +284 -279
- package/dist/cresol.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cresol.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
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 E, withCtx as D, withDirectives as te } from "vue";
|
|
3
3
|
import { AmsomNavTabsHorizontal as ne } from "@amsom-habitat/nav-tabs";
|
|
4
4
|
import re from "@amsom-habitat/horizontal-stepper";
|
|
5
5
|
import { AmsomAutocomplete as O } from "@amsom-habitat/amsom-autocomplete";
|
|
@@ -440,30 +440,30 @@ function Ee(e, t, n, r, c, l) {
|
|
|
440
440
|
"item-key": "id",
|
|
441
441
|
"tab-spacing": 1
|
|
442
442
|
}, {
|
|
443
|
-
libelle:
|
|
443
|
+
libelle: D(({ item: e }) => [
|
|
444
444
|
u(f, { icon: e.icon }, null, 8, ["icon"]),
|
|
445
445
|
s("span", null, C(e.label), 1),
|
|
446
446
|
e.id === "similarite" && n.nbSimilaires > 0 ? (g(), o("span", Se, C(n.nbSimilaires), 1)) : a("", !0)
|
|
447
447
|
]),
|
|
448
|
-
content:
|
|
448
|
+
content: D(() => [s("div", Ce, [e.$slots.similaires ? te((g(), o("div", we, [x(e.$slots, "similaires", h(d(l.scope)))], 512)), [[E, c.activeTab === "similarite"]]) : a("", !0), e.$slots.evenements ? te((g(), o("div", Te, [x(e.$slots, "evenements")], 512)), [[E, c.activeTab === "evenements"]]) : a("", !0)])]),
|
|
449
449
|
_: 3
|
|
450
450
|
}, 8, ["modelValue", "items"])) : a("", !0);
|
|
451
451
|
}
|
|
452
|
-
var De = /*#__PURE__*/ F(xe, [["render", Ee]]),
|
|
452
|
+
var De = /*#__PURE__*/ F(xe, [["render", Ee]]), I = {
|
|
453
453
|
baseUrl: "",
|
|
454
454
|
getToken: () => k.getToken(),
|
|
455
455
|
setToken: (e) => k.setToken(e),
|
|
456
456
|
logout: () => k.logout(),
|
|
457
457
|
goToLoginPage: () => k.goToLoginPage()
|
|
458
458
|
};
|
|
459
|
-
function
|
|
460
|
-
Object.assign(
|
|
459
|
+
function Oe(e = {}) {
|
|
460
|
+
Object.assign(I, e);
|
|
461
461
|
}
|
|
462
|
-
var
|
|
462
|
+
var L = () => I;
|
|
463
463
|
//#endregion
|
|
464
464
|
//#region src/api/transport/axiosOverlayConnector.js
|
|
465
|
-
function
|
|
466
|
-
let n =
|
|
465
|
+
function ke(e, t = {}) {
|
|
466
|
+
let n = L(), r = {
|
|
467
467
|
getToken: () => n.getToken?.() ?? null,
|
|
468
468
|
setToken: (e) => n.setToken?.(e),
|
|
469
469
|
logout: () => n.logout?.(),
|
|
@@ -489,65 +489,65 @@ function Ae(e, t = {}) {
|
|
|
489
489
|
}
|
|
490
490
|
//#endregion
|
|
491
491
|
//#region src/api/transport/httpClient.js
|
|
492
|
-
var
|
|
493
|
-
let n = t ||
|
|
492
|
+
var Ae = (e, t) => {
|
|
493
|
+
let n = t || L().baseUrl;
|
|
494
494
|
if (!n) throw Error("Cresol : baseUrl non renseignée (configureCresol ou prop baseUrl)");
|
|
495
495
|
return `${n}${e}`;
|
|
496
|
-
},
|
|
496
|
+
}, je = (e = {}) => {
|
|
497
497
|
let t = new URLSearchParams();
|
|
498
498
|
Object.entries(e).forEach(([e, n]) => {
|
|
499
499
|
n != null && n !== "" && t.append(e, typeof n == "object" ? JSON.stringify(n) : n);
|
|
500
500
|
});
|
|
501
501
|
let n = t.toString();
|
|
502
502
|
return n ? `?${n}` : "";
|
|
503
|
-
},
|
|
504
|
-
url:
|
|
503
|
+
}, R = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => ke({
|
|
504
|
+
url: Ae(`${t}${je(n)}`, a),
|
|
505
505
|
method: e,
|
|
506
506
|
...r === void 0 ? {} : { data: r },
|
|
507
507
|
...i ? { signal: i } : {}
|
|
508
|
-
}, o),
|
|
508
|
+
}, o), z = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => R({
|
|
509
509
|
method: "GET",
|
|
510
510
|
path: e,
|
|
511
511
|
params: t,
|
|
512
512
|
signal: n,
|
|
513
513
|
baseUrl: i
|
|
514
|
-
}, r).then((e) => e.data),
|
|
514
|
+
}, r).then((e) => e.data), Me = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => R({
|
|
515
515
|
method: "POST",
|
|
516
516
|
path: e,
|
|
517
517
|
params: n,
|
|
518
518
|
data: t,
|
|
519
519
|
signal: r,
|
|
520
520
|
baseUrl: a
|
|
521
|
-
}, i).then((e) => e.data),
|
|
521
|
+
}, i).then((e) => e.data), Ne = { mustBeAuthenticated: !1 }, B = (e, { signal: t, baseUrl: n } = {}) => z(e, {
|
|
522
522
|
signal: t,
|
|
523
523
|
baseUrl: n,
|
|
524
|
-
overlay:
|
|
525
|
-
}),
|
|
524
|
+
overlay: Ne
|
|
525
|
+
}), Pe = (e) => B("/v2/sollicitation/motifs", e), Fe = (e) => B("/v2/sollicitation/categories", e), Ie = (e) => B("/v2/sollicitation/types", e), Le = (e) => B("/v2/sollicitation/natures", e), Re = (e) => B("/v2/sollicitation/etats", e), ze = ({ signal: e, baseUrl: t } = {}) => z("/collaborateurs", {
|
|
526
526
|
params: { actif: !0 },
|
|
527
527
|
signal: e,
|
|
528
528
|
baseUrl: t
|
|
529
|
-
}),
|
|
529
|
+
}), Be = async ({ signal: e, baseUrl: t } = {}) => (await z("/v2/patrimoine/communes", {
|
|
530
530
|
signal: e,
|
|
531
531
|
baseUrl: t
|
|
532
532
|
}) ?? []).map((e) => ({
|
|
533
533
|
idCommune: e.id,
|
|
534
534
|
commune: e.libelle
|
|
535
|
-
})),
|
|
535
|
+
})), Ve = (e, { signal: t, baseUrl: n } = {}) => z("/v2/patrimoine/entrees", {
|
|
536
536
|
params: { idCommune: e },
|
|
537
537
|
signal: t,
|
|
538
538
|
baseUrl: n
|
|
539
|
-
}),
|
|
539
|
+
}), He = (e, { signal: t, baseUrl: n } = {}) => z("/v2/patrimoine/modules", {
|
|
540
540
|
params: { codeProgramme: e },
|
|
541
541
|
signal: t,
|
|
542
542
|
baseUrl: n
|
|
543
|
-
}),
|
|
543
|
+
}), Ue = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => z("/v2/patrimoine/contrat_modules", {
|
|
544
544
|
params: {
|
|
545
545
|
idContrat: e,
|
|
546
546
|
typeContrat: t
|
|
547
547
|
},
|
|
548
548
|
signal: n,
|
|
549
549
|
baseUrl: r
|
|
550
|
-
}),
|
|
550
|
+
}), We = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => z("/v2/sollicitation/responsables", {
|
|
551
551
|
params: {
|
|
552
552
|
motif: e,
|
|
553
553
|
categorie: t,
|
|
@@ -556,11 +556,11 @@ var je = (e, t) => {
|
|
|
556
556
|
},
|
|
557
557
|
signal: i,
|
|
558
558
|
baseUrl: a
|
|
559
|
-
}),
|
|
559
|
+
}), Ge = (e, { signal: t, baseUrl: n } = {}) => z("/v2/patrimoine/contrat_module_rechercher", {
|
|
560
560
|
params: { recherche: e },
|
|
561
561
|
signal: t,
|
|
562
562
|
baseUrl: n
|
|
563
|
-
}),
|
|
563
|
+
}), Ke = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => z("/v2/cresol/reclamant_rechercher", {
|
|
564
564
|
params: {
|
|
565
565
|
categorie: e,
|
|
566
566
|
recherche: t
|
|
@@ -570,11 +570,11 @@ var je = (e, t) => {
|
|
|
570
570
|
});
|
|
571
571
|
//#endregion
|
|
572
572
|
//#region src/utils/apiError.js
|
|
573
|
-
function
|
|
573
|
+
function V(e) {
|
|
574
574
|
let t = e?.response?.data;
|
|
575
575
|
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
576
|
}
|
|
577
|
-
var
|
|
577
|
+
var qe = (e) => e?.name === "AbortError" || e?.name === "CanceledError", Je = Symbol("cresol:data"), Ye = () => ({
|
|
578
578
|
motifs: null,
|
|
579
579
|
categories: null,
|
|
580
580
|
types: null,
|
|
@@ -592,11 +592,11 @@ function Ze() {
|
|
|
592
592
|
}
|
|
593
593
|
var W = (e, t, n) => e?.find((e) => e[t] === n)?.libelle ?? n, G = (e, t, n) => e?.find((e) => e[t] === n)?.icon ?? null;
|
|
594
594
|
function Qe({ onError: e, baseUrl: t } = {}) {
|
|
595
|
-
let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) ||
|
|
595
|
+
let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) || L().baseUrl || "", o = () => Xe(a()), s = (t, r) => {
|
|
596
596
|
let i = `${a()}|${t}`;
|
|
597
597
|
if (U.has(i)) return U.get(i);
|
|
598
598
|
n.value += 1;
|
|
599
|
-
let o = Promise.resolve().then(r).catch((t) => (
|
|
599
|
+
let o = Promise.resolve().then(r).catch((t) => (qe(t) || e?.(V(t)), null)).finally(() => {
|
|
600
600
|
--n.value, U.delete(i);
|
|
601
601
|
});
|
|
602
602
|
return U.set(i, o), o;
|
|
@@ -608,26 +608,26 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
608
608
|
isLoading: r(() => n.value > 0),
|
|
609
609
|
loadNomenclature() {
|
|
610
610
|
return Promise.all([
|
|
611
|
-
c("motifs",
|
|
612
|
-
c("categories",
|
|
613
|
-
c("types",
|
|
614
|
-
c("natures",
|
|
615
|
-
c("etats",
|
|
611
|
+
c("motifs", Pe),
|
|
612
|
+
c("categories", Fe),
|
|
613
|
+
c("types", Ie),
|
|
614
|
+
c("natures", Le),
|
|
615
|
+
c("etats", Re)
|
|
616
616
|
]);
|
|
617
617
|
},
|
|
618
|
-
loadCollaborateurs: () => c("collaborateurs",
|
|
618
|
+
loadCollaborateurs: () => c("collaborateurs", ze),
|
|
619
619
|
loadCommunes() {
|
|
620
|
-
return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await
|
|
620
|
+
return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await Be(i()), o().communes));
|
|
621
621
|
},
|
|
622
622
|
loadAdresses(e) {
|
|
623
623
|
return e == null ? Promise.resolve([]) : o().adressesByCommune[e] ? Promise.resolve(o().adressesByCommune[e]) : s(`adresses:${e}`, async () => {
|
|
624
|
-
let t = await
|
|
624
|
+
let t = await Ve(e, i());
|
|
625
625
|
return o().adressesByCommune[e] = t ?? [], t;
|
|
626
626
|
});
|
|
627
627
|
},
|
|
628
628
|
loadModulesOfProgramme(e) {
|
|
629
629
|
return e == null ? Promise.resolve([]) : o().modulesByProgramme[e] ? Promise.resolve(o().modulesByProgramme[e]) : s(`modules:${e}`, async () => {
|
|
630
|
-
let t = await
|
|
630
|
+
let t = await He(e, i());
|
|
631
631
|
return o().modulesByProgramme[e] = t ?? [], t;
|
|
632
632
|
});
|
|
633
633
|
},
|
|
@@ -635,7 +635,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
635
635
|
if (e == null) return Promise.resolve([]);
|
|
636
636
|
let n = `${t ?? ""}|${e}`;
|
|
637
637
|
return o().modulesByContrat[n] ? Promise.resolve(o().modulesByContrat[n]) : s(`contratModules:${n}`, async () => {
|
|
638
|
-
let r = await
|
|
638
|
+
let r = await Ue({
|
|
639
639
|
idContrat: e,
|
|
640
640
|
typeContrat: t
|
|
641
641
|
}, i());
|
|
@@ -645,7 +645,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
645
645
|
async searchContrats(e, { signal: t } = {}) {
|
|
646
646
|
let n = (e ?? "").trim();
|
|
647
647
|
if (!n) return [];
|
|
648
|
-
let r = await
|
|
648
|
+
let r = await Ge(n, {
|
|
649
649
|
...i(),
|
|
650
650
|
signal: t
|
|
651
651
|
}), a = /* @__PURE__ */ new Map();
|
|
@@ -666,7 +666,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
666
666
|
async searchReclamants(e, t, { signal: n } = {}) {
|
|
667
667
|
let r = (t ?? "").trim();
|
|
668
668
|
if (!r) return [];
|
|
669
|
-
let a = await
|
|
669
|
+
let a = await Ke({
|
|
670
670
|
categorie: e,
|
|
671
671
|
recherche: r
|
|
672
672
|
}, {
|
|
@@ -681,6 +681,7 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
681
681
|
categorie: t.categorie?.toLowerCase() ?? e,
|
|
682
682
|
libelleReclamant: t.libelleReclamant,
|
|
683
683
|
adresse: t.adresse,
|
|
684
|
+
idModule: t.idModule,
|
|
684
685
|
estActif: !1,
|
|
685
686
|
individus: []
|
|
686
687
|
});
|
|
@@ -688,19 +689,20 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
688
689
|
r.estActif ||= !!t.estActif, r.individus.push(t);
|
|
689
690
|
}
|
|
690
691
|
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: `${
|
|
692
|
+
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 = {
|
|
693
|
+
locataire: `${e.libelleReclamant || r} — Contrat ${e.type}/${e.id}`,
|
|
694
|
+
demandeur: `${r} — ${e.libelleReclamant}`
|
|
694
695
|
}[e.categorie];
|
|
695
696
|
return {
|
|
696
697
|
...e,
|
|
697
|
-
|
|
698
|
+
dateSortie: n,
|
|
699
|
+
libelle: i ?? e.libelleReclamant
|
|
698
700
|
};
|
|
699
701
|
});
|
|
700
702
|
},
|
|
701
703
|
loadResponsables({ motif: e, categorie: t, type: n, nature: r }) {
|
|
702
704
|
return e == null ? Promise.resolve([]) : o().responsablesByMotif[e] ? Promise.resolve(o().responsablesByMotif[e]) : s(`responsables:${e}`, async () => {
|
|
703
|
-
let a = await
|
|
705
|
+
let a = await We({
|
|
704
706
|
motif: e,
|
|
705
707
|
categorie: t,
|
|
706
708
|
type: n,
|
|
@@ -737,10 +739,10 @@ function Qe({ onError: e, baseUrl: t } = {}) {
|
|
|
737
739
|
return v(l);
|
|
738
740
|
}
|
|
739
741
|
function $e(e) {
|
|
740
|
-
return _(
|
|
742
|
+
return _(Je, e), e;
|
|
741
743
|
}
|
|
742
744
|
function K() {
|
|
743
|
-
let e = f(
|
|
745
|
+
let e = f(Je, null);
|
|
744
746
|
if (!e) throw Error("useCresolData() hors de <creer-sollicitation-form>");
|
|
745
747
|
return e;
|
|
746
748
|
}
|
|
@@ -755,6 +757,17 @@ async function tt(e) {
|
|
|
755
757
|
});
|
|
756
758
|
}
|
|
757
759
|
//#endregion
|
|
760
|
+
//#region src/utils/date.js
|
|
761
|
+
function nt(e) {
|
|
762
|
+
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
763
|
+
}
|
|
764
|
+
function rt(e) {
|
|
765
|
+
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
766
|
+
}
|
|
767
|
+
function it(e) {
|
|
768
|
+
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toLocaleDateString("fr-FR");
|
|
769
|
+
}
|
|
770
|
+
//#endregion
|
|
758
771
|
//#region src/components/ReclamantRechercheBlock.vue
|
|
759
772
|
var q = [
|
|
760
773
|
{
|
|
@@ -763,7 +776,7 @@ var q = [
|
|
|
763
776
|
icon: "house-user",
|
|
764
777
|
recherche: "Rechercher un locataire",
|
|
765
778
|
aucun: "Aucun locataire trouvé.",
|
|
766
|
-
placeholder: "Nom, prénom, n° de contrat, adresse, téléphone ou mail…"
|
|
779
|
+
placeholder: "Nom, prénom, n° de contrat ou de module, adresse, téléphone ou mail…"
|
|
767
780
|
},
|
|
768
781
|
{
|
|
769
782
|
key: "demandeur",
|
|
@@ -795,9 +808,9 @@ var q = [
|
|
|
795
808
|
icon: "magnifying-glass",
|
|
796
809
|
recherche: "Rechercher parmi tous les réclamants",
|
|
797
810
|
aucun: "Aucun réclamant trouvé.",
|
|
798
|
-
placeholder: "Nom, prénom, n° de contrat ou de demande, adresse, téléphone ou mail…"
|
|
811
|
+
placeholder: "Nom, prénom, n° de contrat, de module ou de demande, adresse, téléphone ou mail…"
|
|
799
812
|
}
|
|
800
|
-
],
|
|
813
|
+
], at = {
|
|
801
814
|
signataire: "Signataire",
|
|
802
815
|
occupant: "Occupant",
|
|
803
816
|
demandeur: "Demandeur"
|
|
@@ -805,7 +818,7 @@ var q = [
|
|
|
805
818
|
D: "demandeur",
|
|
806
819
|
T: "tiers",
|
|
807
820
|
U: "autre"
|
|
808
|
-
}[e.type] ?? "locataire" : null,
|
|
821
|
+
}[e.type] ?? "locataire" : null, ot = {
|
|
809
822
|
name: "ReclamantRechercheBlock",
|
|
810
823
|
components: { AmsomAutocomplete: O },
|
|
811
824
|
setup() {
|
|
@@ -870,6 +883,9 @@ var q = [
|
|
|
870
883
|
return e ? `${e.type}|${e.id}` : null;
|
|
871
884
|
},
|
|
872
885
|
categorieOf: J,
|
|
886
|
+
sortiLibelle(e) {
|
|
887
|
+
return e?.dateSortie == null ? "sorti" : `sorti le ${it(e.dateSortie)}`;
|
|
888
|
+
},
|
|
873
889
|
iconOf(e) {
|
|
874
890
|
return q.find((t) => t.key === J(e))?.icon ?? "user";
|
|
875
891
|
},
|
|
@@ -884,7 +900,7 @@ var q = [
|
|
|
884
900
|
referenceOf(e) {
|
|
885
901
|
if (!e?.individus) return "";
|
|
886
902
|
let t = J(e);
|
|
887
|
-
return t === "locataire" ? `Contrat ${e.type}/${e.id}` : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : "Tiers";
|
|
903
|
+
return t === "locataire" ? [`Contrat ${e.type}/${e.id}`, e.idModule && `Module ${e.idModule}`].filter(Boolean).join(" — ") : t === "demandeur" ? e.libelleReclamant : t === "autre" ? "Individu « Autre »" : "Tiers";
|
|
888
904
|
},
|
|
889
905
|
detailOf(e) {
|
|
890
906
|
let t = e?.individus ?? [];
|
|
@@ -892,28 +908,28 @@ var q = [
|
|
|
892
908
|
let e = t[0];
|
|
893
909
|
return e ? [e.telephone, e.mail].filter(Boolean).join(" — ") : "";
|
|
894
910
|
}
|
|
895
|
-
return t.map((
|
|
896
|
-
let
|
|
897
|
-
return
|
|
911
|
+
return t.map((t) => {
|
|
912
|
+
let n = [t.nom, t.prenom].filter(Boolean).join(" "), r = e.estActif && t.dateSortie != null && t.dateSortie * 1e3 < Date.now() ? `sorti le ${it(t.dateSortie)}` : null, i = [at[t.role]?.toLowerCase(), r].filter(Boolean).join(", ");
|
|
913
|
+
return i ? `${n} (${i})` : n;
|
|
898
914
|
}).join(", ");
|
|
899
915
|
}
|
|
900
916
|
}
|
|
901
|
-
},
|
|
917
|
+
}, st = {
|
|
902
918
|
key: 0,
|
|
903
919
|
class: "d-flex flex-column gap-3"
|
|
904
|
-
},
|
|
920
|
+
}, ct = { class: "d-flex flex-wrap gap-2" }, lt = ["onClick"], ut = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, dt = { class: "min-w-0" }, ft = {
|
|
905
921
|
key: 0,
|
|
906
922
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
907
|
-
},
|
|
923
|
+
}, pt = { class: "text-muted d-block text-truncate" }, mt = { key: 0 }, ht = {
|
|
908
924
|
key: 0,
|
|
909
925
|
class: "text-muted d-block text-truncate"
|
|
910
|
-
},
|
|
926
|
+
}, gt = {
|
|
911
927
|
key: 0,
|
|
912
928
|
class: "text-muted"
|
|
913
929
|
};
|
|
914
|
-
function
|
|
930
|
+
function _t(e, t, r, c, d, f) {
|
|
915
931
|
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
916
|
-
return d.iconsReady ? (g(), o("div",
|
|
932
|
+
return d.iconsReady ? (g(), o("div", st, [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", ct, [(g(!0), o(n, null, b(f.categories, (e) => (g(), o("button", {
|
|
917
933
|
key: e.key,
|
|
918
934
|
type: "button",
|
|
919
935
|
class: m(["btn btn-sm d-inline-flex align-items-center gap-2", d.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -921,8 +937,8 @@ function mt(e, t, r, c, d, f) {
|
|
|
921
937
|
}, [u(p, {
|
|
922
938
|
icon: e.icon,
|
|
923
939
|
"fixed-width": ""
|
|
924
|
-
}, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10,
|
|
925
|
-
s("label",
|
|
940
|
+
}, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10, lt))), 128))])]), s("div", null, [
|
|
941
|
+
s("label", ut, C(f.categorieCourante.recherche), 1),
|
|
926
942
|
(g(), i(h, {
|
|
927
943
|
key: d.categorie,
|
|
928
944
|
modelValue: f.selectedTrouve,
|
|
@@ -938,10 +954,10 @@ function mt(e, t, r, c, d, f) {
|
|
|
938
954
|
"debounce-delay": 0,
|
|
939
955
|
onSearch: f.rechercherPlusTard
|
|
940
956
|
}, {
|
|
941
|
-
options:
|
|
942
|
-
s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [l(C(f.titreOf(e)) + " ", 1), e?.estActif ? a("", !0) : (g(), o("span",
|
|
943
|
-
s("small",
|
|
944
|
-
f.detailOf(e) ? (g(), o("small",
|
|
957
|
+
options: D((e) => [s("div", dt, [
|
|
958
|
+
s("div", { class: m(["fw-medium text-truncate", e?.estActif ? "" : "text-muted"]) }, [l(C(f.titreOf(e)) + " ", 1), e?.estActif ? a("", !0) : (g(), o("span", ft, C(f.categorieOf(e) === "demandeur" ? "inactive" : f.sortiLibelle(e)), 1))], 2),
|
|
959
|
+
s("small", pt, [l(C(f.referenceOf(e)) + " ", 1), e?.adresse ? (g(), o("span", mt, " — " + C(e.adresse), 1)) : a("", !0)]),
|
|
960
|
+
f.detailOf(e) ? (g(), o("small", ht, C(f.detailOf(e)), 1)) : a("", !0)
|
|
945
961
|
])]),
|
|
946
962
|
_: 1
|
|
947
963
|
}, 8, [
|
|
@@ -954,10 +970,10 @@ function mt(e, t, r, c, d, f) {
|
|
|
954
970
|
"placeholder",
|
|
955
971
|
"onSearch"
|
|
956
972
|
])),
|
|
957
|
-
d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small",
|
|
973
|
+
d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small", gt, C(f.categorieCourante.aucun), 1)) : a("", !0)
|
|
958
974
|
])])) : a("", !0);
|
|
959
975
|
}
|
|
960
|
-
var
|
|
976
|
+
var vt = /*#__PURE__*/ F(ot, [["render", _t]]), yt = {
|
|
961
977
|
name: "ProvenanceSelecteurBlock",
|
|
962
978
|
setup() {
|
|
963
979
|
return { draft: P() };
|
|
@@ -973,22 +989,22 @@ var ht = /*#__PURE__*/ F(rt, [["render", mt]]), gt = {
|
|
|
973
989
|
return this.provenances.find((e) => e.id === this.selected) ?? null;
|
|
974
990
|
}
|
|
975
991
|
}
|
|
976
|
-
},
|
|
992
|
+
}, bt = {
|
|
977
993
|
key: 0,
|
|
978
994
|
class: "fs-7 text-muted"
|
|
979
|
-
},
|
|
995
|
+
}, xt = { class: "fw-medium" }, St = { key: 1 }, Ct = { class: "d-flex flex-wrap gap-2" }, wt = ["onClick"], Tt = {
|
|
980
996
|
key: 0,
|
|
981
997
|
class: "fs-7 text-danger mt-1"
|
|
982
998
|
};
|
|
983
|
-
function
|
|
999
|
+
function Et(e, t, r, c, d, f) {
|
|
984
1000
|
let p = S("font-awesome-icon");
|
|
985
|
-
return c.draft.isReadonly("provenance") ? (g(), o("div",
|
|
1001
|
+
return c.draft.isReadonly("provenance") ? (g(), o("div", bt, [t[0] ||= l(" Provenance du contact : ", -1), s("span", xt, [f.provenanceChoisie?.icon ? (g(), i(p, {
|
|
986
1002
|
key: 0,
|
|
987
1003
|
icon: f.provenanceChoisie.icon,
|
|
988
1004
|
"fixed-width": ""
|
|
989
|
-
}, null, 8, ["icon"])) : a("", !0), l(" " + C(f.provenanceChoisie?.libelle ?? "—"), 1)])])) : (g(), o("div",
|
|
1005
|
+
}, null, 8, ["icon"])) : a("", !0), l(" " + C(f.provenanceChoisie?.libelle ?? "—"), 1)])])) : (g(), o("div", St, [
|
|
990
1006
|
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",
|
|
1007
|
+
s("div", Ct, [(g(!0), o(n, null, b(f.provenances, (e) => (g(), o("button", {
|
|
992
1008
|
key: e.id,
|
|
993
1009
|
type: "button",
|
|
994
1010
|
class: m(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === f.selected ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -996,15 +1012,15 @@ function Ct(e, t, r, c, d, f) {
|
|
|
996
1012
|
}, [u(p, {
|
|
997
1013
|
icon: e.icon,
|
|
998
1014
|
"fixed-width": ""
|
|
999
|
-
}, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10,
|
|
1000
|
-
f.selected ? a("", !0) : (g(), o("div",
|
|
1015
|
+
}, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10, wt))), 128))]),
|
|
1016
|
+
f.selected ? a("", !0) : (g(), o("div", Tt, " Sélectionnez par quel canal la sollicitation vous est parvenue. "))
|
|
1001
1017
|
]));
|
|
1002
1018
|
}
|
|
1003
|
-
var
|
|
1019
|
+
var Dt = /*#__PURE__*/ F(yt, [["render", Et]]), Ot = {
|
|
1004
1020
|
name: "EtapeReclamantBlock",
|
|
1005
1021
|
components: {
|
|
1006
|
-
ReclamantRechercheBlock:
|
|
1007
|
-
ProvenanceSelecteurBlock:
|
|
1022
|
+
ReclamantRechercheBlock: vt,
|
|
1023
|
+
ProvenanceSelecteurBlock: Dt
|
|
1008
1024
|
},
|
|
1009
1025
|
props: { premiere: {
|
|
1010
1026
|
type: Boolean,
|
|
@@ -1013,18 +1029,18 @@ var wt = /*#__PURE__*/ F(gt, [["render", Ct]]), Tt = {
|
|
|
1013
1029
|
setup() {
|
|
1014
1030
|
return { draft: P() };
|
|
1015
1031
|
}
|
|
1016
|
-
},
|
|
1017
|
-
function
|
|
1032
|
+
}, kt = { class: "d-flex flex-column gap-3" }, At = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
|
|
1033
|
+
function jt(e, t, n, r, c, d) {
|
|
1018
1034
|
let f = S("provenance-selecteur-block"), p = S("font-awesome-icon"), m = S("reclamant-recherche-block");
|
|
1019
|
-
return g(), o("div",
|
|
1035
|
+
return g(), o("div", kt, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
|
|
1020
1036
|
reclamant: r.draft.reclamantSelectionne,
|
|
1021
1037
|
select: r.draft.selectReclamant
|
|
1022
|
-
}, () => [s("div",
|
|
1038
|
+
}, () => [s("div", At, [u(p, {
|
|
1023
1039
|
icon: "user",
|
|
1024
1040
|
class: "text-primary me-2"
|
|
1025
1041
|
}), t[0] ||= l(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), u(m)])]);
|
|
1026
1042
|
}
|
|
1027
|
-
var
|
|
1043
|
+
var Mt = /*#__PURE__*/ F(Ot, [["render", jt]]), Nt = Symbol("cresol:options"), Pt = (e) => _(Nt, e), Y = () => f(Nt, {});
|
|
1028
1044
|
//#endregion
|
|
1029
1045
|
//#region src/utils/text.js
|
|
1030
1046
|
function X(e, t = !0) {
|
|
@@ -1034,7 +1050,7 @@ function X(e, t = !0) {
|
|
|
1034
1050
|
}
|
|
1035
1051
|
//#endregion
|
|
1036
1052
|
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1037
|
-
var
|
|
1053
|
+
var Ft = {
|
|
1038
1054
|
name: "ReclamantSelecteurBlock",
|
|
1039
1055
|
components: { AmsomAutocomplete: O },
|
|
1040
1056
|
props: {
|
|
@@ -1080,25 +1096,25 @@ var Mt = {
|
|
|
1080
1096
|
return n ? t.filter((e) => (X(e?.libelle) ?? "").includes(n)) : t;
|
|
1081
1097
|
}
|
|
1082
1098
|
}
|
|
1083
|
-
},
|
|
1099
|
+
}, It = {
|
|
1084
1100
|
key: 0,
|
|
1085
1101
|
class: "fs-7 text-muted"
|
|
1086
|
-
},
|
|
1102
|
+
}, Lt = { class: "fw-medium" }, Rt = {
|
|
1087
1103
|
key: 0,
|
|
1088
1104
|
class: "btn-group btn-group-sm",
|
|
1089
1105
|
role: "group"
|
|
1090
|
-
},
|
|
1091
|
-
function
|
|
1106
|
+
}, zt = ["onClick"], Bt = ["value"], Vt = ["value"];
|
|
1107
|
+
function Ht(e, t, r, a, c, u) {
|
|
1092
1108
|
let d = S("amsom-autocomplete");
|
|
1093
|
-
return u.estFige ? (g(), o("div",
|
|
1109
|
+
return u.estFige ? (g(), o("div", It, [t[2] ||= l(" Réclamant : ", -1), s("span", Lt, C(u.reclamantSelectionne?.libelle), 1)])) : (g(), o("div", {
|
|
1094
1110
|
key: 1,
|
|
1095
1111
|
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), u.presentation === "switch" ? (g(), o("div",
|
|
1112
|
+
}, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), u.presentation === "switch" ? (g(), o("div", Rt, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("button", {
|
|
1097
1113
|
key: t,
|
|
1098
1114
|
type: "button",
|
|
1099
1115
|
class: m(["btn btn-sm py-0", e === u.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
|
|
1100
1116
|
onClick: (t) => u.select(e)
|
|
1101
|
-
}, C(e.libelle), 11,
|
|
1117
|
+
}, C(e.libelle), 11, zt))), 128))])) : u.presentation === "autocomplete" ? (g(), i(d, {
|
|
1102
1118
|
key: 1,
|
|
1103
1119
|
"model-value": u.reclamantSelectionne,
|
|
1104
1120
|
items: u.reclamants,
|
|
@@ -1125,17 +1141,17 @@ function zt(e, t, r, a, c, u) {
|
|
|
1125
1141
|
}, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("option", {
|
|
1126
1142
|
key: t,
|
|
1127
1143
|
value: t
|
|
1128
|
-
}, C(e.libelle), 9,
|
|
1144
|
+
}, C(e.libelle), 9, Vt))), 128))], 42, Bt))], 2));
|
|
1129
1145
|
}
|
|
1130
1146
|
//#endregion
|
|
1131
1147
|
//#region src/components/EtapeCategorieBlock.vue
|
|
1132
|
-
var
|
|
1148
|
+
var Ut = {
|
|
1133
1149
|
name: "EtapeCategorieBlock",
|
|
1134
1150
|
components: {
|
|
1135
1151
|
AmsomOverlay: t,
|
|
1136
1152
|
AmsomAutocomplete: O,
|
|
1137
|
-
ReclamantSelecteurBlock: /* @__PURE__ */ F(
|
|
1138
|
-
ProvenanceSelecteurBlock:
|
|
1153
|
+
ReclamantSelecteurBlock: /* @__PURE__ */ F(Ft, [["render", Ht]]),
|
|
1154
|
+
ProvenanceSelecteurBlock: Dt
|
|
1139
1155
|
},
|
|
1140
1156
|
props: { premiere: {
|
|
1141
1157
|
type: Boolean,
|
|
@@ -1297,40 +1313,40 @@ var Bt = {
|
|
|
1297
1313
|
return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
|
|
1298
1314
|
}
|
|
1299
1315
|
}
|
|
1300
|
-
},
|
|
1316
|
+
}, Wt = {
|
|
1301
1317
|
key: 0,
|
|
1302
1318
|
class: "d-flex flex-column gap-3"
|
|
1303
|
-
},
|
|
1319
|
+
}, Gt = { key: 2 }, Kt = { class: "d-flex flex-wrap align-items-center gap-2" }, qt = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, Jt = { key: 3 }, Yt = { class: "d-flex align-items-center gap-2" }, Xt = { class: "min-w-0" }, Zt = { class: "fw-medium text-truncate" }, Qt = { class: "text-muted d-block text-truncate" }, $t = {
|
|
1304
1320
|
key: 4,
|
|
1305
1321
|
class: "d-flex align-items-center gap-2 text-muted fs-7"
|
|
1306
|
-
},
|
|
1322
|
+
}, en = {
|
|
1307
1323
|
key: 5,
|
|
1308
1324
|
class: "d-flex flex-wrap align-items-center gap-2"
|
|
1309
|
-
},
|
|
1325
|
+
}, tn = ["onClick"], nn = { key: 6 }, rn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, an = { class: "row justify-content-around g-3" }, on = ["title", "onClick"], sn = { class: "fs-7 mt-1 lh-sm" }, cn = {
|
|
1310
1326
|
key: 0,
|
|
1311
1327
|
class: "col-12 text-muted fs-7"
|
|
1312
|
-
},
|
|
1328
|
+
}, ln = [
|
|
1313
1329
|
"id",
|
|
1314
1330
|
"checked",
|
|
1315
1331
|
"disabled",
|
|
1316
1332
|
"onChange"
|
|
1317
|
-
],
|
|
1318
|
-
function
|
|
1333
|
+
], un = ["for"];
|
|
1334
|
+
function dn(e, t, r, c, d, f) {
|
|
1319
1335
|
let p = S("provenance-selecteur-block"), m = S("reclamant-selecteur-block"), h = S("font-awesome-icon"), _ = S("amsom-autocomplete"), v = S("amsom-overlay");
|
|
1320
1336
|
return g(), i(v, { loading: c.data.isLoading && !c.data.cache.motifs || !d.iconsReady }, {
|
|
1321
|
-
default:
|
|
1337
|
+
default: D(() => [d.iconsReady ? (g(), o("div", Wt, [
|
|
1322
1338
|
r.premiere ? (g(), i(p, { key: 0 })) : a("", !0),
|
|
1323
1339
|
c.options.reclamantMode === "step" ? a("", !0) : (g(), i(m, { key: 1 })),
|
|
1324
|
-
f.motifFige && f.selectionChain.length ? (g(), o("div",
|
|
1340
|
+
f.motifFige && f.selectionChain.length ? (g(), o("div", Gt, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), s("div", Kt, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
|
|
1325
1341
|
key: 0,
|
|
1326
1342
|
icon: "fa-solid fa-chevron-right",
|
|
1327
1343
|
class: "text-muted fs-7"
|
|
1328
|
-
})) : a("", !0), s("span",
|
|
1344
|
+
})) : a("", !0), s("span", qt, [e.icon ? (g(), i(h, {
|
|
1329
1345
|
key: 0,
|
|
1330
1346
|
icon: e.icon,
|
|
1331
1347
|
"fixed-width": ""
|
|
1332
1348
|
}, null, 8, ["icon"])) : a("", !0), l(" " + C(e.libelle), 1)])], 64))), 128))])])) : a("", !0),
|
|
1333
|
-
f.motifFige ? a("", !0) : (g(), o("div",
|
|
1349
|
+
f.motifFige ? a("", !0) : (g(), o("div", Jt, [t[2] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), u(_, {
|
|
1334
1350
|
modelValue: f.motifRecherche,
|
|
1335
1351
|
"onUpdate:modelValue": t[0] ||= (e) => f.motifRecherche = e,
|
|
1336
1352
|
items: f.allowedMotifs,
|
|
@@ -1342,12 +1358,12 @@ function cn(e, t, r, c, d, f) {
|
|
|
1342
1358
|
"input-size": "sm",
|
|
1343
1359
|
"hide-choices": ""
|
|
1344
1360
|
}, {
|
|
1345
|
-
options:
|
|
1361
|
+
options: D((e) => [s("div", Yt, [e?.icon ? (g(), i(h, {
|
|
1346
1362
|
key: 0,
|
|
1347
1363
|
icon: e.icon,
|
|
1348
1364
|
class: "text-primary",
|
|
1349
1365
|
"fixed-width": ""
|
|
1350
|
-
}, null, 8, ["icon"])) : a("", !0), s("div",
|
|
1366
|
+
}, null, 8, ["icon"])) : a("", !0), s("div", Xt, [s("div", Zt, C(e?.libelle), 1), s("small", Qt, C(e?.categorie) + " › " + C(e?.type) + " › " + C(e?.nature), 1)])])]),
|
|
1351
1367
|
_: 1
|
|
1352
1368
|
}, 8, [
|
|
1353
1369
|
"modelValue",
|
|
@@ -1357,12 +1373,12 @@ function cn(e, t, r, c, d, f) {
|
|
|
1357
1373
|
"get-input-libelle-from-id",
|
|
1358
1374
|
"filtering-function"
|
|
1359
1375
|
])])),
|
|
1360
|
-
f.motifFige ? a("", !0) : (g(), o("div",
|
|
1376
|
+
f.motifFige ? a("", !0) : (g(), o("div", $t, [...t[3] ||= [
|
|
1361
1377
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1),
|
|
1362
1378
|
s("span", null, "ou sélection guidée", -1),
|
|
1363
1379
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1)
|
|
1364
1380
|
]])),
|
|
1365
|
-
!f.motifFige && f.selectionChain.length ? (g(), o("div",
|
|
1381
|
+
!f.motifFige && f.selectionChain.length ? (g(), o("div", en, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
|
|
1366
1382
|
key: 0,
|
|
1367
1383
|
icon: "fa-solid fa-chevron-right",
|
|
1368
1384
|
class: "text-muted fs-7"
|
|
@@ -1381,8 +1397,8 @@ function cn(e, t, r, c, d, f) {
|
|
|
1381
1397
|
icon: "fa-solid fa-xmark",
|
|
1382
1398
|
class: "fs-7 opacity-75"
|
|
1383
1399
|
})
|
|
1384
|
-
], 8,
|
|
1385
|
-
!f.motifFige && f.currentLevel ? (g(), o("div",
|
|
1400
|
+
], 8, tn)], 64))), 128))])) : a("", !0),
|
|
1401
|
+
!f.motifFige && f.currentLevel ? (g(), o("div", nn, [s("label", rn, C(f.currentLevel.title), 1), s("div", an, [(g(!0), o(n, null, b(f.currentLevel.options, (e) => (g(), o("div", {
|
|
1386
1402
|
key: e.id,
|
|
1387
1403
|
class: "col-3 text-center"
|
|
1388
1404
|
}, [s("button", {
|
|
@@ -1394,7 +1410,7 @@ function cn(e, t, r, c, d, f) {
|
|
|
1394
1410
|
key: 0,
|
|
1395
1411
|
icon: e.icon,
|
|
1396
1412
|
size: "lg"
|
|
1397
|
-
}, null, 8, ["icon"])) : a("", !0)], 8,
|
|
1413
|
+
}, null, 8, ["icon"])) : a("", !0)], 8, on), s("div", sn, C(e.libelle), 1)]))), 128)), f.currentLevel.options.length ? a("", !0) : (g(), o("div", cn, " Aucun choix disponible "))])])) : a("", !0),
|
|
1398
1414
|
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
1415
|
s("hr", { class: "flex-grow-1 my-0" }),
|
|
1400
1416
|
s("span", null, "Autres motifs liés"),
|
|
@@ -1409,15 +1425,15 @@ function cn(e, t, r, c, d, f) {
|
|
|
1409
1425
|
checked: f.isActive(e.idMotif),
|
|
1410
1426
|
disabled: f.motifFige,
|
|
1411
1427
|
onChange: (t) => f.toggleMotifAssocie(e)
|
|
1412
|
-
}, null, 40,
|
|
1428
|
+
}, null, 40, ln), s("label", {
|
|
1413
1429
|
class: "form-check-label fs-7",
|
|
1414
1430
|
for: `assoc-${e.idMotif}`
|
|
1415
|
-
}, C(e.libelle) + " ? ", 9,
|
|
1431
|
+
}, C(e.libelle) + " ? ", 9, un)]))), 128))], 64)) : a("", !0)
|
|
1416
1432
|
])) : a("", !0)]),
|
|
1417
1433
|
_: 1
|
|
1418
1434
|
}, 8, ["loading"]);
|
|
1419
1435
|
}
|
|
1420
|
-
var
|
|
1436
|
+
var fn = /*#__PURE__*/ F(Ut, [["render", dn]]), pn = {
|
|
1421
1437
|
B: "briefcase",
|
|
1422
1438
|
M: "store",
|
|
1423
1439
|
W: "dungeon",
|
|
@@ -1427,15 +1443,15 @@ var ln = /*#__PURE__*/ F(Bt, [["render", cn]]), un = {
|
|
|
1427
1443
|
S: "square-parking",
|
|
1428
1444
|
V: "hands-holding"
|
|
1429
1445
|
};
|
|
1430
|
-
function
|
|
1431
|
-
return e === "L" ? t ? "building" : "house" :
|
|
1446
|
+
function mn(e, t = !1, n = "circle-question") {
|
|
1447
|
+
return e === "L" ? t ? "building" : "house" : pn[e] ?? n;
|
|
1432
1448
|
}
|
|
1433
|
-
function
|
|
1449
|
+
function hn(e) {
|
|
1434
1450
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1435
1451
|
}
|
|
1436
1452
|
//#endregion
|
|
1437
1453
|
//#region src/components/CiblePickerBlock.vue
|
|
1438
|
-
var
|
|
1454
|
+
var gn = 0, _n = {
|
|
1439
1455
|
name: "CiblePickerBlock",
|
|
1440
1456
|
components: { AmsomAutocomplete: O },
|
|
1441
1457
|
props: {
|
|
@@ -1492,7 +1508,7 @@ var pn = 0, mn = {
|
|
|
1492
1508
|
},
|
|
1493
1509
|
data() {
|
|
1494
1510
|
return {
|
|
1495
|
-
uid: ++
|
|
1511
|
+
uid: ++gn,
|
|
1496
1512
|
rechercheContrat: "",
|
|
1497
1513
|
contratsTrouves: [],
|
|
1498
1514
|
rechercheEnCours: !1,
|
|
@@ -1664,10 +1680,10 @@ var pn = 0, mn = {
|
|
|
1664
1680
|
},
|
|
1665
1681
|
filterModules({ search: e, items: t }) {
|
|
1666
1682
|
let n = (X(e) ?? "").trim();
|
|
1667
|
-
return n ? t.filter((e) => (X(this.moduleInputLibelle(e)) ?? "").includes(n) || (X(e?._autreLibelle) ?? "").includes(n)) : t;
|
|
1683
|
+
return n ? t.filter((e) => String(e?.idModule ?? "").includes(n) || (X(this.moduleInputLibelle(e)) ?? "").includes(n) || (X(e?._autreLibelle) ?? "").includes(n)) : t;
|
|
1668
1684
|
},
|
|
1669
|
-
getCategorieModuleIcon:
|
|
1670
|
-
categorieLibelle:
|
|
1685
|
+
getCategorieModuleIcon: mn,
|
|
1686
|
+
categorieLibelle: hn,
|
|
1671
1687
|
moduleLibelle(e) {
|
|
1672
1688
|
return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
|
|
1673
1689
|
},
|
|
@@ -1679,43 +1695,43 @@ var pn = 0, mn = {
|
|
|
1679
1695
|
return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
|
|
1680
1696
|
}
|
|
1681
1697
|
}
|
|
1682
|
-
},
|
|
1698
|
+
}, vn = { class: "d-flex flex-column gap-3" }, yn = {
|
|
1683
1699
|
class: "btn-group w-100",
|
|
1684
1700
|
role: "group"
|
|
1685
|
-
},
|
|
1701
|
+
}, bn = ["onClick"], xn = { class: "text-muted d-block mt-1" }, Sn = {
|
|
1686
1702
|
key: 0,
|
|
1687
1703
|
class: "form-check"
|
|
1688
|
-
},
|
|
1704
|
+
}, Cn = ["id", "checked"], wn = ["for"], Tn = { key: 1 }, En = { class: "min-w-0" }, Dn = { class: "fw-medium text-truncate text-capitalize" }, On = { class: "d-flex flex-wrap align-items-center gap-1" }, kn = { class: "text-muted" }, An = {
|
|
1689
1705
|
key: 0,
|
|
1690
1706
|
class: "badge bg-info"
|
|
1691
|
-
},
|
|
1707
|
+
}, jn = {
|
|
1692
1708
|
key: 1,
|
|
1693
1709
|
class: "badge bg-warning"
|
|
1694
|
-
},
|
|
1710
|
+
}, Mn = {
|
|
1695
1711
|
key: 0,
|
|
1696
1712
|
class: "text-muted d-block text-truncate"
|
|
1697
|
-
},
|
|
1713
|
+
}, Nn = { key: 1 }, Pn = { class: "row g-2" }, Fn = ["aria-pressed", "onClick"], In = { class: "min-w-0" }, Ln = { class: "d-block fw-semibold fs-6" }, Rn = { class: "d-block text-muted" }, zn = {
|
|
1698
1714
|
key: 2,
|
|
1699
1715
|
class: "row g-3"
|
|
1700
|
-
},
|
|
1716
|
+
}, Bn = { class: "min-w-0" }, Vn = { class: "fw-medium text-truncate" }, Hn = { class: "text-muted d-block text-truncate" }, Un = ["value"], Wn = ["value"], Gn = ["value"], Kn = {
|
|
1701
1717
|
key: 0,
|
|
1702
1718
|
class: "col-12 col-md-6"
|
|
1703
|
-
},
|
|
1719
|
+
}, qn = { class: "d-flex flex-wrap align-items-center gap-1" }, Jn = ["title"], Yn = { class: "text-muted" }, Xn = {
|
|
1704
1720
|
key: 1,
|
|
1705
1721
|
class: "d-block text-truncate"
|
|
1706
|
-
},
|
|
1722
|
+
}, Zn = {
|
|
1707
1723
|
key: 2,
|
|
1708
1724
|
class: "text-muted d-block"
|
|
1709
|
-
},
|
|
1725
|
+
}, Qn = {
|
|
1710
1726
|
key: 0,
|
|
1711
1727
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1712
|
-
},
|
|
1713
|
-
function
|
|
1728
|
+
}, $n = { class: "form-check mb-0 ms-3" }, er = ["id", "checked"], tr = ["for"];
|
|
1729
|
+
function nr(e, t, r, c, d, f) {
|
|
1714
1730
|
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
1715
|
-
return g(), o("div",
|
|
1731
|
+
return g(), o("div", vn, [
|
|
1716
1732
|
s("div", null, [
|
|
1717
1733
|
t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
|
|
1718
|
-
s("div",
|
|
1734
|
+
s("div", yn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
|
|
1719
1735
|
key: t.key,
|
|
1720
1736
|
type: "button",
|
|
1721
1737
|
class: m(["btn btn-sm", r.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -1723,19 +1739,19 @@ function $n(e, t, r, c, d, f) {
|
|
|
1723
1739
|
}, [u(p, {
|
|
1724
1740
|
icon: t.icon,
|
|
1725
1741
|
class: "me-1"
|
|
1726
|
-
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10,
|
|
1727
|
-
s("small",
|
|
1742
|
+
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, bn))), 128))]),
|
|
1743
|
+
s("small", xn, C(f.currentMode?.aide), 1)
|
|
1728
1744
|
]),
|
|
1729
|
-
r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div",
|
|
1745
|
+
r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div", Sn, [s("input", {
|
|
1730
1746
|
id: `contrat-reclamant-${d.uid}`,
|
|
1731
1747
|
class: "form-check-input",
|
|
1732
1748
|
type: "checkbox",
|
|
1733
1749
|
checked: r.contratReclamant,
|
|
1734
1750
|
onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
|
|
1735
|
-
}, null, 40,
|
|
1751
|
+
}, null, 40, Cn), s("label", {
|
|
1736
1752
|
class: "form-check-label fs-7",
|
|
1737
1753
|
for: `contrat-reclamant-${d.uid}`
|
|
1738
|
-
}, " Contrat du réclamant ", 8,
|
|
1754
|
+
}, " Contrat du réclamant ", 8, wn)])) : a("", !0), r.contratReclamant ? a("", !0) : (g(), o("div", Tn, [t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), u(h, {
|
|
1739
1755
|
modelValue: f.selectedContrat,
|
|
1740
1756
|
"onUpdate:modelValue": t[1] ||= (e) => f.selectedContrat = e,
|
|
1741
1757
|
items: d.contratsTrouves,
|
|
@@ -1749,14 +1765,14 @@ function $n(e, t, r, c, d, f) {
|
|
|
1749
1765
|
"debounce-delay": 0,
|
|
1750
1766
|
onSearch: f.rechercherPlusTard
|
|
1751
1767
|
}, {
|
|
1752
|
-
options:
|
|
1753
|
-
s("div",
|
|
1754
|
-
s("div",
|
|
1755
|
-
s("small",
|
|
1756
|
-
e?.nbModules > 1 ? (g(), o("span",
|
|
1757
|
-
e?.estSorti ? (g(), o("span",
|
|
1768
|
+
options: D((e) => [s("div", En, [
|
|
1769
|
+
s("div", Dn, C(e?.libelle ?? `Contrat ${e?.idContrat}`), 1),
|
|
1770
|
+
s("div", On, [
|
|
1771
|
+
s("small", kn, "N° " + C(e?.typeContrat) + "/" + C(e?.idContrat), 1),
|
|
1772
|
+
e?.nbModules > 1 ? (g(), o("span", An, C(e.nbModules) + " modules", 1)) : a("", !0),
|
|
1773
|
+
e?.estSorti ? (g(), o("span", jn, "Sorti")) : a("", !0)
|
|
1758
1774
|
]),
|
|
1759
|
-
f.contratAdresse(e) ? (g(), o("small",
|
|
1775
|
+
f.contratAdresse(e) ? (g(), o("small", Mn, C(f.contratAdresse(e)), 1)) : a("", !0)
|
|
1760
1776
|
])]),
|
|
1761
1777
|
_: 1
|
|
1762
1778
|
}, 8, [
|
|
@@ -1768,7 +1784,7 @@ function $n(e, t, r, c, d, f) {
|
|
|
1768
1784
|
"get-input-libelle",
|
|
1769
1785
|
"onSearch"
|
|
1770
1786
|
])]))], 64)) : a("", !0),
|
|
1771
|
-
r.cibleMode === "patrimoine" ? (g(), o("div",
|
|
1787
|
+
r.cibleMode === "patrimoine" ? (g(), o("div", Nn, [t[9] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Le problème concerne… ", -1), s("div", Pn, [(g(!0), o(n, null, b(f.portees, (t) => (g(), o("div", {
|
|
1772
1788
|
key: t.titre,
|
|
1773
1789
|
class: "col-12 col-md-6"
|
|
1774
1790
|
}, [s("button", {
|
|
@@ -1780,8 +1796,8 @@ function $n(e, t, r, c, d, f) {
|
|
|
1780
1796
|
icon: t.icon,
|
|
1781
1797
|
class: "fs-4",
|
|
1782
1798
|
"fixed-width": ""
|
|
1783
|
-
}, null, 8, ["icon"]), s("span",
|
|
1784
|
-
r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div",
|
|
1799
|
+
}, null, 8, ["icon"]), s("span", In, [s("span", Ln, C(t.titre), 1), s("small", Rn, C(t.aide), 1)])], 10, Fn)]))), 128))])])) : a("", !0),
|
|
1800
|
+
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
1801
|
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
1802
|
modelValue: f.selectedCommune,
|
|
1787
1803
|
"onUpdate:modelValue": t[2] ||= (e) => f.selectedCommune = e,
|
|
@@ -1811,7 +1827,7 @@ function $n(e, t, r, c, d, f) {
|
|
|
1811
1827
|
"input-size": "sm",
|
|
1812
1828
|
"hide-choices": ""
|
|
1813
1829
|
}, {
|
|
1814
|
-
options:
|
|
1830
|
+
options: D((e) => [s("div", Bn, [s("div", Vn, C(e?.entree), 1), s("small", Hn, C(e?.commune) + " — Programme " + C(e?.codeProgramme), 1)])]),
|
|
1815
1831
|
_: 1
|
|
1816
1832
|
}, 8, [
|
|
1817
1833
|
"modelValue",
|
|
@@ -1843,18 +1859,18 @@ function $n(e, t, r, c, d, f) {
|
|
|
1843
1859
|
class: "form-control form-control-sm",
|
|
1844
1860
|
disabled: "",
|
|
1845
1861
|
value: r.patrimoine.commune ?? "—"
|
|
1846
|
-
}, null, 8,
|
|
1862
|
+
}, null, 8, Un)]),
|
|
1847
1863
|
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
1864
|
class: "form-control form-control-sm",
|
|
1849
1865
|
disabled: "",
|
|
1850
1866
|
value: r.patrimoine.entree ?? "—"
|
|
1851
|
-
}, null, 8,
|
|
1867
|
+
}, null, 8, Wn)]),
|
|
1852
1868
|
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
1869
|
class: "form-control form-control-sm",
|
|
1854
1870
|
disabled: "",
|
|
1855
1871
|
value: r.patrimoine.etage ?? "—"
|
|
1856
|
-
}, null, 8,
|
|
1857
|
-
], 64))], 2), f.afficheModule ? (g(), o("div",
|
|
1872
|
+
}, null, 8, Gn)])
|
|
1873
|
+
], 64))], 2), f.afficheModule ? (g(), o("div", Kn, [
|
|
1858
1874
|
t[16] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Module", -1),
|
|
1859
1875
|
u(h, {
|
|
1860
1876
|
modelValue: f.selectedModule,
|
|
@@ -1868,7 +1884,7 @@ function $n(e, t, r, c, d, f) {
|
|
|
1868
1884
|
"input-size": "sm",
|
|
1869
1885
|
"hide-choices": ""
|
|
1870
1886
|
}, {
|
|
1871
|
-
options:
|
|
1887
|
+
options: D((e) => [s("div", { class: m(["min-w-0 w-100 rounded position-relative", e?._autreLibelle ? "bg-yellow-subtle p-2" : ""]) }, [
|
|
1872
1888
|
e?._autreLibelle ? (g(), i(p, {
|
|
1873
1889
|
key: 0,
|
|
1874
1890
|
icon: "building",
|
|
@@ -1876,12 +1892,12 @@ function $n(e, t, r, c, d, f) {
|
|
|
1876
1892
|
title: "Autre adresse ou étage du même programme"
|
|
1877
1893
|
})) : a("", !0),
|
|
1878
1894
|
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",
|
|
1895
|
+
s("div", qn, [f.categorieLibelle(e) ? (g(), o("span", {
|
|
1880
1896
|
key: 0,
|
|
1881
1897
|
class: "badge bg-info",
|
|
1882
1898
|
title: e?.categorieModule
|
|
1883
|
-
}, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8,
|
|
1884
|
-
e?._autreLibelle ? (g(), o("small",
|
|
1899
|
+
}, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, Jn)) : a("", !0), s("small", Yn, "N° " + C(e?.idModule), 1)]),
|
|
1900
|
+
e?._autreLibelle ? (g(), o("small", Xn, C(e._autreLibelle), 1)) : e?.etage == null ? a("", !0) : (g(), o("small", Zn, " Étage " + C(e.etage), 1))
|
|
1885
1901
|
], 2)]),
|
|
1886
1902
|
_: 1
|
|
1887
1903
|
}, 8, [
|
|
@@ -1892,29 +1908,29 @@ function $n(e, t, r, c, d, f) {
|
|
|
1892
1908
|
"filtering-function",
|
|
1893
1909
|
"disabled"
|
|
1894
1910
|
]),
|
|
1895
|
-
r.locataireActuelOption ? (g(), o("div",
|
|
1911
|
+
r.locataireActuelOption ? (g(), o("div", Qn, [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
1912
|
icon: "circle-info",
|
|
1897
1913
|
class: "mt-1"
|
|
1898
|
-
}), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div",
|
|
1914
|
+
}), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div", $n, [s("input", {
|
|
1899
1915
|
id: `locataire-actuel-${d.uid}`,
|
|
1900
1916
|
class: "form-check-input",
|
|
1901
1917
|
type: "checkbox",
|
|
1902
1918
|
checked: r.locataireActuelOption.reprendre,
|
|
1903
1919
|
onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
|
|
1904
|
-
}, null, 40,
|
|
1920
|
+
}, null, 40, er), s("label", {
|
|
1905
1921
|
class: "form-check-label fs-7",
|
|
1906
1922
|
for: `locataire-actuel-${d.uid}`
|
|
1907
|
-
}, " Rattacher au locataire actuel du module ", 8,
|
|
1923
|
+
}, " Rattacher au locataire actuel du module ", 8, tr)])])) : a("", !0)
|
|
1908
1924
|
])) : a("", !0)])) : a("", !0)
|
|
1909
1925
|
]);
|
|
1910
1926
|
}
|
|
1911
1927
|
//#endregion
|
|
1912
1928
|
//#region src/components/EtapeCibleBlock.vue
|
|
1913
|
-
var
|
|
1929
|
+
var rr = {
|
|
1914
1930
|
name: "EtapeCibleBlock",
|
|
1915
1931
|
components: {
|
|
1916
1932
|
AmsomOverlay: t,
|
|
1917
|
-
CiblePickerBlock: /* @__PURE__ */ F(
|
|
1933
|
+
CiblePickerBlock: /* @__PURE__ */ F(_n, [["render", nr]])
|
|
1918
1934
|
},
|
|
1919
1935
|
setup() {
|
|
1920
1936
|
return {
|
|
@@ -2020,32 +2036,32 @@ var er = {
|
|
|
2020
2036
|
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
2037
|
}
|
|
2022
2038
|
}
|
|
2023
|
-
},
|
|
2039
|
+
}, ir = { class: "d-flex flex-column gap-3" }, ar = {
|
|
2024
2040
|
key: 0,
|
|
2025
2041
|
class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
|
|
2026
|
-
},
|
|
2042
|
+
}, or = { class: "fs-7" }, sr = {
|
|
2027
2043
|
key: 1,
|
|
2028
2044
|
class: "d-flex flex-column gap-1"
|
|
2029
|
-
},
|
|
2045
|
+
}, cr = {
|
|
2030
2046
|
key: 0,
|
|
2031
2047
|
class: "text-muted me-1"
|
|
2032
|
-
},
|
|
2048
|
+
}, lr = { class: "d-flex align-items-center gap-2" }, ur = { class: "fw-medium fs-7" }, dr = { class: "form-check form-switch mb-0" }, fr = [
|
|
2033
2049
|
"id",
|
|
2034
2050
|
"checked",
|
|
2035
2051
|
"onChange"
|
|
2036
|
-
],
|
|
2052
|
+
], pr = ["for"], mr = {
|
|
2037
2053
|
key: 0,
|
|
2038
2054
|
class: "mt-2"
|
|
2039
2055
|
};
|
|
2040
|
-
function
|
|
2056
|
+
function hr(e, t, r, c, d, f) {
|
|
2041
2057
|
let m = S("font-awesome-icon"), h = S("cible-picker-block"), _ = S("amsom-overlay");
|
|
2042
2058
|
return g(), i(_, { loading: c.data.isLoading }, {
|
|
2043
|
-
default:
|
|
2044
|
-
f.motifLibelle ? (g(), o("div",
|
|
2059
|
+
default: D(() => [s("div", ir, [
|
|
2060
|
+
f.motifLibelle ? (g(), o("div", ar, [u(m, {
|
|
2045
2061
|
icon: "tag",
|
|
2046
2062
|
class: "text-primary"
|
|
2047
|
-
}), s("span",
|
|
2048
|
-
f.cibleFigee ? (g(), o("div",
|
|
2063
|
+
}), s("span", or, [t[9] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), l(C(f.motifLibelle), 1)])])) : a("", !0),
|
|
2064
|
+
f.cibleFigee ? (g(), o("div", sr, [(g(!0), o(n, null, b(c.draft.draft.lignes, (e, t) => (g(), o("span", {
|
|
2049
2065
|
key: t,
|
|
2050
2066
|
class: "fs-7"
|
|
2051
2067
|
}, [
|
|
@@ -2053,7 +2069,7 @@ function fr(e, t, r, c, d, f) {
|
|
|
2053
2069
|
icon: "location-dot",
|
|
2054
2070
|
class: "text-primary me-2"
|
|
2055
2071
|
}),
|
|
2056
|
-
f.lignesAssociees.length ? (g(), o("span",
|
|
2072
|
+
f.lignesAssociees.length ? (g(), o("span", cr, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
|
|
2057
2073
|
l(" " + C(c.draft.cibleResume(e)), 1)
|
|
2058
2074
|
]))), 128))])) : (g(), i(h, p({ key: 2 }, f.pickerProps(f.lignePrincipale), {
|
|
2059
2075
|
onChangeMode: t[0] ||= (e) => f.onChangeMode(e),
|
|
@@ -2073,16 +2089,16 @@ function fr(e, t, r, c, d, f) {
|
|
|
2073
2089
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, t) => (g(), o("div", {
|
|
2074
2090
|
key: e.idMotif,
|
|
2075
2091
|
class: "border rounded p-2"
|
|
2076
|
-
}, [s("div",
|
|
2092
|
+
}, [s("div", lr, [s("span", ur, C(e.libelle), 1), s("div", dr, [s("input", {
|
|
2077
2093
|
id: `memecible-${e.idMotif}`,
|
|
2078
2094
|
class: "form-check-input",
|
|
2079
2095
|
type: "checkbox",
|
|
2080
2096
|
checked: !e.patrimoine,
|
|
2081
2097
|
onChange: (e) => c.draft.toggleCibleOverride(t + 1)
|
|
2082
|
-
}, null, 40,
|
|
2098
|
+
}, null, 40, fr), s("label", {
|
|
2083
2099
|
class: "form-check-label fs-7",
|
|
2084
2100
|
for: `memecible-${e.idMotif}`
|
|
2085
|
-
}, " Même cible que la ligne principale ", 8,
|
|
2101
|
+
}, " Même cible que la ligne principale ", 8, pr)])]), e.patrimoine ? (g(), o("div", mr, [u(h, p({ ref_for: !0 }, f.pickerProps(e), {
|
|
2086
2102
|
onChangeMode: (e) => f.onChangeMode(e, t + 1),
|
|
2087
2103
|
onSelectCommune: (e) => f.onSelectCommune(e, t + 1),
|
|
2088
2104
|
onSelectAdresse: (e) => f.onSelectAdresse(e, t + 1),
|
|
@@ -2107,7 +2123,7 @@ function fr(e, t, r, c, d, f) {
|
|
|
2107
2123
|
_: 1
|
|
2108
2124
|
}, 8, ["loading"]);
|
|
2109
2125
|
}
|
|
2110
|
-
var
|
|
2126
|
+
var gr = /*#__PURE__*/ F(rr, [["render", hr]]), _r = {
|
|
2111
2127
|
name: "LigneDocumentBlock",
|
|
2112
2128
|
components: { AmsomUploadFile: se },
|
|
2113
2129
|
props: {
|
|
@@ -2126,7 +2142,7 @@ var pr = /*#__PURE__*/ F(er, [["render", fr]]), mr = {
|
|
|
2126
2142
|
},
|
|
2127
2143
|
emits: ["update"]
|
|
2128
2144
|
};
|
|
2129
|
-
function
|
|
2145
|
+
function vr(e, t, n, r, i, a) {
|
|
2130
2146
|
let c = S("amsom-upload-file");
|
|
2131
2147
|
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
2148
|
"model-value": n.fichier,
|
|
@@ -2142,23 +2158,12 @@ function hr(e, t, n, r, i, a) {
|
|
|
2142
2158
|
"read-only"
|
|
2143
2159
|
])]);
|
|
2144
2160
|
}
|
|
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 = {
|
|
2161
|
+
var yr = /*#__PURE__*/ F(_r, [["render", vr]]), br = 4e3, xr = {
|
|
2157
2162
|
name: "LigneDetailBlock",
|
|
2158
2163
|
components: {
|
|
2159
2164
|
AmsomAutocomplete: O,
|
|
2160
2165
|
AmsomTextarea: oe,
|
|
2161
|
-
LigneDocumentBlock:
|
|
2166
|
+
LigneDocumentBlock: yr
|
|
2162
2167
|
},
|
|
2163
2168
|
props: { index: {
|
|
2164
2169
|
type: Number,
|
|
@@ -2171,7 +2176,7 @@ var yr = 4e3, br = {
|
|
|
2171
2176
|
};
|
|
2172
2177
|
},
|
|
2173
2178
|
computed: {
|
|
2174
|
-
descriptionMaxLength: () =>
|
|
2179
|
+
descriptionMaxLength: () => br,
|
|
2175
2180
|
isPrincipale() {
|
|
2176
2181
|
return this.index === 0;
|
|
2177
2182
|
},
|
|
@@ -2189,8 +2194,8 @@ var yr = 4e3, br = {
|
|
|
2189
2194
|
}
|
|
2190
2195
|
},
|
|
2191
2196
|
methods: {
|
|
2192
|
-
timestampToDateInput:
|
|
2193
|
-
dateInputToTimestamp:
|
|
2197
|
+
timestampToDateInput: nt,
|
|
2198
|
+
dateInputToTimestamp: rt,
|
|
2194
2199
|
responsableLibelle(e) {
|
|
2195
2200
|
let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
|
|
2196
2201
|
return t ? `${t.prenom} ${t.nom}` : "";
|
|
@@ -2200,53 +2205,53 @@ var yr = 4e3, br = {
|
|
|
2200
2205
|
return n ? t.filter((e) => (X(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
|
|
2201
2206
|
}
|
|
2202
2207
|
}
|
|
2203
|
-
},
|
|
2208
|
+
}, Sr = { class: "d-flex flex-column gap-2" }, Cr = { class: "d-flex align-items-center gap-2 mb-1" }, wr = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Tr = {
|
|
2204
2209
|
key: 0,
|
|
2205
2210
|
class: "ms-1 text-danger"
|
|
2206
|
-
},
|
|
2211
|
+
}, Er = {
|
|
2207
2212
|
key: 0,
|
|
2208
2213
|
class: "form-check form-switch mb-0"
|
|
2209
|
-
},
|
|
2214
|
+
}, Dr = [
|
|
2210
2215
|
"id",
|
|
2211
2216
|
"checked",
|
|
2212
2217
|
"disabled"
|
|
2213
|
-
],
|
|
2218
|
+
], Or = ["for"], kr = {
|
|
2214
2219
|
key: 1,
|
|
2215
2220
|
class: "text-muted d-block",
|
|
2216
2221
|
style: { "white-space": "pre-line" }
|
|
2217
|
-
},
|
|
2222
|
+
}, Ar = { class: "row g-3" }, jr = { class: "col-6" }, Mr = { class: "d-flex align-items-center gap-2 mb-1" }, Nr = {
|
|
2218
2223
|
key: 0,
|
|
2219
2224
|
class: "form-check form-switch mb-0"
|
|
2220
|
-
},
|
|
2225
|
+
}, Pr = [
|
|
2221
2226
|
"id",
|
|
2222
2227
|
"checked",
|
|
2223
2228
|
"disabled"
|
|
2224
|
-
],
|
|
2229
|
+
], Fr = ["for"], Ir = ["value"], Lr = {
|
|
2225
2230
|
key: 1,
|
|
2226
2231
|
class: "text-muted d-block"
|
|
2227
|
-
},
|
|
2232
|
+
}, Rr = {
|
|
2228
2233
|
key: 0,
|
|
2229
2234
|
class: "text-muted d-block"
|
|
2230
|
-
},
|
|
2235
|
+
}, zr = { class: "min-w-0" }, Br = { class: "fw-medium text-truncate" }, Vr = {
|
|
2231
2236
|
key: 0,
|
|
2232
2237
|
class: "text-muted d-block"
|
|
2233
|
-
},
|
|
2238
|
+
}, Hr = {
|
|
2234
2239
|
key: 2,
|
|
2235
2240
|
class: "text-muted"
|
|
2236
|
-
},
|
|
2237
|
-
function
|
|
2241
|
+
}, Ur = { class: "col-12 col-md-6" };
|
|
2242
|
+
function Wr(e, t, n, r, c, d) {
|
|
2238
2243
|
let f = S("amsom-textarea"), p = S("amsom-autocomplete"), m = S("ligne-document-block");
|
|
2239
|
-
return g(), o("div",
|
|
2244
|
+
return g(), o("div", Sr, [s("div", null, [s("div", Cr, [s("label", wr, [t[6] ||= l(" Description", -1), d.isPrincipale ? (g(), o("span", Tr, "*")) : a("", !0)]), d.isPrincipale ? a("", !0) : (g(), o("div", Er, [s("input", {
|
|
2240
2245
|
id: `memedetail-${d.ligne.idMotif}`,
|
|
2241
2246
|
class: "form-check-input",
|
|
2242
2247
|
type: "checkbox",
|
|
2243
2248
|
checked: d.ligne.description == null,
|
|
2244
2249
|
disabled: r.draft.isReadonly("description"),
|
|
2245
2250
|
onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
|
|
2246
|
-
}, null, 40,
|
|
2251
|
+
}, null, 40, Dr), s("label", {
|
|
2247
2252
|
class: "form-check-label fs-7",
|
|
2248
2253
|
for: `memedetail-${d.ligne.idMotif}`
|
|
2249
|
-
}, " Même description ", 8,
|
|
2254
|
+
}, " Même description ", 8, Or)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
|
|
2250
2255
|
key: 0,
|
|
2251
2256
|
"model-value": d.ligne.description,
|
|
2252
2257
|
"input-size": "sm",
|
|
@@ -2259,25 +2264,25 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2259
2264
|
"rows",
|
|
2260
2265
|
"maxlength",
|
|
2261
2266
|
"placeholder"
|
|
2262
|
-
])) : (g(), o("small",
|
|
2267
|
+
])) : (g(), o("small", kr, C((d.ligne.description ?? d.lignePrincipale.description) || "—"), 1))]), s("div", Ar, [s("div", jr, [s("div", null, [s("div", Mr, [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", Nr, [s("input", {
|
|
2263
2268
|
id: `memedate-${d.ligne.idMotif}`,
|
|
2264
2269
|
class: "form-check-input",
|
|
2265
2270
|
type: "checkbox",
|
|
2266
2271
|
checked: !d.ligne.dateFaitsOverride,
|
|
2267
2272
|
disabled: r.draft.isReadonly("dateFaits"),
|
|
2268
2273
|
onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
|
|
2269
|
-
}, null, 40,
|
|
2274
|
+
}, null, 40, Pr), s("label", {
|
|
2270
2275
|
class: "form-check-label fs-7",
|
|
2271
2276
|
for: `memedate-${d.ligne.idMotif}`
|
|
2272
|
-
}, " Même date ", 8,
|
|
2277
|
+
}, " Même date ", 8, Fr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
|
|
2273
2278
|
key: 0,
|
|
2274
2279
|
value: d.timestampToDateInput(d.ligne.dateFaits),
|
|
2275
2280
|
type: "date",
|
|
2276
2281
|
class: "form-control form-control-sm",
|
|
2277
2282
|
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, d.dateInputToTimestamp(e.target.value))
|
|
2278
|
-
}, null, 40,
|
|
2283
|
+
}, null, 40, Ir)) : (g(), o("small", Lr, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
|
|
2279
2284
|
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",
|
|
2285
|
+
r.draft.isReadonly("responsable") ? (g(), o("small", Rr, C(d.responsableLibelle(d.ligne.responsable) || "Déterminé automatiquement"), 1)) : (g(), i(p, {
|
|
2281
2286
|
key: 1,
|
|
2282
2287
|
"model-value": d.ligne.responsable,
|
|
2283
2288
|
items: d.collaborateurs,
|
|
@@ -2289,7 +2294,7 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2289
2294
|
"hide-choices": "",
|
|
2290
2295
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2291
2296
|
}, {
|
|
2292
|
-
options:
|
|
2297
|
+
options: D((e) => [s("div", zr, [s("div", Br, C(e?.prenom) + " " + C(e?.nom), 1), e?.service ? (g(), o("small", Vr, C(e.service), 1)) : a("", !0)])]),
|
|
2293
2298
|
_: 1
|
|
2294
2299
|
}, 8, [
|
|
2295
2300
|
"model-value",
|
|
@@ -2298,8 +2303,8 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2298
2303
|
"get-input-libelle",
|
|
2299
2304
|
"filtering-function"
|
|
2300
2305
|
])),
|
|
2301
|
-
d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small",
|
|
2302
|
-
])]), s("div",
|
|
2306
|
+
d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small", Hr, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : a("", !0)
|
|
2307
|
+
])]), s("div", Ur, [u(m, {
|
|
2303
2308
|
index: n.index,
|
|
2304
2309
|
fichier: d.ligne.fichier,
|
|
2305
2310
|
readonly: r.draft.isReadonly("fichier"),
|
|
@@ -2312,11 +2317,11 @@ function Ur(e, t, n, r, c, d) {
|
|
|
2312
2317
|
}
|
|
2313
2318
|
//#endregion
|
|
2314
2319
|
//#region src/components/EtapeDetailsBlock.vue
|
|
2315
|
-
var
|
|
2320
|
+
var Gr = {
|
|
2316
2321
|
name: "EtapeDetailsBlock",
|
|
2317
2322
|
components: {
|
|
2318
2323
|
AmsomOverlay: t,
|
|
2319
|
-
LigneDetailBlock: /* @__PURE__ */ F(
|
|
2324
|
+
LigneDetailBlock: /* @__PURE__ */ F(xr, [["render", Wr]])
|
|
2320
2325
|
},
|
|
2321
2326
|
setup() {
|
|
2322
2327
|
return {
|
|
@@ -2372,22 +2377,22 @@ var Wr = {
|
|
|
2372
2377
|
}
|
|
2373
2378
|
}
|
|
2374
2379
|
}
|
|
2375
|
-
},
|
|
2380
|
+
}, Kr = { class: "d-flex flex-column gap-3" }, qr = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, Jr = {
|
|
2376
2381
|
key: 0,
|
|
2377
2382
|
class: "fs-7"
|
|
2378
|
-
},
|
|
2379
|
-
function
|
|
2383
|
+
}, Yr = { class: "fs-7" }, Xr = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, Zr = { class: "fs-7" }, Qr = { class: "fs-7" };
|
|
2384
|
+
function $r(e, t, r, c, d, f) {
|
|
2380
2385
|
let p = S("font-awesome-icon"), m = S("ligne-detail-block"), h = S("amsom-overlay");
|
|
2381
2386
|
return g(), i(h, { loading: c.data.isLoading && !c.data.cache.collaborateurs }, {
|
|
2382
|
-
default:
|
|
2383
|
-
s("div",
|
|
2387
|
+
default: D(() => [s("div", Kr, [
|
|
2388
|
+
s("div", qr, [f.motifLibelle ? (g(), o("span", Jr, [
|
|
2384
2389
|
u(p, {
|
|
2385
2390
|
icon: "tag",
|
|
2386
2391
|
class: "text-primary me-2"
|
|
2387
2392
|
}),
|
|
2388
2393
|
t[0] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2389
2394
|
l(C(f.motifLibelle), 1)
|
|
2390
|
-
])) : a("", !0), s("span",
|
|
2395
|
+
])) : a("", !0), s("span", Yr, [
|
|
2391
2396
|
u(p, {
|
|
2392
2397
|
icon: "location-dot",
|
|
2393
2398
|
class: "text-primary me-2"
|
|
@@ -2403,14 +2408,14 @@ function Qr(e, t, r, c, d, f) {
|
|
|
2403
2408
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, n) => (g(), o("div", {
|
|
2404
2409
|
key: e.idMotif,
|
|
2405
2410
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2406
|
-
}, [s("div",
|
|
2411
|
+
}, [s("div", Xr, [s("span", Zr, [
|
|
2407
2412
|
u(p, {
|
|
2408
2413
|
icon: "tag",
|
|
2409
2414
|
class: "text-primary me-2"
|
|
2410
2415
|
}),
|
|
2411
2416
|
t[2] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2412
2417
|
l(" " + C(e.libelle), 1)
|
|
2413
|
-
]), s("span",
|
|
2418
|
+
]), s("span", Qr, [
|
|
2414
2419
|
u(p, {
|
|
2415
2420
|
icon: "location-dot",
|
|
2416
2421
|
class: "text-primary me-2"
|
|
@@ -2424,15 +2429,15 @@ function Qr(e, t, r, c, d, f) {
|
|
|
2424
2429
|
}
|
|
2425
2430
|
//#endregion
|
|
2426
2431
|
//#region src/components/StepperBlock.vue
|
|
2427
|
-
var
|
|
2432
|
+
var ei = {
|
|
2428
2433
|
name: "StepperBlock",
|
|
2429
2434
|
components: {
|
|
2430
2435
|
AmsomHorizontalStepper: re,
|
|
2431
2436
|
AmsomOverlay: t,
|
|
2432
|
-
EtapeReclamantBlock:
|
|
2433
|
-
EtapeCategorieBlock:
|
|
2434
|
-
EtapeCibleBlock:
|
|
2435
|
-
EtapeDetailsBlock: /* @__PURE__ */ F(
|
|
2437
|
+
EtapeReclamantBlock: Mt,
|
|
2438
|
+
EtapeCategorieBlock: fn,
|
|
2439
|
+
EtapeCibleBlock: gr,
|
|
2440
|
+
EtapeDetailsBlock: /* @__PURE__ */ F(Gr, [["render", $r]])
|
|
2436
2441
|
},
|
|
2437
2442
|
props: {
|
|
2438
2443
|
step: {
|
|
@@ -2544,43 +2549,43 @@ var $r = {
|
|
|
2544
2549
|
}));
|
|
2545
2550
|
}
|
|
2546
2551
|
}
|
|
2547
|
-
},
|
|
2552
|
+
}, ti = { class: "d-flex flex-column gap-3" }, ni = {
|
|
2548
2553
|
key: 0,
|
|
2549
2554
|
class: "w-100 fs-6 fw-medium my-3 alert alert-info",
|
|
2550
2555
|
style: { "white-space": "pre-line" }
|
|
2551
|
-
},
|
|
2552
|
-
function
|
|
2556
|
+
}, ri = { style: { "min-height": "260px" } }, ii = { class: "d-flex justify-content-between" }, ai = { key: 1 }, oi = ["disabled"], si = ["disabled"];
|
|
2557
|
+
function ci(e, t, n, r, f, p) {
|
|
2553
2558
|
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
2559
|
return g(), i(w, { loading: n.creating }, {
|
|
2555
|
-
default:
|
|
2560
|
+
default: D(() => [s("div", ti, [
|
|
2556
2561
|
u(m, {
|
|
2557
2562
|
steps: p.stepperSteps,
|
|
2558
2563
|
size: "md",
|
|
2559
2564
|
onStepClick: p.onStepClick
|
|
2560
2565
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2561
|
-
p.aideMotif ? (g(), o("div",
|
|
2566
|
+
p.aideMotif ? (g(), o("div", ni, [u(_, {
|
|
2562
2567
|
icon: "circle-info",
|
|
2563
2568
|
class: "text-info-emphasis me-2"
|
|
2564
2569
|
}), s("span", null, C(p.aideMotif), 1)])) : a("", !0),
|
|
2565
|
-
s("div",
|
|
2570
|
+
s("div", ri, [p.currentKey === "reclamant" ? (g(), i(v, {
|
|
2566
2571
|
key: 0,
|
|
2567
2572
|
premiere: n.step === 1
|
|
2568
2573
|
}, c({ _: 2 }, [e.$slots.reclamant ? {
|
|
2569
2574
|
name: "reclamant",
|
|
2570
|
-
fn:
|
|
2575
|
+
fn: D((t) => [x(e.$slots, "reclamant", h(d(t)))]),
|
|
2571
2576
|
key: "0"
|
|
2572
2577
|
} : void 0]), 1032, ["premiere"])) : p.currentKey === "categorie" ? (g(), i(y, {
|
|
2573
2578
|
key: 1,
|
|
2574
2579
|
premiere: n.step === 1
|
|
2575
2580
|
}, null, 8, ["premiere"])) : p.currentKey === "cible" ? (g(), i(b, { key: 2 })) : p.currentKey === "details" ? (g(), i(ee, { key: 3 })) : a("", !0)]),
|
|
2576
|
-
s("div",
|
|
2581
|
+
s("div", ii, [n.step > 1 ? (g(), o("button", {
|
|
2577
2582
|
key: 0,
|
|
2578
2583
|
class: "btn btn-sm btn-outline-secondary",
|
|
2579
2584
|
onClick: t[0] ||= (...e) => p.goPrevious && p.goPrevious(...e)
|
|
2580
2585
|
}, [u(_, {
|
|
2581
2586
|
icon: "chevron-left",
|
|
2582
2587
|
class: "me-1"
|
|
2583
|
-
}), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span",
|
|
2588
|
+
}), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span", ai)), n.step < p.steps.length ? (g(), o("button", {
|
|
2584
2589
|
key: 2,
|
|
2585
2590
|
class: "btn btn-sm btn-primary",
|
|
2586
2591
|
disabled: !p.canGoNext,
|
|
@@ -2588,7 +2593,7 @@ function si(e, t, n, r, f, p) {
|
|
|
2588
2593
|
}, [t[4] ||= l(" Suivant ", -1), u(_, {
|
|
2589
2594
|
icon: "chevron-right",
|
|
2590
2595
|
class: "ms-1"
|
|
2591
|
-
})], 8,
|
|
2596
|
+
})], 8, oi)) : (g(), o("button", {
|
|
2592
2597
|
key: 3,
|
|
2593
2598
|
class: "btn btn-sm btn-success",
|
|
2594
2599
|
disabled: !p.canCreer || n.creating,
|
|
@@ -2596,15 +2601,15 @@ function si(e, t, n, r, f, p) {
|
|
|
2596
2601
|
}, [u(_, {
|
|
2597
2602
|
icon: "check",
|
|
2598
2603
|
class: "me-1"
|
|
2599
|
-
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8,
|
|
2604
|
+
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8, si))])
|
|
2600
2605
|
])]),
|
|
2601
2606
|
_: 3
|
|
2602
2607
|
}, 8, ["loading"]);
|
|
2603
2608
|
}
|
|
2604
|
-
var
|
|
2609
|
+
var li = /*#__PURE__*/ F(ei, [["render", ci]]), ui = (e, { signal: t, baseUrl: n } = {}) => Me("/v2/cresol/creer_sollicitation", e, {
|
|
2605
2610
|
signal: t,
|
|
2606
2611
|
baseUrl: n
|
|
2607
|
-
}),
|
|
2612
|
+
}), di = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => Me("/v2/cresol/upload_sollicitation_ged", {
|
|
2608
2613
|
idSollicitation: e,
|
|
2609
2614
|
pj: t
|
|
2610
2615
|
}, {
|
|
@@ -2658,7 +2663,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2658
2663
|
type: String,
|
|
2659
2664
|
default: null
|
|
2660
2665
|
}
|
|
2661
|
-
},
|
|
2666
|
+
}, fi = Object.keys(Z), Q = [
|
|
2662
2667
|
"update:modelValue",
|
|
2663
2668
|
"reclamantChange",
|
|
2664
2669
|
"motifChange",
|
|
@@ -2667,11 +2672,11 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2667
2672
|
"created",
|
|
2668
2673
|
"createError",
|
|
2669
2674
|
"error"
|
|
2670
|
-
],
|
|
2675
|
+
], pi = {
|
|
2671
2676
|
name: "CreerSollicitationForm",
|
|
2672
2677
|
components: {
|
|
2673
2678
|
AsideBlock: De,
|
|
2674
|
-
StepperBlock:
|
|
2679
|
+
StepperBlock: li
|
|
2675
2680
|
},
|
|
2676
2681
|
props: { ...Z },
|
|
2677
2682
|
emits: [...Q],
|
|
@@ -2685,7 +2690,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2685
2690
|
idModulePrefere: w(e, "idModule"),
|
|
2686
2691
|
readonly: w(e, "readonly")
|
|
2687
2692
|
}));
|
|
2688
|
-
return
|
|
2693
|
+
return Pt(v({
|
|
2689
2694
|
nomenclatureFilter: w(e, "nomenclatureFilter"),
|
|
2690
2695
|
reclamantMode: w(e, "reclamantMode"),
|
|
2691
2696
|
modulesReclamant: s,
|
|
@@ -2749,10 +2754,10 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2749
2754
|
if (!await this.autoriserCreation(e)) return;
|
|
2750
2755
|
let t;
|
|
2751
2756
|
try {
|
|
2752
|
-
t = await
|
|
2757
|
+
t = await ui(e, this.requestOptions) ?? [];
|
|
2753
2758
|
} catch (t) {
|
|
2754
|
-
if (
|
|
2755
|
-
let n =
|
|
2759
|
+
if (qe(t)) return;
|
|
2760
|
+
let n = V(t);
|
|
2756
2761
|
this.$emit("createError", {
|
|
2757
2762
|
error: t,
|
|
2758
2763
|
message: n,
|
|
@@ -2802,7 +2807,7 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2802
2807
|
message: t
|
|
2803
2808
|
};
|
|
2804
2809
|
};
|
|
2805
|
-
return a?.id ?
|
|
2810
|
+
return a?.id ? di({
|
|
2806
2811
|
idSollicitation: a.id,
|
|
2807
2812
|
pj: {
|
|
2808
2813
|
name: n.name,
|
|
@@ -2813,24 +2818,24 @@ var ci = /*#__PURE__*/ F($r, [["render", si]]), li = (e, { signal: t, baseUrl: n
|
|
|
2813
2818
|
...o,
|
|
2814
2819
|
ok: !0,
|
|
2815
2820
|
message: null
|
|
2816
|
-
})).catch((e) => s(
|
|
2821
|
+
})).catch((e) => s(V(e))) : Promise.resolve(s("sollicitation introuvable dans la réponse"));
|
|
2817
2822
|
});
|
|
2818
2823
|
return Promise.all(n);
|
|
2819
2824
|
}
|
|
2820
2825
|
}
|
|
2821
|
-
},
|
|
2826
|
+
}, mi = { class: "row g-3" }, hi = {
|
|
2822
2827
|
key: 0,
|
|
2823
2828
|
class: "col-12 col-lg-4"
|
|
2824
2829
|
};
|
|
2825
|
-
function
|
|
2830
|
+
function gi(e, t, n, r, i, l) {
|
|
2826
2831
|
let f = S("aside-block"), p = S("stepper-block");
|
|
2827
|
-
return g(), o("div",
|
|
2832
|
+
return g(), o("div", mi, [e.aside ? (g(), o("div", hi, [x(e.$slots, "aside", {}, () => [u(f, { "nb-similaires": e.nbSimilaires }, c({ _: 2 }, [e.$slots["aside-similaires"] ? {
|
|
2828
2833
|
name: "similaires",
|
|
2829
|
-
fn:
|
|
2834
|
+
fn: D((t) => [x(e.$slots, "aside-similaires", h(d(t)))]),
|
|
2830
2835
|
key: "0"
|
|
2831
2836
|
} : void 0, e.$slots["aside-evenements"] ? {
|
|
2832
2837
|
name: "evenements",
|
|
2833
|
-
fn:
|
|
2838
|
+
fn: D(() => [x(e.$slots, "aside-evenements")]),
|
|
2834
2839
|
key: "1"
|
|
2835
2840
|
} : void 0]), 1032, ["nb-similaires"])])])) : a("", !0), s("div", { class: m(["col-12", e.aside ? "col-lg-8" : ""]) }, [u(p, {
|
|
2836
2841
|
step: i.currentStep,
|
|
@@ -2840,7 +2845,7 @@ function hi(e, t, n, r, i, l) {
|
|
|
2840
2845
|
onSubmit: l.creer
|
|
2841
2846
|
}, c({ _: 2 }, [e.$slots.reclamant ? {
|
|
2842
2847
|
name: "reclamant",
|
|
2843
|
-
fn:
|
|
2848
|
+
fn: D((t) => [x(e.$slots, "reclamant", h(d(t)))]),
|
|
2844
2849
|
key: "0"
|
|
2845
2850
|
} : void 0]), 1032, [
|
|
2846
2851
|
"step",
|
|
@@ -2848,7 +2853,7 @@ function hi(e, t, n, r, i, l) {
|
|
|
2848
2853
|
"onSubmit"
|
|
2849
2854
|
])], 2)]);
|
|
2850
2855
|
}
|
|
2851
|
-
var $ = /*#__PURE__*/ F(
|
|
2856
|
+
var $ = /*#__PURE__*/ F(pi, [["render", gi]]), _i = {
|
|
2852
2857
|
name: "CreerSollicitationModal",
|
|
2853
2858
|
components: {
|
|
2854
2859
|
AmsomModal: e,
|
|
@@ -2868,7 +2873,7 @@ var $ = /*#__PURE__*/ F(fi, [["render", hi]]), gi = {
|
|
|
2868
2873
|
emits: [...Q, "close"],
|
|
2869
2874
|
computed: {
|
|
2870
2875
|
formProps() {
|
|
2871
|
-
return Object.fromEntries(
|
|
2876
|
+
return Object.fromEntries(fi.map((e) => [e, this[e]]));
|
|
2872
2877
|
},
|
|
2873
2878
|
formListeners() {
|
|
2874
2879
|
return Object.fromEntries(Q.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
|
|
@@ -2877,24 +2882,24 @@ var $ = /*#__PURE__*/ F(fi, [["render", hi]]), gi = {
|
|
|
2877
2882
|
methods: { onCreated(...e) {
|
|
2878
2883
|
this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
|
|
2879
2884
|
} }
|
|
2880
|
-
},
|
|
2881
|
-
function
|
|
2885
|
+
}, vi = { class: "fw-medium fs-5" };
|
|
2886
|
+
function yi(e, t, n, r, a, o) {
|
|
2882
2887
|
let l = S("creer-sollicitation-form"), f = S("amsom-modal");
|
|
2883
2888
|
return g(), i(f, {
|
|
2884
2889
|
"close-option": "",
|
|
2885
2890
|
size: "xl",
|
|
2886
2891
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
2887
2892
|
}, {
|
|
2888
|
-
default:
|
|
2893
|
+
default: D(() => [s("span", vi, 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
2894
|
name: n,
|
|
2890
|
-
fn:
|
|
2895
|
+
fn: D((t) => [x(e.$slots, n, h(d(t ?? {})))])
|
|
2891
2896
|
}))]), 1040, ["onCreated"])]),
|
|
2892
2897
|
_: 3
|
|
2893
2898
|
});
|
|
2894
2899
|
}
|
|
2895
|
-
var
|
|
2896
|
-
CreerSollicitationModal:
|
|
2900
|
+
var bi = /*#__PURE__*/ F(_i, [["render", yi]]), xi = {
|
|
2901
|
+
CreerSollicitationModal: bi,
|
|
2897
2902
|
CreerSollicitationForm: $
|
|
2898
2903
|
};
|
|
2899
2904
|
//#endregion
|
|
2900
|
-
export { $ as CreerSollicitationForm,
|
|
2905
|
+
export { $ as CreerSollicitationForm, bi as CreerSollicitationModal, le as DEFAULT_PROVENANCE_CONTACT, ce as PROVENANCES_CONTACT, M as READONLY_FIELDS, Oe as configureCresol, xi as default, N as getDefaultDraft, j as getDefaultLigne, A as getDefaultPatrimoine, Ze as resetCresolCache };
|