@oneclick.dev/cms-core-modules 0.0.59 → 0.0.61
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/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
- package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
- package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
- package/dist/Create-Bh4g6QW4.js +1 -0
- package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
- package/dist/DateFormatter-BPPBZp1j.js +1 -0
- package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
- package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
- package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
- package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
- package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
- package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
- package/dist/Detail-CtbWzq-R.js +1 -0
- package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
- package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
- package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
- package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
- package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
- package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
- package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
- package/dist/Overview-B-8TLLjh.js +1 -0
- package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
- package/dist/Overview-B_99j5eA.js +1 -0
- package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
- package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
- package/dist/Overview-DtWvKB3W.mjs +327 -0
- package/dist/Overview-HvlDEgqi.mjs +862 -0
- package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
- package/dist/{TableView-CS13LLxk.mjs → TableView-DlhHyuUZ.mjs} +48394 -36321
- package/dist/TableView-_2cP-w_7.js +312 -0
- package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
- package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
- package/dist/View-DfzaVOzS.js +1 -0
- package/dist/agenda-D81m29_4.mjs +1135 -0
- package/dist/agenda-uzPPxgsW.js +1 -0
- package/dist/availability-B-tRp8hB.mjs +629 -0
- package/dist/availability-BiBbzEIM.js +1 -0
- package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
- package/dist/exceptions-C-DPRNQa.js +1 -0
- package/dist/index-4tjmIans.js +1 -0
- package/dist/index-AmUV8LZQ.mjs +176 -0
- package/dist/index-BDaVYdkD.mjs +7763 -0
- package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
- package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
- package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
- package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
- package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
- package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
- package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
- package/dist/index-CxETuRsG.js +1 -0
- package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
- package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
- package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
- package/dist/index-DfV8-6ON.js +245 -0
- package/dist/index-Dnn2SCSl.js +1 -0
- package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
- package/dist/index-Uf7TwBuW.mjs +110 -0
- package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-BshejgNP.mjs} +400 -363
- package/dist/index-YMaY4uuk-BxVT7IpO.js +1 -0
- package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
- package/dist/index-hlylYYgy.mjs +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +98 -81
- package/dist/orders-Bh8w0ueq.mjs +346 -0
- package/dist/orders-Dt0zMz97.js +1 -0
- package/dist/payment-BQaAqQ5q.js +1 -0
- package/dist/payment-BbWByERf.mjs +1080 -0
- package/dist/regular-1LXNPviB.js +1 -0
- package/dist/regular-_05oq5Tx.mjs +1101 -0
- package/dist/regular-slots-Bs3WJB3U.js +1 -0
- package/dist/regular-slots-C2NYxLPn.mjs +222 -0
- package/dist/resources-DgPnEv76.mjs +811 -0
- package/dist/resources-eb0pivDL.js +1 -0
- package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
- package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
- package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
- package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
- package/dist/src/appointments/config.d.ts +30 -0
- package/dist/src/appointments/index.d.ts +32 -5
- package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
- package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
- package/dist/src/appointments/routes.d.ts +2 -5
- package/dist/src/appointments/types.d.ts +16 -0
- package/dist/src/appointments/utils/printReservation.d.ts +45 -0
- package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
- package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
- package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
- package/dist/src/content-manager/types.d.ts +5 -0
- package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
- package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
- package/package.json +4 -2
- package/dist/CalendarDate-CWtpXgpD.js +0 -1
- package/dist/Create-BP8TX6rj.js +0 -1
- package/dist/DateFormatter-BbcSwTs4.js +0 -1
- package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
- package/dist/Detail-DUo6qKqO.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
- package/dist/Overview-BNMZ9MUK.js +0 -1
- package/dist/Overview-CEPodGCn.mjs +0 -311
- package/dist/Overview-CvquDPhB.js +0 -1
- package/dist/Overview-D67UjG6n.mjs +0 -947
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
- package/dist/TableView-Dv4YXBD1.js +0 -111
- package/dist/View-7qb_ohVo.js +0 -1
- package/dist/agenda-B49oKGeh.mjs +0 -706
- package/dist/agenda-DipQ5IWP.js +0 -1
- package/dist/availability-C7q9tq6l.js +0 -1
- package/dist/availability-DeCkqiu8.mjs +0 -613
- package/dist/exceptions-DJ9zWX3k.js +0 -1
- package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
- package/dist/index-DUeFrD-B.js +0 -1
- package/dist/index-DsnoK4ia.mjs +0 -579
- package/dist/index-WL1P6d3j.js +0 -1
- package/dist/index-_mG-aU3Z.mjs +0 -87
- package/dist/index-_sQDF1pH.js +0 -1
- package/dist/index-klI238nT.mjs +0 -24
- package/dist/payment-kTjsV0Jj.js +0 -1
- package/dist/payment-zpCM0LD-.mjs +0 -981
- package/dist/regular-C4_3YXqx.mjs +0 -602
- package/dist/regular-DFwPEbZO.js +0 -1
- package/dist/regular-slots-4ooEpICB.mjs +0 -67
- package/dist/regular-slots-BAVGbomI.js +0 -1
- package/dist/resources-MpQkSstv.mjs +0 -563
- package/dist/resources-iM28T3dD.js +0 -1
- package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
package/dist/agenda-B49oKGeh.mjs
DELETED
|
@@ -1,706 +0,0 @@
|
|
|
1
|
-
import { defineComponent as H, ref as D, resolveComponent as C, createBlock as P, openBlock as a, withCtx as h, createVNode as l, createCommentVNode as $, createTextVNode as q, toDisplayString as w, computed as E, createElementBlock as c, Fragment as F, createElementVNode as e, renderList as O, unref as x, normalizeStyle as G, normalizeClass as M, onMounted as ie, onUnmounted as ue, inject as Z, nextTick as ne, onBeforeUnmount as ce, watch as de, provide as K } from "vue";
|
|
2
|
-
import { n as ee, g as te } from "./CalendarDate-CRT2Viyt.mjs";
|
|
3
|
-
import { Users as ve, Clock as pe, ChevronLeft as se, ChevronRight as oe, Asterisk as me, CalendarDays as fe } from "lucide-vue-next";
|
|
4
|
-
import { _ as ge } from "./EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs";
|
|
5
|
-
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
6
|
-
import { useModuleRoute as xe, useModule as be, useFirebaseIntegration as ye } from "@oneclick.dev/cms-kit";
|
|
7
|
-
const _e = /* @__PURE__ */ H({
|
|
8
|
-
__name: "EventDialog",
|
|
9
|
-
setup(A, { expose: y }) {
|
|
10
|
-
const m = D(!1), k = D(null), f = (p) => {
|
|
11
|
-
m.value = !0, k.value = p;
|
|
12
|
-
}, o = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], v = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
13
|
-
return y({
|
|
14
|
-
openDialog: f
|
|
15
|
-
}), (p, t) => {
|
|
16
|
-
const b = C("DialogTitle"), g = C("DialogDescription"), R = C("DialogHeader"), S = C("DialogFooter"), L = C("DialogScrollContent"), N = C("Dialog");
|
|
17
|
-
return a(), P(N, {
|
|
18
|
-
open: m.value,
|
|
19
|
-
"onUpdate:open": t[0] || (t[0] = (U) => m.value = U)
|
|
20
|
-
}, {
|
|
21
|
-
default: h(() => [
|
|
22
|
-
l(L, { class: "sm:max-w-2xl" }, {
|
|
23
|
-
default: h(() => [
|
|
24
|
-
l(R, null, {
|
|
25
|
-
default: h(() => [
|
|
26
|
-
k.value?.date ? (a(), P(b, { key: 0 }, {
|
|
27
|
-
default: h(() => [
|
|
28
|
-
q(w(o[new Date(k.value.date).getUTCDay()]) + " " + w(v[new Date(k.value.date).getUTCMonth()]) + " " + w(new Date(k.value.date).getUTCDate()) + ", " + w(new Date(k.value.date).getUTCFullYear()), 1)
|
|
29
|
-
]),
|
|
30
|
-
_: 1
|
|
31
|
-
})) : $("", !0),
|
|
32
|
-
l(g, null, {
|
|
33
|
-
default: h(() => [...t[1] || (t[1] = [
|
|
34
|
-
q(" Bewerk de details van dit evenement. ", -1)
|
|
35
|
-
])]),
|
|
36
|
-
_: 1
|
|
37
|
-
})
|
|
38
|
-
]),
|
|
39
|
-
_: 1
|
|
40
|
-
}),
|
|
41
|
-
l(S, null, {
|
|
42
|
-
default: h(() => [...t[2] || (t[2] = [
|
|
43
|
-
q(" SKRRR ", -1)
|
|
44
|
-
])]),
|
|
45
|
-
_: 1
|
|
46
|
-
})
|
|
47
|
-
]),
|
|
48
|
-
_: 1
|
|
49
|
-
})
|
|
50
|
-
]),
|
|
51
|
-
_: 1
|
|
52
|
-
}, 8, ["open"]);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}), we = { class: "flex-1 border-r shadow-sm overflow-hidden min-h-[1536px]" }, ke = { class: "relative h-full min-h-[1536px]" }, De = { class: "divide-y divide-input/80 h-full flex flex-col min-h-[1536px] border-y border-input/80" }, $e = { class: "absolute inset-0 pointer-events-none" }, Se = { class: "relative mr-3 h-full ml-2" }, Te = ["onClick"], Ce = {
|
|
56
|
-
key: 0,
|
|
57
|
-
class: "absolute bottom-0 left-0 right-0 h-1 bg-black/20"
|
|
58
|
-
}, Me = { class: "flex items-start justify-between gap-2 mb-1" }, Be = { class: "font-semibold text-sm leading-tight line-clamp-1 flex-1" }, ze = { class: "flex items-center gap-1 shrink-0" }, Le = {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: "flex items-center -space-x-1.5"
|
|
61
|
-
}, Ee = ["title"], Ue = { class: "font-medium" }, le = /* @__PURE__ */ H({
|
|
62
|
-
__name: "EventTimeline",
|
|
63
|
-
props: {
|
|
64
|
-
date: {},
|
|
65
|
-
events: {},
|
|
66
|
-
firstDay: { type: Boolean, default: !1 },
|
|
67
|
-
resources: { default: () => [] }
|
|
68
|
-
},
|
|
69
|
-
setup(A) {
|
|
70
|
-
const y = A, m = D(null), k = (v) => {
|
|
71
|
-
const [p, t] = v.split(":").map(Number);
|
|
72
|
-
return p * 60 + t;
|
|
73
|
-
}, f = E(() => {
|
|
74
|
-
if (!y.events) return [];
|
|
75
|
-
const v = /* @__PURE__ */ new Map();
|
|
76
|
-
return y.events.forEach((p) => {
|
|
77
|
-
const t = `${p.startTime}-${p.endTime}`;
|
|
78
|
-
v.has(t) || v.set(t, []), v.get(t).push(p);
|
|
79
|
-
}), Array.from(v.entries()).map(([p, t]) => {
|
|
80
|
-
const b = t[0], g = k(b.startTime), S = k(b.endTime) - g, L = g / 1440 * 100, N = S / 1440 * 100, U = t.reduce((i, r) => i + (r.bookings ?? 0), 0), T = t.reduce((i, r) => i + (r.maxBookings ?? 0), 0), B = U > 0, X = T ? U / T * 100 : 0, j = t.filter((i) => (i.bookings ?? 0) > 0 && i.resource).map((i) => i.resource), J = t.find((i) => (i.bookings ?? 0) > 0) || b;
|
|
81
|
-
return {
|
|
82
|
-
...b,
|
|
83
|
-
id: p,
|
|
84
|
-
top: `${L}%`,
|
|
85
|
-
height: `${N}%`,
|
|
86
|
-
color: J.resource?.color || "#3b82f6",
|
|
87
|
-
bookings: U,
|
|
88
|
-
hasBookings: B,
|
|
89
|
-
fillPercentage: X,
|
|
90
|
-
isSmall: S < 60,
|
|
91
|
-
resourcesWithBookings: j,
|
|
92
|
-
allEvents: t
|
|
93
|
-
// Keep reference to all events for the dialog
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
}), o = Array.from({ length: 24 }, (v, p) => ({
|
|
97
|
-
hour: p,
|
|
98
|
-
label: `${p.toString().padStart(2, "0")}:00`
|
|
99
|
-
}));
|
|
100
|
-
return (v, p) => (a(), c(F, null, [
|
|
101
|
-
e("div", we, [
|
|
102
|
-
e("div", ke, [
|
|
103
|
-
e("div", De, [
|
|
104
|
-
(a(!0), c(F, null, O(x(o), (t) => (a(), c("div", {
|
|
105
|
-
key: t.hour,
|
|
106
|
-
class: "flex-1 flex transition-all duration-200"
|
|
107
|
-
}, [...p[0] || (p[0] = [
|
|
108
|
-
e("div", { class: "flex-1 relative" }, [
|
|
109
|
-
e("div", { class: "absolute top-1/2 left-0 right-0 border-t border-dashed border-input/50" })
|
|
110
|
-
], -1)
|
|
111
|
-
])]))), 128))
|
|
112
|
-
]),
|
|
113
|
-
e("div", $e, [
|
|
114
|
-
e("div", Se, [
|
|
115
|
-
(a(!0), c(F, null, O(f.value, (t) => (a(), c("div", {
|
|
116
|
-
key: t.id,
|
|
117
|
-
style: G({
|
|
118
|
-
top: t.top,
|
|
119
|
-
height: t.height,
|
|
120
|
-
opacity: t.hasBookings ? "1" : "0.5"
|
|
121
|
-
}),
|
|
122
|
-
class: "event-card absolute left-2 right-2 rounded-lg pointer-events-auto cursor-pointer group/event transition-all duration-200 hover:shadow-xl overflow-hidden",
|
|
123
|
-
onClick: (b) => m.value.openDialog(t)
|
|
124
|
-
}, [
|
|
125
|
-
e("div", {
|
|
126
|
-
class: M([t.hasBookings ? t.color : v.eventThemes.gray, "absolute inset-0 shadow-lg"])
|
|
127
|
-
}, [
|
|
128
|
-
t.maxBookings ? (a(), c("div", Ce, [
|
|
129
|
-
e("div", {
|
|
130
|
-
class: "h-full bg-white/40 transition-all duration-300",
|
|
131
|
-
style: G({ width: `${t.fillPercentage}%` })
|
|
132
|
-
}, null, 4)
|
|
133
|
-
])) : $("", !0)
|
|
134
|
-
], 2),
|
|
135
|
-
e("div", {
|
|
136
|
-
class: M(["relative h-full p-3 flex flex-col", `${t.hasBookings ? "text-white" : "text-gray-600 dark:text-gray-100"}`])
|
|
137
|
-
}, [
|
|
138
|
-
e("div", Me, [
|
|
139
|
-
e("h3", Be, w(t.title), 1),
|
|
140
|
-
e("div", ze, [
|
|
141
|
-
t.resourcesWithBookings?.length > 0 ? (a(), c("div", Le, [
|
|
142
|
-
(a(!0), c(F, null, O(t.resourcesWithBookings, (b) => (a(), c("div", {
|
|
143
|
-
key: b.id,
|
|
144
|
-
class: "w-6 h-6 rounded-full flex items-center justify-center text-xs font-bold bg-white/30 backdrop-blur-sm text-white border border-white/40",
|
|
145
|
-
title: b.name
|
|
146
|
-
}, w(b.avatarLabel || b.name.charAt(0).toUpperCase()), 9, Ee))), 128))
|
|
147
|
-
])) : $("", !0),
|
|
148
|
-
t.bookings > 0 ? (a(), c("div", {
|
|
149
|
-
key: 1,
|
|
150
|
-
class: M([
|
|
151
|
-
"flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-medium",
|
|
152
|
-
t.hasBookings ? "bg-white/20 backdrop-blur-sm" : "bg-white/10 backdrop-blur-sm"
|
|
153
|
-
])
|
|
154
|
-
}, [
|
|
155
|
-
l(x(ve), { size: 12 }),
|
|
156
|
-
e("span", null, w(t.bookings), 1)
|
|
157
|
-
], 2)) : $("", !0)
|
|
158
|
-
])
|
|
159
|
-
]),
|
|
160
|
-
e("div", {
|
|
161
|
-
class: M(["flex items-center gap-2 text-xs opacity-90 mt-auto", { "-translate-x-1 -translate-y-2 scale-80 origin-[0_0]": t.isSmall }])
|
|
162
|
-
}, [
|
|
163
|
-
e("div", {
|
|
164
|
-
class: M(["flex items-center gap-1 px-2 py-0.5 rounded backdrop-blur-sm", { "bg-black/10": !t.isSmall }])
|
|
165
|
-
}, [
|
|
166
|
-
l(x(pe), { size: 10 }),
|
|
167
|
-
e("span", Ue, w(t.startTime) + " – " + w(t.endTime), 1)
|
|
168
|
-
], 2)
|
|
169
|
-
], 2)
|
|
170
|
-
], 2),
|
|
171
|
-
p[1] || (p[1] = e("div", { class: "absolute inset-0 border-2 border-white/0 group-hover/event:border-white/30 rounded-lg transition-colors duration-200 pointer-events-none" }, null, -1))
|
|
172
|
-
], 12, Te))), 128))
|
|
173
|
-
])
|
|
174
|
-
])
|
|
175
|
-
])
|
|
176
|
-
]),
|
|
177
|
-
l(_e, {
|
|
178
|
-
ref_key: "eventDialog",
|
|
179
|
-
ref: m
|
|
180
|
-
}, null, 512)
|
|
181
|
-
], 64));
|
|
182
|
-
}
|
|
183
|
-
}), Ie = { class: "sticky left-0 mt-auto z-10 divide-y divide-border/50 h-full flex flex-col min-h-[1536px] bg-input" }, Re = { class: "flex-shrink-0 text-xs font-medium text-muted-foreground px-3 pb-3 border-r border-border/50 w-14" }, Ae = { class: "flex items-center gap-1.5" }, ae = /* @__PURE__ */ H({
|
|
184
|
-
__name: "Event24hSidebar",
|
|
185
|
-
setup(A) {
|
|
186
|
-
const y = Array.from({ length: 24 }, (m, k) => ({
|
|
187
|
-
hour: k,
|
|
188
|
-
label: `${k.toString().padStart(2, "0")}:00`
|
|
189
|
-
}));
|
|
190
|
-
return (m, k) => (a(), c("div", Ie, [
|
|
191
|
-
(a(!0), c(F, null, O(x(y), (f) => (a(), c("div", {
|
|
192
|
-
key: f.hour,
|
|
193
|
-
class: "flex-1 flex transition-all duration-200"
|
|
194
|
-
}, [
|
|
195
|
-
e("div", Re, [
|
|
196
|
-
e("div", Ae, [
|
|
197
|
-
e("span", {
|
|
198
|
-
class: M({ "-translate-y-1/2": f.hour !== 0 })
|
|
199
|
-
}, w(f.label), 3)
|
|
200
|
-
])
|
|
201
|
-
])
|
|
202
|
-
]))), 128))
|
|
203
|
-
]));
|
|
204
|
-
}
|
|
205
|
-
}), Ne = { class: "absolute top-0 w-full pointer-events-none" }, Ve = {
|
|
206
|
-
key: 0,
|
|
207
|
-
class: "absolute -right-2 -top-0.5 px-2 py-0.5 bg-red-500 text-white text-xs font-medium rounded shadow-lg"
|
|
208
|
-
}, re = /* @__PURE__ */ H({
|
|
209
|
-
__name: "EventTimeIndicator",
|
|
210
|
-
props: {
|
|
211
|
-
currentDate: {
|
|
212
|
-
type: Object,
|
|
213
|
-
required: !1
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
setup(A) {
|
|
217
|
-
const y = D(Date.now());
|
|
218
|
-
let m;
|
|
219
|
-
ie(() => {
|
|
220
|
-
m = window.setInterval(() => {
|
|
221
|
-
y.value = Date.now();
|
|
222
|
-
}, 1e3);
|
|
223
|
-
}), ue(() => {
|
|
224
|
-
m && clearInterval(m);
|
|
225
|
-
});
|
|
226
|
-
const k = E(() => {
|
|
227
|
-
const o = new Date(y.value);
|
|
228
|
-
return `${(o.getHours() * 60 + o.getMinutes() + o.getSeconds() / 60) / 1440 * 100}%`;
|
|
229
|
-
}), f = E(() => new Date(y.value).getFullYear() + "-" + (new Date(y.value).getMonth() + 1).toString().padStart(2, "0") + "-" + new Date(y.value).getDate().toString().padStart(2, "0"));
|
|
230
|
-
return (o, v) => (a(), c("div", Ne, [
|
|
231
|
-
e("div", {
|
|
232
|
-
class: "absolute left-0 right-0 h-0.5 bg-red-500 z-30 pointer-events-none transition-[top] duration-300 ease-linear",
|
|
233
|
-
style: G({ top: k.value })
|
|
234
|
-
}, [
|
|
235
|
-
v[0] || (v[0] = e("div", { class: "absolute -left-2 -top-1.5 w-3 h-3 bg-red-500 rounded-full shadow-lg shadow-red-500/50" }, null, -1)),
|
|
236
|
-
A.currentDate && A.currentDate == f.value ? (a(), c("div", Ve, " Now ")) : $("", !0)
|
|
237
|
-
], 4)
|
|
238
|
-
]));
|
|
239
|
-
}
|
|
240
|
-
}), Fe = {
|
|
241
|
-
key: 0,
|
|
242
|
-
class: "relative flex flex-1 min-w-0"
|
|
243
|
-
}, je = {
|
|
244
|
-
key: 1,
|
|
245
|
-
class: "flex-1 min-w-0 relative"
|
|
246
|
-
}, We = {
|
|
247
|
-
key: 0,
|
|
248
|
-
class: "absolute top-0 right-0 z-10 px-3 py-1.5 bg-primary/90 text-primary-foreground text-xs font-medium rounded-bl-lg shadow-lg backdrop-blur-sm flex items-center gap-1.5 animate-pulse-subtle"
|
|
249
|
-
}, Pe = { class: "flex pb-4 min-w-[200px]" }, Oe = ["onClick"], Xe = {
|
|
250
|
-
key: 0,
|
|
251
|
-
class: "absolute top-2 right-2 flex items-center gap-1 px-2 py-0.5 bg-primary/20 backdrop-blur-sm rounded-full border border-primary/30"
|
|
252
|
-
}, Ye = { class: "text-xs text-muted-foreground font-medium group-hover:text-foreground/70 transition-colors" }, He = {
|
|
253
|
-
key: 0,
|
|
254
|
-
class: "absolute bottom-0 left-0 w-full h-1 bg-orange-500"
|
|
255
|
-
}, Je = /* @__PURE__ */ H({
|
|
256
|
-
__name: "EventView",
|
|
257
|
-
setup(A) {
|
|
258
|
-
const y = Z("activeDate", D(ee(te()))), m = Z("viewMode", D(1)), k = Z("events", D([])), f = Z("resources", D([])), o = D(null), v = D(!1), p = D(!1);
|
|
259
|
-
E(() => f.value.length > 1);
|
|
260
|
-
const t = E(() => {
|
|
261
|
-
const n = [], u = y.value;
|
|
262
|
-
for (let s = 0; s < m.value; s++)
|
|
263
|
-
n.push(u.add({ days: s }));
|
|
264
|
-
return n;
|
|
265
|
-
}), b = (n, u) => {
|
|
266
|
-
const s = `${n.year}-${String(n.month).padStart(2, "0")}-${String(n.day).padStart(2, "0")}`;
|
|
267
|
-
return k.value?.filter((Y) => Y.date === s) || [];
|
|
268
|
-
}, g = (n) => {
|
|
269
|
-
const u = ee(te());
|
|
270
|
-
return n.year === u.year && n.month === u.month && n.day === u.day;
|
|
271
|
-
}, R = (n) => {
|
|
272
|
-
y.value = n, m.value = 1;
|
|
273
|
-
};
|
|
274
|
-
let S = null, L = null;
|
|
275
|
-
const N = () => {
|
|
276
|
-
o.value && (T(), o.value.scrollBy({ left: -300, behavior: "smooth" }), L = window.setTimeout(() => {
|
|
277
|
-
S = window.setInterval(() => {
|
|
278
|
-
o.value && o.value.scrollBy({ left: -20, behavior: "auto" });
|
|
279
|
-
}, 50);
|
|
280
|
-
}, 300));
|
|
281
|
-
}, U = () => {
|
|
282
|
-
o.value && (T(), o.value.scrollBy({ left: 300, behavior: "smooth" }), L = window.setTimeout(() => {
|
|
283
|
-
S = window.setInterval(() => {
|
|
284
|
-
o.value && o.value.scrollBy({ left: 20, behavior: "auto" });
|
|
285
|
-
}, 50);
|
|
286
|
-
}, 300));
|
|
287
|
-
}, T = () => {
|
|
288
|
-
L && (clearTimeout(L), L = null), S && (clearInterval(S), S = null);
|
|
289
|
-
}, B = () => {
|
|
290
|
-
if (!o.value) return;
|
|
291
|
-
const { scrollLeft: n, scrollWidth: u, clientWidth: s } = o.value;
|
|
292
|
-
v.value = n > 10, p.value = n < u - s - 10;
|
|
293
|
-
}, X = (n) => {
|
|
294
|
-
o.value && Math.abs(n.deltaY) > Math.abs(n.deltaX) && (n.preventDefault(), o.value.scrollBy({ left: n.deltaY, behavior: "auto" }));
|
|
295
|
-
}, j = D(!1), J = D(0), i = D(0), r = (n) => {
|
|
296
|
-
!o.value || m.value === 1 || n.target.closest(".event-card") || (j.value = !0, J.value = n.pageX, i.value = o.value.scrollLeft, o.value.style.userSelect = "none", n.preventDefault());
|
|
297
|
-
}, z = (n) => {
|
|
298
|
-
if (!j.value || !o.value) return;
|
|
299
|
-
const u = n.pageX, s = (J.value - u) * 1.2;
|
|
300
|
-
o.value.scrollLeft = i.value + s;
|
|
301
|
-
}, _ = () => {
|
|
302
|
-
o.value && (j.value = !1, o.value.style.userSelect = "");
|
|
303
|
-
};
|
|
304
|
-
return ie(() => {
|
|
305
|
-
o.value && (o.value.addEventListener("scroll", B), o.value.addEventListener("wheel", X, { passive: !1 }), ne(() => {
|
|
306
|
-
B(), setTimeout(B, 50), setTimeout(B, 150), setTimeout(B, 300), setTimeout(B, 500);
|
|
307
|
-
})), document.addEventListener("mousemove", z), document.addEventListener("mouseup", _);
|
|
308
|
-
}), ce(() => {
|
|
309
|
-
document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", _);
|
|
310
|
-
}), de(m, () => {
|
|
311
|
-
m.value > 1 ? ne(() => {
|
|
312
|
-
setTimeout(() => {
|
|
313
|
-
if (!o.value) return;
|
|
314
|
-
const { scrollWidth: n, clientWidth: u } = o.value;
|
|
315
|
-
n > u && (p.value = !0, v.value = !1);
|
|
316
|
-
}, 100);
|
|
317
|
-
}) : o.value && (o.value.style.cursor = "");
|
|
318
|
-
}), ue(() => {
|
|
319
|
-
T(), o.value && (o.value.removeEventListener("scroll", B), o.value.removeEventListener("wheel", X));
|
|
320
|
-
}), (n, u) => {
|
|
321
|
-
const s = C("Button"), Y = C("TooltipTrigger"), I = C("TooltipContent"), W = C("Tooltip");
|
|
322
|
-
return x(m) === 1 ? (a(), c("div", Fe, [
|
|
323
|
-
l(ae),
|
|
324
|
-
l(re, {
|
|
325
|
-
class: "h-full",
|
|
326
|
-
"current-date": x(y)
|
|
327
|
-
}, null, 8, ["current-date"]),
|
|
328
|
-
l(le, {
|
|
329
|
-
date: x(y),
|
|
330
|
-
events: b(x(y)),
|
|
331
|
-
resources: x(f)
|
|
332
|
-
}, null, 8, ["date", "events", "resources"])
|
|
333
|
-
])) : (a(), c("div", je, [
|
|
334
|
-
x(m) === 7 ? (a(), c("div", We, [
|
|
335
|
-
l(x(se), { size: 12 }),
|
|
336
|
-
u[0] || (u[0] = e("span", null, "Scroll to view all days", -1)),
|
|
337
|
-
l(x(oe), { size: 12 })
|
|
338
|
-
])) : $("", !0),
|
|
339
|
-
v.value ? (a(), P(s, {
|
|
340
|
-
key: 1,
|
|
341
|
-
variant: "outline",
|
|
342
|
-
size: "icon",
|
|
343
|
-
onMousedown: N,
|
|
344
|
-
onMouseup: T,
|
|
345
|
-
onMouseleave: T,
|
|
346
|
-
onTouchstart: N,
|
|
347
|
-
onTouchend: T,
|
|
348
|
-
class: "sticky top-1/2 left-2 -translate-y-1/2 z-40 h-10 w-10 rounded-full shadow-lg bg-background/95 backdrop-blur-sm hover:bg-background border-2"
|
|
349
|
-
}, {
|
|
350
|
-
default: h(() => [
|
|
351
|
-
l(x(se), { size: 20 })
|
|
352
|
-
]),
|
|
353
|
-
_: 1
|
|
354
|
-
})) : $("", !0),
|
|
355
|
-
p.value ? (a(), P(s, {
|
|
356
|
-
key: 2,
|
|
357
|
-
variant: "outline",
|
|
358
|
-
size: "icon",
|
|
359
|
-
onMousedown: U,
|
|
360
|
-
onMouseup: T,
|
|
361
|
-
onMouseleave: T,
|
|
362
|
-
onTouchstart: U,
|
|
363
|
-
onTouchend: T,
|
|
364
|
-
class: "sticky top-1/2 right-2 -translate-y-1/2 z-40 h-10 w-10 rounded-full shadow-lg bg-background/95 backdrop-blur-sm hover:bg-background border-2 float-right"
|
|
365
|
-
}, {
|
|
366
|
-
default: h(() => [
|
|
367
|
-
l(x(oe), { size: 20 })
|
|
368
|
-
]),
|
|
369
|
-
_: 1
|
|
370
|
-
})) : $("", !0),
|
|
371
|
-
l(re, { class: "h-[calc(100%-164px)] mt-[122px]" }),
|
|
372
|
-
e("div", {
|
|
373
|
-
class: M(["absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-background to-transparent z-10 pointer-events-none transition-opacity duration-300", p.value ? "opacity-100" : "opacity-0"])
|
|
374
|
-
}, null, 2),
|
|
375
|
-
e("div", {
|
|
376
|
-
ref_key: "scrollContainer",
|
|
377
|
-
ref: o,
|
|
378
|
-
class: "absolute inset-0 overflow-x-auto overflow-y-visible",
|
|
379
|
-
onScroll: B,
|
|
380
|
-
onMousedown: r
|
|
381
|
-
}, [
|
|
382
|
-
e("div", Pe, [
|
|
383
|
-
l(ae),
|
|
384
|
-
u[5] || (u[5] = e("div", { class: "absolute w-14 h-[125px] bg-input" }, null, -1)),
|
|
385
|
-
(a(!0), c(F, null, O(t.value, (d, V) => (a(), c("div", {
|
|
386
|
-
key: d.toString(),
|
|
387
|
-
class: M(["flex-shrink-0", { "min-w-[200px] w-[33.33%]": x(m) === 3, "min-w-[280px]": x(m) === 7 }])
|
|
388
|
-
}, [
|
|
389
|
-
e("div", {
|
|
390
|
-
onClick: (Q) => R(d),
|
|
391
|
-
class: M([
|
|
392
|
-
"relative p-3 border cursor-pointer transition-all duration-200 group relative",
|
|
393
|
-
g(d) ? "bg-gradient-to-br from-primary/10 to-primary/5 border-primary/30 hover:from-primary/20 hover:to-primary/10 hover:border-primary/50 hover:shadow-md" : "bg-gradient-to-br from-muted/50 to-muted/30 border-border hover:from-accent/50 hover:to-accent/30 hover:border-accent-foreground/20 hover:shadow-md"
|
|
394
|
-
])
|
|
395
|
-
}, [
|
|
396
|
-
g(d) ? (a(), c("div", Xe, [...u[1] || (u[1] = [
|
|
397
|
-
e("div", { class: "w-1.5 h-1.5 bg-primary rounded-full animate-pulse" }, null, -1),
|
|
398
|
-
e("span", { class: "text-[9px] font-bold text-primary uppercase tracking-wide" }, "Today", -1)
|
|
399
|
-
])])) : $("", !0),
|
|
400
|
-
e("div", {
|
|
401
|
-
class: M([
|
|
402
|
-
"text-xs font-semibold uppercase tracking-wider transition-colors",
|
|
403
|
-
g(d) ? "text-primary group-hover:text-primary/80" : "text-muted-foreground group-hover:text-foreground"
|
|
404
|
-
])
|
|
405
|
-
}, w(new Date(d.year, d.month - 1, d.day).toLocaleDateString("en-US", { weekday: "short" })), 3),
|
|
406
|
-
e("div", {
|
|
407
|
-
class: M([
|
|
408
|
-
"text-2xl font-bold transition-colors",
|
|
409
|
-
g(d) ? "text-foreground" : "text-foreground group-hover:text-primary"
|
|
410
|
-
])
|
|
411
|
-
}, w(d.day), 3),
|
|
412
|
-
e("div", Ye, w(new Date(d.year, d.month - 1, d.day).toLocaleDateString("en-US", { month: "long", year: "numeric" })), 1),
|
|
413
|
-
u[4] || (u[4] = e("div", { class: "mt-2 pt-2 border-t border-border/0 group-hover:border-border/50 transition-all" }, [
|
|
414
|
-
e("div", { class: "text-[10px] text-muted-foreground/0 group-hover:text-muted-foreground/100 uppercase tracking-wide transition-all" }, " Click to view ")
|
|
415
|
-
], -1)),
|
|
416
|
-
l(W, null, {
|
|
417
|
-
default: h(() => [
|
|
418
|
-
l(Y, { "as-child": "" }, {
|
|
419
|
-
default: h(() => [
|
|
420
|
-
b(d).filter((Q) => Q.isException).length > 0 ? (a(), P(x(me), {
|
|
421
|
-
key: 0,
|
|
422
|
-
class: "absolute top-3 right-3 size-4 text-orange-500"
|
|
423
|
-
})) : $("", !0)
|
|
424
|
-
]),
|
|
425
|
-
_: 2
|
|
426
|
-
}, 1024),
|
|
427
|
-
l(I, null, {
|
|
428
|
-
default: h(() => [...u[2] || (u[2] = [
|
|
429
|
-
e("p", null, " This day has exceptions applied to it. ", -1)
|
|
430
|
-
])]),
|
|
431
|
-
_: 1
|
|
432
|
-
})
|
|
433
|
-
]),
|
|
434
|
-
_: 2
|
|
435
|
-
}, 1024),
|
|
436
|
-
l(W, null, {
|
|
437
|
-
default: h(() => [
|
|
438
|
-
l(Y, { "as-child": "" }, {
|
|
439
|
-
default: h(() => [
|
|
440
|
-
b(d).filter((Q) => Q.isException).length > 0 ? (a(), c("div", He)) : $("", !0)
|
|
441
|
-
]),
|
|
442
|
-
_: 2
|
|
443
|
-
}, 1024),
|
|
444
|
-
l(I, null, {
|
|
445
|
-
default: h(() => [...u[3] || (u[3] = [
|
|
446
|
-
e("p", null, " This day has exceptions applied to it. ", -1)
|
|
447
|
-
])]),
|
|
448
|
-
_: 1
|
|
449
|
-
})
|
|
450
|
-
]),
|
|
451
|
-
_: 2
|
|
452
|
-
}, 1024)
|
|
453
|
-
], 10, Oe),
|
|
454
|
-
l(le, {
|
|
455
|
-
date: d,
|
|
456
|
-
events: b(d),
|
|
457
|
-
resources: x(f)
|
|
458
|
-
}, null, 8, ["date", "events", "resources"])
|
|
459
|
-
], 2))), 128))
|
|
460
|
-
])
|
|
461
|
-
], 544)
|
|
462
|
-
]));
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
}), Ke = /* @__PURE__ */ he(Je, [["__scopeId", "data-v-99339cf2"]]), qe = { class: "flex flex-col gap-4 w-full h-full" }, Ge = { class: "flex items-center justify-between gap-4 px-1" }, Qe = { class: "flex items-center gap-4" }, Ze = { class: "flex flex-col" }, et = { class: "flex items-center gap-2" }, tt = { class: "text-2xl font-bold tracking-tight" }, ot = { class: "text-sm text-muted-foreground ml-7" }, st = { class: "flex items-center gap-2" }, nt = { class: "flex items-center gap-1 mr-2" }, lt = { class: "flex gap-4 flex-1 min-h-0 min-h-[1700px]" }, at = { class: "flex-shrink-0 flex flex-col gap-4" }, rt = {
|
|
466
|
-
key: 0,
|
|
467
|
-
class: "rounded-md border p-3"
|
|
468
|
-
}, it = { class: "flex items-center justify-between mb-3" }, ut = { class: "space-y-1" }, dt = ["onClick"], ct = { class: "min-w-0 flex-1" }, vt = { class: "text-sm font-medium truncate" }, pt = {
|
|
469
|
-
key: 0,
|
|
470
|
-
class: "pt-2 mt-2 border-t"
|
|
471
|
-
}, mt = {
|
|
472
|
-
key: 0,
|
|
473
|
-
class: "mt-1 space-y-1"
|
|
474
|
-
}, ft = { class: "min-w-0 flex-1" }, gt = { class: "text-sm font-medium truncate text-muted-foreground" }, kt = /* @__PURE__ */ H({
|
|
475
|
-
__name: "agenda",
|
|
476
|
-
setup(A) {
|
|
477
|
-
const { params: y } = xe(), { config: m } = be(), k = ye(m.project), f = D(ee(te())), o = D(1), v = D(null), p = E(() => v.value?.resources || []), t = E(() => p.value.filter((i) => i.isActive)), b = E(() => p.value.filter((i) => !i.isActive)), g = D([]), R = D(!1), S = E(() => g.value.length === 0 ? t.value : t.value.filter((i) => g.value.includes(i.id))), L = (i) => {
|
|
478
|
-
const r = g.value.indexOf(i);
|
|
479
|
-
r === -1 ? g.value.push(i) : g.value.splice(r, 1);
|
|
480
|
-
}, N = () => {
|
|
481
|
-
g.value = [];
|
|
482
|
-
};
|
|
483
|
-
de(f, () => {
|
|
484
|
-
});
|
|
485
|
-
const U = E(() => {
|
|
486
|
-
const i = f.value, r = new Date(i.year, i.month - 1, i.day), z = r.toLocaleDateString("en-US", { weekday: "long" }).toUpperCase(), _ = i.day, n = r.toLocaleDateString("en-US", { month: "short" }).toUpperCase();
|
|
487
|
-
return {
|
|
488
|
-
dayName: z,
|
|
489
|
-
day: _,
|
|
490
|
-
monthName: n,
|
|
491
|
-
full: `${z} ${_} ${n}`
|
|
492
|
-
};
|
|
493
|
-
}), T = () => {
|
|
494
|
-
f.value = f.value.subtract({ days: o.value });
|
|
495
|
-
}, B = () => {
|
|
496
|
-
f.value = f.value.add({ days: o.value });
|
|
497
|
-
}, X = () => {
|
|
498
|
-
f.value = ee(te());
|
|
499
|
-
}, j = E(() => {
|
|
500
|
-
if (!v.value) return [];
|
|
501
|
-
let i = [], r = [];
|
|
502
|
-
for (let _ = 0; _ < o.value; _++) {
|
|
503
|
-
const n = f.value.add({ days: _ });
|
|
504
|
-
r.push(n);
|
|
505
|
-
}
|
|
506
|
-
const z = S.value.length > 0 ? S.value : [null];
|
|
507
|
-
return r.forEach((_) => {
|
|
508
|
-
let n = new Date(_.year, _.month - 1, _.day);
|
|
509
|
-
const u = `${_.year}-${_.month.toString().padStart(2, "0")}-${_.day.toString().padStart(2, "0")}`;
|
|
510
|
-
z.forEach((s) => {
|
|
511
|
-
const I = (v.value?.exceptions || []).find((d) => {
|
|
512
|
-
const V = u >= d.startDate && u <= d.endDate;
|
|
513
|
-
return d.resourceId && s ? V && d.resourceId === s.id : V && !d.resourceId;
|
|
514
|
-
});
|
|
515
|
-
let W = [];
|
|
516
|
-
if (I) {
|
|
517
|
-
if (I.isClosed)
|
|
518
|
-
return;
|
|
519
|
-
W = I.timeslots || [];
|
|
520
|
-
} else {
|
|
521
|
-
const d = v.value?.timeslots[n.getDay()] || [];
|
|
522
|
-
s ? W = d.filter((V) => !V.resourceId || V.resourceId === s.id) : W = d;
|
|
523
|
-
}
|
|
524
|
-
i = i.concat(W.map((d, V) => ({
|
|
525
|
-
id: `${I ? "exc" : "rec"}-${n.toDateString()}-${s?.id || "default"}-${V}`,
|
|
526
|
-
title: v.value.serviceName,
|
|
527
|
-
date: u,
|
|
528
|
-
startTime: d.startTime,
|
|
529
|
-
endTime: d.endTime,
|
|
530
|
-
theme: s?.color || (I ? "purple" : "blue"),
|
|
531
|
-
bookings: 0,
|
|
532
|
-
maxBookings: s?.capacity || v.value.capacity,
|
|
533
|
-
isException: !!I,
|
|
534
|
-
resourceId: s?.id || null,
|
|
535
|
-
resource: s || null
|
|
536
|
-
})));
|
|
537
|
-
});
|
|
538
|
-
}), i;
|
|
539
|
-
});
|
|
540
|
-
return (async () => v.value = await k.get(m.agendaCollection, y.value.id))(), K("activeDate", f), K("viewMode", o), K("events", j), K("resources", S), K("allResources", t), (i, r) => {
|
|
541
|
-
const z = C("Button"), _ = C("SegmentedControlButton"), n = C("SegmentedControl"), u = C("Calendar");
|
|
542
|
-
return a(), P(ge, null, {
|
|
543
|
-
default: h(() => [
|
|
544
|
-
e("div", qe, [
|
|
545
|
-
e("div", Ge, [
|
|
546
|
-
e("div", Qe, [
|
|
547
|
-
e("div", Ze, [
|
|
548
|
-
e("div", et, [
|
|
549
|
-
l(x(fe), {
|
|
550
|
-
size: 20,
|
|
551
|
-
class: "text-primary"
|
|
552
|
-
}),
|
|
553
|
-
e("h2", tt, w(U.value.full), 1)
|
|
554
|
-
]),
|
|
555
|
-
e("p", ot, w(v.value?.serviceName), 1)
|
|
556
|
-
])
|
|
557
|
-
]),
|
|
558
|
-
e("div", st, [
|
|
559
|
-
e("div", nt, [
|
|
560
|
-
l(z, {
|
|
561
|
-
variant: "outline",
|
|
562
|
-
size: "icon",
|
|
563
|
-
class: "size-9",
|
|
564
|
-
onClick: T
|
|
565
|
-
}, {
|
|
566
|
-
default: h(() => [
|
|
567
|
-
l(x(se), { size: 16 })
|
|
568
|
-
]),
|
|
569
|
-
_: 1
|
|
570
|
-
}),
|
|
571
|
-
l(z, {
|
|
572
|
-
variant: "outline",
|
|
573
|
-
size: "sm",
|
|
574
|
-
class: "h-9 px-3",
|
|
575
|
-
onClick: X
|
|
576
|
-
}, {
|
|
577
|
-
default: h(() => [...r[3] || (r[3] = [
|
|
578
|
-
q(" Today ", -1)
|
|
579
|
-
])]),
|
|
580
|
-
_: 1
|
|
581
|
-
}),
|
|
582
|
-
l(z, {
|
|
583
|
-
variant: "outline",
|
|
584
|
-
size: "icon",
|
|
585
|
-
class: "size-9",
|
|
586
|
-
onClick: B
|
|
587
|
-
}, {
|
|
588
|
-
default: h(() => [
|
|
589
|
-
l(x(oe), { size: 16 })
|
|
590
|
-
]),
|
|
591
|
-
_: 1
|
|
592
|
-
})
|
|
593
|
-
]),
|
|
594
|
-
l(n, {
|
|
595
|
-
modelValue: o.value,
|
|
596
|
-
"onUpdate:modelValue": r[0] || (r[0] = (s) => o.value = s)
|
|
597
|
-
}, {
|
|
598
|
-
default: h(() => [
|
|
599
|
-
l(_, { value: 1 }, {
|
|
600
|
-
default: h(() => [...r[4] || (r[4] = [
|
|
601
|
-
e("span", { class: "whitespace-nowrap" }, "1 Day", -1)
|
|
602
|
-
])]),
|
|
603
|
-
_: 1
|
|
604
|
-
}),
|
|
605
|
-
l(_, { value: 3 }, {
|
|
606
|
-
default: h(() => [...r[5] || (r[5] = [
|
|
607
|
-
e("span", { class: "whitespace-nowrap" }, "3 Days", -1)
|
|
608
|
-
])]),
|
|
609
|
-
_: 1
|
|
610
|
-
}),
|
|
611
|
-
l(_, { value: 7 }, {
|
|
612
|
-
default: h(() => [...r[6] || (r[6] = [
|
|
613
|
-
e("span", { class: "whitespace-nowrap" }, "7 Days", -1)
|
|
614
|
-
])]),
|
|
615
|
-
_: 1
|
|
616
|
-
})
|
|
617
|
-
]),
|
|
618
|
-
_: 1
|
|
619
|
-
}, 8, ["modelValue"])
|
|
620
|
-
])
|
|
621
|
-
]),
|
|
622
|
-
e("div", lt, [
|
|
623
|
-
e("div", at, [
|
|
624
|
-
l(u, {
|
|
625
|
-
modelValue: f.value,
|
|
626
|
-
"onUpdate:modelValue": r[1] || (r[1] = (s) => f.value = s),
|
|
627
|
-
"weekday-format": "short",
|
|
628
|
-
class: "rounded-md border"
|
|
629
|
-
}, null, 8, ["modelValue"]),
|
|
630
|
-
p.value.length > 0 ? (a(), c("div", rt, [
|
|
631
|
-
e("div", it, [
|
|
632
|
-
r[8] || (r[8] = e("span", { class: "text-sm font-medium" }, "Resources", -1)),
|
|
633
|
-
g.value.length > 0 ? (a(), P(z, {
|
|
634
|
-
key: 0,
|
|
635
|
-
variant: "ghost",
|
|
636
|
-
size: "sm",
|
|
637
|
-
class: "h-6 text-xs px-2",
|
|
638
|
-
onClick: N
|
|
639
|
-
}, {
|
|
640
|
-
default: h(() => [...r[7] || (r[7] = [
|
|
641
|
-
q(" Show All ", -1)
|
|
642
|
-
])]),
|
|
643
|
-
_: 1
|
|
644
|
-
})) : $("", !0)
|
|
645
|
-
]),
|
|
646
|
-
e("div", ut, [
|
|
647
|
-
(a(!0), c(F, null, O(t.value, (s) => (a(), c("div", {
|
|
648
|
-
key: s.id,
|
|
649
|
-
class: M(["flex items-center gap-2 p-2 rounded-md hover:bg-muted cursor-pointer transition-colors", {
|
|
650
|
-
"bg-muted": g.value.length === 0 || g.value.includes(s.id),
|
|
651
|
-
"opacity-50": g.value.length > 0 && !g.value.includes(s.id)
|
|
652
|
-
}]),
|
|
653
|
-
onClick: (Y) => L(s.id)
|
|
654
|
-
}, [
|
|
655
|
-
e("div", {
|
|
656
|
-
class: "size-7 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0",
|
|
657
|
-
style: G({ backgroundColor: s.color || "#6b7280" })
|
|
658
|
-
}, w(s.avatarLabel || s.name.charAt(0).toUpperCase()), 5),
|
|
659
|
-
e("div", ct, [
|
|
660
|
-
e("div", vt, w(s.name), 1)
|
|
661
|
-
]),
|
|
662
|
-
e("div", {
|
|
663
|
-
class: M(["size-2 rounded-full flex-shrink-0", g.value.length === 0 || g.value.includes(s.id) ? "bg-primary" : "bg-muted-foreground/30"])
|
|
664
|
-
}, null, 2)
|
|
665
|
-
], 10, dt))), 128)),
|
|
666
|
-
b.value.length > 0 ? (a(), c("div", pt, [
|
|
667
|
-
e("button", {
|
|
668
|
-
class: "flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground w-full py-1 transition-colors",
|
|
669
|
-
onClick: r[2] || (r[2] = (s) => R.value = !R.value)
|
|
670
|
-
}, [
|
|
671
|
-
l(x(oe), {
|
|
672
|
-
size: 14,
|
|
673
|
-
class: M(["transition-transform", { "rotate-90": R.value }])
|
|
674
|
-
}, null, 8, ["class"]),
|
|
675
|
-
e("span", null, "Inactive (" + w(b.value.length) + ")", 1)
|
|
676
|
-
]),
|
|
677
|
-
R.value ? (a(), c("div", mt, [
|
|
678
|
-
(a(!0), c(F, null, O(b.value, (s) => (a(), c("div", {
|
|
679
|
-
key: s.id,
|
|
680
|
-
class: "flex items-center gap-2 p-2 rounded-md opacity-50"
|
|
681
|
-
}, [
|
|
682
|
-
e("div", {
|
|
683
|
-
class: "size-7 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0 grayscale",
|
|
684
|
-
style: G({ backgroundColor: s.color || "#6b7280" })
|
|
685
|
-
}, w(s.avatarLabel || s.name.charAt(0).toUpperCase()), 5),
|
|
686
|
-
e("div", ft, [
|
|
687
|
-
e("div", gt, w(s.name), 1)
|
|
688
|
-
])
|
|
689
|
-
]))), 128))
|
|
690
|
-
])) : $("", !0)
|
|
691
|
-
])) : $("", !0)
|
|
692
|
-
])
|
|
693
|
-
])) : $("", !0)
|
|
694
|
-
]),
|
|
695
|
-
l(Ke)
|
|
696
|
-
])
|
|
697
|
-
])
|
|
698
|
-
]),
|
|
699
|
-
_: 1
|
|
700
|
-
});
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
});
|
|
704
|
-
export {
|
|
705
|
-
kt as default
|
|
706
|
-
};
|