@opencitylabs/formio-custom-components 0.6.2 → 0.6.3
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/index.iife.js +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.js +15 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -5601,21 +5601,18 @@ var bt = {
|
|
|
5601
5601
|
}, _e = (e) => {
|
|
5602
5602
|
t?.root?.data?.place && N.current.setOption("eventSources", [{ events: z }]);
|
|
5603
5603
|
};
|
|
5604
|
-
async function z(e
|
|
5604
|
+
async function z(e) {
|
|
5605
5605
|
try {
|
|
5606
5606
|
N.current.setOption("events", []);
|
|
5607
|
-
let
|
|
5608
|
-
|
|
5609
|
-
let
|
|
5610
|
-
if (
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
return;
|
|
5617
|
-
}
|
|
5618
|
-
let f = d.map((e) => ({
|
|
5607
|
+
let n = p(e.start).format("YYYY-MM-DD"), r = new Date(e.end);
|
|
5608
|
+
r.setDate(r.getDate() - 1);
|
|
5609
|
+
let i = p(r).format("YYYY-MM-DD"), a = t?.root?.data?.place?.merge_availabilities ? t?.root?.data?.place?.merged_availabilities_link : null, s = a ? F(a, n, i) : de(n, i, null), c = Ct("AVAILABILITY", s), l = St("AVAILABILITY", c), u;
|
|
5610
|
+
if (l ? (u = l, g(!1)) : (u = await window.FormioHelper.fetchAPIUrlLimit(s), xt("AVAILABILITY", c, u)), !u?.length) return S.fire({
|
|
5611
|
+
icon: "warning",
|
|
5612
|
+
title: o.t("warning"),
|
|
5613
|
+
html: o.t("no_meetings")
|
|
5614
|
+
}), [];
|
|
5615
|
+
let d = u.map((e) => ({
|
|
5619
5616
|
id: e.opening_hour_id,
|
|
5620
5617
|
allDay: !1,
|
|
5621
5618
|
start: `${e.date}T${e.start_time}:00`,
|
|
@@ -5627,12 +5624,12 @@ var bt = {
|
|
|
5627
5624
|
textColor: "#000",
|
|
5628
5625
|
className: "event-slot",
|
|
5629
5626
|
extendedProps: { ...e }
|
|
5630
|
-
})),
|
|
5631
|
-
N.current.setOption("slotMinTime",
|
|
5632
|
-
B(
|
|
5633
|
-
}, 500);
|
|
5627
|
+
})), f = le(u);
|
|
5628
|
+
return N.current.setOption("slotMinTime", f.earliestStartTime), N.current.setOption("slotMaxTime", f.latestEndTime), P(u), yt(N.current, d), setTimeout(() => {
|
|
5629
|
+
B(d);
|
|
5630
|
+
}, 500), d;
|
|
5634
5631
|
} catch (e) {
|
|
5635
|
-
console.error("Errore nel caricamento disponibilità:", e),
|
|
5632
|
+
throw console.error("Errore nel caricamento disponibilità:", e), e;
|
|
5636
5633
|
}
|
|
5637
5634
|
}
|
|
5638
5635
|
s(() => {
|