@oneclick.dev/cms-core-modules 0.0.52 → 0.0.54
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/CalendarDate-CRT2Viyt.mjs +830 -0
- package/dist/CalendarDate-CWtpXgpD.js +1 -0
- package/dist/Components-D9yIIosM.mjs +623 -0
- package/dist/Components-DXbx0RLV.js +1 -0
- package/dist/ContentEditor-DRJFQKCv.mjs +34915 -0
- package/dist/ContentEditor-DzTi8fSZ.js +290 -0
- package/dist/Create-BP8TX6rj.js +1 -0
- package/dist/Create-Bwf1RXdG.mjs +1248 -0
- package/dist/DateFormatter-BbcSwTs4.js +1 -0
- package/dist/DateFormatter-CbO0PVUK.mjs +99 -0
- package/dist/Detail-B-PnkcXD.mjs +3473 -0
- package/dist/Detail-BVlGSjOq.mjs +380 -0
- package/dist/Detail-C4E1T87K.mjs +26 -0
- package/dist/Detail-CNfTDUE5.js +1 -0
- package/dist/Detail-Cd5CBVN0.js +1 -0
- package/dist/Detail-CpfOQChd.mjs +585 -0
- package/dist/Detail-CwagT6gQ.mjs +650 -0
- package/dist/Detail-DUo6qKqO.js +1 -0
- package/dist/Detail-Dd_OkpcN.js +1 -0
- package/dist/Detail-mvSGbnFU.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +55 -0
- package/dist/Entries-DcpPvlYj.js +1 -0
- package/dist/Entries-QLMtTYLX.mjs +713 -0
- package/dist/Find-BPR0uU-Z.mjs +229 -0
- package/dist/Find-BidEQJxT.js +1 -0
- package/dist/GlobalStyling-CMzPRd18.js +17 -0
- package/dist/GlobalStyling-DoLHUJeV.mjs +988 -0
- package/dist/Overview-BDlBCUI_.js +1 -0
- package/dist/Overview-BH3NwvNX.mjs +26 -0
- package/dist/Overview-BLsZMHNW.mjs +178 -0
- package/dist/Overview-BNMZ9MUK.js +1 -0
- package/dist/Overview-BbvfH1u-.js +1 -0
- package/dist/Overview-CDN88OSM.mjs +190 -0
- package/dist/Overview-CEPodGCn.mjs +311 -0
- package/dist/Overview-CvquDPhB.js +1 -0
- package/dist/Overview-D54pjmI6.mjs +633 -0
- package/dist/Overview-D67UjG6n.mjs +947 -0
- package/dist/Overview-KT2Mgfh5.js +1 -0
- package/dist/Overview-T-lsy3UZ.js +1 -0
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +1 -0
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +392 -0
- package/dist/TableView-CpO53xcX.js +111 -0
- package/dist/TableView-D9J5rUls.mjs +72921 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-B_AtWnHa.js +1 -0
- package/dist/TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs +40 -0
- package/dist/View-DlHBZbFu.js +1 -0
- package/dist/View-Dv5QMrSn.mjs +25 -0
- package/dist/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/agenda-B49oKGeh.mjs +706 -0
- package/dist/agenda-DipQ5IWP.js +1 -0
- package/dist/availability-C7q9tq6l.js +1 -0
- package/dist/availability-DeCkqiu8.mjs +613 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/countries-BTPvmrsb.mjs +4 -0
- package/dist/countries-CgZ081No.js +1 -0
- package/dist/exceptions-D3b18TiY.mjs +647 -0
- package/dist/exceptions-DJ9zWX3k.js +1 -0
- package/dist/floating-ui.dom-C82nbomj.js +1 -0
- package/dist/floating-ui.dom-ouSgPqty.mjs +1133 -0
- package/dist/google-CvtuJwgk.mjs +4 -0
- package/dist/google-D4N3gb01.js +1 -0
- package/dist/index--jjEzba7.mjs +24 -0
- package/dist/index-9HVlmvK3.js +1 -0
- package/dist/index-BEGU8Kme.mjs +12 -0
- package/dist/index-Bwi1mtkq.mjs +24 -0
- package/dist/index-BzuHN-r8.mjs +24 -0
- package/dist/index-CImCyE3L.mjs +24 -0
- package/dist/index-CKPshlZ8-BQiiP6r_.mjs +1264 -0
- package/dist/index-CKPshlZ8-CIz1tDwX.js +1 -0
- package/dist/index-CQiY-oTN.mjs +24 -0
- package/dist/index-CSxYBeVA.js +1 -0
- package/dist/index-CkiNvRzs.js +1 -0
- package/dist/index-Co4ON2Di.js +1 -0
- package/dist/index-CwqrAU-H.js +1 -0
- package/dist/index-Cz-baGax.js +1 -0
- package/dist/index-D2a6wEPh.js +1 -0
- package/dist/index-DFQGVHTs.js +1 -0
- package/dist/index-DI6mydpm.mjs +138 -0
- package/dist/index-DMoyoaks.mjs +22 -0
- package/dist/index-DT1wWnUk.mjs +24 -0
- package/dist/index-DUeFrD-B.js +1 -0
- package/dist/index-DsnoK4ia.mjs +579 -0
- package/dist/index-R2oUDsjx.js +1 -0
- package/dist/index-RLz1QPrf.mjs +203 -0
- package/dist/index-UtjLbLw-.js +1 -0
- package/dist/index-_mG-aU3Z.mjs +87 -0
- package/dist/index-_sQDF1pH.js +1 -0
- package/dist/index-ijdf0d9-.js +1 -0
- package/dist/index-klI238nT.mjs +24 -0
- package/dist/index.cjs.js +1 -357
- package/dist/index.mjs +287 -69281
- package/dist/interpolation-BNUjI7LH.js +1 -0
- package/dist/interpolation-BpGXqOz8.mjs +59 -0
- package/dist/payment-kTjsV0Jj.js +1 -0
- package/dist/payment-zpCM0LD-.mjs +981 -0
- package/dist/regular-C4_3YXqx.mjs +602 -0
- package/dist/regular-DFwPEbZO.js +1 -0
- package/dist/regular-slots-4ooEpICB.mjs +67 -0
- package/dist/regular-slots-BAVGbomI.js +1 -0
- package/dist/resources-MpQkSstv.mjs +563 -0
- package/dist/resources-iM28T3dD.js +1 -0
- package/dist/src/appointments/components/edit/PaymentAddons/Addon.vue.d.ts +12 -2
- package/dist/src/appointments/index.d.ts +4 -28
- package/dist/src/appointments/routes.d.ts +3 -9
- package/dist/src/content-manager/index.d.ts +5 -147
- package/dist/src/content-manager/routes.d.ts +4 -128
- package/dist/src/custom/index.d.ts +2 -2
- package/dist/src/custom/routes.d.ts +1 -1
- package/dist/src/lib/interpolation.d.ts +2 -2
- package/dist/src/mail-templates/index.d.ts +2 -30
- package/dist/src/mail-templates/routes.d.ts +1 -11
- package/dist/src/product-collections/index.d.ts +2 -30
- package/dist/src/product-collections/routes.d.ts +1 -11
- package/dist/src/products/index.d.ts +2 -30
- package/dist/src/products/routes.d.ts +1 -11
- package/dist/src/promo-codes/index.d.ts +2 -30
- package/dist/src/promo-codes/routes.d.ts +1 -11
- package/dist/src/shipping-options/index.d.ts +2 -30
- package/dist/src/shipping-options/routes.d.ts +1 -11
- package/dist/src/table/index.d.ts +2 -70
- package/dist/src/table/routes.d.ts +1 -51
- package/dist/utils-BVKy9S2J.mjs +29 -0
- package/dist/utils-D6CaKJbp.js +2 -0
- package/dist/vee-validate-zod-BPQyEfpF.js +1 -0
- package/dist/vee-validate-zod-IXkfh-6Q.mjs +4402 -0
- package/package.json +28 -29
|
@@ -0,0 +1,602 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|