@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,602 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, computed as q, resolveComponent as s, createBlock as _, openBlock as a, withCtx as o, createVNode as t, createElementBlock as y, Fragment as M, renderList as j, createCommentVNode as U, createElementVNode as n, normalizeClass as E, unref as u, createTextVNode as v, toDisplayString as V, inject as C, ref as w, reactive as D, provide as G } from "vue";
|
|
2
|
-
import { useModuleRoute as z, useModule as P, useFirebaseIntegration as O, useModuleBreadcrumbs as R } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { Circle as H, Check as J, Dot as W, ArrowLeft as Y } from "lucide-vue-next";
|
|
4
|
-
import { _ as K } from "./RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs";
|
|
5
|
-
const Q = { class: "flex flex-col gap-1" }, X = /* @__PURE__ */ I({
|
|
6
|
-
__name: "StepNavigation",
|
|
7
|
-
props: {
|
|
8
|
-
modelValue: {
|
|
9
|
-
type: Number,
|
|
10
|
-
required: !0
|
|
11
|
-
},
|
|
12
|
-
steps: {
|
|
13
|
-
type: Array,
|
|
14
|
-
required: !0
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
emits: ["update:modelValue"],
|
|
18
|
-
setup(N, { emit: m }) {
|
|
19
|
-
const g = N, x = m, c = q({
|
|
20
|
-
get: () => g.modelValue,
|
|
21
|
-
set: (e) => {
|
|
22
|
-
x("update:modelValue", e);
|
|
23
|
-
}
|
|
24
|
-
}), r = q(() => g.steps.filter((e) => e.completed).length);
|
|
25
|
-
return (e, d) => {
|
|
26
|
-
const b = s("StepperSeparator"), i = s("Button"), l = s("StepperTrigger"), k = s("StepperTitle"), T = s("StepperItem"), $ = s("Stepper"), F = s("CardContent"), B = s("Card");
|
|
27
|
-
return a(), _(B, null, {
|
|
28
|
-
default: o(() => [
|
|
29
|
-
t(F, null, {
|
|
30
|
-
default: o(() => [
|
|
31
|
-
t($, {
|
|
32
|
-
orientation: "vertical",
|
|
33
|
-
class: "mx-auto flex w-full max-w-md flex-col justify-start gap-10",
|
|
34
|
-
modelValue: c.value,
|
|
35
|
-
"onUpdate:modelValue": d[0] || (d[0] = (f) => c.value = f),
|
|
36
|
-
linear: !1
|
|
37
|
-
}, {
|
|
38
|
-
default: o(() => [
|
|
39
|
-
(a(!0), y(M, null, j(N.steps, (f, A) => (a(), _(T, {
|
|
40
|
-
key: f.step,
|
|
41
|
-
class: "relative flex w-full items-start gap-6",
|
|
42
|
-
step: f.step,
|
|
43
|
-
completed: f.completed,
|
|
44
|
-
disabled: f.step > r.value + 1,
|
|
45
|
-
onClick: (p) => c.value = f.step
|
|
46
|
-
}, {
|
|
47
|
-
default: o(({ state: p }) => [
|
|
48
|
-
f.step !== N.steps[N.steps.length - 1].step ? (a(), _(b, {
|
|
49
|
-
key: 0,
|
|
50
|
-
class: "absolute left-[18px] top-[38px] block h-[105%] w-0.5 shrink-0 rounded-full bg-muted group-data-[state=completed]:bg-primary"
|
|
51
|
-
})) : U("", !0),
|
|
52
|
-
t(l, { "as-child": "" }, {
|
|
53
|
-
default: o(() => [
|
|
54
|
-
t(i, {
|
|
55
|
-
variant: p === "completed" || p === "active" ? "default" : "outline",
|
|
56
|
-
size: "icon",
|
|
57
|
-
class: E(["z-10 rounded-full shrink-0", [c.value === f.step && "ring-2 ring-ring ring-offset-2 ring-offset-background"]])
|
|
58
|
-
}, {
|
|
59
|
-
default: o(() => [
|
|
60
|
-
c.value === f.step ? (a(), _(u(H), { key: 0 })) : p === "completed" ? (a(), _(u(J), {
|
|
61
|
-
key: 1,
|
|
62
|
-
class: "size-5"
|
|
63
|
-
})) : p === "inactive" ? (a(), _(u(W), { key: 2 })) : U("", !0)
|
|
64
|
-
]),
|
|
65
|
-
_: 2
|
|
66
|
-
}, 1032, ["variant", "class"])
|
|
67
|
-
]),
|
|
68
|
-
_: 2
|
|
69
|
-
}, 1024),
|
|
70
|
-
n("div", Q, [
|
|
71
|
-
t(k, {
|
|
72
|
-
class: E([[c.value === f.step && "text-primary", f.step > r.value + 1 && "text-muted-foreground"], "text-sm font-semibold transition lg:text-base mt-1.5"])
|
|
73
|
-
}, {
|
|
74
|
-
default: o(() => [
|
|
75
|
-
v(V(f.title), 1)
|
|
76
|
-
]),
|
|
77
|
-
_: 2
|
|
78
|
-
}, 1032, ["class"])
|
|
79
|
-
])
|
|
80
|
-
]),
|
|
81
|
-
_: 2
|
|
82
|
-
}, 1032, ["step", "completed", "disabled", "onClick"]))), 128))
|
|
83
|
-
]),
|
|
84
|
-
_: 1
|
|
85
|
-
}, 8, ["modelValue"])
|
|
86
|
-
]),
|
|
87
|
-
_: 1
|
|
88
|
-
})
|
|
89
|
-
]),
|
|
90
|
-
_: 1
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
}), Z = { class: "mb-8" }, h = { class: "flex justify-end mt-8" }, ee = /* @__PURE__ */ I({
|
|
95
|
-
__name: "Step1",
|
|
96
|
-
setup(N) {
|
|
97
|
-
const m = C("form"), g = C("steps"), x = C("activeStep", w(1)), c = () => {
|
|
98
|
-
if (m.serviceName = m.serviceName.trim(), !m.serviceName) {
|
|
99
|
-
alert("Please enter a service name.");
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
g.value[0].completed = !0, x.value = 2;
|
|
103
|
-
};
|
|
104
|
-
return (r, e) => {
|
|
105
|
-
const d = s("Label"), b = s("Input"), i = s("Button"), l = s("Card");
|
|
106
|
-
return a(), _(l, { class: "p-8" }, {
|
|
107
|
-
default: o(() => [
|
|
108
|
-
n("div", Z, [
|
|
109
|
-
t(d, {
|
|
110
|
-
for: "service-name",
|
|
111
|
-
class: "text-base font-medium mb-2"
|
|
112
|
-
}, {
|
|
113
|
-
default: o(() => [...e[2] || (e[2] = [
|
|
114
|
-
v(" Your Service Name ", -1)
|
|
115
|
-
])]),
|
|
116
|
-
_: 1
|
|
117
|
-
}),
|
|
118
|
-
t(b, {
|
|
119
|
-
id: "service-name",
|
|
120
|
-
modelValue: u(m).serviceName,
|
|
121
|
-
"onUpdate:modelValue": e[0] || (e[0] = (k) => u(m).serviceName = k),
|
|
122
|
-
placeholder: "Enter service name",
|
|
123
|
-
class: "mt-2"
|
|
124
|
-
}, null, 8, ["modelValue"]),
|
|
125
|
-
e[3] || (e[3] = n("p", { class: "text-sm text-muted-foreground mt-2" }, " How should customers refer to your service ", -1))
|
|
126
|
-
]),
|
|
127
|
-
n("div", h, [
|
|
128
|
-
t(i, {
|
|
129
|
-
onClick: e[1] || (e[1] = (k) => c())
|
|
130
|
-
}, {
|
|
131
|
-
default: o(() => [...e[4] || (e[4] = [
|
|
132
|
-
v(" Continue ", -1)
|
|
133
|
-
])]),
|
|
134
|
-
_: 1
|
|
135
|
-
})
|
|
136
|
-
])
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
}), te = { class: "flex justify-end" }, oe = { class: "flex gap-4" }, se = /* @__PURE__ */ I({
|
|
143
|
-
__name: "Step2",
|
|
144
|
-
setup(N) {
|
|
145
|
-
const m = C("form"), g = C("steps"), x = C("activeStep", w(1)), c = () => {
|
|
146
|
-
g.value[1].completed = !0, x.value = 3;
|
|
147
|
-
};
|
|
148
|
-
return (r, e) => {
|
|
149
|
-
const d = s("Button"), b = s("Card");
|
|
150
|
-
return a(), _(b, { class: "p-8" }, {
|
|
151
|
-
default: o(() => [
|
|
152
|
-
e[5] || (e[5] = n("p", { class: "font-medium text-lg" }, " Create regular time slots for your service. ", -1)),
|
|
153
|
-
t(K, {
|
|
154
|
-
modelValue: u(m).timeslots,
|
|
155
|
-
"onUpdate:modelValue": e[0] || (e[0] = (i) => u(m).timeslots = i)
|
|
156
|
-
}, null, 8, ["modelValue"]),
|
|
157
|
-
e[6] || (e[6] = n("hr", null, null, -1)),
|
|
158
|
-
n("div", te, [
|
|
159
|
-
n("div", oe, [
|
|
160
|
-
t(d, {
|
|
161
|
-
variant: "outline",
|
|
162
|
-
onClick: e[1] || (e[1] = (i) => x.value = 1)
|
|
163
|
-
}, {
|
|
164
|
-
default: o(() => [...e[3] || (e[3] = [
|
|
165
|
-
v(" Back ", -1)
|
|
166
|
-
])]),
|
|
167
|
-
_: 1
|
|
168
|
-
}),
|
|
169
|
-
t(d, {
|
|
170
|
-
onClick: e[2] || (e[2] = (i) => c())
|
|
171
|
-
}, {
|
|
172
|
-
default: o(() => [...e[4] || (e[4] = [
|
|
173
|
-
v(" Continue ", -1)
|
|
174
|
-
])]),
|
|
175
|
-
_: 1
|
|
176
|
-
})
|
|
177
|
-
])
|
|
178
|
-
])
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
}), ne = { class: "mb-8" }, le = { class: "flex justify-end gap-4 mt-8" }, ae = /* @__PURE__ */ I({
|
|
185
|
-
__name: "Step3",
|
|
186
|
-
setup(N) {
|
|
187
|
-
const m = C("form"), g = C("steps"), x = C("activeStep", w(1)), c = () => {
|
|
188
|
-
g.value[2].completed = !0, x.value = 4;
|
|
189
|
-
};
|
|
190
|
-
return (r, e) => {
|
|
191
|
-
const d = s("Label"), b = s("InputGroupInput"), i = s("Search"), l = s("InputGroupAddon"), k = s("SelectValue"), T = s("SelectTrigger"), $ = s("SelectItem"), F = s("SelectGroup"), B = s("SelectContent"), f = s("Select"), A = s("InputGroup"), p = s("Button"), L = s("Card");
|
|
192
|
-
return a(), _(L, { class: "p-8" }, {
|
|
193
|
-
default: o(() => [
|
|
194
|
-
n("div", ne, [
|
|
195
|
-
t(d, {
|
|
196
|
-
for: "lead-time",
|
|
197
|
-
class: "text-base font-medium mb-2"
|
|
198
|
-
}, {
|
|
199
|
-
default: o(() => [...e[6] || (e[6] = [
|
|
200
|
-
v(" Minimum Advance Notice - Lead Time ", -1)
|
|
201
|
-
])]),
|
|
202
|
-
_: 1
|
|
203
|
-
}),
|
|
204
|
-
t(A, { class: "max-w-md" }, {
|
|
205
|
-
default: o(() => [
|
|
206
|
-
t(b, {
|
|
207
|
-
placeholder: "0",
|
|
208
|
-
id: "lead-time",
|
|
209
|
-
modelValue: u(m).minimumAdvanceNotice.value,
|
|
210
|
-
"onUpdate:modelValue": e[0] || (e[0] = (S) => u(m).minimumAdvanceNotice.value = S)
|
|
211
|
-
}, null, 8, ["modelValue"]),
|
|
212
|
-
t(l, null, {
|
|
213
|
-
default: o(() => [
|
|
214
|
-
t(i)
|
|
215
|
-
]),
|
|
216
|
-
_: 1
|
|
217
|
-
}),
|
|
218
|
-
t(l, { align: "inline-end" }, {
|
|
219
|
-
default: o(() => [
|
|
220
|
-
t(f, {
|
|
221
|
-
modelValue: u(m).minimumAdvanceNotice.unit,
|
|
222
|
-
"onUpdate:modelValue": e[1] || (e[1] = (S) => u(m).minimumAdvanceNotice.unit = S)
|
|
223
|
-
}, {
|
|
224
|
-
default: o(() => [
|
|
225
|
-
t(T, { class: "w-[180px] border-0 bg-transparent -mr-1.5" }, {
|
|
226
|
-
default: o(() => [
|
|
227
|
-
t(k)
|
|
228
|
-
]),
|
|
229
|
-
_: 1
|
|
230
|
-
}),
|
|
231
|
-
t(B, null, {
|
|
232
|
-
default: o(() => [
|
|
233
|
-
t(F, null, {
|
|
234
|
-
default: o(() => [
|
|
235
|
-
t($, { value: "minutes" }, {
|
|
236
|
-
default: o(() => [...e[7] || (e[7] = [
|
|
237
|
-
v(" Minutes ", -1)
|
|
238
|
-
])]),
|
|
239
|
-
_: 1
|
|
240
|
-
}),
|
|
241
|
-
t($, { value: "hours" }, {
|
|
242
|
-
default: o(() => [...e[8] || (e[8] = [
|
|
243
|
-
v(" Hours ", -1)
|
|
244
|
-
])]),
|
|
245
|
-
_: 1
|
|
246
|
-
}),
|
|
247
|
-
t($, { value: "days" }, {
|
|
248
|
-
default: o(() => [...e[9] || (e[9] = [
|
|
249
|
-
v(" Days ", -1)
|
|
250
|
-
])]),
|
|
251
|
-
_: 1
|
|
252
|
-
})
|
|
253
|
-
]),
|
|
254
|
-
_: 1
|
|
255
|
-
})
|
|
256
|
-
]),
|
|
257
|
-
_: 1
|
|
258
|
-
})
|
|
259
|
-
]),
|
|
260
|
-
_: 1
|
|
261
|
-
}, 8, ["modelValue"])
|
|
262
|
-
]),
|
|
263
|
-
_: 1
|
|
264
|
-
})
|
|
265
|
-
]),
|
|
266
|
-
_: 1
|
|
267
|
-
}),
|
|
268
|
-
e[10] || (e[10] = n("p", { class: "text-sm text-muted-foreground mt-2" }, " Set how far in advance a customer must book your slot. ", -1))
|
|
269
|
-
]),
|
|
270
|
-
e[19] || (e[19] = n("hr", null, null, -1)),
|
|
271
|
-
n("div", null, [
|
|
272
|
-
t(d, {
|
|
273
|
-
for: "capacity",
|
|
274
|
-
class: "text-base font-medium mb-2"
|
|
275
|
-
}, {
|
|
276
|
-
default: o(() => [...e[11] || (e[11] = [
|
|
277
|
-
v(" Service Visibility ", -1)
|
|
278
|
-
])]),
|
|
279
|
-
_: 1
|
|
280
|
-
}),
|
|
281
|
-
t(A, { class: "max-w-md" }, {
|
|
282
|
-
default: o(() => [
|
|
283
|
-
t(b, {
|
|
284
|
-
placeholder: "1",
|
|
285
|
-
id: "capacity",
|
|
286
|
-
modelValue: u(m).serviceVisibility,
|
|
287
|
-
"onUpdate:modelValue": e[2] || (e[2] = (S) => u(m).serviceVisibility = S)
|
|
288
|
-
}, null, 8, ["modelValue"]),
|
|
289
|
-
t(l, null, {
|
|
290
|
-
default: o(() => [
|
|
291
|
-
t(i)
|
|
292
|
-
]),
|
|
293
|
-
_: 1
|
|
294
|
-
}),
|
|
295
|
-
t(l, { align: "inline-end" }, {
|
|
296
|
-
default: o(() => [...e[12] || (e[12] = [
|
|
297
|
-
v(" days ", -1)
|
|
298
|
-
])]),
|
|
299
|
-
_: 1
|
|
300
|
-
})
|
|
301
|
-
]),
|
|
302
|
-
_: 1
|
|
303
|
-
}),
|
|
304
|
-
e[13] || (e[13] = n("p", { class: "text-sm text-muted-foreground mt-2" }, " Set how many days in advance the service is visible to customers. ", -1))
|
|
305
|
-
]),
|
|
306
|
-
e[20] || (e[20] = n("hr", null, null, -1)),
|
|
307
|
-
n("div", null, [
|
|
308
|
-
t(d, {
|
|
309
|
-
for: "capacity",
|
|
310
|
-
class: "text-base font-medium mb-2"
|
|
311
|
-
}, {
|
|
312
|
-
default: o(() => [...e[14] || (e[14] = [
|
|
313
|
-
v(" Default Capacity ", -1)
|
|
314
|
-
])]),
|
|
315
|
-
_: 1
|
|
316
|
-
}),
|
|
317
|
-
t(A, { class: "max-w-md" }, {
|
|
318
|
-
default: o(() => [
|
|
319
|
-
t(b, {
|
|
320
|
-
placeholder: "∞",
|
|
321
|
-
type: "number",
|
|
322
|
-
id: "capacity",
|
|
323
|
-
class: "no-spinner",
|
|
324
|
-
min: "1",
|
|
325
|
-
modelValue: u(m).capacity,
|
|
326
|
-
"onUpdate:modelValue": e[3] || (e[3] = (S) => u(m).capacity = S)
|
|
327
|
-
}, null, 8, ["modelValue"]),
|
|
328
|
-
t(l, { align: "inline-end" }, {
|
|
329
|
-
default: o(() => [...e[15] || (e[15] = [
|
|
330
|
-
v(" available spots ", -1)
|
|
331
|
-
])]),
|
|
332
|
-
_: 1
|
|
333
|
-
})
|
|
334
|
-
]),
|
|
335
|
-
_: 1
|
|
336
|
-
}),
|
|
337
|
-
e[16] || (e[16] = n("p", { class: "text-sm text-muted-foreground mt-2" }, " Default number of bookings per time slot. ", -1))
|
|
338
|
-
]),
|
|
339
|
-
n("div", le, [
|
|
340
|
-
t(p, {
|
|
341
|
-
variant: "outline",
|
|
342
|
-
onClick: e[4] || (e[4] = (S) => x.value = 2)
|
|
343
|
-
}, {
|
|
344
|
-
default: o(() => [...e[17] || (e[17] = [
|
|
345
|
-
v(" Back ", -1)
|
|
346
|
-
])]),
|
|
347
|
-
_: 1
|
|
348
|
-
}),
|
|
349
|
-
t(p, {
|
|
350
|
-
onClick: e[5] || (e[5] = (S) => c())
|
|
351
|
-
}, {
|
|
352
|
-
default: o(() => [...e[18] || (e[18] = [
|
|
353
|
-
v(" Continue ", -1)
|
|
354
|
-
])]),
|
|
355
|
-
_: 1
|
|
356
|
-
})
|
|
357
|
-
])
|
|
358
|
-
]),
|
|
359
|
-
_: 1
|
|
360
|
-
});
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
}), ie = { class: "mb-8" }, ue = { class: "mb-4 text-lg" }, re = {
|
|
364
|
-
key: 0,
|
|
365
|
-
class: "px-4 pb-2"
|
|
366
|
-
}, de = {
|
|
367
|
-
key: 1,
|
|
368
|
-
class: "px-4 pb-2"
|
|
369
|
-
}, me = { class: "text-sm text-muted-foreground" }, pe = {
|
|
370
|
-
key: 0,
|
|
371
|
-
class: "mb-4 text-lg"
|
|
372
|
-
}, ce = {
|
|
373
|
-
key: 1,
|
|
374
|
-
class: "mb-4 text-lg"
|
|
375
|
-
}, ve = { class: "mb-4 text-lg" }, fe = { class: "mb-4 text-lg" }, _e = { class: "flex gap-4 justify-end" }, ge = {
|
|
376
|
-
key: 0,
|
|
377
|
-
class: "flex gap-2"
|
|
378
|
-
}, xe = { key: 1 }, be = /* @__PURE__ */ I({
|
|
379
|
-
__name: "Step4",
|
|
380
|
-
setup(N) {
|
|
381
|
-
const { navigateTo: m } = z(), { config: g } = P(), x = O(g.project), c = [
|
|
382
|
-
{ value: 1, name: "Monday", short: "Mon" },
|
|
383
|
-
{ value: 2, name: "Tuesday", short: "Tue" },
|
|
384
|
-
{ value: 3, name: "Wednesday", short: "Wed" },
|
|
385
|
-
{ value: 4, name: "Thursday", short: "Thu" },
|
|
386
|
-
{ value: 5, name: "Friday", short: "Fri" },
|
|
387
|
-
{ value: 6, name: "Saturday", short: "Sat" },
|
|
388
|
-
{ value: 0, name: "Sunday", short: "Sun" }
|
|
389
|
-
], r = C("form"), e = C("activeStep", w(1)), d = w(!1), b = async () => {
|
|
390
|
-
try {
|
|
391
|
-
d.value = !0;
|
|
392
|
-
let i = JSON.parse(JSON.stringify(r));
|
|
393
|
-
i.type = "regular", i.capacity === "" || i.capacity === null ? delete i.capacity : i.capacity = Number(i.capacity), Object.entries(i.timeslots).forEach(([l, k]) => {
|
|
394
|
-
i.timeslots[l] = k.map((T) => ({
|
|
395
|
-
startTime: T.startTime,
|
|
396
|
-
endTime: T.endTime
|
|
397
|
-
}));
|
|
398
|
-
}), await x.add(g.agendaCollection, i), m("/");
|
|
399
|
-
} catch {
|
|
400
|
-
alert("Error creating agenda");
|
|
401
|
-
} finally {
|
|
402
|
-
d.value = !1;
|
|
403
|
-
}
|
|
404
|
-
};
|
|
405
|
-
return (i, l) => {
|
|
406
|
-
const k = s("TabsTrigger"), T = s("TabsList"), $ = s("TabsContent"), F = s("Tabs"), B = s("Button"), f = s("Spinner"), A = s("Card");
|
|
407
|
-
return a(), _(A, { class: "p-8" }, {
|
|
408
|
-
default: o(() => [
|
|
409
|
-
n("div", ie, [
|
|
410
|
-
l[2] || (l[2] = n("p", { class: "text-muted-foreground text-xs" }, "Service name", -1)),
|
|
411
|
-
n("p", ue, V(u(r).serviceName), 1),
|
|
412
|
-
l[3] || (l[3] = n("p", { class: "text-muted-foreground text-xs mb-2" }, "Standard timeslots", -1)),
|
|
413
|
-
t(F, {
|
|
414
|
-
"default-value": 1,
|
|
415
|
-
class: "max-w-lg bg-muted/50 rounded-md mb-4"
|
|
416
|
-
}, {
|
|
417
|
-
default: o(() => [
|
|
418
|
-
t(T, { class: "grid w-full grid-cols-7" }, {
|
|
419
|
-
default: o(() => [
|
|
420
|
-
(a(), y(M, null, j(c, (p) => t(k, {
|
|
421
|
-
key: p.value,
|
|
422
|
-
value: p.value
|
|
423
|
-
}, {
|
|
424
|
-
default: o(() => [
|
|
425
|
-
v(V(p.short), 1)
|
|
426
|
-
]),
|
|
427
|
-
_: 2
|
|
428
|
-
}, 1032, ["value"])), 64))
|
|
429
|
-
]),
|
|
430
|
-
_: 1
|
|
431
|
-
}),
|
|
432
|
-
(a(), y(M, null, j(c, (p) => t($, {
|
|
433
|
-
key: p.value,
|
|
434
|
-
value: p.value
|
|
435
|
-
}, {
|
|
436
|
-
default: o(() => [
|
|
437
|
-
u(r).timeslots[p.value]?.length > 0 ? (a(), y("div", re, [
|
|
438
|
-
(a(!0), y(M, null, j(u(r).timeslots[p.value], (L, S) => (a(), y("p", { key: S }, V(L.startTime) + " - " + V(L.endTime), 1))), 128))
|
|
439
|
-
])) : (a(), y("div", de, [
|
|
440
|
-
n("p", me, "No timeslots set for " + V(p.name) + ".", 1)
|
|
441
|
-
]))
|
|
442
|
-
]),
|
|
443
|
-
_: 2
|
|
444
|
-
}, 1032, ["value"])), 64))
|
|
445
|
-
]),
|
|
446
|
-
_: 1
|
|
447
|
-
}),
|
|
448
|
-
l[4] || (l[4] = n("p", { class: "text-muted-foreground text-xs" }, "Minimum Advance Notice", -1)),
|
|
449
|
-
u(r).minimumAdvanceNotice.value !== 0 ? (a(), y("p", pe, V(u(r).minimumAdvanceNotice.value) + " " + V(u(r).minimumAdvanceNotice.unit), 1)) : (a(), y("p", ce, " - ")),
|
|
450
|
-
l[5] || (l[5] = n("p", { class: "text-muted-foreground text-xs" }, "Booking window", -1)),
|
|
451
|
-
n("p", ve, V(u(r).serviceVisibility) + " days ", 1),
|
|
452
|
-
l[6] || (l[6] = n("p", { class: "text-muted-foreground text-xs" }, "Maximum Capacity Per Slot", -1)),
|
|
453
|
-
n("p", fe, V(u(r).capacity), 1)
|
|
454
|
-
]),
|
|
455
|
-
n("div", _e, [
|
|
456
|
-
t(B, {
|
|
457
|
-
variant: "outline",
|
|
458
|
-
onClick: l[0] || (l[0] = (p) => e.value = 3)
|
|
459
|
-
}, {
|
|
460
|
-
default: o(() => [...l[7] || (l[7] = [
|
|
461
|
-
v(" Back ", -1)
|
|
462
|
-
])]),
|
|
463
|
-
_: 1
|
|
464
|
-
}),
|
|
465
|
-
t(B, {
|
|
466
|
-
onClick: l[1] || (l[1] = (p) => b()),
|
|
467
|
-
disabled: d.value
|
|
468
|
-
}, {
|
|
469
|
-
default: o(() => [
|
|
470
|
-
d.value ? (a(), y("span", ge, [
|
|
471
|
-
t(f),
|
|
472
|
-
l[8] || (l[8] = v(" Creating... ", -1))
|
|
473
|
-
])) : (a(), y("span", xe, "Create Agenda"))
|
|
474
|
-
]),
|
|
475
|
-
_: 1
|
|
476
|
-
}, 8, ["disabled"])
|
|
477
|
-
])
|
|
478
|
-
]),
|
|
479
|
-
_: 1
|
|
480
|
-
});
|
|
481
|
-
};
|
|
482
|
-
}
|
|
483
|
-
}), ye = { class: "container mx-auto p-8" }, Se = { class: "max-w-7xl mx-auto" }, Ce = { class: "flex items-center gap-3 mb-8" }, ke = { class: "flex gap-6" }, Ve = { class: "w-80" }, Ne = { class: "flex-1" }, Ae = /* @__PURE__ */ I({
|
|
484
|
-
__name: "regular",
|
|
485
|
-
emits: ["back"],
|
|
486
|
-
setup(N, { emit: m }) {
|
|
487
|
-
const { navigateTo: g } = z();
|
|
488
|
-
R(() => [
|
|
489
|
-
{ text: "Create", href: "/create" },
|
|
490
|
-
{ text: "Regular Booking" }
|
|
491
|
-
]);
|
|
492
|
-
const x = D({
|
|
493
|
-
serviceName: "",
|
|
494
|
-
timeslots: {
|
|
495
|
-
1: [],
|
|
496
|
-
2: [],
|
|
497
|
-
3: [],
|
|
498
|
-
4: [],
|
|
499
|
-
5: [],
|
|
500
|
-
6: [],
|
|
501
|
-
0: []
|
|
502
|
-
},
|
|
503
|
-
minimumAdvanceNotice: {
|
|
504
|
-
value: 0,
|
|
505
|
-
unit: "minutes"
|
|
506
|
-
},
|
|
507
|
-
capacity: 1,
|
|
508
|
-
serviceVisibility: 60,
|
|
509
|
-
customerInformationFields: [
|
|
510
|
-
{
|
|
511
|
-
id: "1",
|
|
512
|
-
fieldName: "First Name",
|
|
513
|
-
fieldType: "text",
|
|
514
|
-
required: !0,
|
|
515
|
-
visible: !0,
|
|
516
|
-
isNativeField: !0
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
id: "2",
|
|
520
|
-
fieldName: "Last Name",
|
|
521
|
-
fieldType: "text",
|
|
522
|
-
required: !0,
|
|
523
|
-
visible: !0,
|
|
524
|
-
isNativeField: !0
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
id: "3",
|
|
528
|
-
fieldName: "Phone No",
|
|
529
|
-
fieldType: "tel",
|
|
530
|
-
required: !0,
|
|
531
|
-
visible: !0,
|
|
532
|
-
isNativeField: !0
|
|
533
|
-
},
|
|
534
|
-
{
|
|
535
|
-
id: "4",
|
|
536
|
-
fieldName: "Email",
|
|
537
|
-
fieldType: "email",
|
|
538
|
-
required: !0,
|
|
539
|
-
visible: !0,
|
|
540
|
-
isNativeField: !0
|
|
541
|
-
}
|
|
542
|
-
]
|
|
543
|
-
}), c = w([
|
|
544
|
-
{
|
|
545
|
-
step: 1,
|
|
546
|
-
title: "Product Selection",
|
|
547
|
-
completed: !1
|
|
548
|
-
},
|
|
549
|
-
{
|
|
550
|
-
step: 2,
|
|
551
|
-
title: "Slot Setup",
|
|
552
|
-
completed: !1
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
step: 3,
|
|
556
|
-
title: "Calculation & Visibility",
|
|
557
|
-
completed: !1
|
|
558
|
-
},
|
|
559
|
-
{
|
|
560
|
-
step: 4,
|
|
561
|
-
title: "Review & Publish",
|
|
562
|
-
completed: !1
|
|
563
|
-
}
|
|
564
|
-
]), r = w(1);
|
|
565
|
-
return G("form", x), G("steps", c), G("activeStep", r), (e, d) => {
|
|
566
|
-
const b = s("Button");
|
|
567
|
-
return a(), y("div", ye, [
|
|
568
|
-
n("div", Se, [
|
|
569
|
-
n("div", Ce, [
|
|
570
|
-
t(b, {
|
|
571
|
-
variant: "ghost",
|
|
572
|
-
size: "icon",
|
|
573
|
-
class: "rounded-lg",
|
|
574
|
-
onClick: d[0] || (d[0] = (i) => u(g)("/create"))
|
|
575
|
-
}, {
|
|
576
|
-
default: o(() => [
|
|
577
|
-
t(u(Y), { class: "w-5 h-5" })
|
|
578
|
-
]),
|
|
579
|
-
_: 1
|
|
580
|
-
}),
|
|
581
|
-
d[2] || (d[2] = n("h2", { class: "text-2xl font-semibold" }, "Agenda Selection", -1))
|
|
582
|
-
]),
|
|
583
|
-
n("div", ke, [
|
|
584
|
-
n("div", Ve, [
|
|
585
|
-
t(X, {
|
|
586
|
-
steps: c.value,
|
|
587
|
-
modelValue: r.value,
|
|
588
|
-
"onUpdate:modelValue": d[1] || (d[1] = (i) => r.value = i)
|
|
589
|
-
}, null, 8, ["steps", "modelValue"])
|
|
590
|
-
]),
|
|
591
|
-
n("div", Ne, [
|
|
592
|
-
r.value === 1 ? (a(), _(ee, { key: 0 })) : r.value === 2 ? (a(), _(se, { key: 1 })) : r.value === 3 ? (a(), _(ae, { key: 2 })) : r.value === 4 ? (a(), _(be, { key: 3 })) : U("", !0)
|
|
593
|
-
])
|
|
594
|
-
])
|
|
595
|
-
])
|
|
596
|
-
]);
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
});
|
|
600
|
-
export {
|
|
601
|
-
Ae as default
|
|
602
|
-
};
|
package/dist/regular-DFwPEbZO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),g=require("@oneclick.dev/cms-kit"),y=require("lucide-vue-next"),S=require("./RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js"),b={class:"flex flex-col gap-1"},B=e.defineComponent({__name:"StepNavigation",props:{modelValue:{type:Number,required:!0},steps:{type:Array,required:!0}},emits:["update:modelValue"],setup(f,{emit:a}){const u=f,c=a,i=e.computed({get:()=>u.modelValue,set:t=>{c("update:modelValue",t)}}),l=e.computed(()=>u.steps.filter(t=>t.completed).length);return(t,r)=>{const m=e.resolveComponent("StepperSeparator"),n=e.resolveComponent("Button"),o=e.resolveComponent("StepperTrigger"),v=e.resolveComponent("StepperTitle"),x=e.resolveComponent("StepperItem"),V=e.resolveComponent("Stepper"),_=e.resolveComponent("CardContent"),N=e.resolveComponent("Card");return e.openBlock(),e.createBlock(N,null,{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(V,{orientation:"vertical",class:"mx-auto flex w-full max-w-md flex-col justify-start gap-10",modelValue:i.value,"onUpdate:modelValue":r[0]||(r[0]=d=>i.value=d),linear:!1},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.steps,(d,C)=>(e.openBlock(),e.createBlock(x,{key:d.step,class:"relative flex w-full items-start gap-6",step:d.step,completed:d.completed,disabled:d.step>l.value+1,onClick:s=>i.value=d.step},{default:e.withCtx(({state:s})=>[d.step!==f.steps[f.steps.length-1].step?(e.openBlock(),e.createBlock(m,{key:0,class:"absolute left-[18px] top-[38px] block h-[105%] w-0.5 shrink-0 rounded-full bg-muted group-data-[state=completed]:bg-primary"})):e.createCommentVNode("",!0),e.createVNode(o,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(n,{variant:s==="completed"||s==="active"?"default":"outline",size:"icon",class:e.normalizeClass(["z-10 rounded-full shrink-0",[i.value===d.step&&"ring-2 ring-ring ring-offset-2 ring-offset-background"]])},{default:e.withCtx(()=>[i.value===d.step?(e.openBlock(),e.createBlock(e.unref(y.Circle),{key:0})):s==="completed"?(e.openBlock(),e.createBlock(e.unref(y.Check),{key:1,class:"size-5"})):s==="inactive"?(e.openBlock(),e.createBlock(e.unref(y.Dot),{key:2})):e.createCommentVNode("",!0)]),_:2},1032,["variant","class"])]),_:2},1024),e.createElementVNode("div",b,[e.createVNode(v,{class:e.normalizeClass([[i.value===d.step&&"text-primary",d.step>l.value+1&&"text-muted-foreground"],"text-sm font-semibold transition lg:text-base mt-1.5"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.title),1)]),_:2},1032,["class"])])]),_:2},1032,["step","completed","disabled","onClick"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})}}}),w={class:"mb-8"},T={class:"flex justify-end mt-8"},E=e.defineComponent({__name:"Step1",setup(f){const a=e.inject("form"),u=e.inject("steps"),c=e.inject("activeStep",e.ref(1)),i=()=>{if(a.serviceName=a.serviceName.trim(),!a.serviceName){alert("Please enter a service name.");return}u.value[0].completed=!0,c.value=2};return(l,t)=>{const r=e.resolveComponent("Label"),m=e.resolveComponent("Input"),n=e.resolveComponent("Button"),o=e.resolveComponent("Card");return e.openBlock(),e.createBlock(o,{class:"p-8"},{default:e.withCtx(()=>[e.createElementVNode("div",w,[e.createVNode(r,{for:"service-name",class:"text-base font-medium mb-2"},{default:e.withCtx(()=>[...t[2]||(t[2]=[e.createTextVNode(" Your Service Name ",-1)])]),_:1}),e.createVNode(m,{id:"service-name",modelValue:e.unref(a).serviceName,"onUpdate:modelValue":t[0]||(t[0]=v=>e.unref(a).serviceName=v),placeholder:"Enter service name",class:"mt-2"},null,8,["modelValue"]),t[3]||(t[3]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-2"}," How should customers refer to your service ",-1))]),e.createElementVNode("div",T,[e.createVNode(n,{onClick:t[1]||(t[1]=v=>i())},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Continue ",-1)])]),_:1})])]),_:1})}}}),$={class:"flex justify-end"},h={class:"flex gap-4"},j=e.defineComponent({__name:"Step2",setup(f){const a=e.inject("form"),u=e.inject("steps"),c=e.inject("activeStep",e.ref(1)),i=()=>{u.value[1].completed=!0,c.value=3};return(l,t)=>{const r=e.resolveComponent("Button"),m=e.resolveComponent("Card");return e.openBlock(),e.createBlock(m,{class:"p-8"},{default:e.withCtx(()=>[t[5]||(t[5]=e.createElementVNode("p",{class:"font-medium text-lg"}," Create regular time slots for your service. ",-1)),e.createVNode(S._sfc_main,{modelValue:e.unref(a).timeslots,"onUpdate:modelValue":t[0]||(t[0]=n=>e.unref(a).timeslots=n)},null,8,["modelValue"]),t[6]||(t[6]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",$,[e.createElementVNode("div",h,[e.createVNode(r,{variant:"outline",onClick:t[1]||(t[1]=n=>c.value=1)},{default:e.withCtx(()=>[...t[3]||(t[3]=[e.createTextVNode(" Back ",-1)])]),_:1}),e.createVNode(r,{onClick:t[2]||(t[2]=n=>i())},{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode(" Continue ",-1)])]),_:1})])])]),_:1})}}}),A={class:"mb-8"},I={class:"flex justify-end gap-4 mt-8"},D=e.defineComponent({__name:"Step3",setup(f){const a=e.inject("form"),u=e.inject("steps"),c=e.inject("activeStep",e.ref(1)),i=()=>{u.value[2].completed=!0,c.value=4};return(l,t)=>{const r=e.resolveComponent("Label"),m=e.resolveComponent("InputGroupInput"),n=e.resolveComponent("Search"),o=e.resolveComponent("InputGroupAddon"),v=e.resolveComponent("SelectValue"),x=e.resolveComponent("SelectTrigger"),V=e.resolveComponent("SelectItem"),_=e.resolveComponent("SelectGroup"),N=e.resolveComponent("SelectContent"),d=e.resolveComponent("Select"),C=e.resolveComponent("InputGroup"),s=e.resolveComponent("Button"),k=e.resolveComponent("Card");return e.openBlock(),e.createBlock(k,{class:"p-8"},{default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createVNode(r,{for:"lead-time",class:"text-base font-medium mb-2"},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode(" Minimum Advance Notice - Lead Time ",-1)])]),_:1}),e.createVNode(C,{class:"max-w-md"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"0",id:"lead-time",modelValue:e.unref(a).minimumAdvanceNotice.value,"onUpdate:modelValue":t[0]||(t[0]=p=>e.unref(a).minimumAdvanceNotice.value=p)},null,8,["modelValue"]),e.createVNode(o,null,{default:e.withCtx(()=>[e.createVNode(n)]),_:1}),e.createVNode(o,{align:"inline-end"},{default:e.withCtx(()=>[e.createVNode(d,{modelValue:e.unref(a).minimumAdvanceNotice.unit,"onUpdate:modelValue":t[1]||(t[1]=p=>e.unref(a).minimumAdvanceNotice.unit=p)},{default:e.withCtx(()=>[e.createVNode(x,{class:"w-[180px] border-0 bg-transparent -mr-1.5"},{default:e.withCtx(()=>[e.createVNode(v)]),_:1}),e.createVNode(N,null,{default:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[e.createVNode(V,{value:"minutes"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Minutes ",-1)])]),_:1}),e.createVNode(V,{value:"hours"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Hours ",-1)])]),_:1}),e.createVNode(V,{value:"days"},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode(" Days ",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),t[10]||(t[10]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-2"}," Set how far in advance a customer must book your slot. ",-1))]),t[19]||(t[19]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",null,[e.createVNode(r,{for:"capacity",class:"text-base font-medium mb-2"},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode(" Service Visibility ",-1)])]),_:1}),e.createVNode(C,{class:"max-w-md"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"1",id:"capacity",modelValue:e.unref(a).serviceVisibility,"onUpdate:modelValue":t[2]||(t[2]=p=>e.unref(a).serviceVisibility=p)},null,8,["modelValue"]),e.createVNode(o,null,{default:e.withCtx(()=>[e.createVNode(n)]),_:1}),e.createVNode(o,{align:"inline-end"},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode(" days ",-1)])]),_:1})]),_:1}),t[13]||(t[13]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-2"}," Set how many days in advance the service is visible to customers. ",-1))]),t[20]||(t[20]=e.createElementVNode("hr",null,null,-1)),e.createElementVNode("div",null,[e.createVNode(r,{for:"capacity",class:"text-base font-medium mb-2"},{default:e.withCtx(()=>[...t[14]||(t[14]=[e.createTextVNode(" Default Capacity ",-1)])]),_:1}),e.createVNode(C,{class:"max-w-md"},{default:e.withCtx(()=>[e.createVNode(m,{placeholder:"∞",type:"number",id:"capacity",class:"no-spinner",min:"1",modelValue:e.unref(a).capacity,"onUpdate:modelValue":t[3]||(t[3]=p=>e.unref(a).capacity=p)},null,8,["modelValue"]),e.createVNode(o,{align:"inline-end"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode(" available spots ",-1)])]),_:1})]),_:1}),t[16]||(t[16]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-2"}," Default number of bookings per time slot. ",-1))]),e.createElementVNode("div",I,[e.createVNode(s,{variant:"outline",onClick:t[4]||(t[4]=p=>c.value=2)},{default:e.withCtx(()=>[...t[17]||(t[17]=[e.createTextVNode(" Back ",-1)])]),_:1}),e.createVNode(s,{onClick:t[5]||(t[5]=p=>i())},{default:e.withCtx(()=>[...t[18]||(t[18]=[e.createTextVNode(" Continue ",-1)])]),_:1})])]),_:1})}}}),F={class:"mb-8"},L={class:"mb-4 text-lg"},M={key:0,class:"px-4 pb-2"},q={key:1,class:"px-4 pb-2"},G={class:"text-sm text-muted-foreground"},U={key:0,class:"mb-4 text-lg"},z={key:1,class:"mb-4 text-lg"},P={class:"mb-4 text-lg"},R={class:"mb-4 text-lg"},O={class:"flex gap-4 justify-end"},H={key:0,class:"flex gap-2"},J={key:1},W=e.defineComponent({__name:"Step4",setup(f){const{navigateTo:a}=g.useModuleRoute(),{config:u}=g.useModule(),c=g.useFirebaseIntegration(u.project),i=[{value:1,name:"Monday",short:"Mon"},{value:2,name:"Tuesday",short:"Tue"},{value:3,name:"Wednesday",short:"Wed"},{value:4,name:"Thursday",short:"Thu"},{value:5,name:"Friday",short:"Fri"},{value:6,name:"Saturday",short:"Sat"},{value:0,name:"Sunday",short:"Sun"}],l=e.inject("form"),t=e.inject("activeStep",e.ref(1)),r=e.ref(!1),m=async()=>{try{r.value=!0;let n=JSON.parse(JSON.stringify(l));n.type="regular",n.capacity===""||n.capacity===null?delete n.capacity:n.capacity=Number(n.capacity),Object.entries(n.timeslots).forEach(([o,v])=>{n.timeslots[o]=v.map(x=>({startTime:x.startTime,endTime:x.endTime}))}),await c.add(u.agendaCollection,n),a("/")}catch{alert("Error creating agenda")}finally{r.value=!1}};return(n,o)=>{const v=e.resolveComponent("TabsTrigger"),x=e.resolveComponent("TabsList"),V=e.resolveComponent("TabsContent"),_=e.resolveComponent("Tabs"),N=e.resolveComponent("Button"),d=e.resolveComponent("Spinner"),C=e.resolveComponent("Card");return e.openBlock(),e.createBlock(C,{class:"p-8"},{default:e.withCtx(()=>[e.createElementVNode("div",F,[o[2]||(o[2]=e.createElementVNode("p",{class:"text-muted-foreground text-xs"},"Service name",-1)),e.createElementVNode("p",L,e.toDisplayString(e.unref(l).serviceName),1),o[3]||(o[3]=e.createElementVNode("p",{class:"text-muted-foreground text-xs mb-2"},"Standard timeslots",-1)),e.createVNode(_,{"default-value":1,class:"max-w-lg bg-muted/50 rounded-md mb-4"},{default:e.withCtx(()=>[e.createVNode(x,{class:"grid w-full grid-cols-7"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,s=>e.createVNode(v,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.short),1)]),_:2},1032,["value"])),64))]),_:1}),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(i,s=>e.createVNode(V,{key:s.value,value:s.value},{default:e.withCtx(()=>[e.unref(l).timeslots[s.value]?.length>0?(e.openBlock(),e.createElementBlock("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(l).timeslots[s.value],(k,p)=>(e.openBlock(),e.createElementBlock("p",{key:p},e.toDisplayString(k.startTime)+" - "+e.toDisplayString(k.endTime),1))),128))])):(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("p",G,"No timeslots set for "+e.toDisplayString(s.name)+".",1)]))]),_:2},1032,["value"])),64))]),_:1}),o[4]||(o[4]=e.createElementVNode("p",{class:"text-muted-foreground text-xs"},"Minimum Advance Notice",-1)),e.unref(l).minimumAdvanceNotice.value!==0?(e.openBlock(),e.createElementBlock("p",U,e.toDisplayString(e.unref(l).minimumAdvanceNotice.value)+" "+e.toDisplayString(e.unref(l).minimumAdvanceNotice.unit),1)):(e.openBlock(),e.createElementBlock("p",z," - ")),o[5]||(o[5]=e.createElementVNode("p",{class:"text-muted-foreground text-xs"},"Booking window",-1)),e.createElementVNode("p",P,e.toDisplayString(e.unref(l).serviceVisibility)+" days ",1),o[6]||(o[6]=e.createElementVNode("p",{class:"text-muted-foreground text-xs"},"Maximum Capacity Per Slot",-1)),e.createElementVNode("p",R,e.toDisplayString(e.unref(l).capacity),1)]),e.createElementVNode("div",O,[e.createVNode(N,{variant:"outline",onClick:o[0]||(o[0]=s=>t.value=3)},{default:e.withCtx(()=>[...o[7]||(o[7]=[e.createTextVNode(" Back ",-1)])]),_:1}),e.createVNode(N,{onClick:o[1]||(o[1]=s=>m()),disabled:r.value},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("span",H,[e.createVNode(d),o[8]||(o[8]=e.createTextVNode(" Creating... ",-1))])):(e.openBlock(),e.createElementBlock("span",J,"Create Agenda"))]),_:1},8,["disabled"])])]),_:1})}}}),K={class:"container mx-auto p-8"},Y={class:"max-w-7xl mx-auto"},Q={class:"flex items-center gap-3 mb-8"},X={class:"flex gap-6"},Z={class:"w-80"},ee={class:"flex-1"},te=e.defineComponent({__name:"regular",emits:["back"],setup(f,{emit:a}){const{navigateTo:u}=g.useModuleRoute();g.useModuleBreadcrumbs(()=>[{text:"Create",href:"/create"},{text:"Regular Booking"}]);const c=e.reactive({serviceName:"",timeslots:{1:[],2:[],3:[],4:[],5:[],6:[],0:[]},minimumAdvanceNotice:{value:0,unit:"minutes"},capacity:1,serviceVisibility:60,customerInformationFields:[{id:"1",fieldName:"First Name",fieldType:"text",required:!0,visible:!0,isNativeField:!0},{id:"2",fieldName:"Last Name",fieldType:"text",required:!0,visible:!0,isNativeField:!0},{id:"3",fieldName:"Phone No",fieldType:"tel",required:!0,visible:!0,isNativeField:!0},{id:"4",fieldName:"Email",fieldType:"email",required:!0,visible:!0,isNativeField:!0}]}),i=e.ref([{step:1,title:"Product Selection",completed:!1},{step:2,title:"Slot Setup",completed:!1},{step:3,title:"Calculation & Visibility",completed:!1},{step:4,title:"Review & Publish",completed:!1}]),l=e.ref(1);return e.provide("form",c),e.provide("steps",i),e.provide("activeStep",l),(t,r)=>{const m=e.resolveComponent("Button");return e.openBlock(),e.createElementBlock("div",K,[e.createElementVNode("div",Y,[e.createElementVNode("div",Q,[e.createVNode(m,{variant:"ghost",size:"icon",class:"rounded-lg",onClick:r[0]||(r[0]=n=>e.unref(u)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(y.ArrowLeft),{class:"w-5 h-5"})]),_:1}),r[2]||(r[2]=e.createElementVNode("h2",{class:"text-2xl font-semibold"},"Agenda Selection",-1))]),e.createElementVNode("div",X,[e.createElementVNode("div",Z,[e.createVNode(B,{steps:i.value,modelValue:l.value,"onUpdate:modelValue":r[1]||(r[1]=n=>l.value=n)},null,8,["steps","modelValue"])]),e.createElementVNode("div",ee,[l.value===1?(e.openBlock(),e.createBlock(E,{key:0})):l.value===2?(e.openBlock(),e.createBlock(j,{key:1})):l.value===3?(e.openBlock(),e.createBlock(D,{key:2})):l.value===4?(e.openBlock(),e.createBlock(W,{key:3})):e.createCommentVNode("",!0)])])])])}}});exports.default=te;
|