@amsom-habitat/cresol 0.2.1 → 0.2.2
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 +7 -6
- package/dist/cresol.js +313 -345
- package/dist/cresol.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/cresol.js
CHANGED
|
@@ -494,68 +494,54 @@ var je = (e, t) => {
|
|
|
494
494
|
});
|
|
495
495
|
let n = t.toString();
|
|
496
496
|
return n ? `?${n}` : "";
|
|
497
|
-
}, Ne = (e = {}
|
|
498
|
-
|
|
499
|
-
functions: {
|
|
500
|
-
...e.functions ?? {},
|
|
501
|
-
getToken: () => t
|
|
502
|
-
}
|
|
503
|
-
} : e, Pe = ({ method: e, path: t, params: n, data: r, signal: i, token: a, baseUrl: o }, s = {}) => Ae({
|
|
504
|
-
url: je(`${t}${Me(n)}`, o),
|
|
497
|
+
}, Ne = ({ method: e, path: t, params: n, data: r, signal: i, baseUrl: a }, o = {}) => Ae({
|
|
498
|
+
url: je(`${t}${Me(n)}`, a),
|
|
505
499
|
method: e,
|
|
506
500
|
...r === void 0 ? {} : { data: r },
|
|
507
501
|
...i ? { signal: i } : {}
|
|
508
|
-
},
|
|
502
|
+
}, o), L = (e, { params: t, signal: n, overlay: r, baseUrl: i } = {}) => Ne({
|
|
509
503
|
method: "GET",
|
|
510
504
|
path: e,
|
|
511
505
|
params: t,
|
|
512
506
|
signal: n,
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}, r).then((e) => e.data), Fe = (e, t, { params: n, signal: r, overlay: i, token: a, baseUrl: o } = {}) => Pe({
|
|
507
|
+
baseUrl: i
|
|
508
|
+
}, r).then((e) => e.data), Pe = (e, t, { params: n, signal: r, overlay: i, baseUrl: a } = {}) => Ne({
|
|
516
509
|
method: "POST",
|
|
517
510
|
path: e,
|
|
518
511
|
params: n,
|
|
519
512
|
data: t,
|
|
520
513
|
signal: r,
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
}, i).then((e) => e.data), Ie = { mustBeAuthenticated: !1 }, R = (e, { signal: t, token: n, baseUrl: r } = {}) => L(e, {
|
|
514
|
+
baseUrl: a
|
|
515
|
+
}, i).then((e) => e.data), Fe = { mustBeAuthenticated: !1 }, R = (e, { signal: t, baseUrl: n } = {}) => L(e, {
|
|
524
516
|
signal: t,
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
}), Le = (e) => R("/v2/sollicitation/motifs", e), Re = (e) => R("/v2/sollicitation/categories", e), ze = (e) => R("/v2/sollicitation/types", e), Be = (e) => R("/v2/sollicitation/natures", e), Ve = (e) => R("/v2/sollicitation/etats", e), He = ({ signal: e, token: t, baseUrl: n } = {}) => L("/collaborateurs", {
|
|
517
|
+
baseUrl: n,
|
|
518
|
+
overlay: Fe
|
|
519
|
+
}), Ie = (e) => R("/v2/sollicitation/motifs", e), Le = (e) => R("/v2/sollicitation/categories", e), Re = (e) => R("/v2/sollicitation/types", e), ze = (e) => R("/v2/sollicitation/natures", e), Be = (e) => R("/v2/sollicitation/etats", e), Ve = ({ signal: e, baseUrl: t } = {}) => L("/collaborateurs", {
|
|
529
520
|
params: { actif: !0 },
|
|
530
521
|
signal: e,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
}), Ue = async ({ signal: e, token: t, baseUrl: n } = {}) => (await L("/v2/patrimoine/communes", {
|
|
522
|
+
baseUrl: t
|
|
523
|
+
}), He = async ({ signal: e, baseUrl: t } = {}) => (await L("/v2/patrimoine/communes", {
|
|
534
524
|
signal: e,
|
|
535
|
-
|
|
536
|
-
baseUrl: n
|
|
525
|
+
baseUrl: t
|
|
537
526
|
}) ?? []).map((e) => ({
|
|
538
527
|
idCommune: e.id,
|
|
539
528
|
commune: e.libelle
|
|
540
|
-
})),
|
|
529
|
+
})), Ue = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/entrees", {
|
|
541
530
|
params: { idCommune: e },
|
|
542
531
|
signal: t,
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
}), Ge = (e, { signal: t, token: n, baseUrl: r } = {}) => L("/v2/patrimoine/modules", {
|
|
532
|
+
baseUrl: n
|
|
533
|
+
}), We = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/modules", {
|
|
546
534
|
params: { codeProgramme: e },
|
|
547
535
|
signal: t,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
}), Ke = ({ idContrat: e, typeContrat: t }, { signal: n, token: r, baseUrl: i } = {}) => L("/v2/patrimoine/contrat_modules", {
|
|
536
|
+
baseUrl: n
|
|
537
|
+
}), Ge = ({ idContrat: e, typeContrat: t }, { signal: n, baseUrl: r } = {}) => L("/v2/patrimoine/contrat_modules", {
|
|
551
538
|
params: {
|
|
552
539
|
idContrat: e,
|
|
553
540
|
typeContrat: t
|
|
554
541
|
},
|
|
555
542
|
signal: n,
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}), qe = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, token: a, baseUrl: o } = {}) => L("/v2/sollicitation/responsables", {
|
|
543
|
+
baseUrl: r
|
|
544
|
+
}), Ke = ({ motif: e, categorie: t, type: n, nature: r }, { signal: i, baseUrl: a } = {}) => L("/v2/sollicitation/responsables", {
|
|
559
545
|
params: {
|
|
560
546
|
motif: e,
|
|
561
547
|
categorie: t,
|
|
@@ -563,21 +549,18 @@ var je = (e, t) => {
|
|
|
563
549
|
nature: r
|
|
564
550
|
},
|
|
565
551
|
signal: i,
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
}), Je = (e, { signal: t, token: n, baseUrl: r } = {}) => L("/v2/patrimoine/contrat_module_rechercher", {
|
|
552
|
+
baseUrl: a
|
|
553
|
+
}), qe = (e, { signal: t, baseUrl: n } = {}) => L("/v2/patrimoine/contrat_module_rechercher", {
|
|
569
554
|
params: { recherche: e },
|
|
570
555
|
signal: t,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}), Ye = ({ categorie: e, recherche: t }, { signal: n, token: r, baseUrl: i } = {}) => L("/v2/cresol/reclamant_rechercher", {
|
|
556
|
+
baseUrl: n
|
|
557
|
+
}), Je = ({ categorie: e, recherche: t }, { signal: n, baseUrl: r } = {}) => L("/v2/cresol/reclamant_rechercher", {
|
|
574
558
|
params: {
|
|
575
559
|
categorie: e,
|
|
576
560
|
recherche: t
|
|
577
561
|
},
|
|
578
562
|
signal: n,
|
|
579
|
-
|
|
580
|
-
baseUrl: i
|
|
563
|
+
baseUrl: r
|
|
581
564
|
});
|
|
582
565
|
//#endregion
|
|
583
566
|
//#region src/utils/apiError.js
|
|
@@ -585,7 +568,7 @@ function z(e) {
|
|
|
585
568
|
let t = e?.response?.data;
|
|
586
569
|
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";
|
|
587
570
|
}
|
|
588
|
-
var B = (e) => e?.name === "AbortError" || e?.name === "CanceledError", V = Symbol("cresol:data"),
|
|
571
|
+
var B = (e) => e?.name === "AbortError" || e?.name === "CanceledError", V = Symbol("cresol:data"), Ye = () => ({
|
|
589
572
|
motifs: null,
|
|
590
573
|
categories: null,
|
|
591
574
|
types: null,
|
|
@@ -597,75 +580,72 @@ var B = (e) => e?.name === "AbortError" || e?.name === "CanceledError", V = Symb
|
|
|
597
580
|
modulesByProgramme: {},
|
|
598
581
|
modulesByContrat: {},
|
|
599
582
|
responsablesByMotif: {}
|
|
600
|
-
}), H = /* @__PURE__ */ new Map(),
|
|
601
|
-
function
|
|
583
|
+
}), H = /* @__PURE__ */ new Map(), Xe = (e) => (H.has(e) || H.set(e, v(Ye())), H.get(e)), U = /* @__PURE__ */ new Map();
|
|
584
|
+
function Ze() {
|
|
602
585
|
H.clear(), U.clear();
|
|
603
586
|
}
|
|
604
587
|
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;
|
|
605
|
-
function
|
|
606
|
-
let
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
let
|
|
611
|
-
|
|
612
|
-
i.value += 1;
|
|
613
|
-
let a = Promise.resolve().then(n).catch((t) => (B(t) || e?.(z(t)), null)).finally(() => {
|
|
614
|
-
--i.value, U.delete(r);
|
|
588
|
+
function Qe({ onError: e, baseUrl: t } = {}) {
|
|
589
|
+
let n = y(0), i = () => ({ baseUrl: T(t) || null }), a = () => T(t) || I().baseUrl || "", o = () => Xe(a()), s = (t, r) => {
|
|
590
|
+
let i = `${a()}|${t}`;
|
|
591
|
+
if (U.has(i)) return U.get(i);
|
|
592
|
+
n.value += 1;
|
|
593
|
+
let o = Promise.resolve().then(r).catch((t) => (B(t) || e?.(z(t)), null)).finally(() => {
|
|
594
|
+
--n.value, U.delete(i);
|
|
615
595
|
});
|
|
616
|
-
return U.set(
|
|
617
|
-
},
|
|
596
|
+
return U.set(i, o), o;
|
|
597
|
+
}, c = (e, t) => o()[e]?.length ? Promise.resolve(o()[e]) : s(`referentiel:${e}`, async () => (o()[e] = await t(i()), o()[e])), l = {
|
|
618
598
|
get cache() {
|
|
619
|
-
return
|
|
599
|
+
return o();
|
|
620
600
|
},
|
|
621
|
-
loading:
|
|
622
|
-
isLoading: r(() =>
|
|
601
|
+
loading: n,
|
|
602
|
+
isLoading: r(() => n.value > 0),
|
|
623
603
|
loadNomenclature() {
|
|
624
604
|
return Promise.all([
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
605
|
+
c("motifs", Ie),
|
|
606
|
+
c("categories", Le),
|
|
607
|
+
c("types", Re),
|
|
608
|
+
c("natures", ze),
|
|
609
|
+
c("etats", Be)
|
|
630
610
|
]);
|
|
631
611
|
},
|
|
632
|
-
loadCollaborateurs: () =>
|
|
612
|
+
loadCollaborateurs: () => c("collaborateurs", Ve),
|
|
633
613
|
loadCommunes() {
|
|
634
|
-
return
|
|
614
|
+
return o().communes?.length ? Promise.resolve(o().communes) : s("communes", async () => (o().communes = await He(i()), o().communes));
|
|
635
615
|
},
|
|
636
616
|
loadAdresses(e) {
|
|
637
|
-
return e == null ? Promise.resolve([]) :
|
|
638
|
-
let t = await
|
|
639
|
-
return
|
|
617
|
+
return e == null ? Promise.resolve([]) : o().adressesByCommune[e] ? Promise.resolve(o().adressesByCommune[e]) : s(`adresses:${e}`, async () => {
|
|
618
|
+
let t = await Ue(e, i());
|
|
619
|
+
return o().adressesByCommune[e] = t ?? [], t;
|
|
640
620
|
});
|
|
641
621
|
},
|
|
642
622
|
loadModulesOfProgramme(e) {
|
|
643
|
-
return e == null ? Promise.resolve([]) :
|
|
644
|
-
let t = await
|
|
645
|
-
return
|
|
623
|
+
return e == null ? Promise.resolve([]) : o().modulesByProgramme[e] ? Promise.resolve(o().modulesByProgramme[e]) : s(`modules:${e}`, async () => {
|
|
624
|
+
let t = await We(e, i());
|
|
625
|
+
return o().modulesByProgramme[e] = t ?? [], t;
|
|
646
626
|
});
|
|
647
627
|
},
|
|
648
628
|
loadModulesOfContrat({ idContrat: e, typeContrat: t }) {
|
|
649
629
|
if (e == null) return Promise.resolve([]);
|
|
650
630
|
let n = `${t ?? ""}|${e}`;
|
|
651
|
-
return
|
|
652
|
-
let r = await
|
|
631
|
+
return o().modulesByContrat[n] ? Promise.resolve(o().modulesByContrat[n]) : s(`contratModules:${n}`, async () => {
|
|
632
|
+
let r = await Ge({
|
|
653
633
|
idContrat: e,
|
|
654
634
|
typeContrat: t
|
|
655
|
-
},
|
|
656
|
-
return
|
|
635
|
+
}, i());
|
|
636
|
+
return o().modulesByContrat[n] = r ?? [], r;
|
|
657
637
|
});
|
|
658
638
|
},
|
|
659
639
|
async searchContrats(e, { signal: t } = {}) {
|
|
660
640
|
let n = (e ?? "").trim();
|
|
661
641
|
if (!n) return [];
|
|
662
|
-
let r = await
|
|
663
|
-
...
|
|
642
|
+
let r = await qe(n, {
|
|
643
|
+
...i(),
|
|
664
644
|
signal: t
|
|
665
|
-
}),
|
|
645
|
+
}), a = /* @__PURE__ */ new Map();
|
|
666
646
|
for (let e of r ?? []) {
|
|
667
647
|
let t = `${e.typeContrat}|${e.idContrat}`;
|
|
668
|
-
|
|
648
|
+
a.has(t) || a.set(t, {
|
|
669
649
|
typeContrat: e.typeContrat,
|
|
670
650
|
idContrat: e.idContrat,
|
|
671
651
|
libelle: e.libelle ?? null,
|
|
@@ -673,19 +653,19 @@ function $e({ onError: e, token: t, baseUrl: n } = {}) {
|
|
|
673
653
|
nbModules: e.nbModulesContrat ?? 1
|
|
674
654
|
});
|
|
675
655
|
}
|
|
676
|
-
return [...
|
|
656
|
+
return [...a.values()].sort((e, t) => Number(e.estSorti) - Number(t.estSorti) || (e.libelle ?? "").localeCompare(t.libelle ?? ""));
|
|
677
657
|
},
|
|
678
658
|
async searchReclamants(e, t, { signal: n } = {}) {
|
|
679
659
|
let r = (t ?? "").trim();
|
|
680
660
|
if (!r) return [];
|
|
681
|
-
let
|
|
661
|
+
let a = await Je({
|
|
682
662
|
categorie: e,
|
|
683
663
|
recherche: r
|
|
684
664
|
}, {
|
|
685
|
-
...
|
|
665
|
+
...i(),
|
|
686
666
|
signal: n
|
|
687
667
|
}), o = /* @__PURE__ */ new Map();
|
|
688
|
-
for (let t of
|
|
668
|
+
for (let t of a ?? []) {
|
|
689
669
|
let n = `${t.typeReclamant}|${t.idReclamant}`;
|
|
690
670
|
o.has(n) || o.set(n, {
|
|
691
671
|
type: t.typeReclamant,
|
|
@@ -711,44 +691,44 @@ function $e({ onError: e, token: t, baseUrl: n } = {}) {
|
|
|
711
691
|
});
|
|
712
692
|
},
|
|
713
693
|
loadResponsables({ motif: e, categorie: t, type: n, nature: r }) {
|
|
714
|
-
return e == null ? Promise.resolve([]) :
|
|
715
|
-
let
|
|
694
|
+
return e == null ? Promise.resolve([]) : o().responsablesByMotif[e] ? Promise.resolve(o().responsablesByMotif[e]) : s(`responsables:${e}`, async () => {
|
|
695
|
+
let a = await Ke({
|
|
716
696
|
motif: e,
|
|
717
697
|
categorie: t,
|
|
718
698
|
type: n,
|
|
719
699
|
nature: r
|
|
720
|
-
},
|
|
721
|
-
return
|
|
700
|
+
}, i());
|
|
701
|
+
return o().responsablesByMotif[e] = a ?? [], a;
|
|
722
702
|
});
|
|
723
703
|
},
|
|
724
|
-
adressesOfCommune: (e) =>
|
|
725
|
-
modulesOfProgramme: (e) =>
|
|
726
|
-
modulesOfContrat: ({ idContrat: e, typeContrat: t }) =>
|
|
727
|
-
allAdresses: () => Object.values(
|
|
704
|
+
adressesOfCommune: (e) => o().adressesByCommune[e] ?? null,
|
|
705
|
+
modulesOfProgramme: (e) => o().modulesByProgramme[e] ?? null,
|
|
706
|
+
modulesOfContrat: ({ idContrat: e, typeContrat: t }) => o().modulesByContrat[`${t ?? ""}|${e}`] ?? null,
|
|
707
|
+
allAdresses: () => Object.values(o().adressesByCommune).flat(),
|
|
728
708
|
getResponsableSuggere({ idMotif: e, codeProgramme: t, codeTranche: n, codeBatiment: r, codeEscalier: i }) {
|
|
729
|
-
let a =
|
|
709
|
+
let a = o().responsablesByMotif[e];
|
|
730
710
|
if (!a?.length || t == null) return null;
|
|
731
|
-
let
|
|
732
|
-
if (!
|
|
733
|
-
let c = (e) => (e.codeEscalier == null ? 0 : 4) + (e.codeBatiment == null ? 0 : 2) + (e.codeTranche == null ? 0 : 1), l =
|
|
711
|
+
let s = a.filter((e) => String(e.codeProgramme) === String(t) && (e.codeTranche == null || e.codeTranche === n) && (e.codeBatiment == null || e.codeBatiment === r) && (e.codeEscalier == null || e.codeEscalier === i));
|
|
712
|
+
if (!s.length) return null;
|
|
713
|
+
let c = (e) => (e.codeEscalier == null ? 0 : 4) + (e.codeBatiment == null ? 0 : 2) + (e.codeTranche == null ? 0 : 1), l = s.reduce((e, t) => c(t) > c(e) ? t : e);
|
|
734
714
|
return {
|
|
735
715
|
idResponsable: l.idResponsable,
|
|
736
716
|
libelle: l.libelleResponsable
|
|
737
717
|
};
|
|
738
718
|
},
|
|
739
|
-
motifLibelle: (e) => W(
|
|
740
|
-
categorieLibelle: (e) => W(
|
|
741
|
-
typeLibelle: (e) => W(
|
|
742
|
-
natureLibelle: (e) => W(
|
|
743
|
-
etatLibelle: (e) => W(
|
|
744
|
-
motifIcon: (e) => G(
|
|
745
|
-
categorieIcon: (e) => G(
|
|
746
|
-
typeIcon: (e) => G(
|
|
747
|
-
natureIcon: (e) => G(
|
|
719
|
+
motifLibelle: (e) => W(o().motifs, "id", e),
|
|
720
|
+
categorieLibelle: (e) => W(o().categories, "id", e),
|
|
721
|
+
typeLibelle: (e) => W(o().types, "id", e),
|
|
722
|
+
natureLibelle: (e) => W(o().natures, "id", e),
|
|
723
|
+
etatLibelle: (e) => W(o().etats, "code", e),
|
|
724
|
+
motifIcon: (e) => G(o().motifs, "id", e),
|
|
725
|
+
categorieIcon: (e) => G(o().categories, "id", e),
|
|
726
|
+
typeIcon: (e) => G(o().types, "id", e),
|
|
727
|
+
natureIcon: (e) => G(o().natures, "id", e)
|
|
748
728
|
};
|
|
749
|
-
return v(
|
|
729
|
+
return v(l);
|
|
750
730
|
}
|
|
751
|
-
function
|
|
731
|
+
function $e(e) {
|
|
752
732
|
return _(V, e), e;
|
|
753
733
|
}
|
|
754
734
|
function K() {
|
|
@@ -758,11 +738,11 @@ function K() {
|
|
|
758
738
|
}
|
|
759
739
|
//#endregion
|
|
760
740
|
//#region src/utils/fontAwesomeIcons.js
|
|
761
|
-
var
|
|
762
|
-
async function
|
|
741
|
+
var et = (e) => "fa" + e.split("-").map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join("");
|
|
742
|
+
async function tt(e) {
|
|
763
743
|
let t = await import("@fortawesome/free-solid-svg-icons");
|
|
764
744
|
[...new Set(e.filter(Boolean))].forEach((e) => {
|
|
765
|
-
let n = t[
|
|
745
|
+
let n = t[et(e)];
|
|
766
746
|
n && ae.add(n);
|
|
767
747
|
});
|
|
768
748
|
}
|
|
@@ -809,7 +789,7 @@ var q = [
|
|
|
809
789
|
aucun: "Aucun réclamant trouvé.",
|
|
810
790
|
placeholder: "Nom, prénom, n° de contrat ou de demande, adresse, téléphone ou mail…"
|
|
811
791
|
}
|
|
812
|
-
],
|
|
792
|
+
], nt = {
|
|
813
793
|
signataire: "Signataire",
|
|
814
794
|
occupant: "Occupant",
|
|
815
795
|
demandeur: "Demandeur"
|
|
@@ -817,7 +797,7 @@ var q = [
|
|
|
817
797
|
D: "demandeur",
|
|
818
798
|
T: "tiers",
|
|
819
799
|
U: "autre"
|
|
820
|
-
}[e.type] ?? "locataire" : null,
|
|
800
|
+
}[e.type] ?? "locataire" : null, rt = {
|
|
821
801
|
name: "ReclamantRechercheBlock",
|
|
822
802
|
components: { AmsomAutocomplete: O },
|
|
823
803
|
setup() {
|
|
@@ -855,7 +835,7 @@ var q = [
|
|
|
855
835
|
}
|
|
856
836
|
},
|
|
857
837
|
async created() {
|
|
858
|
-
await
|
|
838
|
+
await tt(q.map((e) => e.icon)), this.iconsReady = !0;
|
|
859
839
|
},
|
|
860
840
|
beforeUnmount() {
|
|
861
841
|
clearTimeout(this.rechercheTimeout), this.controller?.abort();
|
|
@@ -906,39 +886,39 @@ var q = [
|
|
|
906
886
|
}
|
|
907
887
|
return t.map((e) => {
|
|
908
888
|
let t = [e.nom, e.prenom].filter(Boolean).join(" ");
|
|
909
|
-
return
|
|
889
|
+
return nt[e.role] ? `${t} (${nt[e.role].toLowerCase()})` : t;
|
|
910
890
|
}).join(", ");
|
|
911
891
|
}
|
|
912
892
|
}
|
|
913
|
-
},
|
|
893
|
+
}, it = {
|
|
914
894
|
key: 0,
|
|
915
895
|
class: "d-flex flex-column gap-3"
|
|
916
|
-
},
|
|
896
|
+
}, at = { class: "d-flex flex-wrap gap-2" }, ot = ["onClick"], st = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, ct = { class: "min-w-0" }, lt = {
|
|
917
897
|
key: 0,
|
|
918
898
|
class: "badge bg-warning-subtle text-warning-emphasis ms-1"
|
|
919
|
-
},
|
|
899
|
+
}, ut = { class: "text-muted d-block text-truncate" }, dt = { key: 0 }, ft = {
|
|
920
900
|
key: 0,
|
|
921
901
|
class: "text-muted d-block text-truncate"
|
|
922
|
-
},
|
|
902
|
+
}, pt = {
|
|
923
903
|
key: 0,
|
|
924
904
|
class: "text-muted"
|
|
925
|
-
},
|
|
905
|
+
}, mt = {
|
|
926
906
|
key: 0,
|
|
927
907
|
class: "alert alert-primary py-2 px-3 mb-0 fs-7 d-flex align-items-start gap-2"
|
|
928
|
-
},
|
|
908
|
+
}, ht = { class: "min-w-0" }, gt = { class: "fw-semibold" }, _t = {
|
|
929
909
|
key: 0,
|
|
930
910
|
class: "text-truncate"
|
|
931
|
-
},
|
|
911
|
+
}, vt = {
|
|
932
912
|
key: 1,
|
|
933
913
|
class: "text-truncate"
|
|
934
|
-
},
|
|
914
|
+
}, yt = {
|
|
935
915
|
key: 1,
|
|
936
916
|
class: "fs-7 text-danger"
|
|
937
917
|
};
|
|
938
|
-
function
|
|
918
|
+
function bt(e, t, r, c, d, f) {
|
|
939
919
|
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
940
|
-
return d.iconsReady ? (g(), o("div",
|
|
941
|
-
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",
|
|
920
|
+
return d.iconsReady ? (g(), o("div", it, [
|
|
921
|
+
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", at, [(g(!0), o(n, null, b(f.categories, (e) => (g(), o("button", {
|
|
942
922
|
key: e.key,
|
|
943
923
|
type: "button",
|
|
944
924
|
class: m(["btn btn-sm d-inline-flex align-items-center gap-2", d.categorie === e.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -946,9 +926,9 @@ function xt(e, t, r, c, d, f) {
|
|
|
946
926
|
}, [u(p, {
|
|
947
927
|
icon: e.icon,
|
|
948
928
|
"fixed-width": ""
|
|
949
|
-
}, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10,
|
|
929
|
+
}, null, 8, ["icon"]), s("span", null, C(e.label), 1)], 10, ot))), 128))])]),
|
|
950
930
|
s("div", null, [
|
|
951
|
-
s("label",
|
|
931
|
+
s("label", st, C(f.categorieCourante.recherche), 1),
|
|
952
932
|
(g(), i(h, {
|
|
953
933
|
key: d.categorie,
|
|
954
934
|
modelValue: f.selectedTrouve,
|
|
@@ -964,10 +944,10 @@ function xt(e, t, r, c, d, f) {
|
|
|
964
944
|
"debounce-delay": 0,
|
|
965
945
|
onSearch: f.rechercherPlusTard
|
|
966
946
|
}, {
|
|
967
|
-
options: E((e) => [s("div",
|
|
968
|
-
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",
|
|
969
|
-
s("small",
|
|
970
|
-
f.detailOf(e) ? (g(), o("small",
|
|
947
|
+
options: E((e) => [s("div", ct, [
|
|
948
|
+
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", lt, C(f.categorieOf(e) === "demandeur" ? "inactive" : "sorti"), 1))], 2),
|
|
949
|
+
s("small", ut, [l(C(f.referenceOf(e)) + " ", 1), e?.adresse ? (g(), o("span", dt, " — " + C(e.adresse), 1)) : a("", !0)]),
|
|
950
|
+
f.detailOf(e) ? (g(), o("small", ft, C(f.detailOf(e)), 1)) : a("", !0)
|
|
971
951
|
])]),
|
|
972
952
|
_: 1
|
|
973
953
|
}, 8, [
|
|
@@ -980,19 +960,19 @@ function xt(e, t, r, c, d, f) {
|
|
|
980
960
|
"placeholder",
|
|
981
961
|
"onSearch"
|
|
982
962
|
])),
|
|
983
|
-
d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small",
|
|
963
|
+
d.rechercheFaite && !d.rechercheEnCours && !d.trouves.length ? (g(), o("small", pt, C(f.categorieCourante.aucun), 1)) : a("", !0)
|
|
984
964
|
]),
|
|
985
|
-
f.selectionne ? (g(), o("div",
|
|
965
|
+
f.selectionne ? (g(), o("div", mt, [u(p, {
|
|
986
966
|
icon: f.iconOf(f.selectionne),
|
|
987
967
|
class: "mt-1"
|
|
988
|
-
}, null, 8, ["icon"]), s("div",
|
|
989
|
-
s("div",
|
|
990
|
-
f.selectionne.adresse ? (g(), o("div",
|
|
991
|
-
f.detailOf(f.selectionne) ? (g(), o("div",
|
|
992
|
-
])])) : (g(), o("div",
|
|
968
|
+
}, null, 8, ["icon"]), s("div", ht, [
|
|
969
|
+
s("div", gt, C(f.selectionne.libelle), 1),
|
|
970
|
+
f.selectionne.adresse ? (g(), o("div", _t, C(f.selectionne.adresse), 1)) : a("", !0),
|
|
971
|
+
f.detailOf(f.selectionne) ? (g(), o("div", vt, C(f.detailOf(f.selectionne)), 1)) : a("", !0)
|
|
972
|
+
])])) : (g(), o("div", yt, "Recherchez puis sélectionnez le réclamant."))
|
|
993
973
|
])) : a("", !0);
|
|
994
974
|
}
|
|
995
|
-
var
|
|
975
|
+
var xt = /*#__PURE__*/ F(rt, [["render", bt]]), St = {
|
|
996
976
|
name: "ProvenanceSelecteurBlock",
|
|
997
977
|
setup() {
|
|
998
978
|
return { draft: P() };
|
|
@@ -1008,22 +988,22 @@ var St = /*#__PURE__*/ F(it, [["render", xt]]), Ct = {
|
|
|
1008
988
|
return this.provenances.find((e) => e.id === this.selected) ?? null;
|
|
1009
989
|
}
|
|
1010
990
|
}
|
|
1011
|
-
},
|
|
991
|
+
}, Ct = {
|
|
1012
992
|
key: 0,
|
|
1013
993
|
class: "fs-7 text-muted"
|
|
1014
|
-
},
|
|
994
|
+
}, wt = { class: "fw-medium" }, Tt = { key: 1 }, Et = { class: "d-flex flex-wrap gap-2" }, Dt = ["onClick"], Ot = {
|
|
1015
995
|
key: 0,
|
|
1016
996
|
class: "fs-7 text-danger mt-1"
|
|
1017
997
|
};
|
|
1018
|
-
function
|
|
998
|
+
function kt(e, t, r, c, d, f) {
|
|
1019
999
|
let p = S("font-awesome-icon");
|
|
1020
|
-
return c.draft.isReadonly("provenance") ? (g(), o("div",
|
|
1000
|
+
return c.draft.isReadonly("provenance") ? (g(), o("div", Ct, [t[0] ||= l(" Provenance du contact : ", -1), s("span", wt, [f.provenanceChoisie?.icon ? (g(), i(p, {
|
|
1021
1001
|
key: 0,
|
|
1022
1002
|
icon: f.provenanceChoisie.icon,
|
|
1023
1003
|
"fixed-width": ""
|
|
1024
|
-
}, null, 8, ["icon"])) : a("", !0), l(" " + C(f.provenanceChoisie?.libelle ?? "—"), 1)])])) : (g(), o("div",
|
|
1004
|
+
}, null, 8, ["icon"])) : a("", !0), l(" " + C(f.provenanceChoisie?.libelle ?? "—"), 1)])])) : (g(), o("div", Tt, [
|
|
1025
1005
|
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),
|
|
1026
|
-
s("div",
|
|
1006
|
+
s("div", Et, [(g(!0), o(n, null, b(f.provenances, (e) => (g(), o("button", {
|
|
1027
1007
|
key: e.id,
|
|
1028
1008
|
type: "button",
|
|
1029
1009
|
class: m(["btn btn-sm d-inline-flex align-items-center gap-2", e.id === f.selected ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -1031,15 +1011,15 @@ function At(e, t, r, c, d, f) {
|
|
|
1031
1011
|
}, [u(p, {
|
|
1032
1012
|
icon: e.icon,
|
|
1033
1013
|
"fixed-width": ""
|
|
1034
|
-
}, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10,
|
|
1035
|
-
f.selected ? a("", !0) : (g(), o("div",
|
|
1014
|
+
}, null, 8, ["icon"]), s("span", null, C(e.libelle), 1)], 10, Dt))), 128))]),
|
|
1015
|
+
f.selected ? a("", !0) : (g(), o("div", Ot, " Sélectionnez par quel canal la sollicitation vous est parvenue. "))
|
|
1036
1016
|
]));
|
|
1037
1017
|
}
|
|
1038
|
-
var
|
|
1018
|
+
var At = /*#__PURE__*/ F(St, [["render", kt]]), jt = {
|
|
1039
1019
|
name: "EtapeReclamantBlock",
|
|
1040
1020
|
components: {
|
|
1041
|
-
ReclamantRechercheBlock:
|
|
1042
|
-
ProvenanceSelecteurBlock:
|
|
1021
|
+
ReclamantRechercheBlock: xt,
|
|
1022
|
+
ProvenanceSelecteurBlock: At
|
|
1043
1023
|
},
|
|
1044
1024
|
props: { premiere: {
|
|
1045
1025
|
type: Boolean,
|
|
@@ -1048,18 +1028,18 @@ var jt = /*#__PURE__*/ F(Ct, [["render", At]]), Mt = {
|
|
|
1048
1028
|
setup() {
|
|
1049
1029
|
return { draft: P() };
|
|
1050
1030
|
}
|
|
1051
|
-
},
|
|
1052
|
-
function
|
|
1031
|
+
}, Mt = { class: "d-flex flex-column gap-3" }, Nt = { class: "alert alert-light border py-2 px-3 mb-0 fs-7" };
|
|
1032
|
+
function Pt(e, t, n, r, c, d) {
|
|
1053
1033
|
let f = S("provenance-selecteur-block"), p = S("font-awesome-icon"), m = S("reclamant-recherche-block");
|
|
1054
|
-
return g(), o("div",
|
|
1034
|
+
return g(), o("div", Mt, [n.premiere ? (g(), i(f, { key: 0 })) : a("", !0), x(e.$slots, "reclamant", {
|
|
1055
1035
|
reclamant: r.draft.reclamantSelectionne,
|
|
1056
1036
|
select: r.draft.selectReclamant
|
|
1057
|
-
}, () => [s("div",
|
|
1037
|
+
}, () => [s("div", Nt, [u(p, {
|
|
1058
1038
|
icon: "user",
|
|
1059
1039
|
class: "text-primary me-2"
|
|
1060
1040
|
}), t[0] ||= l(" Pour qui cette sollicitation est-elle créée\xA0? ", -1)]), u(m)])]);
|
|
1061
1041
|
}
|
|
1062
|
-
var
|
|
1042
|
+
var Ft = /*#__PURE__*/ F(jt, [["render", Pt]]), It = Symbol("cresol:options"), Lt = (e) => _(It, e), Y = () => f(It, {});
|
|
1063
1043
|
//#endregion
|
|
1064
1044
|
//#region src/utils/text.js
|
|
1065
1045
|
function X(e, t = !0) {
|
|
@@ -1069,7 +1049,7 @@ function X(e, t = !0) {
|
|
|
1069
1049
|
}
|
|
1070
1050
|
//#endregion
|
|
1071
1051
|
//#region src/components/ReclamantSelecteurBlock.vue
|
|
1072
|
-
var
|
|
1052
|
+
var Rt = {
|
|
1073
1053
|
name: "ReclamantSelecteurBlock",
|
|
1074
1054
|
components: { AmsomAutocomplete: O },
|
|
1075
1055
|
props: {
|
|
@@ -1115,25 +1095,25 @@ var zt = {
|
|
|
1115
1095
|
return n ? t.filter((e) => (X(e?.libelle) ?? "").includes(n)) : t;
|
|
1116
1096
|
}
|
|
1117
1097
|
}
|
|
1118
|
-
},
|
|
1098
|
+
}, zt = {
|
|
1119
1099
|
key: 0,
|
|
1120
1100
|
class: "fs-7 text-muted"
|
|
1121
|
-
},
|
|
1101
|
+
}, Bt = { class: "fw-medium" }, Vt = {
|
|
1122
1102
|
key: 0,
|
|
1123
1103
|
class: "btn-group btn-group-sm",
|
|
1124
1104
|
role: "group"
|
|
1125
|
-
},
|
|
1126
|
-
function
|
|
1105
|
+
}, Ht = ["onClick"], Ut = ["value"], Wt = ["value"];
|
|
1106
|
+
function Gt(e, t, r, a, c, u) {
|
|
1127
1107
|
let d = S("amsom-autocomplete");
|
|
1128
|
-
return u.estFige ? (g(), o("div",
|
|
1108
|
+
return u.estFige ? (g(), o("div", zt, [t[2] ||= l(" Réclamant : ", -1), s("span", Bt, C(u.reclamantSelectionne?.libelle), 1)])) : (g(), o("div", {
|
|
1129
1109
|
key: 1,
|
|
1130
1110
|
class: m(r.inline ? "d-flex align-items-center justify-content-between gap-2 border-bottom pb-2" : "d-flex flex-column gap-1")
|
|
1131
|
-
}, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), u.presentation === "switch" ? (g(), o("div",
|
|
1111
|
+
}, [t[3] ||= s("span", { class: "fs-7 fw-semibold text-muted text-uppercase" }, "Réclamant", -1), u.presentation === "switch" ? (g(), o("div", Vt, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("button", {
|
|
1132
1112
|
key: t,
|
|
1133
1113
|
type: "button",
|
|
1134
1114
|
class: m(["btn btn-sm py-0", e === u.reclamantSelectionne ? "btn-primary" : "btn-outline-primary"]),
|
|
1135
1115
|
onClick: (t) => u.select(e)
|
|
1136
|
-
}, C(e.libelle), 11,
|
|
1116
|
+
}, C(e.libelle), 11, Ht))), 128))])) : u.presentation === "autocomplete" ? (g(), i(d, {
|
|
1137
1117
|
key: 1,
|
|
1138
1118
|
"model-value": u.reclamantSelectionne,
|
|
1139
1119
|
items: u.reclamants,
|
|
@@ -1160,17 +1140,17 @@ function Kt(e, t, r, a, c, u) {
|
|
|
1160
1140
|
}, [(g(!0), o(n, null, b(u.reclamants, (e, t) => (g(), o("option", {
|
|
1161
1141
|
key: t,
|
|
1162
1142
|
value: t
|
|
1163
|
-
}, C(e.libelle), 9,
|
|
1143
|
+
}, C(e.libelle), 9, Wt))), 128))], 42, Ut))], 2));
|
|
1164
1144
|
}
|
|
1165
1145
|
//#endregion
|
|
1166
1146
|
//#region src/components/EtapeCategorieBlock.vue
|
|
1167
|
-
var
|
|
1147
|
+
var Kt = {
|
|
1168
1148
|
name: "EtapeCategorieBlock",
|
|
1169
1149
|
components: {
|
|
1170
1150
|
AmsomOverlay: t,
|
|
1171
1151
|
AmsomAutocomplete: O,
|
|
1172
|
-
ReclamantSelecteurBlock: /* @__PURE__ */ F(
|
|
1173
|
-
ProvenanceSelecteurBlock:
|
|
1152
|
+
ReclamantSelecteurBlock: /* @__PURE__ */ F(Rt, [["render", Gt]]),
|
|
1153
|
+
ProvenanceSelecteurBlock: At
|
|
1174
1154
|
},
|
|
1175
1155
|
props: { premiere: {
|
|
1176
1156
|
type: Boolean,
|
|
@@ -1297,7 +1277,7 @@ var qt = {
|
|
|
1297
1277
|
});
|
|
1298
1278
|
},
|
|
1299
1279
|
registerIcons() {
|
|
1300
|
-
return
|
|
1280
|
+
return tt([
|
|
1301
1281
|
...this.data.cache.categories ?? [],
|
|
1302
1282
|
...this.data.cache.types ?? [],
|
|
1303
1283
|
...this.data.cache.natures ?? [],
|
|
@@ -1332,40 +1312,40 @@ var qt = {
|
|
|
1332
1312
|
return this.activeMotifs.find((t) => t.id === e)?.libelle ?? e;
|
|
1333
1313
|
}
|
|
1334
1314
|
}
|
|
1335
|
-
},
|
|
1315
|
+
}, qt = {
|
|
1336
1316
|
key: 0,
|
|
1337
1317
|
class: "d-flex flex-column gap-3"
|
|
1338
|
-
},
|
|
1318
|
+
}, Jt = { key: 2 }, Yt = { class: "d-flex flex-wrap align-items-center gap-2" }, Xt = { class: "badge rounded-pill bg-primary d-inline-flex align-items-center gap-2" }, Zt = { key: 3 }, Qt = { class: "d-flex align-items-center gap-2" }, $t = { class: "min-w-0" }, en = { class: "fw-medium text-truncate" }, tn = { class: "text-muted d-block text-truncate" }, nn = {
|
|
1339
1319
|
key: 4,
|
|
1340
1320
|
class: "d-flex align-items-center gap-2 text-muted fs-7"
|
|
1341
|
-
},
|
|
1321
|
+
}, rn = {
|
|
1342
1322
|
key: 5,
|
|
1343
1323
|
class: "d-flex flex-wrap align-items-center gap-2"
|
|
1344
|
-
},
|
|
1324
|
+
}, an = ["onClick"], on = { key: 6 }, sn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-2" }, cn = { class: "row justify-content-around g-3" }, ln = ["title", "onClick"], un = { class: "fs-7 mt-1 lh-sm" }, dn = {
|
|
1345
1325
|
key: 0,
|
|
1346
1326
|
class: "col-12 text-muted fs-7"
|
|
1347
|
-
},
|
|
1327
|
+
}, fn = [
|
|
1348
1328
|
"id",
|
|
1349
1329
|
"checked",
|
|
1350
1330
|
"disabled",
|
|
1351
1331
|
"onChange"
|
|
1352
|
-
],
|
|
1353
|
-
function
|
|
1332
|
+
], pn = ["for"];
|
|
1333
|
+
function mn(e, t, r, c, d, f) {
|
|
1354
1334
|
let p = S("provenance-selecteur-block"), m = S("reclamant-selecteur-block"), h = S("font-awesome-icon"), _ = S("amsom-autocomplete"), v = S("amsom-overlay");
|
|
1355
1335
|
return g(), i(v, { loading: c.data.isLoading && !c.data.cache.motifs || !d.iconsReady }, {
|
|
1356
|
-
default: E(() => [d.iconsReady ? (g(), o("div",
|
|
1336
|
+
default: E(() => [d.iconsReady ? (g(), o("div", qt, [
|
|
1357
1337
|
r.premiere ? (g(), i(p, { key: 0 })) : a("", !0),
|
|
1358
1338
|
c.options.reclamantMode === "step" ? a("", !0) : (g(), i(m, { key: 1 })),
|
|
1359
|
-
f.motifFige && f.selectionChain.length ? (g(), o("div",
|
|
1339
|
+
f.motifFige && f.selectionChain.length ? (g(), o("div", Jt, [t[1] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Motif", -1), s("div", Yt, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
|
|
1360
1340
|
key: 0,
|
|
1361
1341
|
icon: "fa-solid fa-chevron-right",
|
|
1362
1342
|
class: "text-muted fs-7"
|
|
1363
|
-
})) : a("", !0), s("span",
|
|
1343
|
+
})) : a("", !0), s("span", Xt, [e.icon ? (g(), i(h, {
|
|
1364
1344
|
key: 0,
|
|
1365
1345
|
icon: e.icon,
|
|
1366
1346
|
"fixed-width": ""
|
|
1367
1347
|
}, null, 8, ["icon"])) : a("", !0), l(" " + C(e.libelle), 1)])], 64))), 128))])])) : a("", !0),
|
|
1368
|
-
f.motifFige ? a("", !0) : (g(), o("div",
|
|
1348
|
+
f.motifFige ? a("", !0) : (g(), o("div", Zt, [t[2] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Rechercher un motif ", -1), u(_, {
|
|
1369
1349
|
modelValue: f.motifRecherche,
|
|
1370
1350
|
"onUpdate:modelValue": t[0] ||= (e) => f.motifRecherche = e,
|
|
1371
1351
|
items: f.allowedMotifs,
|
|
@@ -1377,12 +1357,12 @@ function hn(e, t, r, c, d, f) {
|
|
|
1377
1357
|
"input-size": "sm",
|
|
1378
1358
|
"hide-choices": ""
|
|
1379
1359
|
}, {
|
|
1380
|
-
options: E((e) => [s("div",
|
|
1360
|
+
options: E((e) => [s("div", Qt, [e?.icon ? (g(), i(h, {
|
|
1381
1361
|
key: 0,
|
|
1382
1362
|
icon: e.icon,
|
|
1383
1363
|
class: "text-primary",
|
|
1384
1364
|
"fixed-width": ""
|
|
1385
|
-
}, null, 8, ["icon"])) : a("", !0), s("div",
|
|
1365
|
+
}, null, 8, ["icon"])) : a("", !0), s("div", $t, [s("div", en, C(e?.libelle), 1), s("small", tn, C(e?.categorie) + " › " + C(e?.type) + " › " + C(e?.nature), 1)])])]),
|
|
1386
1366
|
_: 1
|
|
1387
1367
|
}, 8, [
|
|
1388
1368
|
"modelValue",
|
|
@@ -1392,12 +1372,12 @@ function hn(e, t, r, c, d, f) {
|
|
|
1392
1372
|
"get-input-libelle-from-id",
|
|
1393
1373
|
"filtering-function"
|
|
1394
1374
|
])])),
|
|
1395
|
-
f.motifFige ? a("", !0) : (g(), o("div",
|
|
1375
|
+
f.motifFige ? a("", !0) : (g(), o("div", nn, [...t[3] ||= [
|
|
1396
1376
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1),
|
|
1397
1377
|
s("span", null, "ou sélection guidée", -1),
|
|
1398
1378
|
s("hr", { class: "flex-grow-1 my-0" }, null, -1)
|
|
1399
1379
|
]])),
|
|
1400
|
-
!f.motifFige && f.selectionChain.length ? (g(), o("div",
|
|
1380
|
+
!f.motifFige && f.selectionChain.length ? (g(), o("div", rn, [(g(!0), o(n, null, b(f.selectionChain, (e, t) => (g(), o(n, { key: e.level }, [t > 0 ? (g(), i(h, {
|
|
1401
1381
|
key: 0,
|
|
1402
1382
|
icon: "fa-solid fa-chevron-right",
|
|
1403
1383
|
class: "text-muted fs-7"
|
|
@@ -1416,8 +1396,8 @@ function hn(e, t, r, c, d, f) {
|
|
|
1416
1396
|
icon: "fa-solid fa-xmark",
|
|
1417
1397
|
class: "fs-7 opacity-75"
|
|
1418
1398
|
})
|
|
1419
|
-
], 8,
|
|
1420
|
-
!f.motifFige && f.currentLevel ? (g(), o("div",
|
|
1399
|
+
], 8, an)], 64))), 128))])) : a("", !0),
|
|
1400
|
+
!f.motifFige && f.currentLevel ? (g(), o("div", on, [s("label", sn, C(f.currentLevel.title), 1), s("div", cn, [(g(!0), o(n, null, b(f.currentLevel.options, (e) => (g(), o("div", {
|
|
1421
1401
|
key: e.id,
|
|
1422
1402
|
class: "col-3 text-center"
|
|
1423
1403
|
}, [s("button", {
|
|
@@ -1429,7 +1409,7 @@ function hn(e, t, r, c, d, f) {
|
|
|
1429
1409
|
key: 0,
|
|
1430
1410
|
icon: e.icon,
|
|
1431
1411
|
size: "lg"
|
|
1432
|
-
}, null, 8, ["icon"])) : a("", !0)], 8,
|
|
1412
|
+
}, null, 8, ["icon"])) : a("", !0)], 8, ln), s("div", un, C(e.libelle), 1)]))), 128)), f.currentLevel.options.length ? a("", !0) : (g(), o("div", dn, " Aucun choix disponible "))])])) : a("", !0),
|
|
1433
1413
|
f.motifsAssocies.length ? (g(), o(n, { key: 7 }, [t[4] ||= s("div", { class: "d-flex align-items-center gap-2 text-muted fs-7" }, [
|
|
1434
1414
|
s("hr", { class: "flex-grow-1 my-0" }),
|
|
1435
1415
|
s("span", null, "Autres motifs liés"),
|
|
@@ -1444,15 +1424,15 @@ function hn(e, t, r, c, d, f) {
|
|
|
1444
1424
|
checked: f.isActive(e.idMotif),
|
|
1445
1425
|
disabled: f.motifFige,
|
|
1446
1426
|
onChange: (t) => f.toggleMotifAssocie(e)
|
|
1447
|
-
}, null, 40,
|
|
1427
|
+
}, null, 40, fn), s("label", {
|
|
1448
1428
|
class: "form-check-label fs-7",
|
|
1449
1429
|
for: `assoc-${e.idMotif}`
|
|
1450
|
-
}, C(e.libelle) + " ? ", 9,
|
|
1430
|
+
}, C(e.libelle) + " ? ", 9, pn)]))), 128))], 64)) : a("", !0)
|
|
1451
1431
|
])) : a("", !0)]),
|
|
1452
1432
|
_: 1
|
|
1453
1433
|
}, 8, ["loading"]);
|
|
1454
1434
|
}
|
|
1455
|
-
var
|
|
1435
|
+
var hn = /*#__PURE__*/ F(Kt, [["render", mn]]), gn = {
|
|
1456
1436
|
B: "briefcase",
|
|
1457
1437
|
M: "store",
|
|
1458
1438
|
W: "dungeon",
|
|
@@ -1462,15 +1442,15 @@ var gn = /*#__PURE__*/ F(qt, [["render", hn]]), _n = {
|
|
|
1462
1442
|
S: "square-parking",
|
|
1463
1443
|
V: "hands-holding"
|
|
1464
1444
|
};
|
|
1465
|
-
function
|
|
1466
|
-
return e === "L" ? t ? "building" : "house" :
|
|
1445
|
+
function _n(e, t = !1, n = "circle-question") {
|
|
1446
|
+
return e === "L" ? t ? "building" : "house" : gn[e] ?? n;
|
|
1467
1447
|
}
|
|
1468
|
-
function
|
|
1448
|
+
function vn(e) {
|
|
1469
1449
|
return e ? e.idCategorieModule === "L" ? e.estCollectif ? "Appartement" : "Maison" : e.categorieModule ?? "" : "";
|
|
1470
1450
|
}
|
|
1471
1451
|
//#endregion
|
|
1472
1452
|
//#region src/components/CiblePickerBlock.vue
|
|
1473
|
-
var
|
|
1453
|
+
var yn = 0, bn = {
|
|
1474
1454
|
name: "CiblePickerBlock",
|
|
1475
1455
|
components: { AmsomAutocomplete: O },
|
|
1476
1456
|
props: {
|
|
@@ -1522,7 +1502,7 @@ var bn = 0, xn = {
|
|
|
1522
1502
|
},
|
|
1523
1503
|
data() {
|
|
1524
1504
|
return {
|
|
1525
|
-
uid: ++
|
|
1505
|
+
uid: ++yn,
|
|
1526
1506
|
rechercheContrat: "",
|
|
1527
1507
|
contratsTrouves: [],
|
|
1528
1508
|
rechercheEnCours: !1,
|
|
@@ -1678,8 +1658,8 @@ var bn = 0, xn = {
|
|
|
1678
1658
|
let n = (X(e) ?? "").trim();
|
|
1679
1659
|
return n ? t.filter((e) => (X(this.moduleInputLibelle(e)) ?? "").includes(n) || (X(e?._autreLibelle) ?? "").includes(n)) : t;
|
|
1680
1660
|
},
|
|
1681
|
-
getCategorieModuleIcon:
|
|
1682
|
-
categorieLibelle:
|
|
1661
|
+
getCategorieModuleIcon: _n,
|
|
1662
|
+
categorieLibelle: vn,
|
|
1683
1663
|
moduleLibelle(e) {
|
|
1684
1664
|
return e ? e.libelleModule ?? e.adresse ?? `Module ${e.idModule}` : "";
|
|
1685
1665
|
},
|
|
@@ -1691,40 +1671,40 @@ var bn = 0, xn = {
|
|
|
1691
1671
|
return !!e?.dateFin && e.dateFin < Math.floor(Date.now() / 1e3);
|
|
1692
1672
|
}
|
|
1693
1673
|
}
|
|
1694
|
-
},
|
|
1674
|
+
}, xn = { class: "d-flex flex-column gap-3" }, Sn = {
|
|
1695
1675
|
class: "btn-group w-100",
|
|
1696
1676
|
role: "group"
|
|
1697
|
-
},
|
|
1677
|
+
}, Cn = ["onClick"], wn = { class: "text-muted d-block mt-1" }, Tn = {
|
|
1698
1678
|
key: 0,
|
|
1699
1679
|
class: "form-check"
|
|
1700
|
-
},
|
|
1680
|
+
}, En = ["id", "checked"], Dn = ["for"], On = { key: 1 }, kn = { class: "min-w-0" }, An = { class: "fw-medium text-truncate text-capitalize" }, jn = { class: "text-muted d-block text-truncate" }, Mn = { key: 0 }, Nn = {
|
|
1701
1681
|
key: 1,
|
|
1702
1682
|
class: "text-warning"
|
|
1703
|
-
},
|
|
1683
|
+
}, Pn = { class: "min-w-0" }, Fn = { class: "fw-medium text-truncate" }, In = { class: "text-muted d-block text-truncate" }, Ln = {
|
|
1704
1684
|
key: 2,
|
|
1705
1685
|
class: "row g-2"
|
|
1706
|
-
},
|
|
1686
|
+
}, Rn = { class: "col-12 col-md-5" }, zn = ["value"], Bn = { class: "col-12 col-md-5" }, Vn = ["value"], Hn = { class: "col-12 col-md-2" }, Un = ["value"], Wn = { key: 3 }, Gn = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, Kn = {
|
|
1707
1687
|
key: 0,
|
|
1708
1688
|
class: "text-lowercase fw-normal"
|
|
1709
|
-
},
|
|
1689
|
+
}, qn = { class: "d-flex flex-wrap align-items-center gap-1" }, Jn = ["title"], Yn = { class: "text-muted" }, Xn = {
|
|
1710
1690
|
key: 1,
|
|
1711
1691
|
class: "d-block text-truncate"
|
|
1712
|
-
},
|
|
1692
|
+
}, Zn = {
|
|
1713
1693
|
key: 2,
|
|
1714
1694
|
class: "text-muted d-block"
|
|
1715
|
-
},
|
|
1695
|
+
}, Qn = {
|
|
1716
1696
|
key: 0,
|
|
1717
1697
|
class: "text-muted d-block"
|
|
1718
|
-
},
|
|
1698
|
+
}, $n = {
|
|
1719
1699
|
key: 1,
|
|
1720
1700
|
class: "mt-2 d-flex flex-column gap-2"
|
|
1721
|
-
},
|
|
1722
|
-
function
|
|
1701
|
+
}, er = { class: "form-check mb-0 ms-3" }, tr = ["id", "checked"], nr = ["for"];
|
|
1702
|
+
function rr(e, t, r, c, d, f) {
|
|
1723
1703
|
let p = S("font-awesome-icon"), h = S("amsom-autocomplete");
|
|
1724
|
-
return g(), o("div",
|
|
1704
|
+
return g(), o("div", xn, [
|
|
1725
1705
|
s("div", null, [
|
|
1726
1706
|
t[7] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " La sollicitation concerne… ", -1),
|
|
1727
|
-
s("div",
|
|
1707
|
+
s("div", Sn, [(g(!0), o(n, null, b(f.availableModes, (t) => (g(), o("button", {
|
|
1728
1708
|
key: t.key,
|
|
1729
1709
|
type: "button",
|
|
1730
1710
|
class: m(["btn btn-sm", r.cibleMode === t.key ? "btn-primary" : "btn-outline-primary"]),
|
|
@@ -1732,19 +1712,19 @@ function ir(e, t, r, c, d, f) {
|
|
|
1732
1712
|
}, [u(p, {
|
|
1733
1713
|
icon: t.icon,
|
|
1734
1714
|
class: "me-1"
|
|
1735
|
-
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10,
|
|
1736
|
-
s("small",
|
|
1715
|
+
}, null, 8, ["icon"]), l(" " + C(t.label), 1)], 10, Cn))), 128))]),
|
|
1716
|
+
s("small", wn, C(f.currentMode?.aide), 1)
|
|
1737
1717
|
]),
|
|
1738
|
-
r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div",
|
|
1718
|
+
r.cibleMode === "contrat" ? (g(), o(n, { key: 0 }, [r.afficheCaseContratReclamant ? (g(), o("div", Tn, [s("input", {
|
|
1739
1719
|
id: `contrat-reclamant-${d.uid}`,
|
|
1740
1720
|
class: "form-check-input",
|
|
1741
1721
|
type: "checkbox",
|
|
1742
1722
|
checked: r.contratReclamant,
|
|
1743
1723
|
onChange: t[0] ||= (t) => e.$emit("toggle-contrat-reclamant", t.target.checked)
|
|
1744
|
-
}, null, 40,
|
|
1724
|
+
}, null, 40, En), s("label", {
|
|
1745
1725
|
class: "form-check-label fs-7",
|
|
1746
1726
|
for: `contrat-reclamant-${d.uid}`
|
|
1747
|
-
}, " Contrat du réclamant ", 8,
|
|
1727
|
+
}, " Contrat du réclamant ", 8, Dn)])) : a("", !0), r.contratReclamant ? a("", !0) : (g(), o("div", On, [t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Contrat ciblé ", -1), u(h, {
|
|
1748
1728
|
modelValue: f.selectedContrat,
|
|
1749
1729
|
"onUpdate:modelValue": t[1] ||= (e) => f.selectedContrat = e,
|
|
1750
1730
|
items: d.contratsTrouves,
|
|
@@ -1758,10 +1738,10 @@ function ir(e, t, r, c, d, f) {
|
|
|
1758
1738
|
"debounce-delay": 0,
|
|
1759
1739
|
onSearch: f.rechercherPlusTard
|
|
1760
1740
|
}, {
|
|
1761
|
-
options: E((e) => [s("div",
|
|
1741
|
+
options: E((e) => [s("div", kn, [s("div", An, C(e?.libelle ?? `Contrat ${e?.idContrat}`), 1), s("small", jn, [
|
|
1762
1742
|
l(C(e?.typeContrat) + "/" + C(e?.idContrat) + " ", 1),
|
|
1763
|
-
e?.nbModules > 1 ? (g(), o("span",
|
|
1764
|
-
e?.estSorti ? (g(), o("span",
|
|
1743
|
+
e?.nbModules > 1 ? (g(), o("span", Mn, " — " + C(e.nbModules) + " modules", 1)) : a("", !0),
|
|
1744
|
+
e?.estSorti ? (g(), o("span", Nn, " — sorti")) : a("", !0)
|
|
1765
1745
|
])])]),
|
|
1766
1746
|
_: 1
|
|
1767
1747
|
}, 8, [
|
|
@@ -1803,7 +1783,7 @@ function ir(e, t, r, c, d, f) {
|
|
|
1803
1783
|
"input-size": "sm",
|
|
1804
1784
|
"hide-choices": ""
|
|
1805
1785
|
}, {
|
|
1806
|
-
options: E((e) => [s("div",
|
|
1786
|
+
options: E((e) => [s("div", Pn, [s("div", Fn, C(e?.entree), 1), s("small", In, C(e?.commune) + " — Programme " + C(e?.codeProgramme), 1)])]),
|
|
1807
1787
|
_: 1
|
|
1808
1788
|
}, 8, [
|
|
1809
1789
|
"modelValue",
|
|
@@ -1831,25 +1811,25 @@ function ir(e, t, r, c, d, f) {
|
|
|
1831
1811
|
"disabled"
|
|
1832
1812
|
])])
|
|
1833
1813
|
], 64)) : a("", !0),
|
|
1834
|
-
r.cibleMode === "contrat" ? (g(), o("div",
|
|
1835
|
-
s("div",
|
|
1814
|
+
r.cibleMode === "contrat" ? (g(), o("div", Ln, [
|
|
1815
|
+
s("div", Rn, [t[12] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Commune", -1), s("input", {
|
|
1836
1816
|
class: "form-control form-control-sm",
|
|
1837
1817
|
disabled: "",
|
|
1838
1818
|
value: r.patrimoine.commune ?? "—"
|
|
1839
|
-
}, null, 8,
|
|
1840
|
-
s("div",
|
|
1819
|
+
}, null, 8, zn)]),
|
|
1820
|
+
s("div", Bn, [t[13] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Adresse", -1), s("input", {
|
|
1841
1821
|
class: "form-control form-control-sm",
|
|
1842
1822
|
disabled: "",
|
|
1843
1823
|
value: r.patrimoine.entree ?? "—"
|
|
1844
|
-
}, null, 8,
|
|
1845
|
-
s("div",
|
|
1824
|
+
}, null, 8, Vn)]),
|
|
1825
|
+
s("div", Hn, [t[14] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, "Étage", -1), s("input", {
|
|
1846
1826
|
class: "form-control form-control-sm",
|
|
1847
1827
|
disabled: "",
|
|
1848
1828
|
value: r.patrimoine.etage ?? "—"
|
|
1849
|
-
}, null, 8,
|
|
1829
|
+
}, null, 8, Un)])
|
|
1850
1830
|
])) : a("", !0),
|
|
1851
|
-
r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div",
|
|
1852
|
-
s("label",
|
|
1831
|
+
r.cibleMode === "contrat" || r.cibleMode === "patrimoine" ? (g(), o("div", Wn, [
|
|
1832
|
+
s("label", Gn, [t[15] ||= l(" Module ", -1), r.cibleMode === "patrimoine" ? (g(), o("span", Kn, "(facultatif)")) : a("", !0)]),
|
|
1853
1833
|
u(h, {
|
|
1854
1834
|
modelValue: f.selectedModule,
|
|
1855
1835
|
"onUpdate:modelValue": t[5] ||= (e) => f.selectedModule = e,
|
|
@@ -1870,12 +1850,12 @@ function ir(e, t, r, c, d, f) {
|
|
|
1870
1850
|
title: "Autre adresse ou étage du même programme"
|
|
1871
1851
|
})) : a("", !0),
|
|
1872
1852
|
s("div", { class: m(["fw-medium text-truncate", [e?._autreLibelle ? "text-muted" : "", f.isExit(e) ? "text-decoration-line-through" : ""]]) }, C(f.moduleLibelle(e)), 3),
|
|
1873
|
-
s("div",
|
|
1853
|
+
s("div", qn, [f.categorieLibelle(e) ? (g(), o("span", {
|
|
1874
1854
|
key: 0,
|
|
1875
1855
|
class: "badge bg-info",
|
|
1876
1856
|
title: e?.categorieModule
|
|
1877
|
-
}, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8,
|
|
1878
|
-
e?._autreLibelle ? (g(), o("small",
|
|
1857
|
+
}, [u(p, { icon: f.getCategorieModuleIcon(e?.idCategorieModule, e?.estCollectif) }, null, 8, ["icon"])], 8, Jn)) : a("", !0), s("small", Yn, "N° " + C(e?.idModule), 1)]),
|
|
1858
|
+
e?._autreLibelle ? (g(), o("small", Xn, C(e._autreLibelle), 1)) : e?.etage == null ? a("", !0) : (g(), o("small", Zn, " Étage " + C(e.etage), 1))
|
|
1879
1859
|
], 2)]),
|
|
1880
1860
|
_: 1
|
|
1881
1861
|
}, 8, [
|
|
@@ -1886,30 +1866,30 @@ function ir(e, t, r, c, d, f) {
|
|
|
1886
1866
|
"filtering-function",
|
|
1887
1867
|
"disabled"
|
|
1888
1868
|
]),
|
|
1889
|
-
r.cibleMode === "patrimoine" && !r.patrimoine.idModule ? (g(), o("small",
|
|
1890
|
-
r.locataireActuelOption ? (g(), o("div",
|
|
1869
|
+
r.cibleMode === "patrimoine" && !r.patrimoine.idModule ? (g(), o("small", Qn, " Sans module, la sollicitation cible la partie commune de l’adresse. ")) : a("", !0),
|
|
1870
|
+
r.locataireActuelOption ? (g(), o("div", $n, [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, {
|
|
1891
1871
|
icon: "circle-info",
|
|
1892
1872
|
class: "mt-1"
|
|
1893
|
-
}), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div",
|
|
1873
|
+
}), s("span", null, C(r.locataireActuelOption.hint), 1)], 2), s("div", er, [s("input", {
|
|
1894
1874
|
id: `locataire-actuel-${d.uid}`,
|
|
1895
1875
|
class: "form-check-input",
|
|
1896
1876
|
type: "checkbox",
|
|
1897
1877
|
checked: r.locataireActuelOption.reprendre,
|
|
1898
1878
|
onChange: t[6] ||= (t) => e.$emit("toggle-reprendre-locataire-actuel", t.target.checked)
|
|
1899
|
-
}, null, 40,
|
|
1879
|
+
}, null, 40, tr), s("label", {
|
|
1900
1880
|
class: "form-check-label fs-7",
|
|
1901
1881
|
for: `locataire-actuel-${d.uid}`
|
|
1902
|
-
}, " Rattacher au locataire actuel du module ", 8,
|
|
1882
|
+
}, " Rattacher au locataire actuel du module ", 8, nr)])])) : a("", !0)
|
|
1903
1883
|
])) : a("", !0)
|
|
1904
1884
|
]);
|
|
1905
1885
|
}
|
|
1906
1886
|
//#endregion
|
|
1907
1887
|
//#region src/components/EtapeCibleBlock.vue
|
|
1908
|
-
var
|
|
1888
|
+
var ir = {
|
|
1909
1889
|
name: "EtapeCibleBlock",
|
|
1910
1890
|
components: {
|
|
1911
1891
|
AmsomOverlay: t,
|
|
1912
|
-
CiblePickerBlock: /* @__PURE__ */ F(
|
|
1892
|
+
CiblePickerBlock: /* @__PURE__ */ F(bn, [["render", rr]])
|
|
1913
1893
|
},
|
|
1914
1894
|
setup() {
|
|
1915
1895
|
return {
|
|
@@ -2014,32 +1994,32 @@ var ar = {
|
|
|
2014
1994
|
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));
|
|
2015
1995
|
}
|
|
2016
1996
|
}
|
|
2017
|
-
},
|
|
1997
|
+
}, ar = { class: "d-flex flex-column gap-3" }, or = {
|
|
2018
1998
|
key: 0,
|
|
2019
1999
|
class: "alert alert-light border py-2 px-3 mb-0 d-flex align-items-center gap-2"
|
|
2020
|
-
},
|
|
2000
|
+
}, sr = { class: "fs-7" }, cr = {
|
|
2021
2001
|
key: 1,
|
|
2022
2002
|
class: "d-flex flex-column gap-1"
|
|
2023
|
-
},
|
|
2003
|
+
}, lr = {
|
|
2024
2004
|
key: 0,
|
|
2025
2005
|
class: "text-muted me-1"
|
|
2026
|
-
},
|
|
2006
|
+
}, ur = { class: "d-flex align-items-center gap-2" }, dr = { class: "fw-medium fs-7" }, fr = { class: "form-check form-switch mb-0" }, pr = [
|
|
2027
2007
|
"id",
|
|
2028
2008
|
"checked",
|
|
2029
2009
|
"onChange"
|
|
2030
|
-
],
|
|
2010
|
+
], mr = ["for"], hr = {
|
|
2031
2011
|
key: 0,
|
|
2032
2012
|
class: "mt-2"
|
|
2033
2013
|
};
|
|
2034
|
-
function
|
|
2014
|
+
function gr(e, t, r, c, d, f) {
|
|
2035
2015
|
let m = S("font-awesome-icon"), h = S("cible-picker-block"), _ = S("amsom-overlay");
|
|
2036
2016
|
return g(), i(_, { loading: c.data.isLoading }, {
|
|
2037
|
-
default: E(() => [s("div",
|
|
2038
|
-
f.motifLibelle ? (g(), o("div",
|
|
2017
|
+
default: E(() => [s("div", ar, [
|
|
2018
|
+
f.motifLibelle ? (g(), o("div", or, [u(m, {
|
|
2039
2019
|
icon: "tag",
|
|
2040
2020
|
class: "text-primary"
|
|
2041
|
-
}), s("span",
|
|
2042
|
-
f.cibleFigee ? (g(), o("div",
|
|
2021
|
+
}), s("span", sr, [t[8] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1), l(C(f.motifLibelle), 1)])])) : a("", !0),
|
|
2022
|
+
f.cibleFigee ? (g(), o("div", cr, [(g(!0), o(n, null, b(c.draft.draft.lignes, (e, t) => (g(), o("span", {
|
|
2043
2023
|
key: t,
|
|
2044
2024
|
class: "fs-7"
|
|
2045
2025
|
}, [
|
|
@@ -2047,7 +2027,7 @@ function _r(e, t, r, c, d, f) {
|
|
|
2047
2027
|
icon: "location-dot",
|
|
2048
2028
|
class: "text-primary me-2"
|
|
2049
2029
|
}),
|
|
2050
|
-
f.lignesAssociees.length ? (g(), o("span",
|
|
2030
|
+
f.lignesAssociees.length ? (g(), o("span", lr, C(t === 0 ? f.motifLibelle : e.libelle) + " : ", 1)) : a("", !0),
|
|
2051
2031
|
l(" " + C(c.draft.cibleResume(e)), 1)
|
|
2052
2032
|
]))), 128))])) : (g(), i(h, p({ key: 2 }, f.pickerProps(f.lignePrincipale), {
|
|
2053
2033
|
onChangeMode: t[0] ||= (e) => f.onChangeMode(e),
|
|
@@ -2066,16 +2046,16 @@ function _r(e, t, r, c, d, f) {
|
|
|
2066
2046
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, t) => (g(), o("div", {
|
|
2067
2047
|
key: e.idMotif,
|
|
2068
2048
|
class: "border rounded p-2"
|
|
2069
|
-
}, [s("div",
|
|
2049
|
+
}, [s("div", ur, [s("span", dr, C(e.libelle), 1), s("div", fr, [s("input", {
|
|
2070
2050
|
id: `memecible-${e.idMotif}`,
|
|
2071
2051
|
class: "form-check-input",
|
|
2072
2052
|
type: "checkbox",
|
|
2073
2053
|
checked: !e.patrimoine,
|
|
2074
2054
|
onChange: (e) => c.draft.toggleCibleOverride(t + 1)
|
|
2075
|
-
}, null, 40,
|
|
2055
|
+
}, null, 40, pr), s("label", {
|
|
2076
2056
|
class: "form-check-label fs-7",
|
|
2077
2057
|
for: `memecible-${e.idMotif}`
|
|
2078
|
-
}, " Même cible que la ligne principale ", 8,
|
|
2058
|
+
}, " Même cible que la ligne principale ", 8, mr)])]), e.patrimoine ? (g(), o("div", hr, [u(h, p({ ref_for: !0 }, f.pickerProps(e), {
|
|
2079
2059
|
onChangeMode: (e) => f.onChangeMode(e, t + 1),
|
|
2080
2060
|
onSelectCommune: (e) => f.onSelectCommune(e, t + 1),
|
|
2081
2061
|
onSelectAdresse: (e) => f.onSelectAdresse(e, t + 1),
|
|
@@ -2098,7 +2078,7 @@ function _r(e, t, r, c, d, f) {
|
|
|
2098
2078
|
_: 1
|
|
2099
2079
|
}, 8, ["loading"]);
|
|
2100
2080
|
}
|
|
2101
|
-
var
|
|
2081
|
+
var _r = /*#__PURE__*/ F(ir, [["render", gr]]), vr = {
|
|
2102
2082
|
name: "LigneDocumentBlock",
|
|
2103
2083
|
components: { AmsomUploadFile: se },
|
|
2104
2084
|
props: {
|
|
@@ -2117,7 +2097,7 @@ var vr = /*#__PURE__*/ F(ar, [["render", _r]]), yr = {
|
|
|
2117
2097
|
},
|
|
2118
2098
|
emits: ["update"]
|
|
2119
2099
|
};
|
|
2120
|
-
function
|
|
2100
|
+
function yr(e, t, n, r, i, a) {
|
|
2121
2101
|
let c = S("amsom-upload-file");
|
|
2122
2102
|
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, {
|
|
2123
2103
|
"model-value": n.fichier,
|
|
@@ -2133,23 +2113,23 @@ function br(e, t, n, r, i, a) {
|
|
|
2133
2113
|
"read-only"
|
|
2134
2114
|
])]);
|
|
2135
2115
|
}
|
|
2136
|
-
var
|
|
2116
|
+
var br = /*#__PURE__*/ F(vr, [["render", yr]]);
|
|
2137
2117
|
//#endregion
|
|
2138
2118
|
//#region src/utils/date.js
|
|
2139
|
-
function
|
|
2119
|
+
function xr(e) {
|
|
2140
2120
|
return e == null ? "" : (/* @__PURE__ */ new Date(e * 1e3)).toISOString().slice(0, 10);
|
|
2141
2121
|
}
|
|
2142
|
-
function
|
|
2122
|
+
function Sr(e) {
|
|
2143
2123
|
return e ? Math.floor(new Date(e).getTime() / 1e3) : null;
|
|
2144
2124
|
}
|
|
2145
2125
|
//#endregion
|
|
2146
2126
|
//#region src/components/LigneDetailBlock.vue
|
|
2147
|
-
var
|
|
2127
|
+
var Cr = 4e3, wr = {
|
|
2148
2128
|
name: "LigneDetailBlock",
|
|
2149
2129
|
components: {
|
|
2150
2130
|
AmsomAutocomplete: O,
|
|
2151
2131
|
AmsomTextarea: oe,
|
|
2152
|
-
LigneDocumentBlock:
|
|
2132
|
+
LigneDocumentBlock: br
|
|
2153
2133
|
},
|
|
2154
2134
|
props: { index: {
|
|
2155
2135
|
type: Number,
|
|
@@ -2162,7 +2142,7 @@ var wr = 4e3, Tr = {
|
|
|
2162
2142
|
};
|
|
2163
2143
|
},
|
|
2164
2144
|
computed: {
|
|
2165
|
-
descriptionMaxLength: () =>
|
|
2145
|
+
descriptionMaxLength: () => Cr,
|
|
2166
2146
|
isPrincipale() {
|
|
2167
2147
|
return this.index === 0;
|
|
2168
2148
|
},
|
|
@@ -2180,8 +2160,8 @@ var wr = 4e3, Tr = {
|
|
|
2180
2160
|
}
|
|
2181
2161
|
},
|
|
2182
2162
|
methods: {
|
|
2183
|
-
timestampToDateInput:
|
|
2184
|
-
dateInputToTimestamp:
|
|
2163
|
+
timestampToDateInput: xr,
|
|
2164
|
+
dateInputToTimestamp: Sr,
|
|
2185
2165
|
responsableLibelle(e) {
|
|
2186
2166
|
let t = e && typeof e != "object" ? this.collaborateurs.find((t) => String(t.id) === String(e)) : e;
|
|
2187
2167
|
return t ? `${t.prenom} ${t.nom}` : "";
|
|
@@ -2191,53 +2171,53 @@ var wr = 4e3, Tr = {
|
|
|
2191
2171
|
return n ? t.filter((e) => (X(`${e.prenom} ${e.nom} ${e.service}`) ?? "").includes(n)) : t;
|
|
2192
2172
|
}
|
|
2193
2173
|
}
|
|
2194
|
-
},
|
|
2174
|
+
}, Tr = { class: "d-flex flex-column gap-2" }, Er = { class: "d-flex align-items-center gap-2 mb-1" }, Dr = { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-0" }, Or = {
|
|
2195
2175
|
key: 0,
|
|
2196
2176
|
class: "ms-1 text-danger"
|
|
2197
|
-
},
|
|
2177
|
+
}, kr = {
|
|
2198
2178
|
key: 0,
|
|
2199
2179
|
class: "form-check form-switch mb-0"
|
|
2200
|
-
},
|
|
2180
|
+
}, Ar = [
|
|
2201
2181
|
"id",
|
|
2202
2182
|
"checked",
|
|
2203
2183
|
"disabled"
|
|
2204
|
-
],
|
|
2184
|
+
], jr = ["for"], Mr = {
|
|
2205
2185
|
key: 1,
|
|
2206
2186
|
class: "text-muted d-block",
|
|
2207
2187
|
style: { "white-space": "pre-line" }
|
|
2208
|
-
},
|
|
2188
|
+
}, Nr = { class: "row g-3" }, Pr = { class: "col-6" }, Fr = { class: "d-flex align-items-center gap-2 mb-1" }, Ir = {
|
|
2209
2189
|
key: 0,
|
|
2210
2190
|
class: "form-check form-switch mb-0"
|
|
2211
|
-
},
|
|
2191
|
+
}, Lr = [
|
|
2212
2192
|
"id",
|
|
2213
2193
|
"checked",
|
|
2214
2194
|
"disabled"
|
|
2215
|
-
],
|
|
2195
|
+
], Rr = ["for"], zr = ["value"], Br = {
|
|
2216
2196
|
key: 1,
|
|
2217
2197
|
class: "text-muted d-block"
|
|
2218
|
-
},
|
|
2198
|
+
}, Vr = {
|
|
2219
2199
|
key: 0,
|
|
2220
2200
|
class: "text-muted d-block"
|
|
2221
|
-
},
|
|
2201
|
+
}, Hr = { class: "min-w-0" }, Ur = { class: "fw-medium text-truncate" }, Wr = {
|
|
2222
2202
|
key: 0,
|
|
2223
2203
|
class: "text-muted d-block"
|
|
2224
|
-
},
|
|
2204
|
+
}, Gr = {
|
|
2225
2205
|
key: 2,
|
|
2226
2206
|
class: "text-muted"
|
|
2227
|
-
},
|
|
2228
|
-
function
|
|
2207
|
+
}, Kr = { class: "col-12 col-md-6" };
|
|
2208
|
+
function qr(e, t, n, r, c, d) {
|
|
2229
2209
|
let f = S("amsom-textarea"), p = S("amsom-autocomplete"), m = S("ligne-document-block");
|
|
2230
|
-
return g(), o("div",
|
|
2210
|
+
return g(), o("div", Tr, [s("div", null, [s("div", Er, [s("label", Dr, [t[6] ||= l(" Description", -1), d.isPrincipale ? (g(), o("span", Or, "*")) : a("", !0)]), d.isPrincipale ? a("", !0) : (g(), o("div", kr, [s("input", {
|
|
2231
2211
|
id: `memedetail-${d.ligne.idMotif}`,
|
|
2232
2212
|
class: "form-check-input",
|
|
2233
2213
|
type: "checkbox",
|
|
2234
2214
|
checked: d.ligne.description == null,
|
|
2235
2215
|
disabled: r.draft.isReadonly("description"),
|
|
2236
2216
|
onChange: t[0] ||= (e) => r.draft.toggleDescriptionOverride(n.index)
|
|
2237
|
-
}, null, 40,
|
|
2217
|
+
}, null, 40, Ar), s("label", {
|
|
2238
2218
|
class: "form-check-label fs-7",
|
|
2239
2219
|
for: `memedetail-${d.ligne.idMotif}`
|
|
2240
|
-
}, " Même description ", 8,
|
|
2220
|
+
}, " Même description ", 8, jr)]))]), !r.draft.isReadonly("description") && (d.isPrincipale || d.ligne.description != null) ? (g(), i(f, {
|
|
2241
2221
|
key: 0,
|
|
2242
2222
|
"model-value": d.ligne.description,
|
|
2243
2223
|
"input-size": "sm",
|
|
@@ -2250,25 +2230,25 @@ function Jr(e, t, n, r, c, d) {
|
|
|
2250
2230
|
"rows",
|
|
2251
2231
|
"maxlength",
|
|
2252
2232
|
"placeholder"
|
|
2253
|
-
])) : (g(), o("small",
|
|
2233
|
+
])) : (g(), o("small", Mr, C((d.ligne.description ?? d.lignePrincipale.description) || "—"), 1))]), s("div", Nr, [s("div", Pr, [s("div", null, [s("div", Fr, [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", Ir, [s("input", {
|
|
2254
2234
|
id: `memedate-${d.ligne.idMotif}`,
|
|
2255
2235
|
class: "form-check-input",
|
|
2256
2236
|
type: "checkbox",
|
|
2257
2237
|
checked: !d.ligne.dateFaitsOverride,
|
|
2258
2238
|
disabled: r.draft.isReadonly("dateFaits"),
|
|
2259
2239
|
onChange: t[2] ||= (e) => r.draft.toggleDateFaitsOverride(n.index)
|
|
2260
|
-
}, null, 40,
|
|
2240
|
+
}, null, 40, Lr), s("label", {
|
|
2261
2241
|
class: "form-check-label fs-7",
|
|
2262
2242
|
for: `memedate-${d.ligne.idMotif}`
|
|
2263
|
-
}, " Même date ", 8,
|
|
2243
|
+
}, " Même date ", 8, Rr)]))]), !r.draft.isReadonly("dateFaits") && (d.isPrincipale || d.ligne.dateFaitsOverride) ? (g(), o("input", {
|
|
2264
2244
|
key: 0,
|
|
2265
2245
|
value: d.timestampToDateInput(d.ligne.dateFaits),
|
|
2266
2246
|
type: "date",
|
|
2267
2247
|
class: "form-control form-control-sm",
|
|
2268
2248
|
onInput: t[3] ||= (e) => r.draft.setDateFaits(n.index, d.dateInputToTimestamp(e.target.value))
|
|
2269
|
-
}, null, 40,
|
|
2249
|
+
}, null, 40, zr)) : (g(), o("small", Br, C(d.timestampToDateInput(d.dateFaits) || "—"), 1))]), s("div", null, [
|
|
2270
2250
|
t[8] ||= s("label", { class: "form-label fs-7 fw-semibold text-muted text-uppercase mb-1" }, " Responsable ", -1),
|
|
2271
|
-
r.draft.isReadonly("responsable") ? (g(), o("small",
|
|
2251
|
+
r.draft.isReadonly("responsable") ? (g(), o("small", Vr, C(d.responsableLibelle(d.ligne.responsable) || "Déterminé automatiquement"), 1)) : (g(), i(p, {
|
|
2272
2252
|
key: 1,
|
|
2273
2253
|
"model-value": d.ligne.responsable,
|
|
2274
2254
|
items: d.collaborateurs,
|
|
@@ -2280,7 +2260,7 @@ function Jr(e, t, n, r, c, d) {
|
|
|
2280
2260
|
"hide-choices": "",
|
|
2281
2261
|
"onUpdate:modelValue": t[4] ||= (e) => r.draft.setResponsable(n.index, e ?? null)
|
|
2282
2262
|
}, {
|
|
2283
|
-
options: E((e) => [s("div",
|
|
2263
|
+
options: E((e) => [s("div", Hr, [s("div", Ur, C(e?.prenom) + " " + C(e?.nom), 1), e?.service ? (g(), o("small", Wr, C(e.service), 1)) : a("", !0)])]),
|
|
2284
2264
|
_: 1
|
|
2285
2265
|
}, 8, [
|
|
2286
2266
|
"model-value",
|
|
@@ -2289,8 +2269,8 @@ function Jr(e, t, n, r, c, d) {
|
|
|
2289
2269
|
"get-input-libelle",
|
|
2290
2270
|
"filtering-function"
|
|
2291
2271
|
])),
|
|
2292
|
-
d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small",
|
|
2293
|
-
])]), s("div",
|
|
2272
|
+
d.isPrincipale && !d.ligne.responsable && !r.draft.isReadonly("responsable") ? (g(), o("small", Gr, " Aucun paramétrage trouvé : le responsable sera déterminé automatiquement. ")) : a("", !0)
|
|
2273
|
+
])]), s("div", Kr, [u(m, {
|
|
2294
2274
|
index: n.index,
|
|
2295
2275
|
fichier: d.ligne.fichier,
|
|
2296
2276
|
readonly: r.draft.isReadonly("fichier"),
|
|
@@ -2303,11 +2283,11 @@ function Jr(e, t, n, r, c, d) {
|
|
|
2303
2283
|
}
|
|
2304
2284
|
//#endregion
|
|
2305
2285
|
//#region src/components/EtapeDetailsBlock.vue
|
|
2306
|
-
var
|
|
2286
|
+
var Jr = {
|
|
2307
2287
|
name: "EtapeDetailsBlock",
|
|
2308
2288
|
components: {
|
|
2309
2289
|
AmsomOverlay: t,
|
|
2310
|
-
LigneDetailBlock: /* @__PURE__ */ F(
|
|
2290
|
+
LigneDetailBlock: /* @__PURE__ */ F(wr, [["render", qr]])
|
|
2311
2291
|
},
|
|
2312
2292
|
setup() {
|
|
2313
2293
|
return {
|
|
@@ -2363,22 +2343,22 @@ var Yr = {
|
|
|
2363
2343
|
}
|
|
2364
2344
|
}
|
|
2365
2345
|
}
|
|
2366
|
-
},
|
|
2346
|
+
}, Yr = { class: "d-flex flex-column gap-3" }, Xr = { class: "alert alert-light border py-2 px-3 mb-0 d-flex flex-column gap-1" }, Zr = {
|
|
2367
2347
|
key: 0,
|
|
2368
2348
|
class: "fs-7"
|
|
2369
|
-
},
|
|
2370
|
-
function
|
|
2349
|
+
}, Qr = { class: "fs-7" }, $r = { class: "bg-light rounded px-2 py-1 d-flex flex-column gap-1" }, ei = { class: "fs-7" }, ti = { class: "fs-7" };
|
|
2350
|
+
function ni(e, t, r, c, d, f) {
|
|
2371
2351
|
let p = S("font-awesome-icon"), m = S("ligne-detail-block"), h = S("amsom-overlay");
|
|
2372
2352
|
return g(), i(h, { loading: c.data.isLoading && !c.data.cache.collaborateurs }, {
|
|
2373
|
-
default: E(() => [s("div",
|
|
2374
|
-
s("div",
|
|
2353
|
+
default: E(() => [s("div", Yr, [
|
|
2354
|
+
s("div", Xr, [f.motifLibelle ? (g(), o("span", Zr, [
|
|
2375
2355
|
u(p, {
|
|
2376
2356
|
icon: "tag",
|
|
2377
2357
|
class: "text-primary me-2"
|
|
2378
2358
|
}),
|
|
2379
2359
|
t[0] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2380
2360
|
l(C(f.motifLibelle), 1)
|
|
2381
|
-
])) : a("", !0), s("span",
|
|
2361
|
+
])) : a("", !0), s("span", Qr, [
|
|
2382
2362
|
u(p, {
|
|
2383
2363
|
icon: "location-dot",
|
|
2384
2364
|
class: "text-primary me-2"
|
|
@@ -2394,14 +2374,14 @@ function ri(e, t, r, c, d, f) {
|
|
|
2394
2374
|
], -1), (g(!0), o(n, null, b(f.lignesAssociees, (e, n) => (g(), o("div", {
|
|
2395
2375
|
key: e.idMotif,
|
|
2396
2376
|
class: "border rounded p-2 d-flex flex-column gap-2"
|
|
2397
|
-
}, [s("div",
|
|
2377
|
+
}, [s("div", $r, [s("span", ei, [
|
|
2398
2378
|
u(p, {
|
|
2399
2379
|
icon: "tag",
|
|
2400
2380
|
class: "text-primary me-2"
|
|
2401
2381
|
}),
|
|
2402
2382
|
t[2] ||= s("span", { class: "text-muted text-uppercase fw-semibold me-1" }, "Motif", -1),
|
|
2403
2383
|
l(" " + C(e.libelle), 1)
|
|
2404
|
-
]), s("span",
|
|
2384
|
+
]), s("span", ti, [
|
|
2405
2385
|
u(p, {
|
|
2406
2386
|
icon: "location-dot",
|
|
2407
2387
|
class: "text-primary me-2"
|
|
@@ -2415,15 +2395,15 @@ function ri(e, t, r, c, d, f) {
|
|
|
2415
2395
|
}
|
|
2416
2396
|
//#endregion
|
|
2417
2397
|
//#region src/components/StepperBlock.vue
|
|
2418
|
-
var
|
|
2398
|
+
var ri = {
|
|
2419
2399
|
name: "StepperBlock",
|
|
2420
2400
|
components: {
|
|
2421
2401
|
AmsomHorizontalStepper: re,
|
|
2422
2402
|
AmsomOverlay: t,
|
|
2423
|
-
EtapeReclamantBlock:
|
|
2424
|
-
EtapeCategorieBlock:
|
|
2425
|
-
EtapeCibleBlock:
|
|
2426
|
-
EtapeDetailsBlock: /* @__PURE__ */ F(
|
|
2403
|
+
EtapeReclamantBlock: Ft,
|
|
2404
|
+
EtapeCategorieBlock: hn,
|
|
2405
|
+
EtapeCibleBlock: _r,
|
|
2406
|
+
EtapeDetailsBlock: /* @__PURE__ */ F(Jr, [["render", ni]])
|
|
2427
2407
|
},
|
|
2428
2408
|
props: {
|
|
2429
2409
|
step: {
|
|
@@ -2535,25 +2515,25 @@ var ii = {
|
|
|
2535
2515
|
}));
|
|
2536
2516
|
}
|
|
2537
2517
|
}
|
|
2538
|
-
},
|
|
2518
|
+
}, ii = { class: "d-flex flex-column gap-3" }, ai = {
|
|
2539
2519
|
key: 0,
|
|
2540
2520
|
class: "w-100 fs-6 fw-medium my-3 alert alert-info",
|
|
2541
2521
|
style: { "white-space": "pre-line" }
|
|
2542
|
-
},
|
|
2543
|
-
function
|
|
2522
|
+
}, oi = { style: { "min-height": "260px" } }, si = { class: "d-flex justify-content-between" }, ci = { key: 1 }, li = ["disabled"], ui = ["disabled"];
|
|
2523
|
+
function di(e, t, n, r, f, p) {
|
|
2544
2524
|
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");
|
|
2545
2525
|
return g(), i(w, { loading: n.creating }, {
|
|
2546
|
-
default: E(() => [s("div",
|
|
2526
|
+
default: E(() => [s("div", ii, [
|
|
2547
2527
|
u(m, {
|
|
2548
2528
|
steps: p.stepperSteps,
|
|
2549
2529
|
size: "md",
|
|
2550
2530
|
onStepClick: p.onStepClick
|
|
2551
2531
|
}, null, 8, ["steps", "onStepClick"]),
|
|
2552
|
-
p.aideMotif ? (g(), o("div",
|
|
2532
|
+
p.aideMotif ? (g(), o("div", ai, [u(_, {
|
|
2553
2533
|
icon: "circle-info",
|
|
2554
2534
|
class: "text-info-emphasis me-2"
|
|
2555
2535
|
}), s("span", null, C(p.aideMotif), 1)])) : a("", !0),
|
|
2556
|
-
s("div",
|
|
2536
|
+
s("div", oi, [p.currentKey === "reclamant" ? (g(), i(v, {
|
|
2557
2537
|
key: 0,
|
|
2558
2538
|
premiere: n.step === 1
|
|
2559
2539
|
}, c({ _: 2 }, [e.$slots.reclamant ? {
|
|
@@ -2564,14 +2544,14 @@ function fi(e, t, n, r, f, p) {
|
|
|
2564
2544
|
key: 1,
|
|
2565
2545
|
premiere: n.step === 1
|
|
2566
2546
|
}, null, 8, ["premiere"])) : p.currentKey === "cible" ? (g(), i(b, { key: 2 })) : p.currentKey === "details" ? (g(), i(ee, { key: 3 })) : a("", !0)]),
|
|
2567
|
-
s("div",
|
|
2547
|
+
s("div", si, [n.step > 1 ? (g(), o("button", {
|
|
2568
2548
|
key: 0,
|
|
2569
2549
|
class: "btn btn-sm btn-outline-secondary",
|
|
2570
2550
|
onClick: t[0] ||= (...e) => p.goPrevious && p.goPrevious(...e)
|
|
2571
2551
|
}, [u(_, {
|
|
2572
2552
|
icon: "chevron-left",
|
|
2573
2553
|
class: "me-1"
|
|
2574
|
-
}), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span",
|
|
2554
|
+
}), t[3] ||= l(" Précédent ", -1)])) : (g(), o("span", ci)), n.step < p.steps.length ? (g(), o("button", {
|
|
2575
2555
|
key: 2,
|
|
2576
2556
|
class: "btn btn-sm btn-primary",
|
|
2577
2557
|
disabled: !p.canGoNext,
|
|
@@ -2579,7 +2559,7 @@ function fi(e, t, n, r, f, p) {
|
|
|
2579
2559
|
}, [t[4] ||= l(" Suivant ", -1), u(_, {
|
|
2580
2560
|
icon: "chevron-right",
|
|
2581
2561
|
class: "ms-1"
|
|
2582
|
-
})], 8,
|
|
2562
|
+
})], 8, li)) : (g(), o("button", {
|
|
2583
2563
|
key: 3,
|
|
2584
2564
|
class: "btn btn-sm btn-success",
|
|
2585
2565
|
disabled: !p.canCreer || n.creating,
|
|
@@ -2587,22 +2567,20 @@ function fi(e, t, n, r, f, p) {
|
|
|
2587
2567
|
}, [u(_, {
|
|
2588
2568
|
icon: "check",
|
|
2589
2569
|
class: "me-1"
|
|
2590
|
-
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8,
|
|
2570
|
+
}), t[5] ||= l(" Créer la sollicitation ", -1)], 8, ui))])
|
|
2591
2571
|
])]),
|
|
2592
2572
|
_: 3
|
|
2593
2573
|
}, 8, ["loading"]);
|
|
2594
2574
|
}
|
|
2595
|
-
var
|
|
2575
|
+
var fi = /*#__PURE__*/ F(ri, [["render", di]]), pi = (e, { signal: t, baseUrl: n } = {}) => Pe("/v2/cresol/creer_sollicitation", e, {
|
|
2596
2576
|
signal: t,
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
}), hi = ({ idSollicitation: e, pj: t }, { signal: n, token: r, baseUrl: i } = {}) => Fe("/v2/cresol/upload_sollicitation_ged", {
|
|
2577
|
+
baseUrl: n
|
|
2578
|
+
}), mi = ({ idSollicitation: e, pj: t }, { signal: n, baseUrl: r } = {}) => Pe("/v2/cresol/upload_sollicitation_ged", {
|
|
2600
2579
|
idSollicitation: e,
|
|
2601
2580
|
pj: t
|
|
2602
2581
|
}, {
|
|
2603
2582
|
signal: n,
|
|
2604
|
-
|
|
2605
|
-
baseUrl: i
|
|
2583
|
+
baseUrl: r
|
|
2606
2584
|
}), Z = {
|
|
2607
2585
|
modelValue: {
|
|
2608
2586
|
type: Object,
|
|
@@ -2650,12 +2628,8 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2650
2628
|
baseUrl: {
|
|
2651
2629
|
type: String,
|
|
2652
2630
|
default: null
|
|
2653
|
-
},
|
|
2654
|
-
token: {
|
|
2655
|
-
type: String,
|
|
2656
|
-
default: null
|
|
2657
2631
|
}
|
|
2658
|
-
},
|
|
2632
|
+
}, hi = Object.keys(Z), Q = [
|
|
2659
2633
|
"update:modelValue",
|
|
2660
2634
|
"reclamantChange",
|
|
2661
2635
|
"motifChange",
|
|
@@ -2664,19 +2638,16 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2664
2638
|
"created",
|
|
2665
2639
|
"createError",
|
|
2666
2640
|
"error"
|
|
2667
|
-
],
|
|
2641
|
+
], gi = {
|
|
2668
2642
|
name: "CreerSollicitationForm",
|
|
2669
2643
|
components: {
|
|
2670
2644
|
AsideBlock: De,
|
|
2671
|
-
StepperBlock:
|
|
2645
|
+
StepperBlock: fi
|
|
2672
2646
|
},
|
|
2673
2647
|
props: { ...Z },
|
|
2674
2648
|
emits: [...Q],
|
|
2675
2649
|
setup(e, { emit: t }) {
|
|
2676
|
-
let n = (e) => t("error", e), i = {
|
|
2677
|
-
token: w(e, "token"),
|
|
2678
|
-
baseUrl: w(e, "baseUrl")
|
|
2679
|
-
}, a = et($e({
|
|
2650
|
+
let n = (e) => t("error", e), i = { baseUrl: w(e, "baseUrl") }, a = $e(Qe({
|
|
2680
2651
|
onError: n,
|
|
2681
2652
|
...i
|
|
2682
2653
|
})), o = y(null), s = r(() => o.value ?? e.modules ?? []), c = be(ye({
|
|
@@ -2685,7 +2656,7 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2685
2656
|
idModulePrefere: w(e, "idModule"),
|
|
2686
2657
|
readonly: w(e, "readonly")
|
|
2687
2658
|
}));
|
|
2688
|
-
return
|
|
2659
|
+
return Lt(v({
|
|
2689
2660
|
nomenclatureFilter: w(e, "nomenclatureFilter"),
|
|
2690
2661
|
reclamantMode: w(e, "reclamantMode"),
|
|
2691
2662
|
modulesReclamant: s,
|
|
@@ -2705,10 +2676,7 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2705
2676
|
},
|
|
2706
2677
|
computed: {
|
|
2707
2678
|
requestOptions() {
|
|
2708
|
-
return {
|
|
2709
|
-
token: this.token,
|
|
2710
|
-
baseUrl: this.baseUrl
|
|
2711
|
-
};
|
|
2679
|
+
return { baseUrl: this.baseUrl };
|
|
2712
2680
|
},
|
|
2713
2681
|
motifChoisi() {
|
|
2714
2682
|
let [e, ...t] = this.draft.draft.lignes;
|
|
@@ -2752,7 +2720,7 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2752
2720
|
if (!await this.autoriserCreation(e)) return;
|
|
2753
2721
|
let t;
|
|
2754
2722
|
try {
|
|
2755
|
-
t = await
|
|
2723
|
+
t = await pi(e, this.requestOptions) ?? [];
|
|
2756
2724
|
} catch (t) {
|
|
2757
2725
|
if (B(t)) return;
|
|
2758
2726
|
let n = z(t);
|
|
@@ -2805,7 +2773,7 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2805
2773
|
message: t
|
|
2806
2774
|
};
|
|
2807
2775
|
};
|
|
2808
|
-
return a?.id ?
|
|
2776
|
+
return a?.id ? mi({
|
|
2809
2777
|
idSollicitation: a.id,
|
|
2810
2778
|
pj: {
|
|
2811
2779
|
name: n.name,
|
|
@@ -2821,13 +2789,13 @@ var pi = /*#__PURE__*/ F(ii, [["render", fi]]), mi = (e, { signal: t, token: n,
|
|
|
2821
2789
|
return Promise.all(n);
|
|
2822
2790
|
}
|
|
2823
2791
|
}
|
|
2824
|
-
},
|
|
2792
|
+
}, _i = { class: "row g-3" }, vi = {
|
|
2825
2793
|
key: 0,
|
|
2826
2794
|
class: "col-12 col-lg-4"
|
|
2827
2795
|
};
|
|
2828
|
-
function
|
|
2796
|
+
function yi(e, t, n, r, i, l) {
|
|
2829
2797
|
let f = S("aside-block"), p = S("stepper-block");
|
|
2830
|
-
return g(), o("div",
|
|
2798
|
+
return g(), o("div", _i, [e.aside ? (g(), o("div", vi, [x(e.$slots, "aside", {}, () => [u(f, { "nb-similaires": e.nbSimilaires }, c({ _: 2 }, [e.$slots["aside-similaires"] ? {
|
|
2831
2799
|
name: "similaires",
|
|
2832
2800
|
fn: E((t) => [x(e.$slots, "aside-similaires", h(d(t)))]),
|
|
2833
2801
|
key: "0"
|
|
@@ -2851,7 +2819,7 @@ function bi(e, t, n, r, i, l) {
|
|
|
2851
2819
|
"onSubmit"
|
|
2852
2820
|
])], 2)]);
|
|
2853
2821
|
}
|
|
2854
|
-
var $ = /*#__PURE__*/ F(
|
|
2822
|
+
var $ = /*#__PURE__*/ F(gi, [["render", yi]]), bi = {
|
|
2855
2823
|
name: "CreerSollicitationModal",
|
|
2856
2824
|
components: {
|
|
2857
2825
|
AmsomModal: e,
|
|
@@ -2871,7 +2839,7 @@ var $ = /*#__PURE__*/ F(_i, [["render", bi]]), xi = {
|
|
|
2871
2839
|
emits: [...Q, "close"],
|
|
2872
2840
|
computed: {
|
|
2873
2841
|
formProps() {
|
|
2874
|
-
return Object.fromEntries(
|
|
2842
|
+
return Object.fromEntries(hi.map((e) => [e, this[e]]));
|
|
2875
2843
|
},
|
|
2876
2844
|
formListeners() {
|
|
2877
2845
|
return Object.fromEntries(Q.filter((e) => e !== "created").map((e) => [e, (...t) => this.$emit(e, ...t)]));
|
|
@@ -2880,24 +2848,24 @@ var $ = /*#__PURE__*/ F(_i, [["render", bi]]), xi = {
|
|
|
2880
2848
|
methods: { onCreated(...e) {
|
|
2881
2849
|
this.$emit("created", ...e), this.closeOnCreated && this.$emit("close");
|
|
2882
2850
|
} }
|
|
2883
|
-
},
|
|
2884
|
-
function
|
|
2851
|
+
}, xi = { class: "fw-medium fs-5" };
|
|
2852
|
+
function Si(e, t, n, r, a, o) {
|
|
2885
2853
|
let l = S("creer-sollicitation-form"), f = S("amsom-modal");
|
|
2886
2854
|
return g(), i(f, {
|
|
2887
2855
|
"close-option": "",
|
|
2888
2856
|
size: "xl",
|
|
2889
2857
|
onClose: t[0] ||= (t) => e.$emit("close")
|
|
2890
2858
|
}, {
|
|
2891
|
-
default: E(() => [s("span",
|
|
2859
|
+
default: E(() => [s("span", xi, 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) => ({
|
|
2892
2860
|
name: n,
|
|
2893
2861
|
fn: E((t) => [x(e.$slots, n, h(d(t ?? {})))])
|
|
2894
2862
|
}))]), 1040, ["onCreated"])]),
|
|
2895
2863
|
_: 3
|
|
2896
2864
|
});
|
|
2897
2865
|
}
|
|
2898
|
-
var
|
|
2899
|
-
CreerSollicitationModal:
|
|
2866
|
+
var Ci = /*#__PURE__*/ F(bi, [["render", Si]]), wi = {
|
|
2867
|
+
CreerSollicitationModal: Ci,
|
|
2900
2868
|
CreerSollicitationForm: $
|
|
2901
2869
|
};
|
|
2902
2870
|
//#endregion
|
|
2903
|
-
export { $ as CreerSollicitationForm,
|
|
2871
|
+
export { $ as CreerSollicitationForm, Ci as CreerSollicitationModal, le as DEFAULT_PROVENANCE_CONTACT, ce as PROVENANCES_CONTACT, M as READONLY_FIELDS, ke as configureCresol, wi as default, N as getDefaultDraft, j as getDefaultLigne, A as getDefaultPatrimoine, Ze as resetCresolCache };
|