@oneclick.dev/cms-core-modules 0.0.116 → 0.0.117
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-FV3QpaUX.mjs → Acquisition-X5-eksDw.mjs} +2 -2
- package/dist/{Audience-ka0b7YPE.mjs → Audience-CXryJ8tc.mjs} +2 -2
- package/dist/{ContentEditor-Df5uWpVC.mjs → ContentEditor-CUe6-NwF.mjs} +7001 -5467
- package/dist/{ContentEditor-CsbOFg3a.js → ContentEditor-DWoXc0T_.js} +39 -39
- package/dist/{Create-BXNLRQag.mjs → Create-BPA2ywrd.mjs} +1 -1
- package/dist/{DateFormatter-qbhRYxI_.mjs → DateFormatter-BkKoSf_l.mjs} +5 -5
- package/dist/{Detail-BCOcP2ql.mjs → Detail-C1Blq61w.mjs} +1 -1
- package/dist/{Detail-ChD5XurA.mjs → Detail-CfsPwl4s.mjs} +17 -17
- package/dist/{Detail-DnX7tsqN.mjs → Detail-CtItxMX4.mjs} +1 -1
- package/dist/{Detail-Btzwo0Y3.mjs → Detail-Dnpnmy4-.mjs} +1 -1
- package/dist/{Find-zN_dKz4p.mjs → Find-BAvaNf90.mjs} +1 -1
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-BHeMJ6nr.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-BXTkYCm_.mjs} +1 -1
- package/dist/{Overview-BR_y8x3W.mjs → Overview-BWLxUksJ.mjs} +1 -1
- package/dist/{Overview-MpgkLB6m.mjs → Overview-Bjvu9Lfc.mjs} +3 -3
- package/dist/{SeoHealth-bVQj_Xgm.mjs → SeoHealth-I2mqiuLm.mjs} +3 -3
- package/dist/{TableView-Csv5Lycy.mjs → TableView-BQI3CWll.mjs} +2 -2
- package/dist/{agenda-BSdlrfxv.mjs → agenda-B3nj388v.mjs} +3 -3
- package/dist/{exceptions-CqityDo9.mjs → exceptions-Dgj54ULn.mjs} +1 -1
- package/dist/{index-DZV720u-.mjs → index-52nwosIs.mjs} +45 -45
- package/dist/{index-CkVwMqpn.mjs → index-Bnn9LahC.mjs} +52 -52
- package/dist/{index-B8GvmAwh.mjs → index-DiTIA8Sh.mjs} +27 -27
- package/dist/{index-CM4eaK5T.mjs → index-Djp4EBb0.mjs} +130 -130
- package/dist/{index-L54VBzwJ.mjs → index-ar4tbR3i.mjs} +8 -8
- package/dist/{index-BIF2RB7k.mjs → index-cC_2cw31.mjs} +4 -4
- package/dist/{index-CFzn2Lus.mjs → index-hMp4p5qA.mjs} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +20 -20
- package/dist/{math-BJ-oX_IM.mjs → math-Bkw6u412.mjs} +11 -11
- package/dist/{resources-B-D5MUhV.mjs → resources-CK0oWssj.mjs} +1 -1
- package/dist/{vee-validate-zod-DNjTLCgh.mjs → vee-validate-zod-CcOwoF6y.mjs} +6 -6
- package/package.json +2 -2
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as ve, inject as Xe, computed as
|
|
1
|
+
import { defineComponent as ve, inject as Xe, computed as P, ref as j, onMounted as Je, nextTick as Ge, onUnmounted as Ke, watch as Q, openBlock as i, createElementBlock as M, resolveComponent as R, withModifiers as Qe, createElementVNode as d, Fragment as ue, createVNode as c, unref as t, normalizeStyle as be, toDisplayString as $, createCommentVNode as Z, createBlock as A, isRef as ne, withCtx as b, createTextVNode as Y, renderList as De, normalizeClass as ie, withDirectives as Ze, vModelText as et, provide as tt } from "vue";
|
|
2
2
|
import { useModuleRoute as $e, useModule as Me, useFirebaseIntegration as Re, useModulePermissions as at } from "@oneclick.dev/cms-kit";
|
|
3
3
|
import { _ as st } from "./EditLayout.vue_vue_type_script_setup_true_lang-pDO9b4Pv.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { componentToString as Oe, ChartTooltipContent as
|
|
6
|
-
import { Layers as we, ChevronDown as vt, ChevronLeft as gt, ChevronRight as ht, CalendarIcon as xt, Users as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { f as _e, q as ot, p as nt, E as pe, Z as Se, _ as rt, B as Ae, Q as Ee, u as fe, I as ze, $ as lt, a0 as it, a1 as ct, n as dt, h as ut, K as mt, J as pt, P as ft } from "./index-Bnn9LahC.mjs";
|
|
5
|
+
import { componentToString as Oe, ChartTooltipContent as Pe } from "@oneclick.dev/cms-kit/charts";
|
|
6
|
+
import { Layers as we, ChevronDown as vt, ChevronLeft as gt, ChevronRight as ht, CalendarIcon as xt, Users as je, RefreshCw as yt, Search as bt, X as kt, Eye as ge, EyeOff as he, Clock as Dt } from "lucide-vue-next";
|
|
7
|
+
import { u as _t } from "./index-hMp4p5qA.mjs";
|
|
8
|
+
import { X as St, b as He, a as wt, c as Ct, r as $t, D as xe, $ as Be, O as ye, z as Ne, A as We } from "./index-cC_2cw31.mjs";
|
|
9
9
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
10
10
|
import { u as Rt, F as Vt, _ as Tt, a as It, b as At } from "./OrderDetailDialog.vue_vue_type_script_setup_true_lang-DwAUYR8p.mjs";
|
|
11
|
-
import { _ as
|
|
12
|
-
function
|
|
11
|
+
import { _ as Et } from "./NewReservationDialog.vue_vue_type_script_setup_true_lang-BXTkYCm_.mjs";
|
|
12
|
+
function zt({ x: f, y: h, w: s, h: x, tl: v = !1, tr: y = !1, bl: k = !1, br: r = !1, r: n = 0 }) {
|
|
13
13
|
let l;
|
|
14
14
|
l = `M${f + n},${h}h${s - 2 * n}`;
|
|
15
15
|
let o = y ? n : 0, u = y ? 0 : n;
|
|
@@ -17,7 +17,7 @@ function Et({ x: f, y: h, w: s, h: x, tl: v = !1, tr: y = !1, bl: k = !1, br: r
|
|
|
17
17
|
}
|
|
18
18
|
const Ot = Object.assign(Object.assign({}, St), { color: void 0, groupMaxWidth: void 0, groupWidth: void 0, dataStep: void 0, groupPadding: 0.05, barPadding: 0, roundedCorners: 2, barMinHeight: 2, cursor: null, orientation: He.Vertical }), Ue = _e`
|
|
19
19
|
label: grouped-bar-component;
|
|
20
|
-
`,
|
|
20
|
+
`, Pt = ot`
|
|
21
21
|
:root {
|
|
22
22
|
--vis-grouped-bar-cursor: default;
|
|
23
23
|
--vis-grouped-bar-fill-color: var(--vis-color-main);
|
|
@@ -49,12 +49,12 @@ const Ot = Object.assign(Object.assign({}, St), { color: void 0, groupMaxWidth:
|
|
|
49
49
|
label: barGroup;
|
|
50
50
|
`, qe = _e`
|
|
51
51
|
label: barGroupExit;
|
|
52
|
-
`,
|
|
52
|
+
`, jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
53
53
|
__proto__: null,
|
|
54
54
|
bar: ke,
|
|
55
55
|
barGroup: Ce,
|
|
56
56
|
barGroupExit: qe,
|
|
57
|
-
globalStyles:
|
|
57
|
+
globalStyles: Pt,
|
|
58
58
|
root: Ue
|
|
59
59
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
60
60
|
class Ye extends wt {
|
|
@@ -82,29 +82,29 @@ class Ye extends wt {
|
|
|
82
82
|
return this.config.orientation === He.Vertical;
|
|
83
83
|
}
|
|
84
84
|
_render(h) {
|
|
85
|
-
const { config: s } = this, x = Ae(h) ? h : s.duration, v = this._getGroupWidth(), y = this.getAccessors(), k = [-v / 2, v / 2], r = Ct().domain($t(y.length)).range(k).paddingInner(s.barPadding).paddingOuter(s.barPadding), n = this.g.selectAll(`.${Ce}`).data(this._barData, (
|
|
85
|
+
const { config: s } = this, x = Ae(h) ? h : s.duration, v = this._getGroupWidth(), y = this.getAccessors(), k = [-v / 2, v / 2], r = Ct().domain($t(y.length)).range(k).paddingInner(s.barPadding).paddingOuter(s.barPadding), n = this.g.selectAll(`.${Ce}`).data(this._barData, (B, E) => {
|
|
86
86
|
var L;
|
|
87
|
-
return `${(L =
|
|
88
|
-
}), l = (
|
|
89
|
-
const L = this.dataScale(pe(
|
|
90
|
-
return `translate(${
|
|
87
|
+
return `${(L = Ee(B, s.id, E)) !== null && L !== void 0 ? L : E}`;
|
|
88
|
+
}), l = (B, E) => {
|
|
89
|
+
const L = this.dataScale(pe(B, s.x, E)), z = this.isVertical() ? L : 0, q = this.isVertical() ? 0 : L;
|
|
90
|
+
return `translate(${z},${q})`;
|
|
91
91
|
}, u = n.enter().append("g").attr("class", Ce).attr("transform", l).style("opacity", 1).merge(n);
|
|
92
92
|
fe(u, x).attr("transform", l).style("opacity", 1);
|
|
93
93
|
const V = n.exit().attr("class", qe);
|
|
94
|
-
fe(V, x).style("opacity", 0).remove(), fe(V.selectAll(`.${ke}`), x).attr("transform", (
|
|
95
|
-
const _ = r.bandwidth(), O = u.selectAll(`.${ke}`).data((
|
|
96
|
-
const L = r(
|
|
97
|
-
return this._getBarPath(L,
|
|
98
|
-
}).style("fill", (
|
|
99
|
-
fe(te, x).attr("d", (
|
|
100
|
-
const L = r(
|
|
101
|
-
let
|
|
94
|
+
fe(V, x).style("opacity", 0).remove(), fe(V.selectAll(`.${ke}`), x).attr("transform", (B, E, L) => this.isVertical() ? `translate(0,${this.yScale(0)}) scale(1,0)` : `translate(${this.xScale(0)},0) scale(0,1)`);
|
|
95
|
+
const _ = r.bandwidth(), O = u.selectAll(`.${ke}`).data((B) => y.map(() => B)), T = this._getValueAxisDirection(), te = O.enter().append("path").attr("class", ke).attr("d", (B, E) => {
|
|
96
|
+
const L = r(E), z = this.valueScale(0), q = _;
|
|
97
|
+
return this._getBarPath(L, z, q, 0, !1, T);
|
|
98
|
+
}).style("fill", (B, E) => ze(B, s.color, E)).merge(O);
|
|
99
|
+
fe(te, x).attr("d", (B, E) => {
|
|
100
|
+
const L = r(E), z = _, q = pe(B, y[E]), g = q < 0;
|
|
101
|
+
let N = g ? this.valueScale(0) : this.valueScale(q || 0), ae = Math.abs(this.valueScale(0) - this.valueScale(q)) || 0;
|
|
102
102
|
if (ae < s.barMinHeight) {
|
|
103
103
|
const ce = T === xe.North ? -1 : 1;
|
|
104
|
-
|
|
104
|
+
N = this.valueScale(0) + ce * s.barMinHeight, ae = s.barMinHeight;
|
|
105
105
|
}
|
|
106
|
-
return this._getBarPath(L,
|
|
107
|
-
}).style("fill", (
|
|
106
|
+
return this._getBarPath(L, N, z, ae, g, T);
|
|
107
|
+
}).style("fill", (B, E) => ze(B, s.color, E)).style("cursor", (B, E) => Ee(B, s.cursor, E)), fe(O.exit(), x).remove();
|
|
108
108
|
}
|
|
109
109
|
_getValueAxisDirection() {
|
|
110
110
|
return this.valueScale.range()[0] > this.valueScale.range()[1] ? xe.North : xe.South;
|
|
@@ -118,7 +118,7 @@ class Ye extends wt {
|
|
|
118
118
|
}
|
|
119
119
|
_getBarPath(h, s, x, v, y, k) {
|
|
120
120
|
const { config: r } = this, n = r.roundedCorners ? Ae(r.roundedCorners) ? +r.roundedCorners : x / 2 : 0, l = ut(n, 0, Math.min(v, x) / 2), o = k === xe.North, u = this.isVertical() && y !== o, V = this.isVertical() && y === o, _ = !this.isVertical() && y, O = !this.isVertical() && !y;
|
|
121
|
-
return
|
|
121
|
+
return zt({
|
|
122
122
|
x: this.isVertical() ? h : s + (o ? 0 : -v),
|
|
123
123
|
y: this.isVertical() ? s + (o ? 0 : -v) : h,
|
|
124
124
|
w: this.isVertical() ? x : v,
|
|
@@ -160,8 +160,8 @@ class Ye extends wt {
|
|
|
160
160
|
return this.isVertical() ? this.getDataScaleExtent() : this.getValueScaleExtent(!1);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
Ye.selectors =
|
|
164
|
-
const
|
|
163
|
+
Ye.selectors = jt;
|
|
164
|
+
const Bt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
165
165
|
__name: "index",
|
|
166
166
|
props: {
|
|
167
167
|
color: {},
|
|
@@ -186,26 +186,26 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
186
186
|
data: {}
|
|
187
187
|
},
|
|
188
188
|
setup(f, { expose: h }) {
|
|
189
|
-
const s = Xe(mt), x = f, v =
|
|
189
|
+
const s = Xe(mt), x = f, v = P(() => s.data.value ?? x.data), y = pt(x), k = j();
|
|
190
190
|
return Je(() => {
|
|
191
191
|
Ge(() => {
|
|
192
192
|
var r;
|
|
193
193
|
k.value = new Ye(y.value), (r = k.value) == null || r.setData(v.value), s.update(k.value);
|
|
194
194
|
});
|
|
195
|
-
}),
|
|
195
|
+
}), Ke(() => {
|
|
196
196
|
var r;
|
|
197
197
|
(r = k.value) == null || r.destroy(), s.destroy();
|
|
198
|
-
}),
|
|
198
|
+
}), Q(y, (r, n) => {
|
|
199
199
|
var l;
|
|
200
200
|
ft(r, n) || (l = k.value) == null || l.setConfig(y.value);
|
|
201
|
-
}),
|
|
201
|
+
}), Q(v, () => {
|
|
202
202
|
var r;
|
|
203
203
|
(r = k.value) == null || r.setData(v.value);
|
|
204
204
|
}), h({
|
|
205
205
|
component: k
|
|
206
|
-
}), (r, n) => (i(), M("div",
|
|
206
|
+
}), (r, n) => (i(), M("div", Bt));
|
|
207
207
|
}
|
|
208
|
-
}),
|
|
208
|
+
}), Nt = { class: "flex flex-col sm:flex-row" }, Wt = ["data-active"], Ft = { class: "flex items-center gap-2" }, Lt = { class: "block text-muted-foreground text-xs mr-2 max-w-[120px] truncate" }, Gt = { class: "block text-lg leading-none font-bold sm:text-3xl" }, Ht = { class: "mx-auto w-full max-w-sm mt-2 mb-8" }, Ut = { class: "text-muted-foreground" }, qt = { class: "text-muted-foreground" }, Yt = { class: "grid" }, Xt = { class: "flex gap-1 overflow-hidden max-w-80" }, Jt = { class: "truncate" }, Kt = /* @__PURE__ */ ve({
|
|
209
209
|
__name: "ResourceSelector",
|
|
210
210
|
props: {
|
|
211
211
|
resources: {
|
|
@@ -227,26 +227,26 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
227
227
|
},
|
|
228
228
|
emits: ["update:viewMode", "update:activeChart"],
|
|
229
229
|
setup(f, { emit: h }) {
|
|
230
|
-
const s = f, x = h, v =
|
|
230
|
+
const s = f, x = h, v = P({
|
|
231
231
|
get: () => s.viewMode,
|
|
232
232
|
set: (l) => {
|
|
233
233
|
x("update:viewMode", l);
|
|
234
234
|
}
|
|
235
|
-
}), y =
|
|
235
|
+
}), y = P({
|
|
236
236
|
get: () => s.activeChart,
|
|
237
237
|
set: (l) => {
|
|
238
238
|
x("update:activeChart", l);
|
|
239
239
|
}
|
|
240
|
-
}), { width: k } = _t(), r =
|
|
240
|
+
}), { width: k } = _t(), r = P(() => k.value < 640), n = j(!1);
|
|
241
241
|
return (l, o) => {
|
|
242
|
-
const u = R("DrawerTitle"), V = R("DrawerDescription"), _ = R("DrawerHeader"), O = R("Button"), T = R("DrawerFooter"), J = R("DrawerContent"), te = R("Drawer"),
|
|
243
|
-
return i(), M("div",
|
|
242
|
+
const u = R("DrawerTitle"), V = R("DrawerDescription"), _ = R("DrawerHeader"), O = R("Button"), T = R("DrawerFooter"), J = R("DrawerContent"), te = R("Drawer"), B = R("DropdownMenuTrigger"), E = R("DropdownMenuLabel"), L = R("DropdownMenuItem"), z = R("DropdownMenuContent"), q = R("DropdownMenu");
|
|
243
|
+
return i(), M("div", Nt, [
|
|
244
244
|
f.resources.length > 1 ? (i(), M("button", {
|
|
245
245
|
key: 0,
|
|
246
246
|
"data-active": f.viewMode === "stacked",
|
|
247
247
|
class: "hover:bg-muted/50 flex flex-1 flex-col justify-center gap-2 border-t px-4 py-3 text-left sm:border-t-0 sm:border-l sm:px-6 sm:py-6 cursor-pointer select-none",
|
|
248
248
|
onClick: o[0] || (o[0] = (g) => n.value = !0),
|
|
249
|
-
onContextmenu: o[1] || (o[1] =
|
|
249
|
+
onContextmenu: o[1] || (o[1] = Qe((g) => n.value = !0, ["prevent"]))
|
|
250
250
|
}, [
|
|
251
251
|
d("div", Ft, [
|
|
252
252
|
f.viewMode === "stacked" ? (i(), M(ue, { key: 0 }, [
|
|
@@ -261,7 +261,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
261
261
|
], 64)),
|
|
262
262
|
c(t(vt), { class: "ml-auto size-4" })
|
|
263
263
|
]),
|
|
264
|
-
d("span", Gt, $(f.viewMode === "stacked" ? Object.values(f.totals).reduce((g,
|
|
264
|
+
d("span", Gt, $(f.viewMode === "stacked" ? Object.values(f.totals).reduce((g, N) => g + N, 0).toLocaleString() : (f.totals[f.activeChart] || 0).toLocaleString()), 1)
|
|
265
265
|
], 40, Wt)) : Z("", !0),
|
|
266
266
|
t(r) ? (i(), A(te, {
|
|
267
267
|
key: 1,
|
|
@@ -299,13 +299,13 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
299
299
|
}, {
|
|
300
300
|
default: b(() => [
|
|
301
301
|
c(t(we), { class: "size-3 text-muted-foreground" }),
|
|
302
|
-
d("span", Ut, " All Resources (" + $(Object.values(f.totals).reduce((g,
|
|
302
|
+
d("span", Ut, " All Resources (" + $(Object.values(f.totals).reduce((g, N) => g + N, 0).toLocaleString()) + ") ", 1)
|
|
303
303
|
]),
|
|
304
304
|
_: 1
|
|
305
305
|
}, 8, ["variant"]),
|
|
306
306
|
(i(!0), M(ue, null, De(f.resources, (g) => (i(), A(O, {
|
|
307
307
|
key: g.id,
|
|
308
|
-
onClick: (
|
|
308
|
+
onClick: (N) => {
|
|
309
309
|
v.value = "single", y.value = g.id, n.value = !1;
|
|
310
310
|
},
|
|
311
311
|
variant: f.viewMode === "single" && f.activeChart === g.id ? "secondary" : "outline"
|
|
@@ -334,7 +334,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
334
334
|
"onUpdate:open": o[5] || (o[5] = (g) => ne(n) ? n.value = g : null)
|
|
335
335
|
}, {
|
|
336
336
|
default: b(() => [
|
|
337
|
-
c(
|
|
337
|
+
c(B, { "as-child": "" }, {
|
|
338
338
|
default: b(() => [...o[9] || (o[9] = [
|
|
339
339
|
d("button", {
|
|
340
340
|
tabindex: "-1",
|
|
@@ -343,9 +343,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
343
343
|
])]),
|
|
344
344
|
_: 1
|
|
345
345
|
}),
|
|
346
|
-
c(
|
|
346
|
+
c(z, { align: "end" }, {
|
|
347
347
|
default: b(() => [
|
|
348
|
-
c(
|
|
348
|
+
c(E, null, {
|
|
349
349
|
default: b(() => [...o[10] || (o[10] = [
|
|
350
350
|
Y("Resources", -1)
|
|
351
351
|
])]),
|
|
@@ -360,13 +360,13 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
360
360
|
}, {
|
|
361
361
|
default: b(() => [
|
|
362
362
|
c(t(we), { class: "size-3 text-muted-foreground" }),
|
|
363
|
-
d("span", null, " All Resources (" + $(Object.values(f.totals).reduce((g,
|
|
363
|
+
d("span", null, " All Resources (" + $(Object.values(f.totals).reduce((g, N) => g + N, 0).toLocaleString()) + ") ", 1)
|
|
364
364
|
]),
|
|
365
365
|
_: 1
|
|
366
366
|
}, 8, ["class"]),
|
|
367
367
|
(i(!0), M(ue, null, De(f.resources, (g) => (i(), A(L, {
|
|
368
368
|
key: g.id,
|
|
369
|
-
onClick: (
|
|
369
|
+
onClick: (N) => {
|
|
370
370
|
v.value = "single", y.value = g.id, n.value = !1;
|
|
371
371
|
},
|
|
372
372
|
class: ie(f.viewMode === "single" && f.activeChart === g.id ? "bg-input" : "")
|
|
@@ -393,7 +393,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
393
393
|
]);
|
|
394
394
|
};
|
|
395
395
|
}
|
|
396
|
-
}),
|
|
396
|
+
}), Qt = { class: "flex flex-1 flex-col justify-center gap-1 px-6 py-5 sm:py-6" }, Zt = { class: "flex flex-col sm:flex-row sm:items-center gap-2 sm:gap-3" }, ea = { class: "flex items-center gap-1" }, ta = { class: "timeline-date-trigger" }, aa = {
|
|
397
397
|
key: 1,
|
|
398
398
|
class: "flex items-center justify-center px-6 py-4 text-muted-foreground text-sm"
|
|
399
399
|
}, sa = {
|
|
@@ -413,23 +413,23 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
413
413
|
},
|
|
414
414
|
emits: ["update:modelValue", "update:selectedResource", "update:viewMode"],
|
|
415
415
|
setup(f, { emit: h }) {
|
|
416
|
-
const s = f, x = h, { params: v } = $e(), { config: y } = Me(), k = Re(y.project), r =
|
|
417
|
-
|
|
416
|
+
const s = f, x = h, { params: v } = $e(), { config: y } = Me(), k = Re(y.project), r = j([]), n = j([]), l = j(!0), o = j(s.viewMode || "stacked"), u = j(s.selectedResource || "");
|
|
417
|
+
Q(o, (e) => {
|
|
418
418
|
x("update:viewMode", e);
|
|
419
|
-
}, { immediate: !0 }),
|
|
419
|
+
}, { immediate: !0 }), Q(u, (e) => {
|
|
420
420
|
x("update:selectedResource", o.value === "single" ? e : null);
|
|
421
|
-
}),
|
|
421
|
+
}), Q(o, (e) => {
|
|
422
422
|
x("update:selectedResource", e === "single" ? u.value : null);
|
|
423
|
-
}),
|
|
423
|
+
}), Q(() => s.selectedResource, (e) => {
|
|
424
424
|
o.value === "single" && e !== u.value && (u.value = e || "");
|
|
425
425
|
});
|
|
426
|
-
const V = /* @__PURE__ */ new Date(), _ =
|
|
427
|
-
|
|
426
|
+
const V = /* @__PURE__ */ new Date(), _ = j(s.modelValue || /* @__PURE__ */ new Date()), O = j(null);
|
|
427
|
+
Q(() => s.modelValue, (e) => {
|
|
428
428
|
e && e.getTime() !== _.value.getTime() && (_.value = e);
|
|
429
|
-
}),
|
|
429
|
+
}), Q(_, (e) => {
|
|
430
430
|
x("update:modelValue", e);
|
|
431
431
|
}, { immediate: !0 });
|
|
432
|
-
const T =
|
|
432
|
+
const T = P({
|
|
433
433
|
get: () => G(_.value),
|
|
434
434
|
set: (e) => {
|
|
435
435
|
if (!e) {
|
|
@@ -447,7 +447,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
447
447
|
}
|
|
448
448
|
e.focus(), e.click();
|
|
449
449
|
}
|
|
450
|
-
}, te =
|
|
450
|
+
}, te = P(() => {
|
|
451
451
|
const e = new Date(V);
|
|
452
452
|
e.setDate(V.getDate() - 1);
|
|
453
453
|
const m = new Date(V);
|
|
@@ -457,15 +457,15 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
457
457
|
day: "numeric",
|
|
458
458
|
year: "numeric"
|
|
459
459
|
});
|
|
460
|
-
}),
|
|
460
|
+
}), B = () => {
|
|
461
461
|
const e = new Date(_.value);
|
|
462
462
|
e.setDate(e.getDate() - 1), _.value = e;
|
|
463
|
-
},
|
|
463
|
+
}, E = () => {
|
|
464
464
|
const e = new Date(_.value);
|
|
465
465
|
e.setDate(e.getDate() + 1), _.value = e;
|
|
466
466
|
}, L = () => {
|
|
467
467
|
_.value = /* @__PURE__ */ new Date();
|
|
468
|
-
},
|
|
468
|
+
}, z = P(() => (s.resources?.length || 0) === 0 ? 10 : Math.max(...(s.resources || []).map((e) => e.capacity || 10))), q = P(() => (s.resources?.length || 0) === 0 ? 10 : (s.resources || []).reduce((e, m) => e + (m.capacity || 10), 0)), g = P(() => (s.resources?.length || 0) === 0 ? 60 : Math.min(...(s.resources || []).map((e) => e.interval || 60))), N = P(() => {
|
|
469
469
|
const e = {
|
|
470
470
|
total: {
|
|
471
471
|
label: "Total Reservations",
|
|
@@ -479,23 +479,23 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
479
479
|
};
|
|
480
480
|
}), e;
|
|
481
481
|
});
|
|
482
|
-
|
|
482
|
+
Q(() => s.resources, (e) => {
|
|
483
483
|
(e?.length || 0) > 0 && !u.value && (u.value = e[0].id);
|
|
484
484
|
}, { immediate: !0 });
|
|
485
|
-
const ae =
|
|
485
|
+
const ae = P(() => [...s.resources || []].sort((e, m) => {
|
|
486
486
|
const S = ee.value[e.id] || 0;
|
|
487
487
|
return (ee.value[m.id] || 0) - S;
|
|
488
|
-
})), ce =
|
|
488
|
+
})), ce = P(() => {
|
|
489
489
|
const e = [];
|
|
490
490
|
return g.value, r.value.forEach((m, S) => {
|
|
491
491
|
m.time.endsWith(":00") && e.push(S);
|
|
492
492
|
}), e;
|
|
493
|
-
}), ee =
|
|
493
|
+
}), ee = P(() => {
|
|
494
494
|
const e = {};
|
|
495
495
|
return s.resources?.forEach((m) => {
|
|
496
496
|
e[m.id] = n.value.filter((S) => S.resourceId === m.id).reduce((S, w) => S + (w.reserved || 0), 0);
|
|
497
497
|
}), e;
|
|
498
|
-
}), Ve =
|
|
498
|
+
}), Ve = P(() => r.value.reduce((e, m) => Math.max(e, m.total || 0), 0)), p = P(() => Math.max(q.value, Ve.value, 1)), a = (e, m) => {
|
|
499
499
|
const S = e[m];
|
|
500
500
|
return typeof S == "number" ? S : 0;
|
|
501
501
|
}, I = (e, m) => {
|
|
@@ -507,7 +507,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
507
507
|
}, W = (e) => {
|
|
508
508
|
const [m, S] = e.split(":").map(Number);
|
|
509
509
|
return m * 60 + S;
|
|
510
|
-
}, F = (e, m) => (s.agendaData?.exceptions || []).find((w) => m >= w.startDate && m <= w.endDate ? w.resourceIds === null ? !0 : w.resourceIds?.includes(e) : !1) || null, se =
|
|
510
|
+
}, F = (e, m) => (s.agendaData?.exceptions || []).find((w) => m >= w.startDate && m <= w.endDate ? w.resourceIds === null ? !0 : w.resourceIds?.includes(e) : !1) || null, se = P(() => {
|
|
511
511
|
const e = G(_.value), m = _.value.getDay();
|
|
512
512
|
let S = 1440, w = 0;
|
|
513
513
|
if ((s.resources || []).forEach((oe) => {
|
|
@@ -515,8 +515,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
515
515
|
if (U) {
|
|
516
516
|
if (U.isClosed)
|
|
517
517
|
return;
|
|
518
|
-
U.timeslots.forEach((
|
|
519
|
-
const D = W(
|
|
518
|
+
U.timeslots.forEach((K) => {
|
|
519
|
+
const D = W(K.startTime), C = W(K.endTime);
|
|
520
520
|
S = Math.min(S, D), w = Math.max(w, C);
|
|
521
521
|
});
|
|
522
522
|
} else
|
|
@@ -531,14 +531,14 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
531
531
|
}), re = () => {
|
|
532
532
|
const e = [], m = g.value, { startMinutes: S, endMinutes: w } = se.value;
|
|
533
533
|
for (let H = S; H < w; H += m) {
|
|
534
|
-
const le = Math.floor(H / 60), oe = H % 60, U = `${String(le).padStart(2, "0")}:${String(oe).padStart(2, "0")}`,
|
|
534
|
+
const le = Math.floor(H / 60), oe = H % 60, U = `${String(le).padStart(2, "0")}:${String(oe).padStart(2, "0")}`, K = {
|
|
535
535
|
time: U,
|
|
536
536
|
label: U,
|
|
537
537
|
total: 0
|
|
538
538
|
};
|
|
539
539
|
s.resources?.forEach((D) => {
|
|
540
|
-
|
|
541
|
-
}), e.push(
|
|
540
|
+
K[D.id] = 0;
|
|
541
|
+
}), e.push(K);
|
|
542
542
|
}
|
|
543
543
|
return e;
|
|
544
544
|
}, me = async () => {
|
|
@@ -547,8 +547,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
547
547
|
const e = v.value.id, m = G(_.value), S = `${e}_${m}`, w = await k.get(y.reservedSpotsCollection, S);
|
|
548
548
|
n.value = [];
|
|
549
549
|
for (const U of s.resources || []) {
|
|
550
|
-
const
|
|
551
|
-
Object.entries(
|
|
550
|
+
const K = w?.[U.id] || {};
|
|
551
|
+
Object.entries(K).forEach(([D, C]) => {
|
|
552
552
|
const [X, de] = D.split("-");
|
|
553
553
|
n.value.push({
|
|
554
554
|
resourceId: U.id,
|
|
@@ -560,8 +560,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
560
560
|
}
|
|
561
561
|
const H = re(), le = g.value, { startMinutes: oe } = se.value;
|
|
562
562
|
n.value.forEach((U) => {
|
|
563
|
-
const
|
|
564
|
-
for (let C =
|
|
563
|
+
const K = W(U.startTime), D = W(U.endTime);
|
|
564
|
+
for (let C = K; C < D; C += le) {
|
|
565
565
|
const X = Math.floor((C - oe) / le);
|
|
566
566
|
if (X >= 0 && X < H.length) {
|
|
567
567
|
const de = H[X][U.resourceId];
|
|
@@ -578,17 +578,17 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
578
578
|
l.value = !1;
|
|
579
579
|
}
|
|
580
580
|
};
|
|
581
|
-
return (async () => await me())(),
|
|
581
|
+
return (async () => await me())(), Q(_, () => {
|
|
582
582
|
me();
|
|
583
|
-
}),
|
|
583
|
+
}), Q(() => s.resources, () => {
|
|
584
584
|
(s.resources?.length || 0) > 0 && me();
|
|
585
585
|
}), (e, m) => {
|
|
586
|
-
const S = R("CardTitle"), w = R("Button"), H = R("CardDescription"), le = R("CardHeader"), oe = R("ChartContainer"), U = R("CardContent"),
|
|
587
|
-
return i(), A(
|
|
586
|
+
const S = R("CardTitle"), w = R("Button"), H = R("CardDescription"), le = R("CardHeader"), oe = R("ChartContainer"), U = R("CardContent"), K = R("Card");
|
|
587
|
+
return i(), A(K, { class: "py-4 sm:py-0" }, {
|
|
588
588
|
default: b(() => [
|
|
589
589
|
c(le, { class: "flex flex-col items-stretch border-b !p-0 sm:flex-row" }, {
|
|
590
590
|
default: b(() => [
|
|
591
|
-
d("div",
|
|
591
|
+
d("div", Qt, [
|
|
592
592
|
d("div", Zt, [
|
|
593
593
|
c(S, null, {
|
|
594
594
|
default: b(() => [...m[3] || (m[3] = [
|
|
@@ -601,7 +601,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
601
601
|
variant: "outline",
|
|
602
602
|
size: "icon",
|
|
603
603
|
class: "size-8",
|
|
604
|
-
onClick:
|
|
604
|
+
onClick: B
|
|
605
605
|
}, {
|
|
606
606
|
default: b(() => [
|
|
607
607
|
c(t(gt), { size: 16 })
|
|
@@ -623,7 +623,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
623
623
|
variant: "outline",
|
|
624
624
|
size: "icon",
|
|
625
625
|
class: "size-8",
|
|
626
|
-
onClick:
|
|
626
|
+
onClick: E
|
|
627
627
|
}, {
|
|
628
628
|
default: b(() => [
|
|
629
629
|
c(t(ht), { size: 16 })
|
|
@@ -661,7 +661,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
661
661
|
_: 1
|
|
662
662
|
})
|
|
663
663
|
]),
|
|
664
|
-
f.resources.length > 0 ? (i(), A(
|
|
664
|
+
f.resources.length > 0 ? (i(), A(Kt, {
|
|
665
665
|
key: 0,
|
|
666
666
|
resources: f.resources,
|
|
667
667
|
totals: t(ee),
|
|
@@ -681,12 +681,12 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
681
681
|
d("div", { class: "text-muted-foreground" }, "No resources to display", -1)
|
|
682
682
|
])])) : t(o) === "stacked" ? (i(), A(oe, {
|
|
683
683
|
key: 2,
|
|
684
|
-
config: t(
|
|
684
|
+
config: t(N),
|
|
685
685
|
class: "aspect-auto h-[250px] w-full",
|
|
686
686
|
cursor: ""
|
|
687
687
|
}, {
|
|
688
688
|
default: b(() => [
|
|
689
|
-
c(t(
|
|
689
|
+
c(t(Be), {
|
|
690
690
|
data: t(r),
|
|
691
691
|
margin: { left: -24 },
|
|
692
692
|
"y-domain": [0, t(p)]
|
|
@@ -696,7 +696,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
696
696
|
key: D.id,
|
|
697
697
|
x: (X, de) => de,
|
|
698
698
|
y: (X) => I(X, C),
|
|
699
|
-
color: (X) => a(X, D.id) > 0 ? t(
|
|
699
|
+
color: (X) => a(X, D.id) > 0 ? t(N)[D.id]?.color : Le,
|
|
700
700
|
"bar-padding": 0.1,
|
|
701
701
|
"rounded-corners": 2
|
|
702
702
|
}, null, 8, ["x", "y", "color"]))), 128)),
|
|
@@ -715,9 +715,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
715
715
|
"tick-line": !1,
|
|
716
716
|
"domain-line": !1
|
|
717
717
|
}),
|
|
718
|
-
c(t(
|
|
718
|
+
c(t(Ne)),
|
|
719
719
|
c(t(We), {
|
|
720
|
-
template: t(Oe)(t(
|
|
720
|
+
template: t(Oe)(t(N), t(Pe), {
|
|
721
721
|
labelFormatter(D) {
|
|
722
722
|
const C = Math.round(D);
|
|
723
723
|
return C >= 0 && C < t(r).length && t(r)[C]?.time || "";
|
|
@@ -732,21 +732,21 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
732
732
|
_: 1
|
|
733
733
|
}, 8, ["config"])) : (i(), A(oe, {
|
|
734
734
|
key: t(u),
|
|
735
|
-
config: t(
|
|
735
|
+
config: t(N),
|
|
736
736
|
class: "aspect-auto h-[250px] w-full",
|
|
737
737
|
cursor: ""
|
|
738
738
|
}, {
|
|
739
739
|
default: b(() => [
|
|
740
|
-
c(t(
|
|
740
|
+
c(t(Be), {
|
|
741
741
|
data: t(r),
|
|
742
742
|
margin: { left: -24 },
|
|
743
|
-
"y-domain": [0, t(
|
|
743
|
+
"y-domain": [0, t(z)]
|
|
744
744
|
}, {
|
|
745
745
|
default: b(() => [
|
|
746
746
|
c(t(Fe), {
|
|
747
747
|
x: (D, C) => C,
|
|
748
748
|
y: (D) => D[t(u)] || 0,
|
|
749
|
-
color: (D) => D[t(u)] > 0 ? t(
|
|
749
|
+
color: (D) => D[t(u)] > 0 ? t(N)[t(u)]?.color : Le,
|
|
750
750
|
"bar-padding": 0.1,
|
|
751
751
|
"rounded-corners": !1
|
|
752
752
|
}, null, 8, ["x", "y", "color"]),
|
|
@@ -765,9 +765,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
765
765
|
"tick-line": !1,
|
|
766
766
|
"domain-line": !1
|
|
767
767
|
}),
|
|
768
|
-
c(t(
|
|
768
|
+
c(t(Ne)),
|
|
769
769
|
c(t(We), {
|
|
770
|
-
template: t(Oe)(t(
|
|
770
|
+
template: t(Oe)(t(N), t(Pe), {
|
|
771
771
|
labelFormatter(D) {
|
|
772
772
|
const C = Math.round(D);
|
|
773
773
|
return C >= 0 && C < t(r).length && t(r)[C]?.time || "";
|
|
@@ -835,7 +835,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
835
835
|
},
|
|
836
836
|
emits: ["resetSelectedResource"],
|
|
837
837
|
setup(f, { emit: h }) {
|
|
838
|
-
const s = f, x = h, { params: v } = $e(), { config: y } = Me(), k = Re(y.project), r =
|
|
838
|
+
const s = f, x = h, { params: v } = $e(), { config: y } = Me(), k = Re(y.project), r = j([]), n = j(!0), l = j(""), o = j(null), u = j(null), V = P(() => v.value?.id ?? v.id ?? s.agendaData?.id ?? ""), { metadataSchema: _ } = Rt(V), O = P(() => ({
|
|
839
839
|
date: T(s.activeDate),
|
|
840
840
|
resource: null
|
|
841
841
|
}));
|
|
@@ -843,7 +843,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
843
843
|
const T = (p) => {
|
|
844
844
|
const a = p.getFullYear(), I = String(p.getMonth() + 1).padStart(2, "0"), G = String(p.getDate()).padStart(2, "0");
|
|
845
845
|
return `${a}-${I}-${G}`;
|
|
846
|
-
}, J =
|
|
846
|
+
}, J = P(() => {
|
|
847
847
|
let p = r.value;
|
|
848
848
|
return s.selectedResource && (p = p.filter((a) => a.resourceId === s.selectedResource)), l.value.trim() && (p = new Vt(p, {
|
|
849
849
|
keys: [
|
|
@@ -856,10 +856,10 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
856
856
|
threshold: 0.3,
|
|
857
857
|
ignoreLocation: !0
|
|
858
858
|
}).search(l.value).map((I) => I.item)), p;
|
|
859
|
-
}), te =
|
|
859
|
+
}), te = P(() => J.value.filter((p) => z.value.includes(p.reservationStatus))), B = P(() => {
|
|
860
860
|
let p = JSON.parse(JSON.stringify(r.value));
|
|
861
861
|
return s.selectedResource && (p = p.filter((a) => a.resourceId === s.selectedResource)), p.some((a) => a.reservationStatus === "approved" || a.reservationStatus === "needs_approval");
|
|
862
|
-
}),
|
|
862
|
+
}), E = P(() => {
|
|
863
863
|
const p = r.value.filter((a) => a.reservationStatus === "approved" || a.reservationStatus === "needs_approval");
|
|
864
864
|
return {
|
|
865
865
|
spots: p.reduce((a, I) => a + (I.spots || 0), 0),
|
|
@@ -867,8 +867,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
867
867
|
};
|
|
868
868
|
}), L = () => {
|
|
869
869
|
l.value = "";
|
|
870
|
-
},
|
|
871
|
-
|
|
870
|
+
}, z = j(["needs_approval", "approved"]), q = (p) => {
|
|
871
|
+
z.value.includes(p) ? z.value = z.value.filter((a) => a !== p) : z.value.push(p);
|
|
872
872
|
}, g = (p, a, I = a.date) => {
|
|
873
873
|
const G = s.resources.find((F) => F.id === a.resourceId), W = p.id || p.orderId || a.orderId || "";
|
|
874
874
|
return {
|
|
@@ -904,7 +904,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
904
904
|
adjustments: p.adjustments || [],
|
|
905
905
|
reservationAdjustments: a.adjustments || []
|
|
906
906
|
};
|
|
907
|
-
},
|
|
907
|
+
}, N = async () => {
|
|
908
908
|
await Ge(), await new Promise((p) => {
|
|
909
909
|
if (typeof requestAnimationFrame == "function") {
|
|
910
910
|
requestAnimationFrame(() => p());
|
|
@@ -916,7 +916,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
916
916
|
const a = await k.get(y.reservationsCollection, p);
|
|
917
917
|
if (!a) return;
|
|
918
918
|
const I = { ...a, id: a.id || p }, G = (I.reservations || []).map((W) => g(I, W));
|
|
919
|
-
G.length && (await
|
|
919
|
+
G.length && (await N(), u.value?.openDialog({
|
|
920
920
|
id: I.id,
|
|
921
921
|
customerInfo: I.customerInfo,
|
|
922
922
|
status: I.status,
|
|
@@ -928,7 +928,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
928
928
|
totalSpots: G.reduce((W, F) => W + (F.spots || 0), 0)
|
|
929
929
|
}));
|
|
930
930
|
}, ce = async (p) => {
|
|
931
|
-
await
|
|
931
|
+
await N(), o.value?.openDialog(p);
|
|
932
932
|
}, ee = async () => {
|
|
933
933
|
n.value = !0, r.value = [];
|
|
934
934
|
try {
|
|
@@ -956,7 +956,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
956
956
|
n.value = !1;
|
|
957
957
|
}
|
|
958
958
|
};
|
|
959
|
-
return (async () => await ee())(),
|
|
959
|
+
return (async () => await ee())(), Q(() => s.activeDate, () => {
|
|
960
960
|
ee();
|
|
961
961
|
}), (p, a) => {
|
|
962
962
|
const I = R("Badge"), G = R("CardTitle"), W = R("CardDescription"), F = R("Button"), se = R("CardHeader"), re = R("Input"), me = R("CardContent"), Te = R("Card");
|
|
@@ -969,12 +969,12 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
969
969
|
c(G, { class: "flex items-center gap-2" }, {
|
|
970
970
|
default: b(() => [
|
|
971
971
|
a[9] || (a[9] = Y(" Bookings ", -1)),
|
|
972
|
-
t(
|
|
972
|
+
t(E).bookings > 0 ? (i(), A(I, {
|
|
973
973
|
key: 0,
|
|
974
974
|
variant: "secondary"
|
|
975
975
|
}, {
|
|
976
976
|
default: b(() => [
|
|
977
|
-
Y($(t(
|
|
977
|
+
Y($(t(E).bookings), 1)
|
|
978
978
|
]),
|
|
979
979
|
_: 1
|
|
980
980
|
})) : Z("", !0)
|
|
@@ -983,8 +983,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
983
983
|
}),
|
|
984
984
|
c(W, { class: "flex items-center gap-2 mt-1" }, {
|
|
985
985
|
default: b(() => [
|
|
986
|
-
c(t(
|
|
987
|
-
d("span", null, $(t(
|
|
986
|
+
c(t(je), { size: 14 }),
|
|
987
|
+
d("span", null, $(t(E).spots) + " total spots", 1)
|
|
988
988
|
]),
|
|
989
989
|
_: 1
|
|
990
990
|
})
|
|
@@ -1037,9 +1037,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1037
1037
|
f.agendaData.needsApproval ? (i(), M("button", {
|
|
1038
1038
|
key: 0,
|
|
1039
1039
|
onClick: a[1] || (a[1] = (e) => q("needs_approval")),
|
|
1040
|
-
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(
|
|
1040
|
+
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(z).includes("needs_approval") }])
|
|
1041
1041
|
}, [
|
|
1042
|
-
t(
|
|
1042
|
+
t(z).includes("needs_approval") ? (i(), A(t(ge), {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
size: 12
|
|
1045
1045
|
})) : (i(), A(t(he), {
|
|
@@ -1050,9 +1050,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1050
1050
|
], 2)) : Z("", !0),
|
|
1051
1051
|
d("button", {
|
|
1052
1052
|
onClick: a[2] || (a[2] = (e) => q("approved")),
|
|
1053
|
-
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(
|
|
1053
|
+
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(z).includes("approved") }])
|
|
1054
1054
|
}, [
|
|
1055
|
-
t(
|
|
1055
|
+
t(z).includes("approved") ? (i(), A(t(ge), {
|
|
1056
1056
|
key: 0,
|
|
1057
1057
|
size: 12
|
|
1058
1058
|
})) : (i(), A(t(he), {
|
|
@@ -1064,9 +1064,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1064
1064
|
f.agendaData.needsApproval ? (i(), M("button", {
|
|
1065
1065
|
key: 1,
|
|
1066
1066
|
onClick: a[3] || (a[3] = (e) => q("rejected")),
|
|
1067
|
-
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(
|
|
1067
|
+
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(z).includes("rejected") }])
|
|
1068
1068
|
}, [
|
|
1069
|
-
t(
|
|
1069
|
+
t(z).includes("rejected") ? (i(), A(t(ge), {
|
|
1070
1070
|
key: 0,
|
|
1071
1071
|
size: 12
|
|
1072
1072
|
})) : (i(), A(t(he), {
|
|
@@ -1077,9 +1077,9 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1077
1077
|
], 2)) : Z("", !0),
|
|
1078
1078
|
d("button", {
|
|
1079
1079
|
onClick: a[4] || (a[4] = (e) => q("cancelled")),
|
|
1080
|
-
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(
|
|
1080
|
+
class: ie(["flex gap-1.5 items-center px-3 py-1.5 rounded-full text-sm bg-muted", { "opacity-50 hover:opacity-75": !t(z).includes("cancelled") }])
|
|
1081
1081
|
}, [
|
|
1082
|
-
t(
|
|
1082
|
+
t(z).includes("cancelled") ? (i(), A(t(ge), {
|
|
1083
1083
|
key: 0,
|
|
1084
1084
|
size: 12
|
|
1085
1085
|
})) : (i(), A(t(he), {
|
|
@@ -1094,10 +1094,10 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1094
1094
|
d("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
|
|
1095
1095
|
])])) : t(te).length === 0 ? (i(), M("div", ma, [
|
|
1096
1096
|
a[13] || (a[13] = Y(" No bookings for this day ", -1)),
|
|
1097
|
-
t(
|
|
1097
|
+
t(B) ? (i(), A(F, {
|
|
1098
1098
|
key: 0,
|
|
1099
1099
|
onClick: a[5] || (a[5] = (e) => {
|
|
1100
|
-
|
|
1100
|
+
z.value = ["needs_approval", "approved"], l.value = "";
|
|
1101
1101
|
})
|
|
1102
1102
|
}, {
|
|
1103
1103
|
default: b(() => [...a[11] || (a[11] = [
|
|
@@ -1131,7 +1131,7 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1131
1131
|
d("span", null, $(e.startTime) + " - " + $(e.endTime), 1)
|
|
1132
1132
|
]),
|
|
1133
1133
|
d("div", _a, [
|
|
1134
|
-
c(t(
|
|
1134
|
+
c(t(je), { size: 12 }),
|
|
1135
1135
|
d("span", null, $(e.spots) + " " + $(e.spots === 1 ? "spot" : "spots"), 1)
|
|
1136
1136
|
]),
|
|
1137
1137
|
e.resourceName ? (i(), M("div", Sa, [
|
|
@@ -1184,10 +1184,10 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1184
1184
|
});
|
|
1185
1185
|
};
|
|
1186
1186
|
}
|
|
1187
|
-
}), Aa = { class: "space-y-6" },
|
|
1187
|
+
}), Aa = { class: "space-y-6" }, Ea = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, za = { class: "text-2xl font-semibold tracking-tight" }, Oa = { class: "flex flex-col md:flex-row gap-2" }, Pa = { class: "grid gap-6 md:grid-cols-2 lg:grid-cols-3" }, ja = { class: "md:col-span-2 lg:col-span-3" }, Ja = /* @__PURE__ */ ve({
|
|
1188
1188
|
__name: "index",
|
|
1189
1189
|
setup(f) {
|
|
1190
|
-
const { hasPermission: h } = at(), { params: s, resolvePath: x } = $e(), { config: v } = Me(), y = Re(v.project), k =
|
|
1190
|
+
const { hasPermission: h } = at(), { params: s, resolvePath: x } = $e(), { config: v } = Me(), y = Re(v.project), k = j(""), r = j(!0), n = j(/* @__PURE__ */ new Date()), l = j(null), o = j("stacked"), u = j(null), V = j([]);
|
|
1191
1191
|
return (async () => {
|
|
1192
1192
|
try {
|
|
1193
1193
|
const O = await y.get(v.agendaCollection, s.value.id);
|
|
@@ -1200,13 +1200,13 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1200
1200
|
})(), (O, T) => (i(), A(st, null, {
|
|
1201
1201
|
default: b(() => [
|
|
1202
1202
|
d("div", Aa, [
|
|
1203
|
-
d("div",
|
|
1203
|
+
d("div", Ea, [
|
|
1204
1204
|
d("div", null, [
|
|
1205
|
-
d("h1",
|
|
1205
|
+
d("h1", za, $(t(k) || "Dashboard"), 1),
|
|
1206
1206
|
T[4] || (T[4] = d("p", { class: "text-muted-foreground text-sm mt-1" }, " Overview and analytics for your booking service ", -1))
|
|
1207
1207
|
]),
|
|
1208
1208
|
d("div", Oa, [
|
|
1209
|
-
t(h)("manage-reservations") ? (i(), A(
|
|
1209
|
+
t(h)("manage-reservations") ? (i(), A(Et, {
|
|
1210
1210
|
key: 0,
|
|
1211
1211
|
"agenda-data": t(u)
|
|
1212
1212
|
}, null, 8, ["agenda-data"])) : Z("", !0)
|
|
@@ -1222,8 +1222,8 @@ const Nt = { "data-vis-component": "" }, Fe = /* @__PURE__ */ ve({
|
|
|
1222
1222
|
"agenda-data": t(u),
|
|
1223
1223
|
resources: t(V)
|
|
1224
1224
|
}, null, 8, ["modelValue", "view-mode", "selected-resource", "agenda-data", "resources"]),
|
|
1225
|
-
d("div",
|
|
1226
|
-
d("div",
|
|
1225
|
+
d("div", Pa, [
|
|
1226
|
+
d("div", ja, [
|
|
1227
1227
|
t(V).length > 0 ? (i(), A(Ia, {
|
|
1228
1228
|
key: 0,
|
|
1229
1229
|
"agenda-data": t(u),
|