@oneclick.dev/cms-core-modules 0.0.59 → 0.0.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Components-D9yIIosM.mjs → Components-C83O-xlF.mjs} +1 -1
- package/dist/{ContentEditor-DCmt_y_R.js → ContentEditor-BAepN3Yd.js} +51 -34
- package/dist/{ContentEditor-CtGeIzC4.mjs → ContentEditor-BPjWW3d1.mjs} +12341 -10099
- package/dist/Create-Bh4g6QW4.js +1 -0
- package/dist/{Create-Bwf1RXdG.mjs → Create-Cf7pvh5G.mjs} +38 -39
- package/dist/DateFormatter-BPPBZp1j.js +1 -0
- package/dist/{CalendarDate-CRT2Viyt.mjs → DateFormatter-DsmlAuYV.mjs} +353 -256
- package/dist/{Detail-CpfOQChd.mjs → Detail-B4b_FLDa.mjs} +2 -2
- package/dist/{Detail-B-PnkcXD.mjs → Detail-BGD75ul4.mjs} +2 -2
- package/dist/{Detail-Dd_OkpcN.js → Detail-BayNaAg9.js} +1 -1
- package/dist/{Detail-C4E1T87K.mjs → Detail-Byk781b4.mjs} +3 -3
- package/dist/{Detail-Cd5CBVN0.js → Detail-CnK-qbhE.js} +1 -1
- package/dist/Detail-CtbWzq-R.js +1 -0
- package/dist/{Detail-CNfTDUE5.js → Detail-Cxd2VMOl.js} +1 -1
- package/dist/{Detail-BVlGSjOq.mjs → Detail-D10shmpK.mjs} +6 -7
- package/dist/{Detail-CwagT6gQ.mjs → Detail-U0mgLKt6.mjs} +2 -2
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs +75 -0
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js +1 -0
- package/dist/{Entries-zyhycw1M.mjs → Entries-C6Di46My.mjs} +1 -1
- package/dist/{Find-BPR0uU-Z.mjs → Find-B4sAEx0B.mjs} +2 -2
- package/dist/{Find-BidEQJxT.js → Find-Ds6OvuH6.js} +1 -1
- package/dist/{GlobalStyling-BLQ_1W2y.mjs → GlobalStyling-C9VthHWK.mjs} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BJitmbPE.mjs +396 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-D50uTpZY.js +1 -0
- package/dist/Overview-B-8TLLjh.js +1 -0
- package/dist/{Overview-CDN88OSM.mjs → Overview-BCpJNiEB.mjs} +1 -1
- package/dist/Overview-B_99j5eA.js +1 -0
- package/dist/{Overview-BLsZMHNW.mjs → Overview-CIa1E-HH.mjs} +1 -1
- package/dist/{Overview-D1nJLBe1.mjs → Overview-CgViRnNc.mjs} +1 -1
- package/dist/Overview-DtWvKB3W.mjs +327 -0
- package/dist/Overview-HvlDEgqi.mjs +862 -0
- package/dist/{Overview-BH3NwvNX.mjs → Overview-Su8ZUbMs.mjs} +3 -3
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-CI8YgHdU.js +345 -0
- package/dist/ReservationDetailDialog.vue_vue_type_script_setup_true_lang-P-MWwcVh.mjs +2093 -0
- package/dist/{TableView-CS13LLxk.mjs → TableView-B8iLWWcP.mjs} +48394 -36321
- package/dist/TableView-BxK6R8v3.js +312 -0
- package/dist/{TemplateList.vue_vue_type_script_setup_true_lang-BiLAkhIA.mjs → TemplateList.vue_vue_type_script_setup_true_lang-Cmovy7kk.mjs} +5 -5
- package/dist/{View-C7axVP9t.mjs → View-DDXN0tKD.mjs} +7 -7
- package/dist/View-DfzaVOzS.js +1 -0
- package/dist/agenda-D81m29_4.mjs +1135 -0
- package/dist/agenda-uzPPxgsW.js +1 -0
- package/dist/availability-B-tRp8hB.mjs +629 -0
- package/dist/availability-BiBbzEIM.js +1 -0
- package/dist/{exceptions-D3b18TiY.mjs → exceptions-BFchkR06.mjs} +70 -71
- package/dist/exceptions-C-DPRNQa.js +1 -0
- package/dist/index-4tjmIans.js +1 -0
- package/dist/index-AmUV8LZQ.mjs +176 -0
- package/dist/index-BDaVYdkD.mjs +7763 -0
- package/dist/{index-DT1wWnUk.mjs → index-BWDwEd8D.mjs} +1 -1
- package/dist/{index-CImCyE3L.mjs → index-BfBBm9uY.mjs} +1 -1
- package/dist/{index-DMoyoaks.mjs → index-Bkq58CeQ.mjs} +2 -2
- package/dist/{index-DI6mydpm.mjs → index-CABh6Qn6.mjs} +2 -2
- package/dist/{index-CQiY-oTN.mjs → index-CQkOH2_3.mjs} +1 -1
- package/dist/{index-Bwi1mtkq.mjs → index-CU-tbS5W.mjs} +1 -1
- package/dist/{index-BzuHN-r8.mjs → index-Cpnn_Pxd.mjs} +1 -1
- package/dist/index-CxETuRsG.js +1 -0
- package/dist/{index-DyCHxFp3.mjs → index-DRqJOqUR.mjs} +502 -449
- package/dist/index-DTago6vW-Bhr8E1Y6.js +88 -0
- package/dist/index-DTago6vW-CnomHQ_S.mjs +4123 -0
- package/dist/index-DfV8-6ON.js +245 -0
- package/dist/index-Dnn2SCSl.js +1 -0
- package/dist/{index-BEGU8Kme.mjs → index-Dpl9sU6a.mjs} +2 -2
- package/dist/index-Uf7TwBuW.mjs +110 -0
- package/dist/index-YMaY4uuk-BgpTtr73.js +1 -0
- package/dist/{index-CKPshlZ8-BQiiP6r_.mjs → index-YMaY4uuk-C_xV5K9Z.mjs} +399 -363
- package/dist/{index--jjEzba7.mjs → index-cOnxXTbF.mjs} +1 -1
- package/dist/index-hlylYYgy.mjs +24 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +98 -81
- package/dist/orders-Bh8w0ueq.mjs +346 -0
- package/dist/orders-Dt0zMz97.js +1 -0
- package/dist/payment-BQaAqQ5q.js +1 -0
- package/dist/payment-BbWByERf.mjs +1080 -0
- package/dist/regular-1LXNPviB.js +1 -0
- package/dist/regular-_05oq5Tx.mjs +1101 -0
- package/dist/regular-slots-Bs3WJB3U.js +1 -0
- package/dist/regular-slots-C2NYxLPn.mjs +222 -0
- package/dist/resources-DgPnEv76.mjs +811 -0
- package/dist/resources-eb0pivDL.js +1 -0
- package/dist/src/appointments/components/edit/EditLayout.vue.d.ts +2 -2
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +92 -0
- package/dist/src/appointments/components/edit/EventDialog/CancelReservationDialog.vue.d.ts +8 -0
- package/dist/src/appointments/components/edit/EventDialog/EventDialog.vue.d.ts +10 -0
- package/dist/src/appointments/components/edit/{EventDialog.vue.d.ts → EventDialog/ResendConfirmationDialog.vue.d.ts} +1 -1
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +51 -0
- package/dist/src/appointments/components/edit/EventDialog/TimelineChart.vue.d.ts +24 -0
- package/dist/src/appointments/components/edit/EventDialog/TransferReservationDialog.vue.d.ts +4 -0
- package/dist/src/appointments/components/edit/EventTimeline.vue.d.ts +15 -7
- package/dist/src/appointments/components/edit/NewReservationDialog/NewReservationDialog.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +68 -0
- package/dist/src/appointments/components/edit/dashboard/Timeline.vue.d.ts +15 -0
- package/dist/src/appointments/components/edit/dashboard/timeline/ResourceSelector.vue.d.ts +50 -0
- package/dist/src/appointments/config.d.ts +30 -0
- package/dist/src/appointments/index.d.ts +32 -5
- package/dist/src/appointments/pages/edit/agenda.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/availability.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/index.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +64 -0
- package/dist/src/appointments/pages/edit/payment.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/regular-slots.vue.d.ts +1 -1
- package/dist/src/appointments/pages/edit/resources.vue.d.ts +1 -1
- package/dist/src/appointments/routes.d.ts +2 -5
- package/dist/src/appointments/types.d.ts +16 -0
- package/dist/src/appointments/utils/printReservation.d.ts +45 -0
- package/dist/src/content-manager/components/content-editor/ContentStructuredContentSections.vue.d.ts +4 -0
- package/dist/src/content-manager/components/content-editor/PageSettings.vue.d.ts +2 -0
- package/dist/src/content-manager/components/content-editor/SidebarSectionWrapper.vue.d.ts +11 -1
- package/dist/src/content-manager/types.d.ts +5 -0
- package/dist/{vee-validate-zod-BPQyEfpF.js → vee-validate-zod-ByykgYKJ.js} +1 -1
- package/dist/{vee-validate-zod-IXkfh-6Q.mjs → vee-validate-zod-CcOwoF6y.mjs} +4 -4
- package/package.json +4 -2
- package/dist/CalendarDate-CWtpXgpD.js +0 -1
- package/dist/Create-BP8TX6rj.js +0 -1
- package/dist/DateFormatter-BbcSwTs4.js +0 -1
- package/dist/DateFormatter-CbO0PVUK.mjs +0 -99
- package/dist/Detail-DUo6qKqO.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-BWuKVkvV.js +0 -1
- package/dist/EditLayout.vue_vue_type_script_setup_true_lang-D0-EcU0_.mjs +0 -55
- package/dist/Overview-BNMZ9MUK.js +0 -1
- package/dist/Overview-CEPodGCn.mjs +0 -311
- package/dist/Overview-CvquDPhB.js +0 -1
- package/dist/Overview-D67UjG6n.mjs +0 -947
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-0xZSq0rx.js +0 -1
- package/dist/RegularSlotEditor.vue_vue_type_script_setup_true_lang-Bj_PVLLV.mjs +0 -392
- package/dist/TableView-Dv4YXBD1.js +0 -111
- package/dist/View-7qb_ohVo.js +0 -1
- package/dist/agenda-B49oKGeh.mjs +0 -706
- package/dist/agenda-DipQ5IWP.js +0 -1
- package/dist/availability-C7q9tq6l.js +0 -1
- package/dist/availability-DeCkqiu8.mjs +0 -613
- package/dist/exceptions-DJ9zWX3k.js +0 -1
- package/dist/index-CKPshlZ8-CIz1tDwX.js +0 -1
- package/dist/index-DUeFrD-B.js +0 -1
- package/dist/index-DsnoK4ia.mjs +0 -579
- package/dist/index-WL1P6d3j.js +0 -1
- package/dist/index-_mG-aU3Z.mjs +0 -87
- package/dist/index-_sQDF1pH.js +0 -1
- package/dist/index-klI238nT.mjs +0 -24
- package/dist/payment-kTjsV0Jj.js +0 -1
- package/dist/payment-zpCM0LD-.mjs +0 -981
- package/dist/regular-C4_3YXqx.mjs +0 -602
- package/dist/regular-DFwPEbZO.js +0 -1
- package/dist/regular-slots-4ooEpICB.mjs +0 -67
- package/dist/regular-slots-BAVGbomI.js +0 -1
- package/dist/resources-MpQkSstv.mjs +0 -563
- package/dist/resources-iM28T3dD.js +0 -1
- package/dist/src/appointments/components/edit/RegularSlotEditor.vue.d.ts +0 -16
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, ref as A, resolveComponent as l, createElementBlock as f, openBlock as s, Fragment as S, createElementVNode as u, createBlock as E, createVNode as t, withCtx as n, unref as c, createTextVNode as i, createCommentVNode as T, toDisplayString as O, renderList as q, normalizeClass as K } from "vue";
|
|
2
|
-
import { useModule as Q, useFirebaseIntegration as W, useModuleRoute as Z, useConfirmation as ee, useModuleBreadcrumbs as te } from "@oneclick.dev/cms-kit";
|
|
3
|
-
import { CalendarX as ne, MoreHorizontalIcon as V, Copy as oe, ChevronsLeftRightEllipsis as le, Upload as ae, Trash2Icon as se, ImportIcon as ie } from "lucide-vue-next";
|
|
4
|
-
const de = { class: "container mx-auto p-8" }, re = { key: 0 }, ue = { class: "flex gap-2" }, ce = { key: 2 }, pe = { class: "flex justify-between items-center gap-4 mb-4" }, fe = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "flex items-center gap-2"
|
|
7
|
-
}, me = { class: "mr-2" }, ve = ["onClick"], _e = { class: "flex justify-between items-center mb-2" }, ge = { class: "flex flex-col items-start" }, ye = { class: "text-lg font-medium" }, Ce = { class: "text-sm text-muted-foreground" }, ke = { key: 0 }, we = { key: 1 }, xe = { class: "flex justify-end mt-8" }, Ie = /* @__PURE__ */ X({
|
|
8
|
-
__name: "Overview",
|
|
9
|
-
setup(be) {
|
|
10
|
-
const { config: _ } = Q(), C = W(_.project), { navigateTo: M } = Z(), { confirm: z } = ee();
|
|
11
|
-
te(() => []);
|
|
12
|
-
const k = A(null), m = A(!1), d = A([]), I = A("importAgendasInput"), G = (a) => {
|
|
13
|
-
m.value = !0, d.value = [a];
|
|
14
|
-
}, x = async () => {
|
|
15
|
-
k.value = await C.find(_.agendaCollection);
|
|
16
|
-
}, R = async (a) => {
|
|
17
|
-
const e = await C.get(_.agendaCollection, a);
|
|
18
|
-
if (!e) {
|
|
19
|
-
alert("Agenda not found");
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const r = prompt("Enter name for duplicated agenda", e.serviceName + " (Copy)");
|
|
23
|
-
if (!r)
|
|
24
|
-
return;
|
|
25
|
-
const p = { ...e, serviceName: r };
|
|
26
|
-
delete p.id, await C.add(_.agendaCollection, p), await x();
|
|
27
|
-
}, H = async (a) => {
|
|
28
|
-
await z("Are you sure you want to delete this agenda? This action cannot be undone.") && (await C.remove(_.agendaCollection, a), await x());
|
|
29
|
-
}, J = async () => {
|
|
30
|
-
let a = k.value.filter((p) => d.value.includes(p.id));
|
|
31
|
-
a = a.map((p) => {
|
|
32
|
-
const { id: g, ...y } = p;
|
|
33
|
-
return y;
|
|
34
|
-
});
|
|
35
|
-
const e = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(a, null, 2)), r = document.createElement("a");
|
|
36
|
-
r.setAttribute("href", e), r.setAttribute("download", "agendas_export.json"), document.body.appendChild(r), r.click(), r.remove(), m.value = !1, d.value = [];
|
|
37
|
-
}, F = async (a) => {
|
|
38
|
-
const e = a.target;
|
|
39
|
-
if (!e.files || e.files.length === 0)
|
|
40
|
-
return;
|
|
41
|
-
const p = await e.files[0].text();
|
|
42
|
-
let g;
|
|
43
|
-
try {
|
|
44
|
-
g = JSON.parse(p);
|
|
45
|
-
} catch {
|
|
46
|
-
alert("Invalid JSON file");
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
if (!Array.isArray(g)) {
|
|
50
|
-
alert("Invalid agendas format");
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
for (const y of g)
|
|
54
|
-
await C.add(_.agendaCollection, y);
|
|
55
|
-
e.value = "", await x();
|
|
56
|
-
};
|
|
57
|
-
return x(), (a, e) => {
|
|
58
|
-
const r = l("Spinner"), p = l("EmptyMedia"), g = l("EmptyTitle"), y = l("EmptyDescription"), L = l("EmptyHeader"), v = l("Button"), U = l("EmptyContent"), Y = l("Empty"), D = l("DropdownMenuTrigger"), w = l("DropdownMenuItem"), N = l("DropdownMenuGroup"), $ = l("DropdownMenuContent"), h = l("DropdownMenu"), j = l("ButtonGroup"), B = l("Checkbox");
|
|
59
|
-
return s(), f(S, null, [
|
|
60
|
-
u("div", de, [
|
|
61
|
-
k.value === null ? (s(), f("div", re, [
|
|
62
|
-
t(r, { class: "mx-auto" })
|
|
63
|
-
])) : k.value.length === 0 ? (s(), E(Y, { key: 1 }, {
|
|
64
|
-
default: n(() => [
|
|
65
|
-
t(L, null, {
|
|
66
|
-
default: n(() => [
|
|
67
|
-
t(p, { variant: "icon" }, {
|
|
68
|
-
default: n(() => [
|
|
69
|
-
t(c(ne), { class: "size-4-6" })
|
|
70
|
-
]),
|
|
71
|
-
_: 1
|
|
72
|
-
}),
|
|
73
|
-
t(g, null, {
|
|
74
|
-
default: n(() => [...e[4] || (e[4] = [
|
|
75
|
-
i("No Agendas Yet", -1)
|
|
76
|
-
])]),
|
|
77
|
-
_: 1
|
|
78
|
-
}),
|
|
79
|
-
t(y, null, {
|
|
80
|
-
default: n(() => [...e[5] || (e[5] = [
|
|
81
|
-
i(" You haven't created any agenda yet. Get started by creating your first agenda. ", -1)
|
|
82
|
-
])]),
|
|
83
|
-
_: 1
|
|
84
|
-
})
|
|
85
|
-
]),
|
|
86
|
-
_: 1
|
|
87
|
-
}),
|
|
88
|
-
t(U, null, {
|
|
89
|
-
default: n(() => [
|
|
90
|
-
u("div", ue, [
|
|
91
|
-
t(v, {
|
|
92
|
-
onClick: e[0] || (e[0] = (o) => c(M)("/create"))
|
|
93
|
-
}, {
|
|
94
|
-
default: n(() => [...e[6] || (e[6] = [
|
|
95
|
-
i("Create Agenda", -1)
|
|
96
|
-
])]),
|
|
97
|
-
_: 1
|
|
98
|
-
})
|
|
99
|
-
])
|
|
100
|
-
]),
|
|
101
|
-
_: 1
|
|
102
|
-
})
|
|
103
|
-
]),
|
|
104
|
-
_: 1
|
|
105
|
-
})) : (s(), f("div", ce, [
|
|
106
|
-
u("div", pe, [
|
|
107
|
-
e[9] || (e[9] = u("h2", { class: "text-2xl font-bold" }, "Agendas", -1)),
|
|
108
|
-
m.value ? (s(), f("div", fe, [
|
|
109
|
-
u("span", me, O(d.value.length) + " selected", 1),
|
|
110
|
-
t(v, {
|
|
111
|
-
variant: "outline",
|
|
112
|
-
onClick: e[1] || (e[1] = (o) => {
|
|
113
|
-
m.value = !1, d.value = [];
|
|
114
|
-
})
|
|
115
|
-
}, {
|
|
116
|
-
default: n(() => [...e[7] || (e[7] = [
|
|
117
|
-
i(" Cancel ", -1)
|
|
118
|
-
])]),
|
|
119
|
-
_: 1
|
|
120
|
-
}),
|
|
121
|
-
t(v, {
|
|
122
|
-
onClick: J,
|
|
123
|
-
disabled: d.value.length === 0
|
|
124
|
-
}, {
|
|
125
|
-
default: n(() => [...e[8] || (e[8] = [
|
|
126
|
-
i(" Export ", -1)
|
|
127
|
-
])]),
|
|
128
|
-
_: 1
|
|
129
|
-
}, 8, ["disabled"])
|
|
130
|
-
])) : T("", !0)
|
|
131
|
-
]),
|
|
132
|
-
(s(!0), f(S, null, q(k.value, (o) => (s(), f("button", {
|
|
133
|
-
key: o.id,
|
|
134
|
-
class: K(["block w-full mb-4 p-4 border rounded-md bg-background", { "cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50": m.value }]),
|
|
135
|
-
onClick: (b) => m.value ? d.value.includes(o.id) ? d.value = d.value.filter((P) => P !== o.id) : d.value.push(o.id) : null
|
|
136
|
-
}, [
|
|
137
|
-
u("div", _e, [
|
|
138
|
-
u("div", ge, [
|
|
139
|
-
u("h3", ye, O(o.serviceName), 1),
|
|
140
|
-
u("p", Ce, [
|
|
141
|
-
o.type === "regular" ? (s(), f("span", ke, "Regular Agenda")) : T("", !0)
|
|
142
|
-
])
|
|
143
|
-
]),
|
|
144
|
-
m.value ? (s(), f("div", we, [
|
|
145
|
-
d.value.includes(o.id) ? (s(), E(B, {
|
|
146
|
-
key: 0,
|
|
147
|
-
tabindex: "-1",
|
|
148
|
-
defaultValue: !0
|
|
149
|
-
})) : (s(), E(B, {
|
|
150
|
-
key: 1,
|
|
151
|
-
tabindex: "-1",
|
|
152
|
-
defaultValue: !1
|
|
153
|
-
}))
|
|
154
|
-
])) : (s(), E(j, { key: 0 }, {
|
|
155
|
-
default: n(() => [
|
|
156
|
-
t(v, {
|
|
157
|
-
variant: "outline",
|
|
158
|
-
onClick: (b) => c(M)(`/edit/${o.id}`)
|
|
159
|
-
}, {
|
|
160
|
-
default: n(() => [...e[10] || (e[10] = [
|
|
161
|
-
i(" Edit Agenda ", -1)
|
|
162
|
-
])]),
|
|
163
|
-
_: 1
|
|
164
|
-
}, 8, ["onClick"]),
|
|
165
|
-
t(h, null, {
|
|
166
|
-
default: n(() => [
|
|
167
|
-
t(D, { "as-child": "" }, {
|
|
168
|
-
default: n(() => [
|
|
169
|
-
t(v, {
|
|
170
|
-
variant: "outline",
|
|
171
|
-
size: "icon",
|
|
172
|
-
"aria-label": "More Options"
|
|
173
|
-
}, {
|
|
174
|
-
default: n(() => [
|
|
175
|
-
t(c(V))
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
})
|
|
179
|
-
]),
|
|
180
|
-
_: 1
|
|
181
|
-
}),
|
|
182
|
-
t($, {
|
|
183
|
-
align: "end",
|
|
184
|
-
class: "w-52"
|
|
185
|
-
}, {
|
|
186
|
-
default: n(() => [
|
|
187
|
-
t(N, null, {
|
|
188
|
-
default: n(() => [
|
|
189
|
-
t(w, {
|
|
190
|
-
onClick: (b) => R(o.id)
|
|
191
|
-
}, {
|
|
192
|
-
default: n(() => [
|
|
193
|
-
t(c(oe)),
|
|
194
|
-
e[11] || (e[11] = i(" Duplicate Agenda ", -1))
|
|
195
|
-
]),
|
|
196
|
-
_: 1
|
|
197
|
-
}, 8, ["onClick"]),
|
|
198
|
-
t(w, null, {
|
|
199
|
-
default: n(() => [
|
|
200
|
-
t(c(le)),
|
|
201
|
-
e[12] || (e[12] = i(" API Set-up ", -1))
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
}),
|
|
205
|
-
t(w, {
|
|
206
|
-
onClick: (b) => G(o.id)
|
|
207
|
-
}, {
|
|
208
|
-
default: n(() => [
|
|
209
|
-
t(c(ae)),
|
|
210
|
-
e[13] || (e[13] = i(" Export Agenda ", -1))
|
|
211
|
-
]),
|
|
212
|
-
_: 1
|
|
213
|
-
}, 8, ["onClick"]),
|
|
214
|
-
t(w, {
|
|
215
|
-
variant: "destructive",
|
|
216
|
-
onClick: (b) => H(o.id)
|
|
217
|
-
}, {
|
|
218
|
-
default: n(() => [
|
|
219
|
-
t(c(se)),
|
|
220
|
-
e[14] || (e[14] = i(" Remove Agenda ", -1))
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
}, 8, ["onClick"])
|
|
224
|
-
]),
|
|
225
|
-
_: 2
|
|
226
|
-
}, 1024)
|
|
227
|
-
]),
|
|
228
|
-
_: 2
|
|
229
|
-
}, 1024)
|
|
230
|
-
]),
|
|
231
|
-
_: 2
|
|
232
|
-
}, 1024)
|
|
233
|
-
]),
|
|
234
|
-
_: 2
|
|
235
|
-
}, 1024))
|
|
236
|
-
])
|
|
237
|
-
], 10, ve))), 128)),
|
|
238
|
-
u("div", xe, [
|
|
239
|
-
t(j, null, {
|
|
240
|
-
default: n(() => [
|
|
241
|
-
t(v, {
|
|
242
|
-
onClick: e[2] || (e[2] = (o) => c(M)("/create")),
|
|
243
|
-
class: "border-r"
|
|
244
|
-
}, {
|
|
245
|
-
default: n(() => [...e[15] || (e[15] = [
|
|
246
|
-
i("New Agenda", -1)
|
|
247
|
-
])]),
|
|
248
|
-
_: 1
|
|
249
|
-
}),
|
|
250
|
-
t(h, null, {
|
|
251
|
-
default: n(() => [
|
|
252
|
-
t(D, { "as-child": "" }, {
|
|
253
|
-
default: n(() => [
|
|
254
|
-
t(v, {
|
|
255
|
-
size: "icon",
|
|
256
|
-
"aria-label": "More Options"
|
|
257
|
-
}, {
|
|
258
|
-
default: n(() => [
|
|
259
|
-
t(c(V))
|
|
260
|
-
]),
|
|
261
|
-
_: 1
|
|
262
|
-
})
|
|
263
|
-
]),
|
|
264
|
-
_: 1
|
|
265
|
-
}),
|
|
266
|
-
t($, {
|
|
267
|
-
align: "end",
|
|
268
|
-
class: "w-52"
|
|
269
|
-
}, {
|
|
270
|
-
default: n(() => [
|
|
271
|
-
t(N, null, {
|
|
272
|
-
default: n(() => [
|
|
273
|
-
t(w, {
|
|
274
|
-
onClick: e[3] || (e[3] = (o) => I.value.click())
|
|
275
|
-
}, {
|
|
276
|
-
default: n(() => [
|
|
277
|
-
t(c(ie)),
|
|
278
|
-
e[16] || (e[16] = i(" Import Agendas... ", -1))
|
|
279
|
-
]),
|
|
280
|
-
_: 1
|
|
281
|
-
})
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
})
|
|
285
|
-
]),
|
|
286
|
-
_: 1
|
|
287
|
-
})
|
|
288
|
-
]),
|
|
289
|
-
_: 1
|
|
290
|
-
})
|
|
291
|
-
]),
|
|
292
|
-
_: 1
|
|
293
|
-
})
|
|
294
|
-
])
|
|
295
|
-
]))
|
|
296
|
-
]),
|
|
297
|
-
u("input", {
|
|
298
|
-
type: "file",
|
|
299
|
-
ref_key: "importAgendasInput",
|
|
300
|
-
ref: I,
|
|
301
|
-
class: "hidden",
|
|
302
|
-
accept: ".json,application/json",
|
|
303
|
-
onChange: F
|
|
304
|
-
}, null, 544)
|
|
305
|
-
], 64);
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
});
|
|
309
|
-
export {
|
|
310
|
-
Ie as default
|
|
311
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("@oneclick.dev/cms-kit"),d=require("lucide-vue-next"),O={class:"container mx-auto p-8"},z={key:0},G={class:"flex gap-2"},R={key:2},H={class:"flex justify-between items-center gap-4 mb-4"},q={key:0,class:"flex items-center gap-2"},F={class:"mr-2"},J=["onClick"],L={class:"flex justify-between items-center mb-2"},P={class:"flex flex-col items-start"},U={class:"text-lg font-medium"},Y={class:"text-sm text-muted-foreground"},K={key:0},X={key:1},Q={class:"flex justify-end mt-8"},W=e.defineComponent({__name:"Overview",setup(Z){const{config:c}=C.useModule(),m=C.useFirebaseIntegration(c.project),{navigateTo:g}=C.useModuleRoute(),{confirm:b}=C.useConfirmation();C.useModuleBreadcrumbs(()=>[]);const f=e.ref(null),i=e.ref(!1),a=e.ref([]),_=e.ref("importAgendasInput"),A=n=>{i.value=!0,a.value=[n]},x=async()=>{f.value=await m.find(c.agendaCollection)},B=async n=>{const t=await m.get(c.agendaCollection,n);if(!t){alert("Agenda not found");return}const l=prompt("Enter name for duplicated agenda",t.serviceName+" (Copy)");if(!l)return;const r={...t,serviceName:l};delete r.id,await m.add(c.agendaCollection,r),await x()},M=async n=>{await b("Are you sure you want to delete this agenda? This action cannot be undone.")&&(await m.remove(c.agendaCollection,n),await x())},T=async()=>{let n=f.value.filter(r=>a.value.includes(r.id));n=n.map(r=>{const{id:u,...p}=r;return p});const t="data:text/json;charset=utf-8,"+encodeURIComponent(JSON.stringify(n,null,2)),l=document.createElement("a");l.setAttribute("href",t),l.setAttribute("download","agendas_export.json"),document.body.appendChild(l),l.click(),l.remove(),i.value=!1,a.value=[]},I=async n=>{const t=n.target;if(!t.files||t.files.length===0)return;const r=await t.files[0].text();let u;try{u=JSON.parse(r)}catch{alert("Invalid JSON file");return}if(!Array.isArray(u)){alert("Invalid agendas format");return}for(const p of u)await m.add(c.agendaCollection,p);t.value="",await x()};return x(),(n,t)=>{const l=e.resolveComponent("Spinner"),r=e.resolveComponent("EmptyMedia"),u=e.resolveComponent("EmptyTitle"),p=e.resolveComponent("EmptyDescription"),D=e.resolveComponent("EmptyHeader"),s=e.resolveComponent("Button"),S=e.resolveComponent("EmptyContent"),$=e.resolveComponent("Empty"),V=e.resolveComponent("DropdownMenuTrigger"),v=e.resolveComponent("DropdownMenuItem"),w=e.resolveComponent("DropdownMenuGroup"),k=e.resolveComponent("DropdownMenuContent"),y=e.resolveComponent("DropdownMenu"),E=e.resolveComponent("ButtonGroup"),h=e.resolveComponent("Checkbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",O,[f.value===null?(e.openBlock(),e.createElementBlock("div",z,[e.createVNode(l,{class:"mx-auto"})])):f.value.length===0?(e.openBlock(),e.createBlock($,{key:1},{default:e.withCtx(()=>[e.createVNode(D,null,{default:e.withCtx(()=>[e.createVNode(r,{variant:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.CalendarX),{class:"size-4-6"})]),_:1}),e.createVNode(u,null,{default:e.withCtx(()=>[...t[4]||(t[4]=[e.createTextVNode("No Agendas Yet",-1)])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[...t[5]||(t[5]=[e.createTextVNode(" You haven't created any agenda yet. Get started by creating your first agenda. ",-1)])]),_:1})]),_:1}),e.createVNode(S,null,{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createVNode(s,{onClick:t[0]||(t[0]=o=>e.unref(g)("/create"))},{default:e.withCtx(()=>[...t[6]||(t[6]=[e.createTextVNode("Create Agenda",-1)])]),_:1})])]),_:1})]),_:1})):(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",H,[t[9]||(t[9]=e.createElementVNode("h2",{class:"text-2xl font-bold"},"Agendas",-1)),i.value?(e.openBlock(),e.createElementBlock("div",q,[e.createElementVNode("span",F,e.toDisplayString(a.value.length)+" selected",1),e.createVNode(s,{variant:"outline",onClick:t[1]||(t[1]=o=>{i.value=!1,a.value=[]})},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode(" Cancel ",-1)])]),_:1}),e.createVNode(s,{onClick:T,disabled:a.value.length===0},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode(" Export ",-1)])]),_:1},8,["disabled"])])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,o=>(e.openBlock(),e.createElementBlock("button",{key:o.id,class:e.normalizeClass(["block w-full mb-4 p-4 border rounded-md bg-background",{"cursor-pointer hover:bg-accent focus-visible:outline-0 focus:ring-2 ring-ring/50":i.value}]),onClick:N=>i.value?a.value.includes(o.id)?a.value=a.value.filter(j=>j!==o.id):a.value.push(o.id):null},[e.createElementVNode("div",L,[e.createElementVNode("div",P,[e.createElementVNode("h3",U,e.toDisplayString(o.serviceName),1),e.createElementVNode("p",Y,[o.type==="regular"?(e.openBlock(),e.createElementBlock("span",K,"Regular Agenda")):e.createCommentVNode("",!0)])]),i.value?(e.openBlock(),e.createElementBlock("div",X,[a.value.includes(o.id)?(e.openBlock(),e.createBlock(h,{key:0,tabindex:"-1",defaultValue:!0})):(e.openBlock(),e.createBlock(h,{key:1,tabindex:"-1",defaultValue:!1}))])):(e.openBlock(),e.createBlock(E,{key:0},{default:e.withCtx(()=>[e.createVNode(s,{variant:"outline",onClick:N=>e.unref(g)(`/edit/${o.id}`)},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode(" Edit Agenda ",-1)])]),_:1},8,["onClick"]),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(V,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(s,{variant:"outline",size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(k,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,{onClick:N=>B(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Copy)),t[11]||(t[11]=e.createTextVNode(" Duplicate Agenda ",-1))]),_:1},8,["onClick"]),e.createVNode(v,null,{default:e.withCtx(()=>[e.createVNode(e.unref(d.ChevronsLeftRightEllipsis)),t[12]||(t[12]=e.createTextVNode(" API Set-up ",-1))]),_:1}),e.createVNode(v,{onClick:N=>A(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Upload)),t[13]||(t[13]=e.createTextVNode(" Export Agenda ",-1))]),_:1},8,["onClick"]),e.createVNode(v,{variant:"destructive",onClick:N=>M(o.id)},{default:e.withCtx(()=>[e.createVNode(e.unref(d.Trash2Icon)),t[14]||(t[14]=e.createTextVNode(" Remove Agenda ",-1))]),_:1},8,["onClick"])]),_:2},1024)]),_:2},1024)]),_:2},1024)]),_:2},1024))])],10,J))),128)),e.createElementVNode("div",Q,[e.createVNode(E,null,{default:e.withCtx(()=>[e.createVNode(s,{onClick:t[2]||(t[2]=o=>e.unref(g)("/create")),class:"border-r"},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("New Agenda",-1)])]),_:1}),e.createVNode(y,null,{default:e.withCtx(()=>[e.createVNode(V,{"as-child":""},{default:e.withCtx(()=>[e.createVNode(s,{size:"icon","aria-label":"More Options"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.MoreHorizontalIcon))]),_:1})]),_:1}),e.createVNode(k,{align:"end",class:"w-52"},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(()=>[e.createVNode(v,{onClick:t[3]||(t[3]=o=>_.value.click())},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ImportIcon)),t[16]||(t[16]=e.createTextVNode(" Import Agendas... ",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})])]))]),e.createElementVNode("input",{type:"file",ref_key:"importAgendasInput",ref:_,class:"hidden",accept:".json,application/json",onChange:I},null,544)],64)}}});exports.default=W;
|