@oneclick.dev/cms-core-modules 0.0.114 → 0.0.116
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/{ContentEditor-MctMvN7D.js → ContentEditor-CsbOFg3a.js} +52 -52
- package/dist/{ContentEditor-C5yNNLeV.mjs → ContentEditor-Df5uWpVC.mjs} +10337 -8677
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-gozJKXvM.js +1 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-pDO9b4Pv.mjs +77 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BHeMJ6nr.mjs +1476 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-C2zwt5UF.js +1 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-BYSeUW_V.js +925 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-DwAUYR8p.mjs +5021 -0
- package/dist/Overview-CBahJviK.js +1 -0
- package/dist/Overview-CVQ1pkuD.mjs +527 -0
- package/dist/TableView-Csv5Lycy.mjs +6234 -0
- package/dist/TableView-Cwal0BPW.js +4 -0
- package/dist/agenda-BSdlrfxv.mjs +1253 -0
- package/dist/agenda-Bev1mO7E.js +1 -0
- package/dist/availability-ClBGVgE9.js +1 -0
- package/dist/availability-D8JdA4rP.mjs +274 -0
- package/dist/booking-data-Px7XCIfU.mjs +1024 -0
- package/dist/booking-data-aMS1p_3g.js +1 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/exceptions-CqityDo9.mjs +651 -0
- package/dist/exceptions-DXqc0Nza.js +1 -0
- package/dist/index-CM4eaK5T.mjs +1245 -0
- package/dist/index-DliTZzwI.js +35 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +12 -11
- package/dist/orders-1swJVKw2.js +1 -0
- package/dist/orders-D41GbzIa.mjs +624 -0
- package/dist/payment-BJHgpaeT.js +1 -0
- package/dist/payment-D5j-68Ig.mjs +1278 -0
- package/dist/refunds-D9nTeD2d.mjs +436 -0
- package/dist/refunds-oVB2Opib.js +1 -0
- package/dist/resources-8WouFvJe.js +1 -0
- package/dist/resources-B-D5MUhV.mjs +975 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +626 -515
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +146 -5
- package/dist/src/appointments/components/edit/EventDialog/CancelRefundReservationDialog.vue.d.ts +33 -0
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +26 -8
- package/dist/src/appointments/components/edit/EventDialog/RefundDetailsDisplay.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +91 -5
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +20 -3
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +5 -0
- package/dist/src/appointments/components/edit/OrderMetadataDisplay.vue.d.ts +20 -2
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +240 -0
- package/dist/src/appointments/composables/useAgendaMetadataSchema.d.ts +37 -0
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +225 -0
- package/dist/src/appointments/pages/edit/refunds.vue.d.ts +2 -0
- package/dist/src/appointments/server.d.ts +2 -0
- package/dist/src/appointments/types.d.ts +6 -0
- package/dist/src/appointments/utils/printReservation.d.ts +65 -3
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/Table.d.ts +36 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/Table.vue.d.ts +95 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/TableCell.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/TableHeader.d.ts +6 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/TableRow.d.ts +6 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/table/index.d.ts +4 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/TableMenu.vue.d.ts +13 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/element-editor-views/index.d.ts +14 -0
- package/package.json +2 -2
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-DWMqQvHl.mjs +0 -76
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-kpjbVSXg.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Baqy-rTT.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Dx4Bpa2m.mjs +0 -1263
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +0 -1
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +0 -330
- package/dist/Overview-98nkJUWN.mjs +0 -481
- package/dist/Overview-Dl8cMlsr.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +0 -349
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +0 -3077
- package/dist/TableView-CVfkyj1k.js +0 -4
- package/dist/TableView-zDx0IegJ.mjs +0 -6096
- package/dist/agenda-BaJu3-1c.js +0 -1
- package/dist/agenda-BwVY_8oM.mjs +0 -1165
- package/dist/availability-CMrRa5y2.mjs +0 -269
- package/dist/availability-Cf2YfMwM.js +0 -1
- package/dist/booking-data-DgJd0BcM.mjs +0 -889
- package/dist/booking-data-Di5GmH_8.js +0 -1
- package/dist/exceptions-B6P9UiCj.js +0 -1
- package/dist/exceptions-De9-FvdP.mjs +0 -646
- package/dist/index-DL6orwdK.js +0 -35
- package/dist/index-hH3e-IYz.mjs +0 -1187
- package/dist/orders-C65SlpJy.mjs +0 -618
- package/dist/orders-XVzWAgG1.js +0 -1
- package/dist/payment-C3ohkehF.mjs +0 -1080
- package/dist/payment-Dfr-Ro-a.js +0 -1
- package/dist/resources-CxeFd57z.js +0 -1
- package/dist/resources-DwYxn2Vi.mjs +0 -811
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _e, ref as z, computed as L, resolveComponent as u, openBlock as d, createElementBlock as f, Fragment as F, createElementVNode as o, createVNode as n, createBlock as k, withCtx as s, unref as i, createTextVNode as m, createCommentVNode as x, toDisplayString as g, renderList as ye, normalizeClass as H, normalizeStyle as J, withModifiers as N } from "vue";
|
|
2
|
-
import { useModule as xe, useFirebaseIntegration as be, useModuleRoute as Ce, useConfirmation as ke, useModulePermissions as we, useModuleBreadcrumbs as he } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { CalendarX as Ae, PlusIcon as Y, Search as q, MoreHorizontalIcon as Q, ImportIcon as Ee, Upload as X, CheckCircle2 as Me, Clock as $e, DollarSign as ze, Users as De, CalendarDays as K, Copy as Ie, ChevronsLeftRightEllipsis as Ne, Trash2Icon as Se } from "lucide-vue-next";
|
|
4
|
-
const je = { class: "container @container mx-auto py-8" }, Te = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "flex justify-center py-24"
|
|
7
|
-
}, Ve = { class: "flex gap-2" }, Be = { key: 2 }, Ue = { class: "flex flex-col gap-4 mb-6 @md:flex-row @md:items-end @md:justify-between" }, Oe = { class: "flex flex-wrap items-center gap-2" }, Re = { class: "relative" }, Pe = {
|
|
8
|
-
key: 0,
|
|
9
|
-
class: "flex flex-wrap items-center justify-between gap-3 mb-4 px-4 py-3 rounded-lg border bg-muted/40"
|
|
10
|
-
}, Ge = { class: "flex items-center gap-3" }, Le = { class: "text-sm font-medium" }, Fe = { class: "flex items-center gap-2" }, He = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "flex flex-col items-center justify-center py-16 text-center border border-dashed rounded-lg"
|
|
13
|
-
}, Je = { class: "font-medium" }, Ye = {
|
|
14
|
-
key: 2,
|
|
15
|
-
class: "grid gap-4 @md:grid-cols-2 @3xl:grid-cols-3"
|
|
16
|
-
}, qe = ["onClick"], Qe = ["onClick"], Xe = { class: "flex items-start gap-3" }, Ke = ["onClick"], We = { class: "text-base font-semibold leading-tight line-clamp-1" }, Ze = { class: "flex items-center gap-2 mt-1" }, et = {
|
|
17
|
-
key: 0,
|
|
18
|
-
class: "text-xs text-muted-foreground cursor-pointer"
|
|
19
|
-
}, tt = {
|
|
20
|
-
key: 0,
|
|
21
|
-
class: "shrink-0"
|
|
22
|
-
}, nt = { class: "grid grid-cols-3 gap-2 mt-5" }, ot = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, st = { class: "flex items-center gap-1 text-muted-foreground" }, lt = { class: "text-sm font-semibold" }, it = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, rt = { class: "flex items-center gap-1 text-muted-foreground" }, at = { class: "text-sm font-semibold" }, dt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, ut = { class: "flex items-center gap-1 text-muted-foreground" }, ct = { class: "text-sm font-semibold" }, pt = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "flex items-center justify-between gap-2 px-5 py-3 border-t bg-muted/20"
|
|
25
|
-
}, _t = /* @__PURE__ */ _e({
|
|
26
|
-
__name: "Overview",
|
|
27
|
-
setup(mt) {
|
|
28
|
-
const { config: w } = xe(), M = be(w.project), { navigateTo: h } = Ce(), { confirm: W } = ke(), { hasPermission: v } = we();
|
|
29
|
-
he(() => []);
|
|
30
|
-
const _ = z(null), D = z(""), c = z(!1), r = z([]), j = z("importAgendasInput"), b = L(() => {
|
|
31
|
-
if (!_.value) return [];
|
|
32
|
-
const t = D.value.trim().toLowerCase();
|
|
33
|
-
return t ? _.value.filter(
|
|
34
|
-
(e) => (e.serviceName || "").toLowerCase().includes(t)
|
|
35
|
-
) : _.value;
|
|
36
|
-
}), T = L(
|
|
37
|
-
() => b.value.length > 0 && b.value.every((t) => r.value.includes(t.id))
|
|
38
|
-
), Z = () => {
|
|
39
|
-
if (T.value) {
|
|
40
|
-
const t = b.value.map((e) => e.id);
|
|
41
|
-
r.value = r.value.filter((e) => !t.includes(e));
|
|
42
|
-
} else {
|
|
43
|
-
const t = b.value.map((a) => a.id), e = /* @__PURE__ */ new Set([...r.value, ...t]);
|
|
44
|
-
r.value = Array.from(e);
|
|
45
|
-
}
|
|
46
|
-
}, V = (t) => {
|
|
47
|
-
r.value.includes(t) ? r.value = r.value.filter((e) => e !== t) : r.value.push(t);
|
|
48
|
-
}, ee = (t) => {
|
|
49
|
-
if (!t) return "??";
|
|
50
|
-
const e = t.trim().split(/\s+/);
|
|
51
|
-
return e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
|
|
52
|
-
}, B = [
|
|
53
|
-
{ fg: "#7c3aed", bg: "rgba(124, 58, 237, 0.12)" },
|
|
54
|
-
// violet
|
|
55
|
-
{ fg: "#0891b2", bg: "rgba(8, 145, 178, 0.12)" },
|
|
56
|
-
// cyan
|
|
57
|
-
{ fg: "#ea580c", bg: "rgba(234, 88, 12, 0.12)" },
|
|
58
|
-
// orange
|
|
59
|
-
{ fg: "#16a34a", bg: "rgba(22, 163, 74, 0.12)" },
|
|
60
|
-
// green
|
|
61
|
-
{ fg: "#2563eb", bg: "rgba(37, 99, 235, 0.12)" },
|
|
62
|
-
// blue
|
|
63
|
-
{ fg: "#db2777", bg: "rgba(219, 39, 119, 0.12)" },
|
|
64
|
-
// pink
|
|
65
|
-
{ fg: "#475569", bg: "rgba(71, 85, 105, 0.12)" }
|
|
66
|
-
// slate
|
|
67
|
-
], S = (t) => {
|
|
68
|
-
const e = (t.id || t.serviceName || "").toString();
|
|
69
|
-
let a = 0;
|
|
70
|
-
for (let p = 0; p < e.length; p++) a = a * 31 + e.charCodeAt(p) >>> 0;
|
|
71
|
-
return B[a % B.length];
|
|
72
|
-
}, te = (t) => {
|
|
73
|
-
const e = t?.pricingOptions?.[0];
|
|
74
|
-
return e?.duration ? `${e.duration} min` : null;
|
|
75
|
-
}, ne = (t) => {
|
|
76
|
-
const e = t?.pricingOptions?.[0];
|
|
77
|
-
return e?.price === void 0 || e?.price === null || e?.price === "" ? null : `${t.currency === "EUR" ? "€" : "$"}${e.price}`;
|
|
78
|
-
}, oe = (t) => Array.isArray(t?.resources) ? t.resources.filter((e) => e?.isActive !== !1).length : 0, se = (t) => t.type === "regular" ? "Regular" : t.type ? t.type.charAt(0).toUpperCase() + t.type.slice(1) : "Agenda", le = (t) => {
|
|
79
|
-
c.value = !0, r.value = [t];
|
|
80
|
-
}, I = async () => {
|
|
81
|
-
_.value = await M.find(w.agendaCollection);
|
|
82
|
-
}, ie = async (t) => {
|
|
83
|
-
if (!v("create-agendas")) return;
|
|
84
|
-
const e = await M.get(w.agendaCollection, t);
|
|
85
|
-
if (!e) {
|
|
86
|
-
alert("Agenda not found");
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
const a = prompt("Enter name for duplicated agenda", e.serviceName + " (Copy)");
|
|
90
|
-
if (!a)
|
|
91
|
-
return;
|
|
92
|
-
const p = { ...e, serviceName: a };
|
|
93
|
-
delete p.id, await M.add(w.agendaCollection, p), await I();
|
|
94
|
-
}, re = async (t) => {
|
|
95
|
-
!v("delete-agendas") || !await W("Are you sure you want to delete this agenda? This action cannot be undone.") || (await M.remove(w.agendaCollection, t), await I());
|
|
96
|
-
}, ae = async () => {
|
|
97
|
-
if (!_.value) return;
|
|
98
|
-
let t = _.value.filter((p) => r.value.includes(p.id));
|
|
99
|
-
t = t.map((p) => {
|
|
100
|
-
const { id: A, ...E } = p;
|
|
101
|
-
return E;
|
|
102
|
-
});
|
|
103
|
-
const e = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(t, null, 2)), a = document.createElement("a");
|
|
104
|
-
a.setAttribute("href", e), a.setAttribute("download", "agendas_export.json"), document.body.appendChild(a), a.click(), a.remove(), c.value = !1, r.value = [];
|
|
105
|
-
}, de = async (t) => {
|
|
106
|
-
const e = t.target;
|
|
107
|
-
if (!e.files || e.files.length === 0)
|
|
108
|
-
return;
|
|
109
|
-
const p = await e.files[0].text();
|
|
110
|
-
let A;
|
|
111
|
-
try {
|
|
112
|
-
A = JSON.parse(p);
|
|
113
|
-
} catch {
|
|
114
|
-
alert("Invalid JSON file");
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
if (!Array.isArray(A)) {
|
|
118
|
-
alert("Invalid agendas format");
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
for (const E of A)
|
|
122
|
-
await M.add(w.agendaCollection, E);
|
|
123
|
-
e.value = "", await I();
|
|
124
|
-
}, U = (t) => {
|
|
125
|
-
c.value || (v("edit-agendas") ? h(`/edit/${t}`) : h(`/edit/${t}/agenda`));
|
|
126
|
-
};
|
|
127
|
-
return I(), (t, e) => {
|
|
128
|
-
const a = u("Spinner"), p = u("EmptyMedia"), A = u("EmptyTitle"), E = u("EmptyDescription"), ue = u("EmptyHeader"), y = u("Button"), ce = u("EmptyContent"), pe = u("Empty"), me = u("Input"), O = u("DropdownMenuTrigger"), $ = u("DropdownMenuItem"), R = u("DropdownMenuGroup"), P = u("DropdownMenuContent"), G = u("DropdownMenu"), fe = u("ButtonGroup"), ge = u("Checkbox"), ve = u("Badge");
|
|
129
|
-
return d(), f(F, null, [
|
|
130
|
-
o("div", je, [
|
|
131
|
-
_.value === null ? (d(), f("div", Te, [
|
|
132
|
-
n(a, { class: "mx-auto" })
|
|
133
|
-
])) : _.value.length === 0 ? (d(), k(pe, { key: 1 }, {
|
|
134
|
-
default: s(() => [
|
|
135
|
-
n(ue, null, {
|
|
136
|
-
default: s(() => [
|
|
137
|
-
n(p, { variant: "icon" }, {
|
|
138
|
-
default: s(() => [
|
|
139
|
-
n(i(Ae), { class: "size-4-6" })
|
|
140
|
-
]),
|
|
141
|
-
_: 1
|
|
142
|
-
}),
|
|
143
|
-
n(A, null, {
|
|
144
|
-
default: s(() => [...e[6] || (e[6] = [
|
|
145
|
-
m("No Agendas Yet", -1)
|
|
146
|
-
])]),
|
|
147
|
-
_: 1
|
|
148
|
-
}),
|
|
149
|
-
n(E, null, {
|
|
150
|
-
default: s(() => [...e[7] || (e[7] = [
|
|
151
|
-
m(" You haven't created any agenda yet. Get started by creating your first agenda. ", -1)
|
|
152
|
-
])]),
|
|
153
|
-
_: 1
|
|
154
|
-
})
|
|
155
|
-
]),
|
|
156
|
-
_: 1
|
|
157
|
-
}),
|
|
158
|
-
n(ce, null, {
|
|
159
|
-
default: s(() => [
|
|
160
|
-
o("div", Ve, [
|
|
161
|
-
n(y, {
|
|
162
|
-
onClick: e[0] || (e[0] = (l) => i(h)("/create"))
|
|
163
|
-
}, {
|
|
164
|
-
default: s(() => [
|
|
165
|
-
n(i(Y)),
|
|
166
|
-
e[8] || (e[8] = m(" Create Agenda ", -1))
|
|
167
|
-
]),
|
|
168
|
-
_: 1
|
|
169
|
-
})
|
|
170
|
-
])
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
})
|
|
174
|
-
]),
|
|
175
|
-
_: 1
|
|
176
|
-
})) : (d(), f("div", Be, [
|
|
177
|
-
o("div", Ue, [
|
|
178
|
-
e[11] || (e[11] = o("div", null, [
|
|
179
|
-
o("h2", { class: "text-3xl font-bold tracking-tight" }, "Agendas"),
|
|
180
|
-
o("p", { class: "text-sm text-muted-foreground mt-1" }, " Manage your bookable services, hours and resources. ")
|
|
181
|
-
], -1)),
|
|
182
|
-
o("div", Oe, [
|
|
183
|
-
o("div", Re, [
|
|
184
|
-
n(i(q), { class: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
|
|
185
|
-
n(me, {
|
|
186
|
-
modelValue: D.value,
|
|
187
|
-
"onUpdate:modelValue": e[1] || (e[1] = (l) => D.value = l),
|
|
188
|
-
placeholder: "Search agendas...",
|
|
189
|
-
class: "pl-9 w-full @md:w-64"
|
|
190
|
-
}, null, 8, ["modelValue"])
|
|
191
|
-
]),
|
|
192
|
-
!c.value && i(v)("create-agendas") ? (d(), k(fe, { key: 0 }, {
|
|
193
|
-
default: s(() => [
|
|
194
|
-
n(y, {
|
|
195
|
-
onClick: e[2] || (e[2] = (l) => i(h)("/create"))
|
|
196
|
-
}, {
|
|
197
|
-
default: s(() => [
|
|
198
|
-
n(i(Y)),
|
|
199
|
-
e[9] || (e[9] = m(" New Agenda ", -1))
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
}),
|
|
203
|
-
n(G, null, {
|
|
204
|
-
default: s(() => [
|
|
205
|
-
n(O, { "as-child": "" }, {
|
|
206
|
-
default: s(() => [
|
|
207
|
-
n(y, {
|
|
208
|
-
size: "icon",
|
|
209
|
-
"aria-label": "More Options"
|
|
210
|
-
}, {
|
|
211
|
-
default: s(() => [
|
|
212
|
-
n(i(Q))
|
|
213
|
-
]),
|
|
214
|
-
_: 1
|
|
215
|
-
})
|
|
216
|
-
]),
|
|
217
|
-
_: 1
|
|
218
|
-
}),
|
|
219
|
-
n(P, {
|
|
220
|
-
align: "end",
|
|
221
|
-
class: "w-52"
|
|
222
|
-
}, {
|
|
223
|
-
default: s(() => [
|
|
224
|
-
n(R, null, {
|
|
225
|
-
default: s(() => [
|
|
226
|
-
n($, {
|
|
227
|
-
onClick: e[3] || (e[3] = (l) => j.value.click())
|
|
228
|
-
}, {
|
|
229
|
-
default: s(() => [
|
|
230
|
-
n(i(Ee)),
|
|
231
|
-
e[10] || (e[10] = m(" Import Agendas... ", -1))
|
|
232
|
-
]),
|
|
233
|
-
_: 1
|
|
234
|
-
})
|
|
235
|
-
]),
|
|
236
|
-
_: 1
|
|
237
|
-
})
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
})
|
|
241
|
-
]),
|
|
242
|
-
_: 1
|
|
243
|
-
})
|
|
244
|
-
]),
|
|
245
|
-
_: 1
|
|
246
|
-
})) : x("", !0)
|
|
247
|
-
])
|
|
248
|
-
]),
|
|
249
|
-
c.value ? (d(), f("div", Pe, [
|
|
250
|
-
o("div", Ge, [
|
|
251
|
-
n(ge, {
|
|
252
|
-
modelValue: T.value,
|
|
253
|
-
"onUpdate:modelValue": Z
|
|
254
|
-
}, null, 8, ["modelValue"]),
|
|
255
|
-
o("span", Le, g(r.value.length) + " of " + g(b.value.length) + " selected ", 1)
|
|
256
|
-
]),
|
|
257
|
-
o("div", Fe, [
|
|
258
|
-
n(y, {
|
|
259
|
-
variant: "ghost",
|
|
260
|
-
onClick: e[4] || (e[4] = (l) => {
|
|
261
|
-
c.value = !1, r.value = [];
|
|
262
|
-
})
|
|
263
|
-
}, {
|
|
264
|
-
default: s(() => [...e[12] || (e[12] = [
|
|
265
|
-
m(" Cancel ", -1)
|
|
266
|
-
])]),
|
|
267
|
-
_: 1
|
|
268
|
-
}),
|
|
269
|
-
n(y, {
|
|
270
|
-
onClick: ae,
|
|
271
|
-
disabled: r.value.length === 0
|
|
272
|
-
}, {
|
|
273
|
-
default: s(() => [
|
|
274
|
-
n(i(X)),
|
|
275
|
-
m(" Export " + g(r.value.length || ""), 1)
|
|
276
|
-
]),
|
|
277
|
-
_: 1
|
|
278
|
-
}, 8, ["disabled"])
|
|
279
|
-
])
|
|
280
|
-
])) : x("", !0),
|
|
281
|
-
b.value.length === 0 ? (d(), f("div", He, [
|
|
282
|
-
n(i(q), { class: "size-8 text-muted-foreground mb-3" }),
|
|
283
|
-
o("p", Je, 'No agendas match "' + g(D.value) + '"', 1),
|
|
284
|
-
e[13] || (e[13] = o("p", { class: "text-sm text-muted-foreground mt-1" }, "Try a different search term.", -1))
|
|
285
|
-
])) : (d(), f("div", Ye, [
|
|
286
|
-
(d(!0), f(F, null, ye(b.value, (l) => (d(), f("div", {
|
|
287
|
-
key: l.id,
|
|
288
|
-
class: H(["group relative flex flex-col overflow-hidden rounded-xl border bg-card shadow-sm transition-all duration-200", {
|
|
289
|
-
"cursor-pointer": c.value,
|
|
290
|
-
"ring-2 ring-primary border-primary/40": c.value && r.value.includes(l.id)
|
|
291
|
-
}]),
|
|
292
|
-
onClick: (C) => c.value ? V(l.id) : null
|
|
293
|
-
}, [
|
|
294
|
-
o("div", {
|
|
295
|
-
class: "h-1 w-full",
|
|
296
|
-
style: J({ backgroundColor: S(l).fg })
|
|
297
|
-
}, null, 4),
|
|
298
|
-
o("div", {
|
|
299
|
-
class: "flex flex-col flex-1 p-5",
|
|
300
|
-
onClick: (C) => !c.value && U(l.id)
|
|
301
|
-
}, [
|
|
302
|
-
o("div", Xe, [
|
|
303
|
-
o("div", {
|
|
304
|
-
class: "shrink-0 size-12 rounded-lg flex items-center justify-center font-semibold text-sm",
|
|
305
|
-
style: J({
|
|
306
|
-
backgroundColor: S(l).bg,
|
|
307
|
-
color: S(l).fg
|
|
308
|
-
})
|
|
309
|
-
}, g(ee(l.serviceName)), 5),
|
|
310
|
-
o("button", {
|
|
311
|
-
type: "button",
|
|
312
|
-
class: "flex-1 min-w-0 text-left focus:outline-none",
|
|
313
|
-
onClick: N((C) => c.value ? V(l.id) : U(l.id), ["stop"])
|
|
314
|
-
}, [
|
|
315
|
-
o("h3", We, g(l.serviceName || "Untitled Agenda"), 1),
|
|
316
|
-
o("div", Ze, [
|
|
317
|
-
n(ve, {
|
|
318
|
-
variant: "secondary",
|
|
319
|
-
class: "text-[10px] font-medium px-1.5 py-0 h-4"
|
|
320
|
-
}, {
|
|
321
|
-
default: s(() => [
|
|
322
|
-
m(g(se(l)), 1)
|
|
323
|
-
]),
|
|
324
|
-
_: 2
|
|
325
|
-
}, 1024),
|
|
326
|
-
c.value ? x("", !0) : (d(), f("span", et, " Click to " + g(i(v)("edit-agendas") ? "edit" : "view"), 1))
|
|
327
|
-
])
|
|
328
|
-
], 8, Ke),
|
|
329
|
-
c.value ? (d(), f("div", tt, [
|
|
330
|
-
o("div", {
|
|
331
|
-
class: H(["flex items-center justify-center size-6 rounded-full border-2 transition", r.value.includes(l.id) ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/30"])
|
|
332
|
-
}, [
|
|
333
|
-
r.value.includes(l.id) ? (d(), k(i(Me), {
|
|
334
|
-
key: 0,
|
|
335
|
-
class: "size-4"
|
|
336
|
-
})) : x("", !0)
|
|
337
|
-
], 2)
|
|
338
|
-
])) : x("", !0)
|
|
339
|
-
]),
|
|
340
|
-
o("div", nt, [
|
|
341
|
-
o("div", ot, [
|
|
342
|
-
o("div", st, [
|
|
343
|
-
n(i($e), { class: "size-3.5" }),
|
|
344
|
-
e[14] || (e[14] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Duration", -1))
|
|
345
|
-
]),
|
|
346
|
-
o("span", lt, g(te(l) || "—"), 1)
|
|
347
|
-
]),
|
|
348
|
-
o("div", it, [
|
|
349
|
-
o("div", rt, [
|
|
350
|
-
n(i(ze), { class: "size-3.5" }),
|
|
351
|
-
e[15] || (e[15] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Price", -1))
|
|
352
|
-
]),
|
|
353
|
-
o("span", at, g(ne(l) || "—"), 1)
|
|
354
|
-
]),
|
|
355
|
-
o("div", dt, [
|
|
356
|
-
o("div", ut, [
|
|
357
|
-
n(i(De), { class: "size-3.5" }),
|
|
358
|
-
e[16] || (e[16] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Resources", -1))
|
|
359
|
-
]),
|
|
360
|
-
o("span", ct, g(oe(l)), 1)
|
|
361
|
-
])
|
|
362
|
-
])
|
|
363
|
-
], 8, Qe),
|
|
364
|
-
c.value ? x("", !0) : (d(), f("div", pt, [
|
|
365
|
-
i(v)("edit-agendas") ? (d(), k(y, {
|
|
366
|
-
key: 0,
|
|
367
|
-
variant: "ghost",
|
|
368
|
-
size: "sm",
|
|
369
|
-
class: "gap-1.5",
|
|
370
|
-
onClick: N((C) => i(h)(`/edit/${l.id}`), ["stop"])
|
|
371
|
-
}, {
|
|
372
|
-
default: s(() => [
|
|
373
|
-
n(i(K), { class: "size-4" }),
|
|
374
|
-
e[17] || (e[17] = m(" Edit Agenda ", -1))
|
|
375
|
-
]),
|
|
376
|
-
_: 1
|
|
377
|
-
}, 8, ["onClick"])) : (d(), k(y, {
|
|
378
|
-
key: 1,
|
|
379
|
-
variant: "ghost",
|
|
380
|
-
size: "sm",
|
|
381
|
-
class: "gap-1.5",
|
|
382
|
-
onClick: N((C) => i(h)(`/edit/${l.id}/agenda`), ["stop"])
|
|
383
|
-
}, {
|
|
384
|
-
default: s(() => [
|
|
385
|
-
n(i(K), { class: "size-4" }),
|
|
386
|
-
e[18] || (e[18] = m(" View Agenda ", -1))
|
|
387
|
-
]),
|
|
388
|
-
_: 1
|
|
389
|
-
}, 8, ["onClick"])),
|
|
390
|
-
n(G, null, {
|
|
391
|
-
default: s(() => [
|
|
392
|
-
n(O, { "as-child": "" }, {
|
|
393
|
-
default: s(() => [
|
|
394
|
-
n(y, {
|
|
395
|
-
variant: "ghost",
|
|
396
|
-
size: "icon",
|
|
397
|
-
"aria-label": "More Options",
|
|
398
|
-
onClick: e[5] || (e[5] = N(() => {
|
|
399
|
-
}, ["stop"]))
|
|
400
|
-
}, {
|
|
401
|
-
default: s(() => [
|
|
402
|
-
n(i(Q))
|
|
403
|
-
]),
|
|
404
|
-
_: 1
|
|
405
|
-
})
|
|
406
|
-
]),
|
|
407
|
-
_: 1
|
|
408
|
-
}),
|
|
409
|
-
n(P, {
|
|
410
|
-
align: "end",
|
|
411
|
-
class: "w-52"
|
|
412
|
-
}, {
|
|
413
|
-
default: s(() => [
|
|
414
|
-
n(R, null, {
|
|
415
|
-
default: s(() => [
|
|
416
|
-
i(v)("create-agendas") ? (d(), k($, {
|
|
417
|
-
key: 0,
|
|
418
|
-
onClick: (C) => ie(l.id)
|
|
419
|
-
}, {
|
|
420
|
-
default: s(() => [
|
|
421
|
-
n(i(Ie)),
|
|
422
|
-
e[19] || (e[19] = m(" Duplicate Agenda ", -1))
|
|
423
|
-
]),
|
|
424
|
-
_: 1
|
|
425
|
-
}, 8, ["onClick"])) : x("", !0),
|
|
426
|
-
n($, null, {
|
|
427
|
-
default: s(() => [
|
|
428
|
-
n(i(Ne)),
|
|
429
|
-
e[20] || (e[20] = m(" API Set-up ", -1))
|
|
430
|
-
]),
|
|
431
|
-
_: 1
|
|
432
|
-
}),
|
|
433
|
-
n($, {
|
|
434
|
-
onClick: (C) => le(l.id)
|
|
435
|
-
}, {
|
|
436
|
-
default: s(() => [
|
|
437
|
-
n(i(X)),
|
|
438
|
-
e[21] || (e[21] = m(" Export Agenda ", -1))
|
|
439
|
-
]),
|
|
440
|
-
_: 1
|
|
441
|
-
}, 8, ["onClick"]),
|
|
442
|
-
i(v)("delete-agendas") ? (d(), k($, {
|
|
443
|
-
key: 1,
|
|
444
|
-
variant: "destructive",
|
|
445
|
-
onClick: (C) => re(l.id)
|
|
446
|
-
}, {
|
|
447
|
-
default: s(() => [
|
|
448
|
-
n(i(Se)),
|
|
449
|
-
e[22] || (e[22] = m(" Remove Agenda ", -1))
|
|
450
|
-
]),
|
|
451
|
-
_: 1
|
|
452
|
-
}, 8, ["onClick"])) : x("", !0)
|
|
453
|
-
]),
|
|
454
|
-
_: 2
|
|
455
|
-
}, 1024)
|
|
456
|
-
]),
|
|
457
|
-
_: 2
|
|
458
|
-
}, 1024)
|
|
459
|
-
]),
|
|
460
|
-
_: 2
|
|
461
|
-
}, 1024)
|
|
462
|
-
]))
|
|
463
|
-
], 10, qe))), 128))
|
|
464
|
-
]))
|
|
465
|
-
]))
|
|
466
|
-
]),
|
|
467
|
-
o("input", {
|
|
468
|
-
type: "file",
|
|
469
|
-
ref_key: "importAgendasInput",
|
|
470
|
-
ref: j,
|
|
471
|
-
class: "hidden",
|
|
472
|
-
accept: ".json,application/json",
|
|
473
|
-
onChange: de
|
|
474
|
-
}, null, 544)
|
|
475
|
-
], 64);
|
|
476
|
-
};
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
export {
|
|
480
|
-
_t as default
|
|
481
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("@oneclick.dev/cms-kit"),l=require("lucide-vue-next"),W={class:"container @container mx-auto py-8"},Z={key:0,class:"flex justify-center py-24"},ee={class:"flex gap-2"},te={key:2},oe={class:"flex flex-col gap-4 mb-6 @md:flex-row @md:items-end @md:justify-between"},ne={class:"flex flex-wrap items-center gap-2"},re={class:"relative"},le={key:0,class:"flex flex-wrap items-center justify-between gap-3 mb-4 px-4 py-3 rounded-lg border bg-muted/40"},se={class:"flex items-center gap-3"},ae={class:"text-sm font-medium"},ie={class:"flex items-center gap-2"},de={key:1,class:"flex flex-col items-center justify-center py-16 text-center border border-dashed rounded-lg"},ce={class:"font-medium"},ue={key:2,class:"grid gap-4 @md:grid-cols-2 @3xl:grid-cols-3"},me=["onClick"],pe=["onClick"],fe={class:"flex items-start gap-3"},ge=["onClick"],ve={class:"text-base font-semibold leading-tight line-clamp-1"},xe={class:"flex items-center gap-2 mt-1"},Ce={key:0,class:"text-xs text-muted-foreground cursor-pointer"},Ne={key:0,class:"shrink-0"},Ve={class:"grid grid-cols-3 gap-2 mt-5"},ye={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},_e={class:"flex items-center gap-1 text-muted-foreground"},ke={class:"text-sm font-semibold"},he={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},we={class:"flex items-center gap-1 text-muted-foreground"},be={class:"text-sm font-semibold"},Ee={class:"flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2"},Ae={class:"flex items-center gap-1 text-muted-foreground"},Be={class:"text-sm font-semibold"},Se={key:0,class:"flex items-center justify-between gap-2 px-5 py-3 border-t bg-muted/20"},De=e.defineComponent({__name:"Overview",setup(Me){const{config:f}=C.useModule(),N=C.useFirebaseIntegration(f.project),{navigateTo:g}=C.useModuleRoute(),{confirm:T}=C.useConfirmation(),{hasPermission:d}=C.useModulePermissions();C.useModuleBreadcrumbs(()=>[]);const c=e.ref(null),y=e.ref(""),a=e.ref(!1),r=e.ref([]),h=e.ref("importAgendasInput"),m=e.computed(()=>{if(!c.value)return[];const o=y.value.trim().toLowerCase();return o?c.value.filter(t=>(t.serviceName||"").toLowerCase().includes(o)):c.value}),w=e.computed(()=>m.value.length>0&&m.value.every(o=>r.value.includes(o.id))),z=()=>{if(w.value){const o=m.value.map(t=>t.id);r.value=r.value.filter(t=>!o.includes(t))}else{const o=m.value.map(s=>s.id),t=new Set([...r.value,...o]);r.value=Array.from(t)}},b=o=>{r.value.includes(o)?r.value=r.value.filter(t=>t!==o):r.value.push(o)},I=o=>{if(!o)return"??";const t=o.trim().split(/\s+/);return t.length===1?t[0].slice(0,2).toUpperCase():(t[0][0]+t[t.length-1][0]).toUpperCase()},E=[{fg:"#7c3aed",bg:"rgba(124, 58, 237, 0.12)"},{fg:"#0891b2",bg:"rgba(8, 145, 178, 0.12)"},{fg:"#ea580c",bg:"rgba(234, 88, 12, 0.12)"},{fg:"#16a34a",bg:"rgba(22, 163, 74, 0.12)"},{fg:"#2563eb",bg:"rgba(37, 99, 235, 0.12)"},{fg:"#db2777",bg:"rgba(219, 39, 119, 0.12)"},{fg:"#475569",bg:"rgba(71, 85, 105, 0.12)"}],k=o=>{const t=(o.id||o.serviceName||"").toString();let s=0;for(let i=0;i<t.length;i++)s=s*31+t.charCodeAt(i)>>>0;return E[s%E.length]},$=o=>{const t=o?.pricingOptions?.[0];return t?.duration?`${t.duration} min`:null},j=o=>{const t=o?.pricingOptions?.[0];return t?.price===void 0||t?.price===null||t?.price===""?null:`${o.currency==="EUR"?"€":"$"}${t.price}`},U=o=>Array.isArray(o?.resources)?o.resources.filter(t=>t?.isActive!==!1).length:0,O=o=>o.type==="regular"?"Regular":o.type?o.type.charAt(0).toUpperCase()+o.type.slice(1):"Agenda",P=o=>{a.value=!0,r.value=[o]},_=async()=>{c.value=await N.find(f.agendaCollection)},R=async o=>{if(!d("create-agendas"))return;const t=await N.get(f.agendaCollection,o);if(!t){alert("Agenda not found");return}const s=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!s)return;const i={...t,serviceName:s};delete i.id,await N.add(f.agendaCollection,i),await _()},G=async o=>{!d("delete-agendas")||!await T("Are you sure you want to delete this agenda? This action cannot be undone.")||(await N.remove(f.agendaCollection,o),await _())},L=async()=>{if(!c.value)return;let o=c.value.filter(i=>r.value.includes(i.id));o=o.map(i=>{const{id:v,...x}=i;return x});const t="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(o,null,2)),s=document.createElement("a");s.setAttribute("href",t),s.setAttribute("download","agendas_export.json"),document.body.appendChild(s),s.click(),s.remove(),a.value=!1,r.value=[]},q=async o=>{const t=o.target;if(!t.files||t.files.length===0)return;const i=await t.files[0].text();let v;try{v=JSON.parse(i)}catch{alert("Invalid JSON file");return}if(!Array.isArray(v)){alert("Invalid agendas format");return}for(const x of v)await N.add(f.agendaCollection,x);t.value="",await _()},A=o=>{a.value||(d("edit-agendas")?g(`/edit/${o}`):g(`/edit/${o}/agenda`))};return _(),(o,t)=>{const s=e.resolveComponent("Spinner"),i=e.resolveComponent("EmptyMedia"),v=e.resolveComponent("EmptyTitle"),x=e.resolveComponent("EmptyDescription"),F=e.resolveComponent("EmptyHeader"),u=e.resolveComponent("Button"),H=e.resolveComponent("EmptyContent"),J=e.resolveComponent("Empty"),Y=e.resolveComponent("Input"),B=e.resolveComponent("DropdownMenuTrigger"),V=e.resolveComponent("DropdownMenuItem"),S=e.resolveComponent("DropdownMenuGroup"),D=e.resolveComponent("DropdownMenuContent"),M=e.resolveComponent("DropdownMenu"),K=e.resolveComponent("ButtonGroup"),Q=e.resolveComponent("Checkbox"),X=e.resolveComponent("Badge");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",W,[c.value===null?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(s,{class:"mx-auto"})])):c.value.length===0?(e.openBlock(),e.createBlock(J,{key:1},{default:e.withCtx(()=>[e.createVNode(F,null,{default:e.withCtx(()=>[e.createVNode(i,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(v,null,{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(x,null,{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" You haven't created any agenda yet. Get started by creating your first agenda. ",-1)])]),_:1})]),_:1}),e.createVNode(H,null,{default:e.withCtx(()=>[e.createElementVNode("div",ee,[e.createVNode(u,{onClick:t[0]||(t[0]=n=>e.unref(g)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.PlusIcon)),t[8]||(t[8]=e.createTextVNode(" Create Agenda ",-1))]),_:1})])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("div",oe,[t[11]||(t[11]=e.createElementVNode("div",null,[e.createElementVNode("h2",{class:"text-3xl font-bold tracking-tight"},"Agendas"),e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"}," Manage your bookable services, hours and resources. ")],-1)),e.createElementVNode("div",ne,[e.createElementVNode("div",re,[e.createVNode(e.unref(l.Search),{class:"absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none"}),e.createVNode(Y,{modelValue:y.value,"onUpdate:modelValue":t[1]||(t[1]=n=>y.value=n),placeholder:"Search agendas...",class:"pl-9 w-full @md:w-64"},null,8,["modelValue"])]),!a.value&&e.unref(d)("create-agendas")?(e.openBlock(),e.createBlock(K,{key:0},{default:e.withCtx(()=>[e.createVNode(u,{onClick:t[2]||(t[2]=n=>e.unref(g)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.PlusIcon)),t[9]||(t[9]=e.createTextVNode(" New Agenda ",-1))]),_:1}),e.createVNode(M,null,{default:e.withCtx(()=>[e.createVNode(B,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(u,{size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(D,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(V,{onClick:t[3]||(t[3]=n=>h.value.click())},{default:e.withCtx(()=>[e.createVNode(e.unref(l.ImportIcon)),t[10]||(t[10]=e.createTextVNode(" Import Agendas... ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createVNode(Q,{modelValue:w.value,"onUpdate:modelValue":z},null,8,["modelValue"]),e.createElementVNode("span",ae,e.toDisplayString(r.value.length)+" of "+e.toDisplayString(m.value.length)+" selected ",1)]),e.createElementVNode("div",ie,[e.createVNode(u,{variant:"ghost",onClick:t[4]||(t[4]=n=>{a.value=!1,r.value=[]})},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(u,{onClick:L,disabled:r.value.length===0},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Upload)),e.createTextVNode(" Export "+e.toDisplayString(r.value.length||""),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0),m.value.length===0?(e.openBlock(),e.createElementBlock("div",de,[e.createVNode(e.unref(l.Search),{class:"size-8 text-muted-foreground mb-3"}),e.createElementVNode("p",ce,'No agendas match "'+e.toDisplayString(y.value)+'"',1),t[13]||(t[13]=e.createElementVNode("p",{class:"text-sm text-muted-foreground mt-1"},"Try a different search term.",-1))])):(e.openBlock(),e.createElementBlock("div",ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id,class:e.normalizeClass(["group relative flex flex-col overflow-hidden rounded-xl border bg-card shadow-sm transition-all duration-200",{"cursor-pointer":a.value,"ring-2 ring-primary border-primary/40":a.value&&r.value.includes(n.id)}]),onClick:p=>a.value?b(n.id):null},[e.createElementVNode("div",{class:"h-1 w-full",style:e.normalizeStyle({backgroundColor:k(n).fg})},null,4),e.createElementVNode("div",{class:"flex flex-col flex-1 p-5",onClick:p=>!a.value&&A(n.id)},[e.createElementVNode("div",fe,[e.createElementVNode("div",{class:"shrink-0 size-12 rounded-lg flex items-center justify-center font-semibold text-sm",style:e.normalizeStyle({backgroundColor:k(n).bg,color:k(n).fg})},e.toDisplayString(I(n.serviceName)),5),e.createElementVNode("button",{type:"button",class:"flex-1 min-w-0 text-left focus:outline-none",onClick:e.withModifiers(p=>a.value?b(n.id):A(n.id),["stop"])},[e.createElementVNode("h3",ve,e.toDisplayString(n.serviceName||"Untitled Agenda"),1),e.createElementVNode("div",xe,[e.createVNode(X,{variant:"secondary",class:"text-[10px] font-medium px-1.5 py-0 h-4"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O(n)),1)]),_:2},1024),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ce," Click to "+e.toDisplayString(e.unref(d)("edit-agendas")?"edit":"view"),1))])],8,ge),a.value?(e.openBlock(),e.createElementBlock("div",Ne,[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center justify-center size-6 rounded-full border-2 transition",r.value.includes(n.id)?"border-primary bg-primary text-primary-foreground":"border-muted-foreground/30"])},[r.value.includes(n.id)?(e.openBlock(),e.createBlock(e.unref(l.CheckCircle2),{key:0,class:"size-4"})):e.createCommentVNode("",!0)],2)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ve,[e.createElementVNode("div",ye,[e.createElementVNode("div",_e,[e.createVNode(e.unref(l.Clock),{class:"size-3.5"}),t[14]||(t[14]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Duration",-1))]),e.createElementVNode("span",ke,e.toDisplayString($(n)||"—"),1)]),e.createElementVNode("div",he,[e.createElementVNode("div",we,[e.createVNode(e.unref(l.DollarSign),{class:"size-3.5"}),t[15]||(t[15]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Price",-1))]),e.createElementVNode("span",be,e.toDisplayString(j(n)||"—"),1)]),e.createElementVNode("div",Ee,[e.createElementVNode("div",Ae,[e.createVNode(e.unref(l.Users),{class:"size-3.5"}),t[16]||(t[16]=e.createElementVNode("span",{class:"text-[10px] uppercase tracking-wide font-medium"},"Resources",-1))]),e.createElementVNode("span",Be,e.toDisplayString(U(n)),1)])])],8,pe),a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Se,[e.unref(d)("edit-agendas")?(e.openBlock(),e.createBlock(u,{key:0,variant:"ghost",size:"sm",class:"gap-1.5",onClick:e.withModifiers(p=>e.unref(g)(`/edit/${n.id}`),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.CalendarDays),{class:"size-4"}),t[17]||(t[17]=e.createTextVNode(" Edit Agenda ",-1))]),_:1},8,["onClick"])):(e.openBlock(),e.createBlock(u,{key:1,variant:"ghost",size:"sm",class:"gap-1.5",onClick:e.withModifiers(p=>e.unref(g)(`/edit/${n.id}/agenda`),["stop"])},{default:e.withCtx(()=>[e.createVNode(e.unref(l.CalendarDays),{class:"size-4"}),t[18]||(t[18]=e.createTextVNode(" View Agenda ",-1))]),_:1},8,["onClick"])),e.createVNode(M,null,{default:e.withCtx(()=>[e.createVNode(B,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(u,{variant:"ghost",size:"icon","aria-label":"More Options",onClick:t[5]||(t[5]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(D,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(S,null,{default:e.withCtx(()=>[e.unref(d)("create-agendas")?(e.openBlock(),e.createBlock(V,{key:0,onClick:p=>R(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Copy)),t[19]||(t[19]=e.createTextVNode(" Duplicate Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(e.unref(l.ChevronsLeftRightEllipsis)),t[20]||(t[20]=e.createTextVNode(" API Set-up ",-1))]),_:1}),e.createVNode(V,{onClick:p=>P(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Upload)),t[21]||(t[21]=e.createTextVNode(" Export Agenda ",-1))]),_:1},8,["onClick"]),e.unref(d)("delete-agendas")?(e.openBlock(),e.createBlock(V,{key:1,variant:"destructive",onClick:p=>G(n.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(l.Trash2Icon)),t[22]||(t[22]=e.createTextVNode(" Remove Agenda ",-1))]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024)]))],10,me))),128))]))]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:h,class:"hidden",accept:".json,application/json",onChange:q},null,544)],64)}}});exports.default=De;
|