@oneclick.dev/cms-core-modules 0.0.59 → 0.0.60
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-B8iLWWcP.mjs} +48394 -36321
- package/dist/TableView-BxK6R8v3.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-YMaY4uuk-BgpTtr73.js +1 -0
- package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +399 -363
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent as ne, ref as E, reactive as ce, computed as te, resolveComponent as i,
|
|
2
|
-
import { _ as me } from "./EditLayout.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import {
|
|
4
|
-
import { $ as ae } from "./DateFormatter-CbO0PVUK.mjs";
|
|
1
|
+
import { defineComponent as ne, ref as E, reactive as ce, computed as te, resolveComponent as i, openBlock as l, createBlock as g, withCtx as a, createVNode as n, createTextVNode as u, toDisplayString as h, createElementVNode as o, unref as m, createElementBlock as r, Fragment as D, normalizeClass as k, createCommentVNode as v, renderList as B, normalizeStyle as ae } from "vue";
|
|
2
|
+
import { _ as me } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
|
|
3
|
+
import { h as re, o as U, g as b, v as N } from "./DateFormatter-DsmlAuYV.mjs";
|
|
5
4
|
import { Calendar as se, Users as le, BanIcon as de, Trash2 as ie, Plus as ue, CalendarPlus as pe } from "lucide-vue-next";
|
|
6
5
|
import { useModuleRoute as fe, useModule as ve, useFirebaseIntegration as ge } from "@oneclick.dev/cms-kit";
|
|
7
6
|
const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-2" }, be = { class: "flex items-center justify-center w-8 h-8 rounded-full bg-muted" }, Ce = {
|
|
@@ -41,7 +40,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
41
40
|
},
|
|
42
41
|
emits: ["add-exception", "update-exception", "remove-exception"],
|
|
43
42
|
setup(oe, { expose: V, emit: F }) {
|
|
44
|
-
const I = new
|
|
43
|
+
const I = new re("en-US", {
|
|
45
44
|
dateStyle: "medium"
|
|
46
45
|
}), T = oe, x = F, y = E(!1), $ = E("add"), A = E(!1), c = E({
|
|
47
46
|
start: U(b()),
|
|
@@ -116,13 +115,13 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
116
115
|
open: y.value,
|
|
117
116
|
"onUpdate:open": e[6] || (e[6] = (d) => y.value = d)
|
|
118
117
|
}, {
|
|
119
|
-
default:
|
|
118
|
+
default: a(() => [
|
|
120
119
|
n(_, { class: "sm:max-w-2xl" }, {
|
|
121
|
-
default:
|
|
120
|
+
default: a(() => [
|
|
122
121
|
n(S, null, {
|
|
123
|
-
default:
|
|
122
|
+
default: a(() => [
|
|
124
123
|
n(p, null, {
|
|
125
|
-
default:
|
|
124
|
+
default: a(() => [
|
|
126
125
|
u(h($.value === "add" ? "Add Exception" : "Edit Exception"), 1)
|
|
127
126
|
]),
|
|
128
127
|
_: 1
|
|
@@ -133,7 +132,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
133
132
|
o("div", xe, [
|
|
134
133
|
o("div", null, [
|
|
135
134
|
n(R, { class: "text-sm font-normal mb-1.5" }, {
|
|
136
|
-
default:
|
|
135
|
+
default: a(() => [...e[7] || (e[7] = [
|
|
137
136
|
u("Select Date or Date Range", -1)
|
|
138
137
|
])]),
|
|
139
138
|
_: 1
|
|
@@ -142,22 +141,22 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
142
141
|
open: A.value,
|
|
143
142
|
"onUpdate:open": e[1] || (e[1] = (d) => A.value = d)
|
|
144
143
|
}, {
|
|
145
|
-
default:
|
|
144
|
+
default: a(() => [
|
|
146
145
|
n(K, { "as-child": "" }, {
|
|
147
|
-
default:
|
|
146
|
+
default: a(() => [
|
|
148
147
|
n(w, {
|
|
149
148
|
variant: "outline",
|
|
150
149
|
class: "w-full justify-start text-left font-normal"
|
|
151
150
|
}, {
|
|
152
|
-
default:
|
|
151
|
+
default: a(() => [
|
|
153
152
|
n(m(se), { class: "mr-2 h-4 w-4" }),
|
|
154
|
-
c.value.start ? (l(),
|
|
155
|
-
c.value.end && c.value.start.toString() !== c.value.end.toString() ? (l(),
|
|
153
|
+
c.value.start ? (l(), r(D, { key: 0 }, [
|
|
154
|
+
c.value.end && c.value.start.toString() !== c.value.end.toString() ? (l(), r(D, { key: 0 }, [
|
|
156
155
|
u(h(m(I).format(c.value.start.toDate(m(b)()))) + " - " + h(m(I).format(c.value.end.toDate(m(b)()))), 1)
|
|
157
|
-
], 64)) : (l(),
|
|
156
|
+
], 64)) : (l(), r(D, { key: 1 }, [
|
|
158
157
|
u(h(m(I).format(c.value.start.toDate(m(b)()))), 1)
|
|
159
158
|
], 64))
|
|
160
|
-
], 64)) : (l(),
|
|
159
|
+
], 64)) : (l(), r(D, { key: 1 }, [
|
|
161
160
|
u(" Pick a date ")
|
|
162
161
|
], 64))
|
|
163
162
|
]),
|
|
@@ -167,7 +166,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
167
166
|
_: 1
|
|
168
167
|
}),
|
|
169
168
|
n(W, { class: "w-auto p-0" }, {
|
|
170
|
-
default:
|
|
169
|
+
default: a(() => [
|
|
171
170
|
n(Q, {
|
|
172
171
|
modelValue: c.value,
|
|
173
172
|
"onUpdate:modelValue": e[0] || (e[0] = (d) => c.value = d),
|
|
@@ -182,9 +181,9 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
182
181
|
_: 1
|
|
183
182
|
}, 8, ["open"])
|
|
184
183
|
]),
|
|
185
|
-
T.resources && T.resources.length > 0 ? (l(),
|
|
184
|
+
T.resources && T.resources.length > 0 ? (l(), r("div", ye, [
|
|
186
185
|
n(R, { class: "text-sm font-normal mb-1.5" }, {
|
|
187
|
-
default:
|
|
186
|
+
default: a(() => [...e[8] || (e[8] = [
|
|
188
187
|
u("Apply To", -1)
|
|
189
188
|
])]),
|
|
190
189
|
_: 1
|
|
@@ -204,7 +203,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
204
203
|
o("div", {
|
|
205
204
|
class: k(["w-4 h-4 rounded-full border-2", C.value ? "border-primary bg-primary" : "border-muted-foreground"])
|
|
206
205
|
}, [
|
|
207
|
-
C.value ? (l(),
|
|
206
|
+
C.value ? (l(), r("div", Ce)) : v("", !0)
|
|
208
207
|
], 2)
|
|
209
208
|
], 2),
|
|
210
209
|
o("div", {
|
|
@@ -221,11 +220,11 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
221
220
|
o("div", {
|
|
222
221
|
class: k(["w-4 h-4 rounded-full border-2", C.value ? "border-muted-foreground" : "border-primary bg-primary"])
|
|
223
222
|
}, [
|
|
224
|
-
C.value ? v("", !0) : (l(),
|
|
223
|
+
C.value ? v("", !0) : (l(), r("div", De))
|
|
225
224
|
], 2)
|
|
226
225
|
], 2),
|
|
227
|
-
C.value ? v("", !0) : (l(),
|
|
228
|
-
(l(!0),
|
|
226
|
+
C.value ? v("", !0) : (l(), r("div", he, [
|
|
227
|
+
(l(!0), r(D, null, B(T.resources, (d) => (l(), r("div", {
|
|
229
228
|
key: d.id,
|
|
230
229
|
class: k(["flex items-center gap-2 p-2 rounded-md hover:bg-muted cursor-pointer transition-colors", {
|
|
231
230
|
"bg-muted": t.resourceIds?.includes(d.id),
|
|
@@ -235,7 +234,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
235
234
|
}, [
|
|
236
235
|
o("div", {
|
|
237
236
|
class: "size-6 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0",
|
|
238
|
-
style:
|
|
237
|
+
style: ae({ backgroundColor: d.color || "#6b7280" })
|
|
239
238
|
}, h(d.avatarLabel || d.name.charAt(0).toUpperCase()), 5),
|
|
240
239
|
o("div", Ee, [
|
|
241
240
|
o("div", $e, h(d.name), 1)
|
|
@@ -243,7 +242,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
243
242
|
o("div", {
|
|
244
243
|
class: k(["size-4 rounded border-2 flex items-center justify-center flex-shrink-0", t.resourceIds?.includes(d.id) ? "border-primary bg-primary" : "border-muted-foreground"])
|
|
245
244
|
}, [
|
|
246
|
-
t.resourceIds?.includes(d.id) ? (l(),
|
|
245
|
+
t.resourceIds?.includes(d.id) ? (l(), r("svg", Ie, [...e[11] || (e[11] = [
|
|
247
246
|
o("path", {
|
|
248
247
|
"stroke-linecap": "round",
|
|
249
248
|
"stroke-linejoin": "round",
|
|
@@ -253,13 +252,13 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
253
252
|
])])) : v("", !0)
|
|
254
253
|
], 2)
|
|
255
254
|
], 10, we))), 128)),
|
|
256
|
-
t.resourceIds?.length === 0 ? (l(),
|
|
255
|
+
t.resourceIds?.length === 0 ? (l(), r("p", Se, " ⚠️ Please select at least one resource ")) : v("", !0)
|
|
257
256
|
]))
|
|
258
257
|
])
|
|
259
258
|
])) : v("", !0),
|
|
260
259
|
o("div", null, [
|
|
261
260
|
n(R, { class: "text-sm font-normal mb-1.5" }, {
|
|
262
|
-
default:
|
|
261
|
+
default: a(() => [...e[12] || (e[12] = [
|
|
263
262
|
u("Exception Type", -1)
|
|
264
263
|
])]),
|
|
265
264
|
_: 1
|
|
@@ -279,7 +278,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
279
278
|
o("div", {
|
|
280
279
|
class: k(["w-4 h-4 rounded-full border-2", t.isClosed ? "border-primary bg-primary" : "border-muted-foreground"])
|
|
281
280
|
}, [
|
|
282
|
-
t.isClosed ? (l(),
|
|
281
|
+
t.isClosed ? (l(), r("div", Re)) : v("", !0)
|
|
283
282
|
], 2)
|
|
284
283
|
], 2),
|
|
285
284
|
o("div", {
|
|
@@ -296,22 +295,22 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
296
295
|
o("div", {
|
|
297
296
|
class: k(["w-4 h-4 rounded-full border-2", t.isClosed ? "border-muted-foreground" : "border-primary bg-primary"])
|
|
298
297
|
}, [
|
|
299
|
-
t.isClosed ? v("", !0) : (l(),
|
|
298
|
+
t.isClosed ? v("", !0) : (l(), r("div", Ve))
|
|
300
299
|
], 2)
|
|
301
300
|
], 2)
|
|
302
301
|
])
|
|
303
302
|
]),
|
|
304
|
-
t.isClosed ? v("", !0) : (l(),
|
|
303
|
+
t.isClosed ? v("", !0) : (l(), r("div", ze, [
|
|
305
304
|
n(R, { class: "text-sm font-normal mb-1.5" }, {
|
|
306
|
-
default:
|
|
305
|
+
default: a(() => [...e[15] || (e[15] = [
|
|
307
306
|
u("Time Slots", -1)
|
|
308
307
|
])]),
|
|
309
308
|
_: 1
|
|
310
309
|
}),
|
|
311
310
|
n(Z, { class: "p-4" }, {
|
|
312
|
-
default:
|
|
313
|
-
t.timeslots.length === 0 ? (l(),
|
|
314
|
-
(l(!0),
|
|
311
|
+
default: a(() => [
|
|
312
|
+
t.timeslots.length === 0 ? (l(), r("div", je, ' No time slots added. Click "Add Time Slot" to create one. ')) : (l(), r("div", Pe, [
|
|
313
|
+
(l(!0), r(D, null, B(t.timeslots, (d) => (l(), r("div", {
|
|
315
314
|
key: d.id,
|
|
316
315
|
class: "flex items-center gap-2"
|
|
317
316
|
}, [
|
|
@@ -333,7 +332,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
333
332
|
size: "icon",
|
|
334
333
|
onClick: (P) => G(d.id)
|
|
335
334
|
}, {
|
|
336
|
-
default:
|
|
335
|
+
default: a(() => [
|
|
337
336
|
n(m(ie), { class: "size-4" })
|
|
338
337
|
]),
|
|
339
338
|
_: 1
|
|
@@ -346,7 +345,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
346
345
|
size: "sm",
|
|
347
346
|
class: "w-full"
|
|
348
347
|
}, {
|
|
349
|
-
default:
|
|
348
|
+
default: a(() => [
|
|
350
349
|
n(m(ue), { class: "size-4 mr-1" }),
|
|
351
350
|
e[17] || (e[17] = u(" Add Time Slot ", -1))
|
|
352
351
|
]),
|
|
@@ -358,14 +357,14 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
358
357
|
]))
|
|
359
358
|
]),
|
|
360
359
|
n(f, { class: "gap-2" }, {
|
|
361
|
-
default:
|
|
360
|
+
default: a(() => [
|
|
362
361
|
o("div", Be, [
|
|
363
362
|
$.value === "edit" ? (l(), g(w, {
|
|
364
363
|
key: 0,
|
|
365
364
|
variant: "destructive",
|
|
366
365
|
onClick: O
|
|
367
366
|
}, {
|
|
368
|
-
default:
|
|
367
|
+
default: a(() => [...e[18] || (e[18] = [
|
|
369
368
|
u(" Remove Exception ", -1)
|
|
370
369
|
])]),
|
|
371
370
|
_: 1
|
|
@@ -375,7 +374,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
375
374
|
variant: "outline",
|
|
376
375
|
onClick: H
|
|
377
376
|
}, {
|
|
378
|
-
default:
|
|
377
|
+
default: a(() => [...e[19] || (e[19] = [
|
|
379
378
|
u(" Cancel ", -1)
|
|
380
379
|
])]),
|
|
381
380
|
_: 1
|
|
@@ -385,7 +384,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
385
384
|
onClick: z,
|
|
386
385
|
disabled: !L.value
|
|
387
386
|
}, {
|
|
388
|
-
default:
|
|
387
|
+
default: a(() => [...e[20] || (e[20] = [
|
|
389
388
|
u(" Add Exception ", -1)
|
|
390
389
|
])]),
|
|
391
390
|
_: 1
|
|
@@ -394,7 +393,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
394
393
|
onClick: j,
|
|
395
394
|
disabled: !L.value
|
|
396
395
|
}, {
|
|
397
|
-
default:
|
|
396
|
+
default: a(() => [...e[21] || (e[21] = [
|
|
398
397
|
u(" Update Exception ", -1)
|
|
399
398
|
])]),
|
|
400
399
|
_: 1
|
|
@@ -427,10 +426,10 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
427
426
|
}, et = { class: "flex flex-wrap gap-2" }, tt = { class: "flex gap-1" }, st = {
|
|
428
427
|
key: 4,
|
|
429
428
|
class: "flex justify-end pt-4 border-t"
|
|
430
|
-
},
|
|
429
|
+
}, dt = /* @__PURE__ */ ne({
|
|
431
430
|
__name: "exceptions",
|
|
432
431
|
setup(oe) {
|
|
433
|
-
const V = new
|
|
432
|
+
const V = new re("en-US", {
|
|
434
433
|
dateStyle: "medium"
|
|
435
434
|
}), { params: F } = fe(), { config: I } = ve(), T = ge(I.project), x = E([]), y = E([]), $ = E(!1), A = E(!0), c = E(), t = (s) => !s.resourceIds || s.resourceIds.length === 0 ? null : y.value.filter((e) => s.resourceIds?.includes(e.id)), C = async () => {
|
|
436
435
|
try {
|
|
@@ -467,27 +466,27 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
467
466
|
return C(), (s, e) => {
|
|
468
467
|
const p = i("Button"), S = i("Badge"), R = i("Card"), w = i("Spinner"), K = i("EmptyMedia"), Q = i("EmptyTitle"), W = i("EmptyDescription"), X = i("EmptyHeader"), J = i("EmptyContent"), Z = i("Empty");
|
|
469
468
|
return l(), g(me, null, {
|
|
470
|
-
default:
|
|
469
|
+
default: a(() => [
|
|
471
470
|
e[10] || (e[10] = o("h1", { class: "text-lg font-medium mb-2" }, "Exception Management", -1)),
|
|
472
471
|
e[11] || (e[11] = o("p", { class: "mb-6 text-muted-foreground text-sm" }, " Create exceptions to override your regular schedule. You can close specific dates or set custom hours for special occasions. ", -1)),
|
|
473
472
|
o("div", Le, [
|
|
474
|
-
j.value.length > 0 ? (l(),
|
|
473
|
+
j.value.length > 0 ? (l(), r("div", He, [
|
|
475
474
|
n(p, { onClick: M }, {
|
|
476
|
-
default:
|
|
475
|
+
default: a(() => [
|
|
477
476
|
n(m(ue), { class: "size-4 mr-1" }),
|
|
478
477
|
e[0] || (e[0] = u(" Add Exception ", -1))
|
|
479
478
|
]),
|
|
480
479
|
_: 1
|
|
481
480
|
})
|
|
482
481
|
])) : v("", !0),
|
|
483
|
-
j.value.length > 0 ? (l(),
|
|
482
|
+
j.value.length > 0 ? (l(), r("div", Me, [
|
|
484
483
|
e[5] || (e[5] = o("h2", { class: "text-base font-medium mb-3" }, "Active Exceptions", -1)),
|
|
485
484
|
o("div", Oe, [
|
|
486
|
-
(l(!0),
|
|
485
|
+
(l(!0), r(D, null, B(j.value, (f) => (l(), g(R, {
|
|
487
486
|
key: f.id,
|
|
488
487
|
class: k(["p-4", O(f.endDate) ? "opacity-60" : ""])
|
|
489
488
|
}, {
|
|
490
|
-
default:
|
|
489
|
+
default: a(() => [
|
|
491
490
|
o("div", Je, [
|
|
492
491
|
o("div", Ye, [
|
|
493
492
|
o("div", qe, [
|
|
@@ -504,42 +503,42 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
504
503
|
variant: "secondary",
|
|
505
504
|
class: "text-xs"
|
|
506
505
|
}, {
|
|
507
|
-
default:
|
|
506
|
+
default: a(() => [...e[1] || (e[1] = [
|
|
508
507
|
u(" Past ", -1)
|
|
509
508
|
])]),
|
|
510
509
|
_: 1
|
|
511
510
|
})) : v("", !0)
|
|
512
511
|
]),
|
|
513
|
-
y.value.length > 0 ? (l(),
|
|
514
|
-
t(f) ? (l(!0),
|
|
512
|
+
y.value.length > 0 ? (l(), r("div", Ke, [
|
|
513
|
+
t(f) ? (l(!0), r(D, { key: 0 }, B(t(f), (_) => (l(), r("div", {
|
|
515
514
|
key: _.id,
|
|
516
515
|
class: "size-5 rounded-full flex items-center justify-center text-white text-[10px] font-medium",
|
|
517
|
-
style:
|
|
516
|
+
style: ae({ backgroundColor: _.color || "#6b7280" }),
|
|
518
517
|
title: _.name
|
|
519
518
|
}, h(_.avatarLabel || _.name.charAt(0).toUpperCase()), 13, Qe))), 128)) : (l(), g(S, {
|
|
520
519
|
key: 1,
|
|
521
520
|
variant: "outline",
|
|
522
521
|
class: "text-xs"
|
|
523
522
|
}, {
|
|
524
|
-
default:
|
|
523
|
+
default: a(() => [...e[2] || (e[2] = [
|
|
525
524
|
u(" All Resources ", -1)
|
|
526
525
|
])]),
|
|
527
526
|
_: 1
|
|
528
527
|
}))
|
|
529
528
|
])) : v("", !0),
|
|
530
529
|
o("div", We, [
|
|
531
|
-
f.isClosed ? (l(),
|
|
530
|
+
f.isClosed ? (l(), r(D, { key: 0 }, [
|
|
532
531
|
u(" Closed - No appointments available ")
|
|
533
|
-
], 64)) : (l(),
|
|
534
|
-
f.timeslots.length === 0 ? (l(),
|
|
532
|
+
], 64)) : (l(), r(D, { key: 1 }, [
|
|
533
|
+
f.timeslots.length === 0 ? (l(), r("div", Xe, " ⚠️ No time slots defined ")) : (l(), r("div", Ze, [
|
|
535
534
|
e[3] || (e[3] = o("div", { class: "font-medium text-foreground" }, "Custom Hours:", -1)),
|
|
536
535
|
o("div", et, [
|
|
537
|
-
(l(!0),
|
|
536
|
+
(l(!0), r(D, null, B(f.timeslots, (_, ee) => (l(), g(S, {
|
|
538
537
|
key: ee,
|
|
539
538
|
variant: "outline",
|
|
540
539
|
class: "font-mono text-xs"
|
|
541
540
|
}, {
|
|
542
|
-
default:
|
|
541
|
+
default: a(() => [
|
|
543
542
|
u(h(_.startTime) + " - " + h(_.endTime), 1)
|
|
544
543
|
]),
|
|
545
544
|
_: 2
|
|
@@ -554,7 +553,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
554
553
|
variant: "ghost",
|
|
555
554
|
onClick: (_) => G(f)
|
|
556
555
|
}, {
|
|
557
|
-
default:
|
|
556
|
+
default: a(() => [...e[4] || (e[4] = [
|
|
558
557
|
u(" Edit ", -1)
|
|
559
558
|
])]),
|
|
560
559
|
_: 1
|
|
@@ -564,7 +563,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
564
563
|
size: "icon",
|
|
565
564
|
onClick: (_) => H(f.id)
|
|
566
565
|
}, {
|
|
567
|
-
default:
|
|
566
|
+
default: a(() => [
|
|
568
567
|
n(m(ie), { class: "size-4 text-destructive" })
|
|
569
568
|
]),
|
|
570
569
|
_: 1
|
|
@@ -582,23 +581,23 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
582
581
|
key: 3,
|
|
583
582
|
class: "border border-dashed"
|
|
584
583
|
}, {
|
|
585
|
-
default:
|
|
584
|
+
default: a(() => [
|
|
586
585
|
n(X, null, {
|
|
587
|
-
default:
|
|
586
|
+
default: a(() => [
|
|
588
587
|
n(K, { variant: "icon" }, {
|
|
589
|
-
default:
|
|
588
|
+
default: a(() => [
|
|
590
589
|
n(m(pe))
|
|
591
590
|
]),
|
|
592
591
|
_: 1
|
|
593
592
|
}),
|
|
594
593
|
n(Q, null, {
|
|
595
|
-
default:
|
|
594
|
+
default: a(() => [...e[6] || (e[6] = [
|
|
596
595
|
u("No Exceptions Created", -1)
|
|
597
596
|
])]),
|
|
598
597
|
_: 1
|
|
599
598
|
}),
|
|
600
599
|
n(W, null, {
|
|
601
|
-
default:
|
|
600
|
+
default: a(() => [...e[7] || (e[7] = [
|
|
602
601
|
u(' Your agenda runs smoothly without any exceptions. Click "Add Exception" to create one. ', -1)
|
|
603
602
|
])]),
|
|
604
603
|
_: 1
|
|
@@ -607,13 +606,13 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
607
606
|
_: 1
|
|
608
607
|
}),
|
|
609
608
|
n(J, null, {
|
|
610
|
-
default:
|
|
609
|
+
default: a(() => [
|
|
611
610
|
n(p, {
|
|
612
611
|
variant: "outline",
|
|
613
612
|
size: "sm",
|
|
614
613
|
onClick: M
|
|
615
614
|
}, {
|
|
616
|
-
default:
|
|
615
|
+
default: a(() => [...e[8] || (e[8] = [
|
|
617
616
|
u(" Add Exception ", -1)
|
|
618
617
|
])]),
|
|
619
618
|
_: 1
|
|
@@ -624,7 +623,7 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
624
623
|
]),
|
|
625
624
|
_: 1
|
|
626
625
|
})),
|
|
627
|
-
$.value ? (l(),
|
|
626
|
+
$.value ? (l(), r("div", st, [...e[9] || (e[9] = [
|
|
628
627
|
o("span", null, "Saving...", -1)
|
|
629
628
|
])])) : v("", !0)
|
|
630
629
|
]),
|
|
@@ -643,5 +642,5 @@ const xe = { class: "space-y-6 py-4" }, ye = { key: 0 }, _e = { class: "space-y-
|
|
|
643
642
|
}
|
|
644
643
|
});
|
|
645
644
|
export {
|
|
646
|
-
|
|
645
|
+
dt as default
|
|
647
646
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),a=require("./DateFormatter-BPPBZp1j.js"),m=require("lucide-vue-next"),j=require("@oneclick.dev/cms-kit"),H={class:"space-y-6 py-4"},O={key:0},q={class:"space-y-2"},J={class:"flex items-center justify-center w-8 h-8 rounded-full bg-muted"},Y={key:0,class:"w-full h-full rounded-full bg-white scale-50"},K={class:"flex items-center justify-center w-8 h-8 rounded-full bg-muted"},G={key:0,class:"w-full h-full rounded-full bg-white scale-50"},Q={key:0,class:"pl-4 pt-2 space-y-1"},W=["onClick"],X={class:"min-w-0 flex-1"},Z={class:"text-sm font-medium truncate"},ee={key:0,class:"w-3 h-3 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},te={key:0,class:"text-xs text-amber-600 mt-2"},oe={class:"space-y-3"},ne={class:"flex items-center justify-center w-10 h-10 rounded-full bg-destructive/10"},le={key:0,class:"w-full h-full rounded-full bg-white scale-50"},ae={class:"flex items-center justify-center w-10 h-10 rounded-full bg-primary/10"},se={key:0,class:"w-full h-full rounded-full bg-white scale-50"},re={key:1},de={key:0,class:"text-center py-6 text-muted-foreground text-sm"},ce={key:1,class:"space-y-2 mb-3"},ie={class:"w-full flex justify-between items-center"},ue={class:"flex items-center gap-2 ml-auto"},me=e.defineComponent({__name:"ExceptionDialog",props:{resources:{}},emits:["add-exception","update-exception","remove-exception"],setup(L,{expose:N,emit:_}){const x=new a.$fb18d541ea1ad717$export$ad991b66133851cf("en-US",{dateStyle:"medium"}),k=L,c=_,i=e.ref(!1),v=e.ref("add"),g=e.ref(!1),s=e.ref({start:a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),end:a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}),o=e.reactive({id:"",startDate:"",endDate:"",isClosed:!1,timeslots:[],resourceIds:null}),p=e.computed({get:()=>o.resourceIds===null,set:n=>{n?o.resourceIds=null:o.resourceIds=[]}}),T=n=>{if(o.resourceIds===null)o.resourceIds=[n];else{const t=o.resourceIds.indexOf(n);t===-1?o.resourceIds.push(n):o.resourceIds.splice(t,1)}},$=e.computed(()=>!(!s.value.start||o.resourceIds!==null&&o.resourceIds.length===0)),S=n=>{v.value=n?"edit":"add",n?(o.id=n.id,o.startDate=n.startDate,o.endDate=n.endDate,o.isClosed=n.isClosed,o.timeslots=JSON.parse(JSON.stringify(n.timeslots)),o.resourceIds=n.resourceIds?[...n.resourceIds]:null,s.value={start:a.$fae977aafc393c5c$export$6b862160d295c8e(n.startDate),end:a.$fae977aafc393c5c$export$6b862160d295c8e(n.endDate)}):(o.id="",o.startDate="",o.endDate="",o.isClosed=!1,o.timeslots=[],o.resourceIds=null,s.value={start:a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()),end:a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())}),i.value=!0},B=()=>{i.value=!1},h=()=>{o.timeslots.push({id:Date.now(),startTime:"",endTime:""})},I=n=>{o.timeslots=o.timeslots.filter(t=>t.id!==n)},y=()=>{if(!s.value.start)return;const n=s.value.start.toString(),t=s.value.end?.toString()||n,r={id:Date.now().toString(),startDate:n,endDate:t,isClosed:o.isClosed,timeslots:o.isClosed?[]:[...o.timeslots],resourceIds:o.resourceIds};c("add-exception",r),i.value=!1},E=()=>{const n=s.value.start.toString(),t=s.value.end?.toString()||n,r={id:o.id,startDate:n,endDate:t,isClosed:o.isClosed,timeslots:o.isClosed?[]:[...o.timeslots],resourceIds:o.resourceIds};c("update-exception",r),i.value=!1},w=()=>{c("remove-exception",o.id),i.value=!1};return N({openDialog:S}),(n,t)=>{const r=e.resolveComponent("DialogTitle"),C=e.resolveComponent("DialogHeader"),V=e.resolveComponent("Label"),f=e.resolveComponent("Button"),z=e.resolveComponent("PopoverTrigger"),A=e.resolveComponent("RangeCalendar"),F=e.resolveComponent("PopoverContent"),R=e.resolveComponent("Popover"),D=e.resolveComponent("Input"),U=e.resolveComponent("Card"),d=e.resolveComponent("DialogFooter"),u=e.resolveComponent("DialogScrollContent"),P=e.resolveComponent("Dialog");return e.openBlock(),e.createBlock(P,{open:i.value,"onUpdate:open":t[6]||(t[6]=l=>i.value=l)},{default:e.withCtx(()=>[e.createVNode(u,{class:"sm:max-w-2xl"},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(r,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(v.value==="add"?"Add Exception":"Edit Exception"),1)]),_:1})]),_:1}),e.createElementVNode("div",H,[e.createElementVNode("div",null,[e.createVNode(V,{class:"text-sm font-normal mb-1.5"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("Select Date or Date Range",-1)])]),_:1}),e.createVNode(R,{open:g.value,"onUpdate:open":t[1]||(t[1]=l=>g.value=l)},{default:e.withCtx(()=>[e.createVNode(z,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(f,{variant:"outline",class:"w-full justify-start text-left font-normal"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Calendar),{class:"mr-2 h-4 w-4"}),s.value.start?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[s.value.end&&s.value.start.toString()!==s.value.end.toString()?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(x).format(s.value.start.toDate(e.unref(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)())))+" - "+e.toDisplayString(e.unref(x).format(s.value.end.toDate(e.unref(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)()))),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(x).format(s.value.start.toDate(e.unref(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)()))),1)],64))],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(" Pick a date ")],64))]),_:1})]),_:1}),e.createVNode(F,{class:"w-auto p-0"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=l=>s.value=l),"initial-focus":"","number-of-months":2,"min-value":e.unref(a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3)(e.unref(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2)())},null,8,["modelValue","min-value"])]),_:1})]),_:1},8,["open"])]),k.resources&&k.resources.length>0?(e.openBlock(),e.createElementBlock("div",O,[e.createVNode(V,{class:"text-sm font-normal mb-1.5"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("Apply To",-1)])]),_:1}),e.createElementVNode("div",q,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-3 p-3 border rounded-lg cursor-pointer hover:bg-accent transition-colors",p.value?"bg-accent border-primary":""]),onClick:t[2]||(t[2]=l=>p.value=!0)},[e.createElementVNode("div",J,[e.createVNode(e.unref(m.Users),{class:"h-4 w-4 text-muted-foreground"})]),t[9]||(t[9]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("div",{class:"font-medium text-sm"},"All Resources"),e.createElementVNode("div",{class:"text-xs text-muted-foreground"},"Exception applies to all resources")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2",p.value?"border-primary bg-primary":"border-muted-foreground"])},[p.value?(e.openBlock(),e.createElementBlock("div",Y)):e.createCommentVNode("",!0)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-3 p-3 border rounded-lg cursor-pointer hover:bg-accent transition-colors",p.value?"":"bg-accent border-primary"]),onClick:t[3]||(t[3]=l=>p.value=!1)},[e.createElementVNode("div",K,[e.createVNode(e.unref(m.Users),{class:"h-4 w-4 text-muted-foreground"})]),t[10]||(t[10]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("div",{class:"font-medium text-sm"},"Specific Resources"),e.createElementVNode("div",{class:"text-xs text-muted-foreground"},"Select which resources this exception applies to")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2",p.value?"border-muted-foreground":"border-primary bg-primary"])},[p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",G))],2)],2),p.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.resources,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:e.normalizeClass(["flex items-center gap-2 p-2 rounded-md hover:bg-muted cursor-pointer transition-colors",{"bg-muted":o.resourceIds?.includes(l.id),"opacity-50":o.resourceIds&&o.resourceIds.length>0&&!o.resourceIds.includes(l.id)}]),onClick:b=>T(l.id)},[e.createElementVNode("div",{class:"size-6 rounded-full flex items-center justify-center text-white text-xs font-medium flex-shrink-0",style:e.normalizeStyle({backgroundColor:l.color||"#6b7280"})},e.toDisplayString(l.avatarLabel||l.name.charAt(0).toUpperCase()),5),e.createElementVNode("div",X,[e.createElementVNode("div",Z,e.toDisplayString(l.name),1)]),e.createElementVNode("div",{class:e.normalizeClass(["size-4 rounded border-2 flex items-center justify-center flex-shrink-0",o.resourceIds?.includes(l.id)?"border-primary bg-primary":"border-muted-foreground"])},[o.resourceIds?.includes(l.id)?(e.openBlock(),e.createElementBlock("svg",ee,[...t[11]||(t[11]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"3",d:"M5 13l4 4L19 7"},null,-1)])])):e.createCommentVNode("",!0)],2)],10,W))),128)),o.resourceIds?.length===0?(e.openBlock(),e.createElementBlock("p",te," ⚠️ Please select at least one resource ")):e.createCommentVNode("",!0)]))])])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(V,{class:"text-sm font-normal mb-1.5"},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode("Exception Type",-1)])]),_:1}),e.createElementVNode("div",oe,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-3 p-3 border rounded-lg cursor-pointer hover:bg-accent transition-colors",o.isClosed?"bg-accent border-primary":""]),onClick:t[4]||(t[4]=l=>o.isClosed=!0)},[e.createElementVNode("div",ne,[e.createVNode(e.unref(m.BanIcon),{class:"h-5 w-5 text-destructive"})]),t[13]||(t[13]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("div",{class:"font-medium"},"Closed"),e.createElementVNode("div",{class:"text-sm text-muted-foreground"},"No appointments available during this period")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2",o.isClosed?"border-primary bg-primary":"border-muted-foreground"])},[o.isClosed?(e.openBlock(),e.createElementBlock("div",le)):e.createCommentVNode("",!0)],2)],2),e.createElementVNode("div",{class:e.normalizeClass(["flex items-center gap-3 p-3 border rounded-lg cursor-pointer hover:bg-accent transition-colors",o.isClosed?"":"bg-accent border-primary"]),onClick:t[5]||(t[5]=l=>o.isClosed=!1)},[e.createElementVNode("div",ae,[e.createVNode(e.unref(m.Calendar),{class:"h-5 w-5 text-primary"})]),t[14]||(t[14]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("div",{class:"font-medium"},"Custom Hours"),e.createElementVNode("div",{class:"text-sm text-muted-foreground"},"Set specific time slots for this period")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["w-4 h-4 rounded-full border-2",o.isClosed?"border-muted-foreground":"border-primary bg-primary"])},[o.isClosed?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",se))],2)],2)])]),o.isClosed?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",re,[e.createVNode(V,{class:"text-sm font-normal mb-1.5"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("Time Slots",-1)])]),_:1}),e.createVNode(U,{class:"p-4"},{default:e.withCtx(()=>[o.timeslots.length===0?(e.openBlock(),e.createElementBlock("div",de,' No time slots added. Click "Add Time Slot" to create one. ')):(e.openBlock(),e.createElementBlock("div",ce,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.timeslots,l=>(e.openBlock(),e.createElementBlock("div",{key:l.id,class:"flex items-center gap-2"},[e.createVNode(D,{class:"w-32",modelValue:l.startTime,"onUpdate:modelValue":b=>l.startTime=b,type:"time"},null,8,["modelValue","onUpdate:modelValue"]),t[16]||(t[16]=e.createElementVNode("span",{class:"text-muted-foreground"},"to",-1)),e.createVNode(D,{class:"w-32",modelValue:l.endTime,"onUpdate:modelValue":b=>l.endTime=b,type:"time"},null,8,["modelValue","onUpdate:modelValue"]),e.createVNode(f,{variant:"ghost",size:"icon",onClick:b=>I(l.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Trash2),{class:"size-4"})]),_:1},8,["onClick"])]))),128))])),e.createVNode(f,{onClick:h,variant:"outline",size:"sm",class:"w-full"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-4 mr-1"}),t[17]||(t[17]=e.createTextVNode(" Add Time Slot ",-1))]),_:1})]),_:1})]))]),e.createVNode(d,{class:"gap-2"},{default:e.withCtx(()=>[e.createElementVNode("div",ie,[v.value==="edit"?(e.openBlock(),e.createBlock(f,{key:0,variant:"destructive",onClick:w},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Remove Exception ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createElementVNode("div",ue,[e.createVNode(f,{variant:"outline",onClick:B},{default:e.withCtx(()=>[...t[19]||(t[19]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),v.value==="add"?(e.openBlock(),e.createBlock(f,{key:0,onClick:y,disabled:!$.value},{default:e.withCtx(()=>[...t[20]||(t[20]=[e.createTextVNode(" Add Exception ",-1)])]),_:1},8,["disabled"])):(e.openBlock(),e.createBlock(f,{key:1,onClick:E,disabled:!$.value},{default:e.withCtx(()=>[...t[21]||(t[21]=[e.createTextVNode(" Update Exception ",-1)])]),_:1},8,["disabled"]))])])]),_:1})]),_:1})]),_:1},8,["open"])}}}),pe={class:"max-w-4xl space-y-6"},fe={key:0,class:"flex"},ve={key:1},xe={class:"space-y-3"},Ce={class:"flex items-start justify-between"},ke={class:"flex-1"},ge={class:"flex items-center gap-2 mb-1"},Ve={class:"font-medium"},Ne={key:0,class:"flex items-center gap-1.5 ml-6 mb-2"},ye=["title"],Ee={class:"text-sm text-muted-foreground ml-6"},be={key:0,class:"text-amber-600"},_e={key:1,class:"space-y-1"},$e={class:"flex flex-wrap gap-2"},Be={class:"flex gap-1"},he={key:4,class:"flex justify-end pt-4 border-t"},we=e.defineComponent({__name:"exceptions",setup(L){const N=new a.$fb18d541ea1ad717$export$ad991b66133851cf("en-US",{dateStyle:"medium"}),{params:_}=j.useModuleRoute(),{config:x}=j.useModule(),k=j.useFirebaseIntegration(x.project),c=e.ref([]),i=e.ref([]),v=e.ref(!1),g=e.ref(!0),s=e.ref(),o=n=>!n.resourceIds||n.resourceIds.length===0?null:i.value.filter(t=>n.resourceIds?.includes(t.id)),p=async()=>{try{g.value=!0;const n=await k.get(x.agendaCollection,_.value.id);c.value=n.exceptions||[],i.value=(n.resources||[]).filter(t=>t.isActive)}catch(n){console.error("Error loading exceptions:",n)}finally{g.value=!1}},T=(n,t)=>{const r=a.$fae977aafc393c5c$export$6b862160d295c8e(n),C=a.$fae977aafc393c5c$export$6b862160d295c8e(t);return n===t?N.format(r.toDate(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2())):`${N.format(r.toDate(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))} - ${N.format(C.toDate(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2()))}`},$=n=>{c.value.push(n),y()},S=n=>{const t=c.value.findIndex(r=>r.id===n.id);t!==-1&&(c.value[t]=n),y()},B=n=>{c.value=c.value.filter(t=>t.id!==n),y()},h=()=>{s.value?.openDialog()},I=n=>{s.value?.openDialog(n)},y=async()=>{v.value=!0,await k.update(x.agendaCollection,_.value.id,{exceptions:c.value}),v.value=!1},E=e.computed(()=>[...c.value].sort((n,t)=>n.startDate.localeCompare(t.startDate))),w=n=>{const t=a.$fae977aafc393c5c$export$6b862160d295c8e(n),r=a.$14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(a.$14e0f24ef4ac5c92$export$aa8b41735afcabd2());return t.compare(r)<0};return p(),(n,t)=>{const r=e.resolveComponent("Button"),C=e.resolveComponent("Badge"),V=e.resolveComponent("Card"),f=e.resolveComponent("Spinner"),z=e.resolveComponent("EmptyMedia"),A=e.resolveComponent("EmptyTitle"),F=e.resolveComponent("EmptyDescription"),R=e.resolveComponent("EmptyHeader"),D=e.resolveComponent("EmptyContent"),U=e.resolveComponent("Empty");return e.openBlock(),e.createBlock(M._sfc_main,null,{default:e.withCtx(()=>[t[10]||(t[10]=e.createElementVNode("h1",{class:"text-lg font-medium mb-2"},"Exception Management",-1)),t[11]||(t[11]=e.createElementVNode("p",{class:"mb-6 text-muted-foreground text-sm"}," Create exceptions to override your regular schedule. You can close specific dates or set custom hours for special occasions. ",-1)),e.createElementVNode("div",pe,[E.value.length>0?(e.openBlock(),e.createElementBlock("div",fe,[e.createVNode(r,{onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Plus),{class:"size-4 mr-1"}),t[0]||(t[0]=e.createTextVNode(" Add Exception ",-1))]),_:1})])):e.createCommentVNode("",!0),E.value.length>0?(e.openBlock(),e.createElementBlock("div",ve,[t[5]||(t[5]=e.createElementVNode("h2",{class:"text-base font-medium mb-3"},"Active Exceptions",-1)),e.createElementVNode("div",xe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,d=>(e.openBlock(),e.createBlock(V,{key:d.id,class:e.normalizeClass(["p-4",w(d.endDate)?"opacity-60":""])},{default:e.withCtx(()=>[e.createElementVNode("div",Ce,[e.createElementVNode("div",ke,[e.createElementVNode("div",ge,[d.isClosed?(e.openBlock(),e.createBlock(e.unref(m.BanIcon),{key:0,class:"h-4 w-4 text-destructive"})):(e.openBlock(),e.createBlock(e.unref(m.Calendar),{key:1,class:"h-4 w-4 text-primary"})),e.createElementVNode("h3",Ve,e.toDisplayString(T(d.startDate,d.endDate)),1),w(d.endDate)?(e.openBlock(),e.createBlock(C,{key:2,variant:"secondary",class:"text-xs"},{default:e.withCtx(()=>[...t[1]||(t[1]=[e.createTextVNode(" Past ",-1)])]),_:1})):e.createCommentVNode("",!0)]),i.value.length>0?(e.openBlock(),e.createElementBlock("div",Ne,[o(d)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o(d),u=>(e.openBlock(),e.createElementBlock("div",{key:u.id,class:"size-5 rounded-full flex items-center justify-center text-white text-[10px] font-medium",style:e.normalizeStyle({backgroundColor:u.color||"#6b7280"}),title:u.name},e.toDisplayString(u.avatarLabel||u.name.charAt(0).toUpperCase()),13,ye))),128)):(e.openBlock(),e.createBlock(C,{key:1,variant:"outline",class:"text-xs"},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" All Resources ",-1)])]),_:1}))])):e.createCommentVNode("",!0),e.createElementVNode("div",Ee,[d.isClosed?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(" Closed - No appointments available ")],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[d.timeslots.length===0?(e.openBlock(),e.createElementBlock("div",be," ⚠️ No time slots defined ")):(e.openBlock(),e.createElementBlock("div",_e,[t[3]||(t[3]=e.createElementVNode("div",{class:"font-medium text-foreground"},"Custom Hours:",-1)),e.createElementVNode("div",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.timeslots,(u,P)=>(e.openBlock(),e.createBlock(C,{key:P,variant:"outline",class:"font-mono text-xs"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.startTime)+" - "+e.toDisplayString(u.endTime),1)]),_:2},1024))),128))])]))],64))])]),e.createElementVNode("div",Be,[e.createVNode(r,{variant:"ghost",onClick:u=>I(d)},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Edit ",-1)])]),_:1},8,["onClick"]),e.createVNode(r,{variant:"ghost",size:"icon",onClick:u=>B(d.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(m.Trash2),{class:"size-4 text-destructive"})]),_:1},8,["onClick"])])])]),_:2},1032,["class"]))),128))])])):g.value?(e.openBlock(),e.createBlock(f,{key:2,class:"my-8 size-8"})):(e.openBlock(),e.createBlock(U,{key:3,class:"border border-dashed"},{default:e.withCtx(()=>[e.createVNode(R,null,{default:e.withCtx(()=>[e.createVNode(z,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(m.CalendarPlus))]),_:1}),e.createVNode(A,null,{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("No Exceptions Created",-1)])]),_:1}),e.createVNode(F,null,{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(' Your agenda runs smoothly without any exceptions. Click "Add Exception" to create one. ',-1)])]),_:1})]),_:1}),e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(r,{variant:"outline",size:"sm",onClick:h},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Add Exception ",-1)])]),_:1})]),_:1})]),_:1})),v.value?(e.openBlock(),e.createElementBlock("div",he,[...t[9]||(t[9]=[e.createElementVNode("span",null,"Saving...",-1)])])):e.createCommentVNode("",!0)]),e.createVNode(me,{ref_key:"exceptionDialogRef",ref:s,resources:i.value,onAddException:$,onUpdateException:S,onRemoveException:B},null,8,["resources"])]),_:1})}}});exports.default=we;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("vue");function w(e){return o.getCurrentScope()?(o.onScopeDispose(e),!0):!1}const l=new WeakMap,y=(...e)=>{var r;const n=e[0],t=(r=o.getCurrentInstance())==null?void 0:r.proxy;if(t==null&&!o.hasInjectionContext())throw new Error("injectLocal must be called in setup");return t&&l.has(t)&&n in l.get(t)?l.get(t)[n]:o.inject(...e)},j=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const O=Object.prototype.toString,g=e=>O.call(e)==="[object Object]",p=()=>{};function m(e,r){function n(...t){return new Promise((i,c)=>{Promise.resolve(e(()=>r.apply(this,t),{fn:r,thisArg:this,args:t})).then(i).catch(c)})}return n}const F=e=>e();function h(e,r={}){let n,t,i=p;const c=u=>{clearTimeout(u),i(),i=p};let f;return u=>{const d=o.toValue(e),a=o.toValue(r.maxWait);return n&&c(n),d<=0||a!==void 0&&a<=0?(t&&(c(t),t=void 0),Promise.resolve(u())):new Promise((s,b)=>{i=r.rejectOnCancel?b:s,f=u,a&&!t&&(t=setTimeout(()=>{n&&c(n),t=void 0,s(f())},a)),n=setTimeout(()=>{t&&c(t),t=void 0,s(u())},d)})}}function S(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function v(e){return Array.isArray(e)?e:[e]}function C(e){return o.getCurrentInstance()}function D(e,r=200,n={}){return m(h(r,n),e)}function T(e,r,n={}){const{eventFilter:t=F,...i}=n;return o.watch(e,m(t,r),i)}function W(e,r=!0,n){C()?o.onMounted(e,n):r?e():o.nextTick(e)}function x(e,r,n={}){const{debounce:t=0,maxWait:i=void 0,...c}=n;return T(e,r,{...c,eventFilter:h(t,{maxWait:i})})}function I(e,r,n){return o.watch(e,r,{...n,immediate:!0})}exports.injectLocal=y;exports.isClient=j;exports.isObject=g;exports.pxValue=S;exports.toArray=v;exports.tryOnMounted=W;exports.tryOnScopeDispose=w;exports.useDebounceFn=D;exports.watchDebounced=x;exports.watchImmediate=I;
|