@oneclick.dev/cms-core-modules 0.0.105 → 0.0.106
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/{Acquisition-CPlZzUBo.mjs → Acquisition-B2pM5vSp.mjs} +2 -2
- package/dist/{Acquisition-Br1Pfny3.js → Acquisition-Dt2rREU8.js} +1 -1
- package/dist/{Audience-BfkrmBuQ.js → Audience-Bs7b0TNm.js} +1 -1
- package/dist/{Audience-DTblSAiL.mjs → Audience-VLnUsQvW.mjs} +2 -2
- package/dist/{ContentEditor-B1nfKG_5.mjs → ContentEditor-BNLEv-qJ.mjs} +3119 -3098
- package/dist/{ContentEditor-DdFU8piH.js → ContentEditor-BUvvqfG1.js} +36 -36
- package/dist/{Create-qPeQxkdl.js → Create-89z41K73.js} +1 -1
- package/dist/{Create-BRBh0xjM.mjs → Create-Cn_Eufga.mjs} +5 -1
- package/dist/{Entries-C8UJkrVC.mjs → Entries-BdhUyJR5.mjs} +1 -1
- package/dist/{Entries-BaS6H6ak.js → Entries-CEXM_SkO.js} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-Ceoje52V.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DMGcRmm-.mjs +1255 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-COrK1j0S.js +1 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-Vb3q8EVv.mjs +330 -0
- package/dist/{Overview-CpHhuiaV.js → Overview-Bn1Xx3_j.js} +1 -1
- package/dist/{Overview-BrCwozey.js → Overview-DC9io1bk.js} +1 -1
- package/dist/Overview-Di84CsR5.mjs +476 -0
- package/dist/Overview-UoZHUMUz.js +1 -0
- package/dist/{Overview-kaMhsIUq.mjs → Overview-ejh4vUMT.mjs} +3 -3
- package/dist/{Overview-D_T3K6aq.mjs → Overview-lWAyyenp.mjs} +1 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CuwREvXD.js +349 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-GYNZ_yhD.mjs +3077 -0
- package/dist/{SeoHealth-BzcWd_w7.mjs → SeoHealth-DsbVdd2l.mjs} +3 -3
- package/dist/SeoHealth-az1YuNF2.js +1 -0
- package/dist/{TableView-DXmEF6pY.mjs → TableView-Bm6HaRHm.mjs} +1 -1
- package/dist/{TableView-CPAw3h8g.js → TableView-DQW0A1oG.js} +1 -1
- package/dist/agenda-IOqtALWf.js +1 -0
- package/dist/agenda-neyeLWv-.mjs +1165 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/{index-C4YUVWzJ.js → index-A2kp8Isi.js} +6 -6
- package/dist/{index-BuzLn4Km.js → index-B5aBwdxY.js} +2 -2
- package/dist/{index-p5Uqu8c2.mjs → index-BRdCrvcz.mjs} +52 -47
- package/dist/{index-D3L8WAJI.js → index-BiT55eU0.js} +2 -2
- package/dist/{index-CMk3uhUt.mjs → index-Bvxc5xv_.mjs} +153 -147
- package/dist/{index-DQYBP8Js.js → index-G7cIlnGN.js} +4 -4
- package/dist/{index-DjDCYQ_6.mjs → index-X6LV64jK.mjs} +102 -101
- package/dist/{index-_2lRVt_k.mjs → index-uOkqO74I.mjs} +105 -107
- package/dist/index-unsDfNYv.mjs +1187 -0
- package/dist/index-vHmvbEwa.js +35 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +14 -14
- package/dist/interpolation-CHn59tIC.js +1 -0
- package/dist/interpolation-w7IRDJwK.mjs +180 -0
- package/dist/orders-C65SlpJy.mjs +618 -0
- package/dist/orders-XVzWAgG1.js +1 -0
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +11 -2
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +55 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +6 -1
- package/dist/src/appointments/components/edit/NewReservationDialog/CustomerInformation.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +25 -1
- package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +26 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +31 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +3 -1
- package/dist/src/appointments/composables/useHorizontalScroll.d.ts +20 -0
- package/dist/src/lib/interpolation.d.ts +6 -0
- package/package.json +2 -2
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-9Q7TMm4u.mjs +0 -401
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-DiNzGl-q.js +0 -1
- package/dist/Overview-BYMrsZjM.mjs +0 -332
- package/dist/Overview-t0pG5xjA.js +0 -1
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cz_22Oce.mjs +0 -2927
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-DPPNc-Z5.js +0 -349
- package/dist/SeoHealth-09sEOu3G.js +0 -1
- package/dist/agenda-BNG05SAq.js +0 -1
- package/dist/agenda-D1RxMxBS.mjs +0 -1152
- package/dist/index-BtujSJeg.js +0 -35
- package/dist/index-dOdMm1pV.mjs +0 -1105
- package/dist/interpolation-DEDSLETn.mjs +0 -128
- package/dist/interpolation-DERg6Lwt.js +0 -1
- package/dist/orders-CzzcFQha.mjs +0 -559
- package/dist/orders-ETtbA4aQ.js +0 -1
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +0 -110
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +0 -98
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { defineComponent as _e, ref as z, computed as P, resolveComponent as d, openBlock as u, createElementBlock as g, Fragment as G, createElementVNode as o, createVNode as n, createBlock as b, withCtx as s, unref as l, createTextVNode as p, createCommentVNode as C, toDisplayString as f, renderList as xe, normalizeClass as L, normalizeStyle as F, withModifiers as N } from "vue";
|
|
2
|
+
import { useModule as ye, 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 H, Search as J, MoreHorizontalIcon as Y, ImportIcon as Ee, Upload as q, CheckCircle2 as Me, Clock as $e, DollarSign as ze, Users as De, CalendarDays as Q, Copy as Ie, ChevronsLeftRightEllipsis as Ne, Trash2Icon as Se } from "lucide-vue-next";
|
|
4
|
+
const je = { class: "container @container mx-auto py-8 px-4" }, 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 = { class: "flex flex-col flex-1 p-5" }, Xe = { class: "flex items-start gap-3" }, Ke = ["disabled", "onClick"], We = { class: "text-base font-semibold leading-tight line-clamp-1" }, Ze = { class: "flex items-center gap-2 mt-1" }, et = { class: "text-xs text-muted-foreground cursor-pointer" }, tt = {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "shrink-0"
|
|
19
|
+
}, 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" }, rt = { class: "flex flex-col items-start gap-1 rounded-lg bg-muted/40 px-3 py-2" }, it = { 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 = {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: "flex items-center justify-between gap-2 px-5 py-3 border-t bg-muted/20"
|
|
22
|
+
}, _t = /* @__PURE__ */ _e({
|
|
23
|
+
__name: "Overview",
|
|
24
|
+
setup(mt) {
|
|
25
|
+
const { config: k } = ye(), M = be(k.project), { navigateTo: w } = Ce(), { confirm: X } = ke(), { hasPermission: v } = we();
|
|
26
|
+
he(() => []);
|
|
27
|
+
const _ = z(null), D = z(""), m = z(!1), i = z([]), j = z("importAgendasInput"), y = P(() => {
|
|
28
|
+
if (!_.value) return [];
|
|
29
|
+
const t = D.value.trim().toLowerCase();
|
|
30
|
+
return t ? _.value.filter(
|
|
31
|
+
(e) => (e.serviceName || "").toLowerCase().includes(t)
|
|
32
|
+
) : _.value;
|
|
33
|
+
}), T = P(
|
|
34
|
+
() => y.value.length > 0 && y.value.every((t) => i.value.includes(t.id))
|
|
35
|
+
), K = () => {
|
|
36
|
+
if (T.value) {
|
|
37
|
+
const t = y.value.map((e) => e.id);
|
|
38
|
+
i.value = i.value.filter((e) => !t.includes(e));
|
|
39
|
+
} else {
|
|
40
|
+
const t = y.value.map((a) => a.id), e = /* @__PURE__ */ new Set([...i.value, ...t]);
|
|
41
|
+
i.value = Array.from(e);
|
|
42
|
+
}
|
|
43
|
+
}, W = (t) => {
|
|
44
|
+
i.value.includes(t) ? i.value = i.value.filter((e) => e !== t) : i.value.push(t);
|
|
45
|
+
}, Z = (t) => {
|
|
46
|
+
if (!t) return "??";
|
|
47
|
+
const e = t.trim().split(/\s+/);
|
|
48
|
+
return e.length === 1 ? e[0].slice(0, 2).toUpperCase() : (e[0][0] + e[e.length - 1][0]).toUpperCase();
|
|
49
|
+
}, V = [
|
|
50
|
+
{ fg: "#7c3aed", bg: "rgba(124, 58, 237, 0.12)" },
|
|
51
|
+
// violet
|
|
52
|
+
{ fg: "#0891b2", bg: "rgba(8, 145, 178, 0.12)" },
|
|
53
|
+
// cyan
|
|
54
|
+
{ fg: "#ea580c", bg: "rgba(234, 88, 12, 0.12)" },
|
|
55
|
+
// orange
|
|
56
|
+
{ fg: "#16a34a", bg: "rgba(22, 163, 74, 0.12)" },
|
|
57
|
+
// green
|
|
58
|
+
{ fg: "#2563eb", bg: "rgba(37, 99, 235, 0.12)" },
|
|
59
|
+
// blue
|
|
60
|
+
{ fg: "#db2777", bg: "rgba(219, 39, 119, 0.12)" },
|
|
61
|
+
// pink
|
|
62
|
+
{ fg: "#475569", bg: "rgba(71, 85, 105, 0.12)" }
|
|
63
|
+
// slate
|
|
64
|
+
], S = (t) => {
|
|
65
|
+
const e = (t.id || t.serviceName || "").toString();
|
|
66
|
+
let a = 0;
|
|
67
|
+
for (let c = 0; c < e.length; c++) a = a * 31 + e.charCodeAt(c) >>> 0;
|
|
68
|
+
return V[a % V.length];
|
|
69
|
+
}, ee = (t) => {
|
|
70
|
+
const e = t?.pricingOptions?.[0];
|
|
71
|
+
return e?.duration ? `${e.duration} min` : null;
|
|
72
|
+
}, te = (t) => {
|
|
73
|
+
const e = t?.pricingOptions?.[0];
|
|
74
|
+
return e?.price === void 0 || e?.price === null || e?.price === "" ? null : `${t.currency === "EUR" ? "€" : "$"}${e.price}`;
|
|
75
|
+
}, ne = (t) => Array.isArray(t?.resources) ? t.resources.filter((e) => e?.isActive !== !1).length : 0, oe = (t) => t.type === "regular" ? "Regular" : t.type ? t.type.charAt(0).toUpperCase() + t.type.slice(1) : "Agenda", se = (t) => {
|
|
76
|
+
m.value = !0, i.value = [t];
|
|
77
|
+
}, I = async () => {
|
|
78
|
+
_.value = await M.find(k.agendaCollection);
|
|
79
|
+
}, le = async (t) => {
|
|
80
|
+
if (!v("create-agendas")) return;
|
|
81
|
+
const e = await M.get(k.agendaCollection, t);
|
|
82
|
+
if (!e) {
|
|
83
|
+
alert("Agenda not found");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const a = prompt("Enter name for duplicated agenda", e.serviceName + " (Copy)");
|
|
87
|
+
if (!a)
|
|
88
|
+
return;
|
|
89
|
+
const c = { ...e, serviceName: a };
|
|
90
|
+
delete c.id, await M.add(k.agendaCollection, c), await I();
|
|
91
|
+
}, re = async (t) => {
|
|
92
|
+
!v("delete-agendas") || !await X("Are you sure you want to delete this agenda? This action cannot be undone.") || (await M.remove(k.agendaCollection, t), await I());
|
|
93
|
+
}, ie = async () => {
|
|
94
|
+
if (!_.value) return;
|
|
95
|
+
let t = _.value.filter((c) => i.value.includes(c.id));
|
|
96
|
+
t = t.map((c) => {
|
|
97
|
+
const { id: h, ...A } = c;
|
|
98
|
+
return A;
|
|
99
|
+
});
|
|
100
|
+
const e = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(t, null, 2)), a = document.createElement("a");
|
|
101
|
+
a.setAttribute("href", e), a.setAttribute("download", "agendas_export.json"), document.body.appendChild(a), a.click(), a.remove(), m.value = !1, i.value = [];
|
|
102
|
+
}, ae = async (t) => {
|
|
103
|
+
const e = t.target;
|
|
104
|
+
if (!e.files || e.files.length === 0)
|
|
105
|
+
return;
|
|
106
|
+
const c = await e.files[0].text();
|
|
107
|
+
let h;
|
|
108
|
+
try {
|
|
109
|
+
h = JSON.parse(c);
|
|
110
|
+
} catch {
|
|
111
|
+
alert("Invalid JSON file");
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (!Array.isArray(h)) {
|
|
115
|
+
alert("Invalid agendas format");
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
for (const A of h)
|
|
119
|
+
await M.add(k.agendaCollection, A);
|
|
120
|
+
e.value = "", await I();
|
|
121
|
+
}, de = (t) => {
|
|
122
|
+
m.value || (v("edit-agendas") ? w(`/edit/${t}`) : w(`/edit/${t}/agenda`));
|
|
123
|
+
};
|
|
124
|
+
return I(), (t, e) => {
|
|
125
|
+
const a = d("Spinner"), c = d("EmptyMedia"), h = d("EmptyTitle"), A = d("EmptyDescription"), ue = d("EmptyHeader"), x = d("Button"), ce = d("EmptyContent"), pe = d("Empty"), me = d("Input"), B = d("DropdownMenuTrigger"), $ = d("DropdownMenuItem"), U = d("DropdownMenuGroup"), O = d("DropdownMenuContent"), R = d("DropdownMenu"), fe = d("ButtonGroup"), ge = d("Checkbox"), ve = d("Badge");
|
|
126
|
+
return u(), g(G, null, [
|
|
127
|
+
o("div", je, [
|
|
128
|
+
_.value === null ? (u(), g("div", Te, [
|
|
129
|
+
n(a, { class: "mx-auto" })
|
|
130
|
+
])) : _.value.length === 0 ? (u(), b(pe, { key: 1 }, {
|
|
131
|
+
default: s(() => [
|
|
132
|
+
n(ue, null, {
|
|
133
|
+
default: s(() => [
|
|
134
|
+
n(c, { variant: "icon" }, {
|
|
135
|
+
default: s(() => [
|
|
136
|
+
n(l(Ae), { class: "size-4-6" })
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
}),
|
|
140
|
+
n(h, null, {
|
|
141
|
+
default: s(() => [...e[6] || (e[6] = [
|
|
142
|
+
p("No Agendas Yet", -1)
|
|
143
|
+
])]),
|
|
144
|
+
_: 1
|
|
145
|
+
}),
|
|
146
|
+
n(A, null, {
|
|
147
|
+
default: s(() => [...e[7] || (e[7] = [
|
|
148
|
+
p(" You haven't created any agenda yet. Get started by creating your first agenda. ", -1)
|
|
149
|
+
])]),
|
|
150
|
+
_: 1
|
|
151
|
+
})
|
|
152
|
+
]),
|
|
153
|
+
_: 1
|
|
154
|
+
}),
|
|
155
|
+
n(ce, null, {
|
|
156
|
+
default: s(() => [
|
|
157
|
+
o("div", Ve, [
|
|
158
|
+
n(x, {
|
|
159
|
+
onClick: e[0] || (e[0] = (r) => l(w)("/create"))
|
|
160
|
+
}, {
|
|
161
|
+
default: s(() => [
|
|
162
|
+
n(l(H)),
|
|
163
|
+
e[8] || (e[8] = p(" Create Agenda ", -1))
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
})
|
|
167
|
+
])
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
})
|
|
171
|
+
]),
|
|
172
|
+
_: 1
|
|
173
|
+
})) : (u(), g("div", Be, [
|
|
174
|
+
o("div", Ue, [
|
|
175
|
+
e[11] || (e[11] = o("div", null, [
|
|
176
|
+
o("h2", { class: "text-3xl font-bold tracking-tight" }, "Agendas"),
|
|
177
|
+
o("p", { class: "text-sm text-muted-foreground mt-1" }, " Manage your bookable services, hours and resources. ")
|
|
178
|
+
], -1)),
|
|
179
|
+
o("div", Oe, [
|
|
180
|
+
o("div", Re, [
|
|
181
|
+
n(l(J), { class: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground pointer-events-none" }),
|
|
182
|
+
n(me, {
|
|
183
|
+
modelValue: D.value,
|
|
184
|
+
"onUpdate:modelValue": e[1] || (e[1] = (r) => D.value = r),
|
|
185
|
+
placeholder: "Search agendas...",
|
|
186
|
+
class: "pl-9 w-full @md:w-64"
|
|
187
|
+
}, null, 8, ["modelValue"])
|
|
188
|
+
]),
|
|
189
|
+
!m.value && l(v)("create-agendas") ? (u(), b(fe, { key: 0 }, {
|
|
190
|
+
default: s(() => [
|
|
191
|
+
n(x, {
|
|
192
|
+
onClick: e[2] || (e[2] = (r) => l(w)("/create"))
|
|
193
|
+
}, {
|
|
194
|
+
default: s(() => [
|
|
195
|
+
n(l(H)),
|
|
196
|
+
e[9] || (e[9] = p(" New Agenda ", -1))
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
}),
|
|
200
|
+
n(R, null, {
|
|
201
|
+
default: s(() => [
|
|
202
|
+
n(B, { "as-child": "" }, {
|
|
203
|
+
default: s(() => [
|
|
204
|
+
n(x, {
|
|
205
|
+
size: "icon",
|
|
206
|
+
"aria-label": "More Options"
|
|
207
|
+
}, {
|
|
208
|
+
default: s(() => [
|
|
209
|
+
n(l(Y))
|
|
210
|
+
]),
|
|
211
|
+
_: 1
|
|
212
|
+
})
|
|
213
|
+
]),
|
|
214
|
+
_: 1
|
|
215
|
+
}),
|
|
216
|
+
n(O, {
|
|
217
|
+
align: "end",
|
|
218
|
+
class: "w-52"
|
|
219
|
+
}, {
|
|
220
|
+
default: s(() => [
|
|
221
|
+
n(U, null, {
|
|
222
|
+
default: s(() => [
|
|
223
|
+
n($, {
|
|
224
|
+
onClick: e[3] || (e[3] = (r) => j.value.click())
|
|
225
|
+
}, {
|
|
226
|
+
default: s(() => [
|
|
227
|
+
n(l(Ee)),
|
|
228
|
+
e[10] || (e[10] = p(" Import Agendas... ", -1))
|
|
229
|
+
]),
|
|
230
|
+
_: 1
|
|
231
|
+
})
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
})
|
|
235
|
+
]),
|
|
236
|
+
_: 1
|
|
237
|
+
})
|
|
238
|
+
]),
|
|
239
|
+
_: 1
|
|
240
|
+
})
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
})) : C("", !0)
|
|
244
|
+
])
|
|
245
|
+
]),
|
|
246
|
+
m.value ? (u(), g("div", Pe, [
|
|
247
|
+
o("div", Ge, [
|
|
248
|
+
n(ge, {
|
|
249
|
+
modelValue: T.value,
|
|
250
|
+
"onUpdate:modelValue": K
|
|
251
|
+
}, null, 8, ["modelValue"]),
|
|
252
|
+
o("span", Le, f(i.value.length) + " of " + f(y.value.length) + " selected ", 1)
|
|
253
|
+
]),
|
|
254
|
+
o("div", Fe, [
|
|
255
|
+
n(x, {
|
|
256
|
+
variant: "ghost",
|
|
257
|
+
onClick: e[4] || (e[4] = (r) => {
|
|
258
|
+
m.value = !1, i.value = [];
|
|
259
|
+
})
|
|
260
|
+
}, {
|
|
261
|
+
default: s(() => [...e[12] || (e[12] = [
|
|
262
|
+
p(" Cancel ", -1)
|
|
263
|
+
])]),
|
|
264
|
+
_: 1
|
|
265
|
+
}),
|
|
266
|
+
n(x, {
|
|
267
|
+
onClick: ie,
|
|
268
|
+
disabled: i.value.length === 0
|
|
269
|
+
}, {
|
|
270
|
+
default: s(() => [
|
|
271
|
+
n(l(q)),
|
|
272
|
+
p(" Export " + f(i.value.length || ""), 1)
|
|
273
|
+
]),
|
|
274
|
+
_: 1
|
|
275
|
+
}, 8, ["disabled"])
|
|
276
|
+
])
|
|
277
|
+
])) : C("", !0),
|
|
278
|
+
y.value.length === 0 ? (u(), g("div", He, [
|
|
279
|
+
n(l(J), { class: "size-8 text-muted-foreground mb-3" }),
|
|
280
|
+
o("p", Je, 'No agendas match "' + f(D.value) + '"', 1),
|
|
281
|
+
e[13] || (e[13] = o("p", { class: "text-sm text-muted-foreground mt-1" }, "Try a different search term.", -1))
|
|
282
|
+
])) : (u(), g("div", Ye, [
|
|
283
|
+
(u(!0), g(G, null, xe(y.value, (r) => (u(), g("div", {
|
|
284
|
+
key: r.id,
|
|
285
|
+
class: L(["group relative flex flex-col overflow-hidden rounded-xl border bg-card shadow-sm transition-all duration-200", {
|
|
286
|
+
"cursor-pointer": m.value,
|
|
287
|
+
"ring-2 ring-primary border-primary/40": m.value && i.value.includes(r.id)
|
|
288
|
+
}]),
|
|
289
|
+
onClick: (E) => m.value ? W(r.id) : null
|
|
290
|
+
}, [
|
|
291
|
+
o("div", {
|
|
292
|
+
class: "h-1 w-full",
|
|
293
|
+
style: F({ backgroundColor: S(r).fg })
|
|
294
|
+
}, null, 4),
|
|
295
|
+
o("div", Qe, [
|
|
296
|
+
o("div", Xe, [
|
|
297
|
+
o("div", {
|
|
298
|
+
class: "shrink-0 size-12 rounded-lg flex items-center justify-center font-semibold text-sm",
|
|
299
|
+
style: F({
|
|
300
|
+
backgroundColor: S(r).bg,
|
|
301
|
+
color: S(r).fg
|
|
302
|
+
})
|
|
303
|
+
}, f(Z(r.serviceName)), 5),
|
|
304
|
+
o("button", {
|
|
305
|
+
type: "button",
|
|
306
|
+
class: "flex-1 min-w-0 text-left focus:outline-none",
|
|
307
|
+
disabled: m.value,
|
|
308
|
+
onClick: N((E) => !m.value && de(r.id), ["stop"])
|
|
309
|
+
}, [
|
|
310
|
+
o("h3", We, f(r.serviceName || "Untitled Agenda"), 1),
|
|
311
|
+
o("div", Ze, [
|
|
312
|
+
n(ve, {
|
|
313
|
+
variant: "secondary",
|
|
314
|
+
class: "text-[10px] font-medium px-1.5 py-0 h-4"
|
|
315
|
+
}, {
|
|
316
|
+
default: s(() => [
|
|
317
|
+
p(f(oe(r)), 1)
|
|
318
|
+
]),
|
|
319
|
+
_: 2
|
|
320
|
+
}, 1024),
|
|
321
|
+
o("span", et, " Click to " + f(l(v)("edit-agendas") ? "edit" : "view"), 1)
|
|
322
|
+
])
|
|
323
|
+
], 8, Ke),
|
|
324
|
+
m.value ? (u(), g("div", tt, [
|
|
325
|
+
o("div", {
|
|
326
|
+
class: L(["flex items-center justify-center size-6 rounded-full border-2 transition", i.value.includes(r.id) ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/30"])
|
|
327
|
+
}, [
|
|
328
|
+
i.value.includes(r.id) ? (u(), b(l(Me), {
|
|
329
|
+
key: 0,
|
|
330
|
+
class: "size-4"
|
|
331
|
+
})) : C("", !0)
|
|
332
|
+
], 2)
|
|
333
|
+
])) : C("", !0)
|
|
334
|
+
]),
|
|
335
|
+
o("div", nt, [
|
|
336
|
+
o("div", ot, [
|
|
337
|
+
o("div", st, [
|
|
338
|
+
n(l($e), { class: "size-3.5" }),
|
|
339
|
+
e[14] || (e[14] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Duration", -1))
|
|
340
|
+
]),
|
|
341
|
+
o("span", lt, f(ee(r) || "—"), 1)
|
|
342
|
+
]),
|
|
343
|
+
o("div", rt, [
|
|
344
|
+
o("div", it, [
|
|
345
|
+
n(l(ze), { class: "size-3.5" }),
|
|
346
|
+
e[15] || (e[15] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Price", -1))
|
|
347
|
+
]),
|
|
348
|
+
o("span", at, f(te(r) || "—"), 1)
|
|
349
|
+
]),
|
|
350
|
+
o("div", dt, [
|
|
351
|
+
o("div", ut, [
|
|
352
|
+
n(l(De), { class: "size-3.5" }),
|
|
353
|
+
e[16] || (e[16] = o("span", { class: "text-[10px] uppercase tracking-wide font-medium" }, "Resources", -1))
|
|
354
|
+
]),
|
|
355
|
+
o("span", ct, f(ne(r)), 1)
|
|
356
|
+
])
|
|
357
|
+
])
|
|
358
|
+
]),
|
|
359
|
+
m.value ? C("", !0) : (u(), g("div", pt, [
|
|
360
|
+
l(v)("edit-agendas") ? (u(), b(x, {
|
|
361
|
+
key: 0,
|
|
362
|
+
variant: "ghost",
|
|
363
|
+
size: "sm",
|
|
364
|
+
class: "gap-1.5",
|
|
365
|
+
onClick: N((E) => l(w)(`/edit/${r.id}`), ["stop"])
|
|
366
|
+
}, {
|
|
367
|
+
default: s(() => [
|
|
368
|
+
n(l(Q), { class: "size-4" }),
|
|
369
|
+
e[17] || (e[17] = p(" Edit Agenda ", -1))
|
|
370
|
+
]),
|
|
371
|
+
_: 1
|
|
372
|
+
}, 8, ["onClick"])) : (u(), b(x, {
|
|
373
|
+
key: 1,
|
|
374
|
+
variant: "ghost",
|
|
375
|
+
size: "sm",
|
|
376
|
+
class: "gap-1.5",
|
|
377
|
+
onClick: N((E) => l(w)(`/edit/${r.id}/agenda`), ["stop"])
|
|
378
|
+
}, {
|
|
379
|
+
default: s(() => [
|
|
380
|
+
n(l(Q), { class: "size-4" }),
|
|
381
|
+
e[18] || (e[18] = p(" View Agenda ", -1))
|
|
382
|
+
]),
|
|
383
|
+
_: 1
|
|
384
|
+
}, 8, ["onClick"])),
|
|
385
|
+
n(R, null, {
|
|
386
|
+
default: s(() => [
|
|
387
|
+
n(B, { "as-child": "" }, {
|
|
388
|
+
default: s(() => [
|
|
389
|
+
n(x, {
|
|
390
|
+
variant: "ghost",
|
|
391
|
+
size: "icon",
|
|
392
|
+
"aria-label": "More Options",
|
|
393
|
+
onClick: e[5] || (e[5] = N(() => {
|
|
394
|
+
}, ["stop"]))
|
|
395
|
+
}, {
|
|
396
|
+
default: s(() => [
|
|
397
|
+
n(l(Y))
|
|
398
|
+
]),
|
|
399
|
+
_: 1
|
|
400
|
+
})
|
|
401
|
+
]),
|
|
402
|
+
_: 1
|
|
403
|
+
}),
|
|
404
|
+
n(O, {
|
|
405
|
+
align: "end",
|
|
406
|
+
class: "w-52"
|
|
407
|
+
}, {
|
|
408
|
+
default: s(() => [
|
|
409
|
+
n(U, null, {
|
|
410
|
+
default: s(() => [
|
|
411
|
+
l(v)("create-agendas") ? (u(), b($, {
|
|
412
|
+
key: 0,
|
|
413
|
+
onClick: (E) => le(r.id)
|
|
414
|
+
}, {
|
|
415
|
+
default: s(() => [
|
|
416
|
+
n(l(Ie)),
|
|
417
|
+
e[19] || (e[19] = p(" Duplicate Agenda ", -1))
|
|
418
|
+
]),
|
|
419
|
+
_: 1
|
|
420
|
+
}, 8, ["onClick"])) : C("", !0),
|
|
421
|
+
n($, null, {
|
|
422
|
+
default: s(() => [
|
|
423
|
+
n(l(Ne)),
|
|
424
|
+
e[20] || (e[20] = p(" API Set-up ", -1))
|
|
425
|
+
]),
|
|
426
|
+
_: 1
|
|
427
|
+
}),
|
|
428
|
+
n($, {
|
|
429
|
+
onClick: (E) => se(r.id)
|
|
430
|
+
}, {
|
|
431
|
+
default: s(() => [
|
|
432
|
+
n(l(q)),
|
|
433
|
+
e[21] || (e[21] = p(" Export Agenda ", -1))
|
|
434
|
+
]),
|
|
435
|
+
_: 1
|
|
436
|
+
}, 8, ["onClick"]),
|
|
437
|
+
l(v)("delete-agendas") ? (u(), b($, {
|
|
438
|
+
key: 1,
|
|
439
|
+
variant: "destructive",
|
|
440
|
+
onClick: (E) => re(r.id)
|
|
441
|
+
}, {
|
|
442
|
+
default: s(() => [
|
|
443
|
+
n(l(Se)),
|
|
444
|
+
e[22] || (e[22] = p(" Remove Agenda ", -1))
|
|
445
|
+
]),
|
|
446
|
+
_: 1
|
|
447
|
+
}, 8, ["onClick"])) : C("", !0)
|
|
448
|
+
]),
|
|
449
|
+
_: 2
|
|
450
|
+
}, 1024)
|
|
451
|
+
]),
|
|
452
|
+
_: 2
|
|
453
|
+
}, 1024)
|
|
454
|
+
]),
|
|
455
|
+
_: 2
|
|
456
|
+
}, 1024)
|
|
457
|
+
]))
|
|
458
|
+
], 10, qe))), 128))
|
|
459
|
+
]))
|
|
460
|
+
]))
|
|
461
|
+
]),
|
|
462
|
+
o("input", {
|
|
463
|
+
type: "file",
|
|
464
|
+
ref_key: "importAgendasInput",
|
|
465
|
+
ref: j,
|
|
466
|
+
class: "hidden",
|
|
467
|
+
accept: ".json,application/json",
|
|
468
|
+
onChange: ae
|
|
469
|
+
}, null, 544)
|
|
470
|
+
], 64);
|
|
471
|
+
};
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
export {
|
|
475
|
+
_t as default
|
|
476
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),N=require("@oneclick.dev/cms-kit"),l=require("lucide-vue-next"),W={class:"container @container mx-auto py-8 px-4"},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"},pe=["onClick"],me={class:"flex flex-col flex-1 p-5"},fe={class:"flex items-start gap-3"},ge=["disabled","onClick"],ve={class:"text-base font-semibold leading-tight line-clamp-1"},xe={class:"flex items-center gap-2 mt-1"},Ne={class:"text-xs text-muted-foreground cursor-pointer"},Ce={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:m}=N.useModule(),C=N.useFirebaseIntegration(m.project),{navigateTo:f}=N.useModuleRoute(),{confirm:D}=N.useConfirmation(),{hasPermission:d}=N.useModulePermissions();N.useModuleBreadcrumbs(()=>[]);const c=e.ref(null),y=e.ref(""),i=e.ref(!1),r=e.ref([]),h=e.ref("importAgendasInput"),p=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(()=>p.value.length>0&&p.value.every(o=>r.value.includes(o.id))),M=()=>{if(w.value){const o=p.value.map(t=>t.id);r.value=r.value.filter(t=>!o.includes(t))}else{const o=p.value.map(s=>s.id),t=new Set([...r.value,...o]);r.value=Array.from(t)}},T=o=>{r.value.includes(o)?r.value=r.value.filter(t=>t!==o):r.value.push(o)},z=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()},b=[{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 a=0;a<t.length;a++)s=s*31+t.charCodeAt(a)>>>0;return b[s%b.length]},I=o=>{const t=o?.pricingOptions?.[0];return t?.duration?`${t.duration} min`:null},$=o=>{const t=o?.pricingOptions?.[0];return t?.price===void 0||t?.price===null||t?.price===""?null:`${o.currency==="EUR"?"€":"$"}${t.price}`},j=o=>Array.isArray(o?.resources)?o.resources.filter(t=>t?.isActive!==!1).length:0,U=o=>o.type==="regular"?"Regular":o.type?o.type.charAt(0).toUpperCase()+o.type.slice(1):"Agenda",O=o=>{i.value=!0,r.value=[o]},_=async()=>{c.value=await C.find(m.agendaCollection)},P=async o=>{if(!d("create-agendas"))return;const t=await C.get(m.agendaCollection,o);if(!t){alert("Agenda not found");return}const s=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!s)return;const a={...t,serviceName:s};delete a.id,await C.add(m.agendaCollection,a),await _()},R=async o=>{!d("delete-agendas")||!await D("Are you sure you want to delete this agenda? This action cannot be undone.")||(await C.remove(m.agendaCollection,o),await _())},G=async()=>{if(!c.value)return;let o=c.value.filter(a=>r.value.includes(a.id));o=o.map(a=>{const{id:g,...v}=a;return v});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(),i.value=!1,r.value=[]},L=async o=>{const t=o.target;if(!t.files||t.files.length===0)return;const a=await t.files[0].text();let g;try{g=JSON.parse(a)}catch{alert("Invalid JSON file");return}if(!Array.isArray(g)){alert("Invalid agendas format");return}for(const v of g)await C.add(m.agendaCollection,v);t.value="",await _()},q=o=>{i.value||(d("edit-agendas")?f(`/edit/${o}`):f(`/edit/${o}/agenda`))};return _(),(o,t)=>{const s=e.resolveComponent("Spinner"),a=e.resolveComponent("EmptyMedia"),g=e.resolveComponent("EmptyTitle"),v=e.resolveComponent("EmptyDescription"),F=e.resolveComponent("EmptyHeader"),u=e.resolveComponent("Button"),H=e.resolveComponent("EmptyContent"),J=e.resolveComponent("Empty"),Y=e.resolveComponent("Input"),E=e.resolveComponent("DropdownMenuTrigger"),V=e.resolveComponent("DropdownMenuItem"),A=e.resolveComponent("DropdownMenuGroup"),B=e.resolveComponent("DropdownMenuContent"),S=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(a,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(l.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(g,null,{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(v,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(f)("/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"])]),!i.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(f)("/create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(l.PlusIcon)),t[9]||(t[9]=e.createTextVNode(" New Agenda ",-1))]),_:1}),e.createVNode(S,null,{default:e.withCtx(()=>[e.createVNode(E,{"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(B,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(A,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)])]),i.value?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",se,[e.createVNode(Q,{modelValue:w.value,"onUpdate:modelValue":M},null,8,["modelValue"]),e.createElementVNode("span",ae,e.toDisplayString(r.value.length)+" of "+e.toDisplayString(p.value.length)+" selected ",1)]),e.createElementVNode("div",ie,[e.createVNode(u,{variant:"ghost",onClick:t[4]||(t[4]=n=>{i.value=!1,r.value=[]})},{default:e.withCtx(()=>[...t[12]||(t[12]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(u,{onClick:G,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),p.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(p.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":i.value,"ring-2 ring-primary border-primary/40":i.value&&r.value.includes(n.id)}]),onClick:x=>i.value?T(n.id):null},[e.createElementVNode("div",{class:"h-1 w-full",style:e.normalizeStyle({backgroundColor:k(n).fg})},null,4),e.createElementVNode("div",me,[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(z(n.serviceName)),5),e.createElementVNode("button",{type:"button",class:"flex-1 min-w-0 text-left focus:outline-none",disabled:i.value,onClick:e.withModifiers(x=>!i.value&&q(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(U(n)),1)]),_:2},1024),e.createElementVNode("span",Ne," Click to "+e.toDisplayString(e.unref(d)("edit-agendas")?"edit":"view"),1)])],8,ge),i.value?(e.openBlock(),e.createElementBlock("div",Ce,[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(I(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($(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(j(n)),1)])])]),i.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(x=>e.unref(f)(`/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(x=>e.unref(f)(`/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(S,null,{default:e.withCtx(()=>[e.createVNode(E,{"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(B,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(A,null,{default:e.withCtx(()=>[e.unref(d)("create-agendas")?(e.openBlock(),e.createBlock(V,{key:0,onClick:x=>P(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:x=>O(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:x=>R(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,pe))),128))]))]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:h,class:"hidden",accept:".json,application/json",onChange:L},null,544)],64)}}});exports.default=De;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineComponent as _e, ref as f, computed as te, watch as he, onMounted as ye, resolveComponent as h, openBlock as n, createElementBlock as i, createElementVNode as s, toDisplayString as u, unref as r, Fragment as w, renderList as D, normalizeClass as L, createVNode as t, withCtx as l, createCommentVNode as T, createBlock as P, createTextVNode as y, resolveDynamicComponent as W, normalizeStyle as se } from "vue";
|
|
2
2
|
import { useModule as be, useModuleRoute as we, useModuleBreadcrumbs as Ce } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import "./index-
|
|
3
|
+
import "./index-Bvxc5xv_.mjs";
|
|
4
4
|
import { componentToString as oe, ChartTooltipContent as ae } from "@oneclick.dev/cms-kit/charts";
|
|
5
5
|
import { MousePointerClick as ke, Users as $e, Eye as De, Clock as Te, Zap as Pe, TrendingDown as le, TrendingUp as ne, UserPlus as Se, Activity as Ue, RefreshCw as Ve, Loader2 as Re, ArrowUpRight as Me, Globe as Fe, Minus as Ae, Smartphone as ze, Tablet as Ne, Monitor as Be } from "lucide-vue-next";
|
|
6
|
-
import { S as re, C as j, A as ie, z as ue } from "./index-
|
|
7
|
-
import {
|
|
6
|
+
import { S as re, C as j, A as ie, z as ue } from "./index-uOkqO74I.mjs";
|
|
7
|
+
import { j as ce, C as H } from "./index-BRdCrvcz.mjs";
|
|
8
8
|
const Le = { class: "flex flex-col gap-4 w-full max-w-7xl mx-auto py-8" }, je = { class: "flex justify-between gap-4 flex-col @lg:flex-row @lg:items-center" }, Ge = { class: "text-muted-foreground text-sm mt-1" }, Ie = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "flex items-center gap-2"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as G, resolveComponent as n, openBlock as c, createElementBlock as k, Fragment as te, renderList as le, createBlock as w, unref as C, withCtx as l, createElementVNode as o, normalizeClass as oe, resolveDynamicComponent as ne, toDisplayString as P, createCommentVNode as U, createVNode as t, withModifiers as Ee, createTextVNode as d, ref as v, computed as q, useTemplateRef as Se, onMounted as De } from "vue";
|
|
2
2
|
import { icons as ae, EllipsisVertical as Te, Paintbrush as Pe, ToyBrick as Me, Plus as Ue } from "lucide-vue-next";
|
|
3
3
|
import { useModuleRoute as se, useConfirmation as ie, useModuleStorage as $e, useModulePermissions as Ne, useModuleBreadcrumbs as Re, useFirebaseIntegration as Ae } from "@oneclick.dev/cms-kit";
|
|
4
|
-
import { i as Le } from "./interpolation-
|
|
4
|
+
import { i as Le } from "./interpolation-w7IRDJwK.mjs";
|
|
5
5
|
import { t as z } from "./index-RLz1QPrf.mjs";
|
|
6
6
|
const Be = { class: "grid @lg:grid-cols-2 @2xl:grid-cols-3 @4xl:grid-cols-4 @7xl:grid-cols-5 gap-4" }, Ie = { class: "relative flex pl-3 @5xl:pl-6 pr-1.5 @5xl:pr-3 gap-3" }, Fe = { class: "self-center overflow-hidden w-full group-hover:w-[calc(100%-6.5rem)]" }, ze = ["title"], Oe = ["title"], je = { class: "absolute -top-1 right-2 self-start opacity-0 group-hover:opacity-100" }, qe = /* @__PURE__ */ G({
|
|
7
7
|
__name: "CollectionsGridView",
|