@oneclick.dev/cms-core-modules 0.0.118 → 0.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ContentEditor-Cm28u_14.mjs → ContentEditor-W4YrQyBW.mjs} +3962 -3700
- package/dist/{ContentEditor-BnOVpmsQ.js → ContentEditor-YFnqVZrX.js} +42 -41
- package/dist/{EditLayout.vue_vue_type_script_setup_true_lang-pDO9b4Pv.mjs → EditLayout.vue_vue_type_script_setup_true_lang-BXVf9gZW.mjs} +20 -20
- package/dist/{EditLayout.vue_vue_type_script_setup_true_lang-gozJKXvM.js → EditLayout.vue_vue_type_script_setup_true_lang-CFFZ6r8i.js} +1 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BdZbcubW.js +1 -0
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-bZidw6RT.mjs +1500 -0
- package/dist/Overview-Tf_ApkWh.js +1 -0
- package/dist/{Overview-CVQ1pkuD.mjs → Overview-usm5gPD1.mjs} +131 -131
- package/dist/{TableView-BQI3CWll.mjs → TableView-Ctnep-Qu.mjs} +1174 -1161
- package/dist/TableView-DJqyJL9L.js +4 -0
- package/dist/{agenda-Dcsc3QHj.js → agenda-BusN9-XG.js} +1 -1
- package/dist/{agenda-DyTpFZfY.mjs → agenda-CJXKaIo0.mjs} +7 -7
- package/dist/{availability-D8JdA4rP.mjs → availability-BP6GACqo.mjs} +1 -1
- package/dist/{availability-ClBGVgE9.js → availability-UUKdgidr.js} +1 -1
- package/dist/{booking-data-aMS1p_3g.js → booking-data-BHfLyOlu.js} +1 -1
- package/dist/{booking-data-Px7XCIfU.mjs → booking-data-WCBcpOOo.mjs} +1 -1
- package/dist/cms-core-modules.css +1 -1
- package/dist/{exceptions-Dgj54ULn.mjs → exceptions-B8r2psu2.mjs} +1 -1
- package/dist/{exceptions-DXqc0Nza.js → exceptions-BazAiy2s.js} +1 -1
- package/dist/index-BiKWKrEs.js +35 -0
- package/dist/index-DJxex3Dt.mjs +1256 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +12 -12
- package/dist/{orders-C5NT99Fy.mjs → orders-B8C6u4iF.mjs} +229 -234
- package/dist/orders-CAAuDhkQ.js +1 -0
- package/dist/{payment-D5j-68Ig.mjs → payment-BOOJ1O6M.mjs} +1 -1
- package/dist/{payment-BJHgpaeT.js → payment-IxA9qiCV.js} +1 -1
- package/dist/{refunds-D9nTeD2d.mjs → refunds-CI0qpJC0.mjs} +1 -1
- package/dist/{refunds-oVB2Opib.js → refunds-CqGKm1NG.js} +1 -1
- package/dist/{resources-8WouFvJe.js → resources-B75nXreU.js} +1 -1
- package/dist/{resources-CK0oWssj.mjs → resources-dIZDh4Sz.mjs} +1 -1
- package/dist/src/appointments/components/edit/NewReservationDialog/QuickReservationAdder.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/NewReservationDialog/ReservationLines.vue.d.ts +1 -0
- package/dist/src/shims-vue.d.ts +6 -0
- package/dist/src/table/components/DataTableAction.vue.d.ts +1 -0
- package/dist/src/table/flow-builder-extensions/row-item.d.ts +5 -5
- package/package.json +2 -2
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BXTkYCm_.mjs +0 -1476
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-C2zwt5UF.js +0 -1
- package/dist/Overview-CBahJviK.js +0 -1
- package/dist/TableView-Cwal0BPW.js +0 -4
- package/dist/index-g1jAGZGc.mjs +0 -1261
- package/dist/index-yrUH3zmq.js +0 -35
- package/dist/orders-lO3dZ5un.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as ke, computed as k, ref as
|
|
2
|
-
import { useRoute as Pe, useRouter as Ae, useOverlayParams as Ne, useModuleRoute as ze, useModule as Oe, useFirebaseIntegration as
|
|
3
|
-
import { ShoppingBag as re, Users as
|
|
4
|
-
import { u as Me, F as Ve, _ as
|
|
5
|
-
import { _ as Ee } from "./EditLayout.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { defineComponent as ke, computed as k, ref as g, provide as be, onMounted as we, watch as se, resolveComponent as b, openBlock as n, createElementBlock as l, Fragment as z, createVNode as r, withCtx as f, createElementVNode as a, unref as o, createTextVNode as w, renderList as U, toDisplayString as d, createBlock as ae, createCommentVNode as D, normalizeClass as De, withDirectives as Ce, isRef as oe, vModelText as Ie, normalizeStyle as ne, nextTick as Se } from "vue";
|
|
2
|
+
import { useRoute as Pe, useRouter as Ae, useOverlayParams as Ne, useModuleRoute as ze, useModule as Oe, useFirebaseIntegration as je } from "@oneclick.dev/cms-kit";
|
|
3
|
+
import { ShoppingBag as re, Users as L, ChevronLeft as Te, ChevronRight as Re, RefreshCw as Fe, CalendarIcon as E, Search as Be, X as $e, Clock as le } from "lucide-vue-next";
|
|
4
|
+
import { u as Me, F as Ve, _ as H, a as Ue, b as Le } from "./OrderDetailDialog.vue_vue_type_script_setup_true_lang-DwAUYR8p.mjs";
|
|
5
|
+
import { _ as Ee } from "./EditLayout.vue_vue_type_script_setup_true_lang-BXVf9gZW.mjs";
|
|
6
6
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.mjs";
|
|
7
|
-
const qe = { class: "space-y-6" },
|
|
7
|
+
const qe = { class: "space-y-6" }, Qe = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Xe = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, Ye = { class: "flex gap-1 border rounded-lg p-1 w-fit bg-card" }, Ge = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Je = { class: "flex items-center gap-1" }, Ke = { class: "flex items-center gap-1" }, We = { class: "flex items-center gap-2" }, Ze = { class: "flex items-center gap-1" }, et = { class: "mt-2 text-sm text-muted-foreground" }, tt = { class: "orders-date-trigger" }, st = { class: "relative mb-4" }, at = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "mb-3 text-sm text-muted-foreground"
|
|
10
10
|
}, ot = {
|
|
@@ -18,11 +18,11 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
18
18
|
class: "text-center py-8 text-muted-foreground"
|
|
19
19
|
}, lt = {
|
|
20
20
|
key: 4,
|
|
21
|
-
class: "space-y-2"
|
|
22
|
-
},
|
|
21
|
+
class: "-mx-6 @5xl:mx-0 @5xl:space-y-2"
|
|
22
|
+
}, dt = ["onClick"], it = { class: "flex items-start justify-between" }, ct = { class: "flex-1" }, ut = { class: "font-medium" }, mt = { class: "text-sm text-muted-foreground" }, ft = { class: "text-sm text-muted-foreground" }, xt = { class: "flex items-center gap-4 flex-wrap mt-1" }, pt = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, vt = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, _t = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "flex items-center gap-1 text-xs text-muted-foreground"
|
|
25
|
-
},
|
|
25
|
+
}, gt = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, ht = { class: "text-right" }, yt = {
|
|
26
26
|
key: 0,
|
|
27
27
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
28
28
|
}, kt = {
|
|
@@ -46,59 +46,59 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
46
46
|
}, St = {
|
|
47
47
|
key: 7,
|
|
48
48
|
class: "text-sm font-medium mt-1"
|
|
49
|
-
}, Pt = ["onClick"],
|
|
49
|
+
}, Pt = { key: 1 }, At = ["onClick"], Nt = { class: "flex items-start justify-between" }, zt = { class: "flex-1" }, Ot = { class: "flex items-center flex-wrap gap-x-2" }, jt = { class: "font-medium" }, Tt = { class: "text-sm text-muted-foreground" }, Rt = { class: "text-sm text-muted-foreground" }, Ft = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, Bt = { class: "text-right" }, $t = {
|
|
50
50
|
key: 0,
|
|
51
51
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
52
|
-
},
|
|
52
|
+
}, Mt = {
|
|
53
53
|
key: 1,
|
|
54
54
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
|
|
55
|
-
},
|
|
55
|
+
}, Vt = {
|
|
56
56
|
key: 2,
|
|
57
57
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"
|
|
58
|
-
},
|
|
58
|
+
}, Ut = { class: "text-sm font-medium mt-1" }, Lt = ["onClick"], Et = { class: "flex items-center justify-between" }, Ht = { class: "flex items-center gap-4 flex-wrap" }, qt = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Qt = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Xt = {
|
|
59
59
|
key: 0,
|
|
60
60
|
class: "flex items-center gap-1 text-xs text-muted-foreground"
|
|
61
|
-
},
|
|
61
|
+
}, Yt = {
|
|
62
62
|
key: 0,
|
|
63
63
|
class: "text-right flex items-center gap-2"
|
|
64
|
-
},
|
|
64
|
+
}, Gt = {
|
|
65
65
|
key: 0,
|
|
66
66
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-400"
|
|
67
|
-
},
|
|
67
|
+
}, Jt = {
|
|
68
68
|
key: 1,
|
|
69
69
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-400"
|
|
70
|
-
},
|
|
70
|
+
}, Kt = {
|
|
71
71
|
key: 2,
|
|
72
72
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
|
|
73
|
-
},
|
|
73
|
+
}, Wt = {
|
|
74
74
|
key: 3,
|
|
75
75
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-400"
|
|
76
|
-
},
|
|
76
|
+
}, Zt = {
|
|
77
77
|
key: 4,
|
|
78
78
|
class: "inline-block px-2 py-1 text-xs rounded-full bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-400"
|
|
79
|
-
},
|
|
79
|
+
}, es = {
|
|
80
80
|
key: 5,
|
|
81
81
|
class: "text-sm font-medium"
|
|
82
|
-
},
|
|
82
|
+
}, ts = /* @__PURE__ */ ke({
|
|
83
83
|
__name: "orders",
|
|
84
|
-
setup(
|
|
85
|
-
const
|
|
84
|
+
setup(ss) {
|
|
85
|
+
const q = Pe();
|
|
86
86
|
Ae();
|
|
87
|
-
const Q = Ne(), { params:
|
|
88
|
-
date: J(
|
|
87
|
+
const Q = Ne(), { params: O } = ze(), { config: A } = Oe(), j = je(A.project), X = k(() => O.value?.id ?? O.id ?? ""), { metadataSchema: T } = Me(X), v = g([]), I = g([]), S = g(!0), R = g(null), h = g(""), P = g(null), F = g(null), C = g("confirmed"), Y = /* @__PURE__ */ new Date(), x = g(/* @__PURE__ */ new Date()), G = g(null), de = k(() => ({
|
|
88
|
+
date: J(x.value),
|
|
89
89
|
resource: null
|
|
90
90
|
}));
|
|
91
|
-
be("event",
|
|
92
|
-
const
|
|
93
|
-
get: () => J(
|
|
91
|
+
be("event", de);
|
|
92
|
+
const B = k({
|
|
93
|
+
get: () => J(x.value),
|
|
94
94
|
set: (t) => {
|
|
95
95
|
if (!t) {
|
|
96
|
-
|
|
96
|
+
x.value = /* @__PURE__ */ new Date();
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
x.value = /* @__PURE__ */ new Date(`${t}T00:00:00`);
|
|
100
100
|
}
|
|
101
|
-
}),
|
|
101
|
+
}), ie = () => {
|
|
102
102
|
const t = G.value;
|
|
103
103
|
if (t) {
|
|
104
104
|
if (typeof t.showPicker == "function") {
|
|
@@ -107,30 +107,25 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
107
107
|
}
|
|
108
108
|
t.focus(), t.click();
|
|
109
109
|
}
|
|
110
|
-
}, ce = k(() => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
year: "numeric"
|
|
119
|
-
});
|
|
120
|
-
}), ue = () => {
|
|
121
|
-
const t = new Date(m.value);
|
|
122
|
-
t.setDate(t.getDate() - 1), m.value = t;
|
|
110
|
+
}, ce = k(() => x.value.toLocaleDateString("en-US", {
|
|
111
|
+
weekday: "long",
|
|
112
|
+
month: "long",
|
|
113
|
+
day: "numeric",
|
|
114
|
+
year: "numeric"
|
|
115
|
+
})), ue = () => {
|
|
116
|
+
const t = new Date(x.value);
|
|
117
|
+
t.setDate(t.getDate() - 1), x.value = t;
|
|
123
118
|
}, me = () => {
|
|
124
|
-
const t = new Date(
|
|
125
|
-
t.setDate(t.getDate() + 1), t <=
|
|
119
|
+
const t = new Date(x.value);
|
|
120
|
+
t.setDate(t.getDate() + 1), t <= Y && (x.value = t);
|
|
126
121
|
}, fe = k(() => {
|
|
127
|
-
const t = new Date(
|
|
128
|
-
return t.setDate(t.getDate() + 1), t <=
|
|
129
|
-
}),
|
|
130
|
-
|
|
122
|
+
const t = new Date(x.value);
|
|
123
|
+
return t.setDate(t.getDate() + 1), t <= Y;
|
|
124
|
+
}), xe = () => {
|
|
125
|
+
x.value = /* @__PURE__ */ new Date();
|
|
131
126
|
}, J = (t) => {
|
|
132
|
-
const e = t.getFullYear(),
|
|
133
|
-
return `${e}-${
|
|
127
|
+
const e = t.getFullYear(), i = String(t.getMonth() + 1).padStart(2, "0"), u = String(t.getDate()).padStart(2, "0");
|
|
128
|
+
return `${e}-${i}-${u}`;
|
|
134
129
|
}, K = (t) => t ? new Date(t).toLocaleTimeString("en-US", {
|
|
135
130
|
hour: "2-digit",
|
|
136
131
|
minute: "2-digit",
|
|
@@ -140,7 +135,7 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
140
135
|
month: "short",
|
|
141
136
|
day: "numeric"
|
|
142
137
|
}) : "", Z = (t, e) => {
|
|
143
|
-
const
|
|
138
|
+
const i = I.value.find((p) => p.id === e.resourceId), u = t.id || t.orderId || e.orderId || "";
|
|
144
139
|
return {
|
|
145
140
|
customerInfo: t.customerInfo,
|
|
146
141
|
amountDue: t.amountDue,
|
|
@@ -163,8 +158,8 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
163
158
|
reservationAddOnsPrice: e.addOnsPrice,
|
|
164
159
|
pricingOptionId: e.pricingOptionId,
|
|
165
160
|
pricingOption: e.pricingOption,
|
|
166
|
-
resourceName:
|
|
167
|
-
resourceColor:
|
|
161
|
+
resourceName: i?.name,
|
|
162
|
+
resourceColor: i?.color,
|
|
168
163
|
metadata: t.metadata || {},
|
|
169
164
|
reservationMetadata: e.metadata || {},
|
|
170
165
|
refundStatus: e.refundStatus,
|
|
@@ -174,7 +169,7 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
174
169
|
adjustments: t.adjustments || [],
|
|
175
170
|
reservationAdjustments: e.adjustments || []
|
|
176
171
|
};
|
|
177
|
-
},
|
|
172
|
+
}, $ = async () => {
|
|
178
173
|
await Se(), await new Promise((t) => {
|
|
179
174
|
if (typeof requestAnimationFrame == "function") {
|
|
180
175
|
requestAnimationFrame(() => t());
|
|
@@ -182,7 +177,7 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
182
177
|
}
|
|
183
178
|
t();
|
|
184
179
|
});
|
|
185
|
-
},
|
|
180
|
+
}, M = k(() => h.value.trim() ? new Ve(v.value, {
|
|
186
181
|
keys: [
|
|
187
182
|
"customerInfo.firstName",
|
|
188
183
|
"customerInfo.lastName",
|
|
@@ -192,9 +187,9 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
192
187
|
],
|
|
193
188
|
threshold: 0.3,
|
|
194
189
|
ignoreLocation: !0
|
|
195
|
-
}).search(
|
|
190
|
+
}).search(h.value).map((e) => e.item) : v.value), ee = k(() => {
|
|
196
191
|
const t = /* @__PURE__ */ new Map();
|
|
197
|
-
for (const e of
|
|
192
|
+
for (const e of M.value) {
|
|
198
193
|
t.has(e.id) || t.set(e.id, {
|
|
199
194
|
id: e.id,
|
|
200
195
|
customerInfo: e.customerInfo,
|
|
@@ -206,62 +201,62 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
206
201
|
totalPrice: 0,
|
|
207
202
|
totalSpots: 0
|
|
208
203
|
});
|
|
209
|
-
const
|
|
210
|
-
|
|
204
|
+
const i = t.get(e.id);
|
|
205
|
+
i.reservations.push(e), i.totalPrice = typeof e.total == "number" ? e.total : i.totalPrice + (e.reservationPrice || 0), i.totalSpots += e.spots || 0;
|
|
211
206
|
}
|
|
212
207
|
return Array.from(t.values());
|
|
213
|
-
}),
|
|
214
|
-
spots:
|
|
215
|
-
bookings:
|
|
208
|
+
}), N = k(() => (console.log("orderssss", v.value), {
|
|
209
|
+
spots: v.value.reduce((t, e) => t + (e.spots || 0), 0),
|
|
210
|
+
bookings: v.value.length,
|
|
216
211
|
revenue: ee.value.reduce((t, e) => t + (e.totalPrice || 0), 0)
|
|
217
212
|
})), pe = () => {
|
|
218
|
-
|
|
219
|
-
},
|
|
213
|
+
h.value = "";
|
|
214
|
+
}, ve = async () => {
|
|
220
215
|
try {
|
|
221
|
-
const t = await j.get(
|
|
222
|
-
|
|
216
|
+
const t = await j.get(A.agendaCollection, X.value);
|
|
217
|
+
R.value = t, I.value = t?.resources?.filter((e) => e.isActive) || [];
|
|
223
218
|
} catch (t) {
|
|
224
|
-
console.error("Error loading resources:", t),
|
|
219
|
+
console.error("Error loading resources:", t), I.value = [];
|
|
225
220
|
}
|
|
226
|
-
},
|
|
227
|
-
|
|
221
|
+
}, y = async () => {
|
|
222
|
+
S.value = !0, v.value = [];
|
|
228
223
|
try {
|
|
229
|
-
const t =
|
|
224
|
+
const t = O.value.id, e = new Date(x.value);
|
|
230
225
|
e.setHours(0, 0, 0, 0);
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
const u = await j.find(
|
|
226
|
+
const i = new Date(x.value);
|
|
227
|
+
i.setHours(23, 59, 59, 999);
|
|
228
|
+
const u = await j.find(A.reservationsCollection, {
|
|
234
229
|
filters: [
|
|
235
230
|
{ field: "agendaId", operator: "==", value: t },
|
|
236
231
|
{ field: "createdAt", operator: ">=", value: e.toISOString() },
|
|
237
|
-
{ field: "createdAt", operator: "<=", value:
|
|
238
|
-
{ field: "status", operator: "==", value:
|
|
232
|
+
{ field: "createdAt", operator: "<=", value: i.toISOString() },
|
|
233
|
+
{ field: "status", operator: "==", value: C.value }
|
|
239
234
|
]
|
|
240
235
|
});
|
|
241
236
|
let p = [];
|
|
242
|
-
u.forEach((
|
|
243
|
-
(
|
|
244
|
-
p.push(Z(
|
|
237
|
+
u.forEach((m) => {
|
|
238
|
+
(m.reservations || []).forEach((V) => {
|
|
239
|
+
p.push(Z(m, V));
|
|
245
240
|
});
|
|
246
|
-
}),
|
|
241
|
+
}), v.value = p.sort((m, _) => (_.createdAt || "").localeCompare(m.createdAt || ""));
|
|
247
242
|
} catch (t) {
|
|
248
|
-
console.error("Error loading orders:", t),
|
|
243
|
+
console.error("Error loading orders:", t), v.value = [];
|
|
249
244
|
} finally {
|
|
250
|
-
|
|
245
|
+
S.value = !1;
|
|
251
246
|
}
|
|
252
|
-
},
|
|
253
|
-
await
|
|
247
|
+
}, _e = async () => {
|
|
248
|
+
await ve(), await y();
|
|
254
249
|
}, te = async (t, e) => {
|
|
255
|
-
const
|
|
256
|
-
if (!
|
|
257
|
-
const u = { ...
|
|
250
|
+
const i = await j.get(A.reservationsCollection, t);
|
|
251
|
+
if (!i) return;
|
|
252
|
+
const u = { ...i, id: i.id || t }, p = (u.reservations || []).map((m) => Z(u, m));
|
|
258
253
|
if (e) {
|
|
259
|
-
const
|
|
260
|
-
if (!
|
|
261
|
-
await
|
|
254
|
+
const m = p.find((_) => _.res_id === e);
|
|
255
|
+
if (!m) return;
|
|
256
|
+
await $(), P.value?.openDialog(m);
|
|
262
257
|
return;
|
|
263
258
|
}
|
|
264
|
-
p.length && (await
|
|
259
|
+
p.length && (await $(), F.value?.openDialog({
|
|
265
260
|
id: u.id,
|
|
266
261
|
customerInfo: u.customerInfo,
|
|
267
262
|
status: u.status,
|
|
@@ -269,130 +264,130 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
269
264
|
metadata: u.metadata || {},
|
|
270
265
|
reservations: p,
|
|
271
266
|
adjustments: u.adjustments || [],
|
|
272
|
-
totalPrice: typeof u.total == "number" ? u.total : p.reduce((
|
|
273
|
-
totalSpots: p.reduce((
|
|
267
|
+
totalPrice: typeof u.total == "number" ? u.total : p.reduce((m, _) => m + (_.reservationPrice || 0), 0),
|
|
268
|
+
totalSpots: p.reduce((m, _) => m + (_.spots || 0), 0)
|
|
274
269
|
}));
|
|
275
|
-
},
|
|
276
|
-
await
|
|
270
|
+
}, ge = async (t) => {
|
|
271
|
+
await $(), P.value?.openDialog(t);
|
|
277
272
|
};
|
|
278
|
-
return
|
|
279
|
-
const t = Q.value.orderId ||
|
|
273
|
+
return _e(), we(async () => {
|
|
274
|
+
const t = Q.value.orderId || q.query.orderId, e = Q.value.reservationId || q.query.reservationId;
|
|
280
275
|
if (t) {
|
|
281
|
-
const
|
|
282
|
-
|
|
276
|
+
const i = new URL(window.location.href);
|
|
277
|
+
i.searchParams.delete("orderId"), i.searchParams.delete("reservationId"), window.history.replaceState(window.history.state, "", i.toString()), await te(t, e);
|
|
283
278
|
}
|
|
284
|
-
}), se(
|
|
285
|
-
|
|
286
|
-
}), se(
|
|
287
|
-
|
|
279
|
+
}), se(x, () => {
|
|
280
|
+
y();
|
|
281
|
+
}), se(C, () => {
|
|
282
|
+
y();
|
|
288
283
|
}), (t, e) => {
|
|
289
|
-
const
|
|
290
|
-
return n(), l(
|
|
284
|
+
const i = b("Button"), u = b("Badge"), p = b("CardTitle"), m = b("CardDescription"), _ = b("CardHeader"), V = b("Input"), he = b("CardContent"), ye = b("Card");
|
|
285
|
+
return n(), l(z, null, [
|
|
291
286
|
r(Ee, null, {
|
|
292
|
-
default:
|
|
287
|
+
default: f(() => [
|
|
293
288
|
a("div", qe, [
|
|
294
|
-
a("div",
|
|
289
|
+
a("div", Qe, [
|
|
295
290
|
a("div", null, [
|
|
296
|
-
a("h1",
|
|
291
|
+
a("h1", Xe, [
|
|
297
292
|
r(o(re), { class: "size-6" }),
|
|
298
293
|
e[4] || (e[4] = w(" Orders ", -1))
|
|
299
294
|
]),
|
|
300
295
|
e[5] || (e[5] = a("p", { class: "text-muted-foreground text-sm mt-1" }, " View orders by when they were placed ", -1))
|
|
301
296
|
])
|
|
302
297
|
]),
|
|
303
|
-
a("div",
|
|
304
|
-
(n(), l(
|
|
298
|
+
a("div", Ye, [
|
|
299
|
+
(n(), l(z, null, U(["confirmed", "pending", "cancelled"], (s) => r(i, {
|
|
305
300
|
key: s,
|
|
306
|
-
variant: o(
|
|
301
|
+
variant: o(C) === s ? "default" : "ghost",
|
|
307
302
|
size: "sm",
|
|
308
303
|
class: "capitalize",
|
|
309
|
-
onClick: (c) =>
|
|
304
|
+
onClick: (c) => C.value = s
|
|
310
305
|
}, {
|
|
311
|
-
default:
|
|
312
|
-
w(
|
|
306
|
+
default: f(() => [
|
|
307
|
+
w(d(s), 1)
|
|
313
308
|
]),
|
|
314
309
|
_: 2
|
|
315
310
|
}, 1032, ["variant", "onClick"])), 64))
|
|
316
311
|
]),
|
|
317
|
-
r(
|
|
318
|
-
default:
|
|
319
|
-
r(
|
|
320
|
-
default:
|
|
312
|
+
r(ye, { class: "-mx-6 rounded-none border-x-0 @5xl:mx-0 @5xl:rounded-xl @5xl:border-x-[1px]" }, {
|
|
313
|
+
default: f(() => [
|
|
314
|
+
r(_, null, {
|
|
315
|
+
default: f(() => [
|
|
321
316
|
a("div", Ge, [
|
|
322
317
|
a("div", null, [
|
|
323
318
|
r(p, { class: "flex items-center gap-2" }, {
|
|
324
|
-
default:
|
|
319
|
+
default: f(() => [
|
|
325
320
|
e[6] || (e[6] = w(" Orders received ", -1)),
|
|
326
|
-
o(
|
|
321
|
+
o(N).bookings > 0 ? (n(), ae(u, {
|
|
327
322
|
key: 0,
|
|
328
323
|
variant: "secondary"
|
|
329
324
|
}, {
|
|
330
|
-
default:
|
|
331
|
-
w(
|
|
325
|
+
default: f(() => [
|
|
326
|
+
w(d(o(N).bookings), 1)
|
|
332
327
|
]),
|
|
333
328
|
_: 1
|
|
334
329
|
})) : D("", !0)
|
|
335
330
|
]),
|
|
336
331
|
_: 1
|
|
337
332
|
}),
|
|
338
|
-
r(
|
|
339
|
-
default:
|
|
333
|
+
r(m, { class: "flex items-center gap-4 mt-1" }, {
|
|
334
|
+
default: f(() => [
|
|
340
335
|
a("span", Je, [
|
|
341
|
-
r(o(
|
|
342
|
-
w(" " +
|
|
336
|
+
r(o(L), { size: 14 }),
|
|
337
|
+
w(" " + d(o(N).spots) + " spots ", 1)
|
|
343
338
|
]),
|
|
344
|
-
a("span", Ke, " €" +
|
|
339
|
+
a("span", Ke, " €" + d(o(N).revenue.toFixed(2)) + d(o(C) === "pending" ? " pending " : o(C) === "cancelled" ? " cancelled " : " ") + "revenue ", 1)
|
|
345
340
|
]),
|
|
346
341
|
_: 1
|
|
347
342
|
})
|
|
348
343
|
]),
|
|
349
344
|
a("div", We, [
|
|
350
345
|
a("div", Ze, [
|
|
351
|
-
r(
|
|
346
|
+
r(i, {
|
|
352
347
|
variant: "outline",
|
|
353
348
|
size: "icon",
|
|
354
349
|
class: "size-8",
|
|
355
350
|
onClick: ue
|
|
356
351
|
}, {
|
|
357
|
-
default:
|
|
358
|
-
r(o(
|
|
352
|
+
default: f(() => [
|
|
353
|
+
r(o(Te), { size: 16 })
|
|
359
354
|
]),
|
|
360
355
|
_: 1
|
|
361
356
|
}),
|
|
362
|
-
r(
|
|
357
|
+
r(i, {
|
|
363
358
|
variant: "outline",
|
|
364
359
|
size: "sm",
|
|
365
360
|
class: "h-8 px-3 text-xs",
|
|
366
|
-
onClick:
|
|
361
|
+
onClick: xe
|
|
367
362
|
}, {
|
|
368
|
-
default:
|
|
363
|
+
default: f(() => [...e[7] || (e[7] = [
|
|
369
364
|
w(" Today ", -1)
|
|
370
365
|
])]),
|
|
371
366
|
_: 1
|
|
372
367
|
}),
|
|
373
|
-
r(
|
|
368
|
+
r(i, {
|
|
374
369
|
variant: "outline",
|
|
375
370
|
size: "icon",
|
|
376
371
|
class: "size-8",
|
|
377
372
|
onClick: me,
|
|
378
373
|
disabled: !o(fe)
|
|
379
374
|
}, {
|
|
380
|
-
default:
|
|
375
|
+
default: f(() => [
|
|
381
376
|
r(o(Re), { size: 16 })
|
|
382
377
|
]),
|
|
383
378
|
_: 1
|
|
384
379
|
}, 8, ["disabled"])
|
|
385
380
|
]),
|
|
386
|
-
r(
|
|
381
|
+
r(i, {
|
|
387
382
|
variant: "outline",
|
|
388
383
|
size: "icon",
|
|
389
|
-
onClick:
|
|
390
|
-
disabled: o(
|
|
384
|
+
onClick: y,
|
|
385
|
+
disabled: o(S)
|
|
391
386
|
}, {
|
|
392
|
-
default:
|
|
387
|
+
default: f(() => [
|
|
393
388
|
r(o(Fe), {
|
|
394
389
|
size: 16,
|
|
395
|
-
class: De({ "animate-spin": o(
|
|
390
|
+
class: De({ "animate-spin": o(S) })
|
|
396
391
|
}, null, 8, ["class"])
|
|
397
392
|
]),
|
|
398
393
|
_: 1
|
|
@@ -401,189 +396,189 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
401
396
|
]),
|
|
402
397
|
a("div", et, [
|
|
403
398
|
a("div", tt, [
|
|
404
|
-
r(
|
|
399
|
+
r(i, {
|
|
405
400
|
type: "button",
|
|
406
401
|
variant: "outline",
|
|
407
|
-
onClick:
|
|
402
|
+
onClick: ie
|
|
408
403
|
}, {
|
|
409
|
-
default:
|
|
410
|
-
r(o(
|
|
411
|
-
w(" " +
|
|
404
|
+
default: f(() => [
|
|
405
|
+
r(o(E), { class: "size-4" }),
|
|
406
|
+
w(" " + d(o(ce)), 1)
|
|
412
407
|
]),
|
|
413
408
|
_: 1
|
|
414
409
|
}),
|
|
415
410
|
Ce(a("input", {
|
|
416
411
|
ref_key: "dateInputRef",
|
|
417
412
|
ref: G,
|
|
418
|
-
"onUpdate:modelValue": e[0] || (e[0] = (s) => oe(
|
|
413
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => oe(B) ? B.value = s : null),
|
|
419
414
|
type: "date",
|
|
420
415
|
class: "orders-date-picker",
|
|
421
416
|
"aria-label": "Select order date"
|
|
422
417
|
}, null, 512), [
|
|
423
|
-
[Ie, o(
|
|
418
|
+
[Ie, o(B)]
|
|
424
419
|
])
|
|
425
420
|
])
|
|
426
421
|
])
|
|
427
422
|
]),
|
|
428
423
|
_: 1
|
|
429
424
|
}),
|
|
430
|
-
r(
|
|
431
|
-
default:
|
|
425
|
+
r(he, null, {
|
|
426
|
+
default: f(() => [
|
|
432
427
|
a("div", st, [
|
|
433
428
|
r(o(Be), {
|
|
434
429
|
size: 16,
|
|
435
430
|
class: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
436
431
|
}),
|
|
437
|
-
r(
|
|
438
|
-
modelValue: o(
|
|
439
|
-
"onUpdate:modelValue": e[1] || (e[1] = (s) => oe(
|
|
432
|
+
r(V, {
|
|
433
|
+
modelValue: o(h),
|
|
434
|
+
"onUpdate:modelValue": e[1] || (e[1] = (s) => oe(h) ? h.value = s : null),
|
|
440
435
|
placeholder: "Search by name, email, or phone...",
|
|
441
436
|
class: "pl-9 pr-9"
|
|
442
437
|
}, null, 8, ["modelValue"]),
|
|
443
|
-
o(
|
|
438
|
+
o(h) ? (n(), ae(i, {
|
|
444
439
|
key: 0,
|
|
445
440
|
variant: "ghost",
|
|
446
441
|
size: "icon",
|
|
447
442
|
class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
|
|
448
443
|
onClick: pe
|
|
449
444
|
}, {
|
|
450
|
-
default:
|
|
445
|
+
default: f(() => [
|
|
451
446
|
r(o($e), { size: 14 })
|
|
452
447
|
]),
|
|
453
448
|
_: 1
|
|
454
449
|
})) : D("", !0)
|
|
455
450
|
]),
|
|
456
|
-
o(
|
|
457
|
-
o(
|
|
451
|
+
o(h) ? (n(), l("div", at, " Showing " + d(o(M).length) + " of " + d(o(v).length) + " orders ", 1)) : D("", !0),
|
|
452
|
+
o(S) ? (n(), l("div", ot, [...e[8] || (e[8] = [
|
|
458
453
|
a("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
|
|
459
|
-
])])) : o(
|
|
454
|
+
])])) : o(v).length === 0 ? (n(), l("div", nt, [
|
|
460
455
|
r(o(re), { class: "size-12 mx-auto mb-3 opacity-50" }),
|
|
461
456
|
e[9] || (e[9] = a("p", null, "No orders received on this day", -1))
|
|
462
|
-
])) : o(
|
|
463
|
-
(n(!0), l(
|
|
457
|
+
])) : o(M).length === 0 ? (n(), l("div", rt, " No orders match your search ")) : (n(), l("div", lt, [
|
|
458
|
+
(n(!0), l(z, null, U(o(ee), (s) => (n(), l("div", {
|
|
464
459
|
key: s.id,
|
|
465
|
-
class: "border rounded-lg overflow-hidden shadow-sm"
|
|
460
|
+
class: "border-t last:border-b @5xl:border @5xl:rounded-lg overflow-hidden @5xl:shadow-sm"
|
|
466
461
|
}, [
|
|
467
462
|
s.reservations.length === 1 ? (n(), l("div", {
|
|
468
463
|
key: 0,
|
|
469
|
-
class: "
|
|
470
|
-
onClick: (c) => o(
|
|
464
|
+
class: "px-6 py-3 @5xl:px-3 hover:bg-muted/50 transition-colors cursor-pointer",
|
|
465
|
+
onClick: (c) => o(P)?.openDialog(s.reservations[0])
|
|
471
466
|
}, [
|
|
472
|
-
a("div",
|
|
467
|
+
a("div", it, [
|
|
473
468
|
a("div", ct, [
|
|
474
|
-
a("div", ut,
|
|
475
|
-
a("div", mt,
|
|
476
|
-
a("div", ft,
|
|
477
|
-
a("div",
|
|
469
|
+
a("div", ut, d(s.customerInfo?.firstName || s.customerInfo?.lastName ? [s.customerInfo?.firstName, s.customerInfo?.lastName].filter(Boolean).join(" ") : "Unknown Customer"), 1),
|
|
470
|
+
a("div", mt, d(s.customerInfo?.email), 1),
|
|
471
|
+
a("div", ft, d(s.customerInfo?.phone), 1),
|
|
472
|
+
a("div", xt, [
|
|
478
473
|
a("div", pt, [
|
|
479
|
-
r(o(H), { size: 12 }),
|
|
480
|
-
a("span", null, i(W(s.reservations[0].date)) + " · " + i(s.reservations[0].startTime) + " - " + i(s.reservations[0].endTime), 1)
|
|
481
|
-
]),
|
|
482
|
-
a("div", xt, [
|
|
483
474
|
r(o(E), { size: 12 }),
|
|
484
|
-
a("span", null,
|
|
475
|
+
a("span", null, d(W(s.reservations[0].date)) + " · " + d(s.reservations[0].startTime) + " - " + d(s.reservations[0].endTime), 1)
|
|
476
|
+
]),
|
|
477
|
+
a("div", vt, [
|
|
478
|
+
r(o(L), { size: 12 }),
|
|
479
|
+
a("span", null, d(s.reservations[0].spots) + " spots", 1)
|
|
485
480
|
]),
|
|
486
|
-
s.reservations[0].resourceName ? (n(), l("div",
|
|
481
|
+
s.reservations[0].resourceName ? (n(), l("div", _t, [
|
|
487
482
|
a("div", {
|
|
488
483
|
class: "w-3 h-3 rounded-full",
|
|
489
484
|
style: ne({ backgroundColor: s.reservations[0].resourceColor || "#6b7280" })
|
|
490
485
|
}, null, 4),
|
|
491
|
-
a("span", null,
|
|
486
|
+
a("span", null, d(s.reservations[0].resourceName), 1)
|
|
492
487
|
])) : D("", !0)
|
|
493
488
|
]),
|
|
494
|
-
a("div",
|
|
489
|
+
a("div", gt, [
|
|
495
490
|
r(o(le), { size: 12 }),
|
|
496
|
-
a("span", null, "Ordered at " +
|
|
491
|
+
a("span", null, "Ordered at " + d(K(s.createdAt)), 1)
|
|
497
492
|
]),
|
|
498
|
-
r(
|
|
493
|
+
r(H, {
|
|
499
494
|
metadata: { ...s.reservations[0].metadata, ...s.reservations[0].reservationMetadata },
|
|
500
|
-
schema: o(
|
|
495
|
+
schema: o(T),
|
|
501
496
|
"display-filter": ["highlight", "badge"],
|
|
502
497
|
compact: "",
|
|
503
498
|
class: "mt-1"
|
|
504
499
|
}, null, 8, ["metadata", "schema"])
|
|
505
500
|
]),
|
|
506
|
-
a("div",
|
|
507
|
-
s.reservations[0].status === "pending" ? (n(), l("span",
|
|
508
|
-
s.reservations[0].reservationPrice || s.reservations[0].reservationPrice === 0 ? (n(), l("div", St, " €" +
|
|
501
|
+
a("div", ht, [
|
|
502
|
+
s.reservations[0].status === "pending" ? (n(), l("span", yt, "Pending")) : s.reservations[0].status === "cancelled" ? (n(), l("span", kt, "Cancelled")) : s.reservations[0].reservationStatus === "needs_approval" ? (n(), l("span", bt, "Needs Approval")) : s.reservations[0].reservationStatus === "approved" ? (n(), l("span", wt, "Approved")) : s.reservations[0].reservationStatus === "cancelled" ? (n(), l("span", Dt, "Cancelled")) : s.reservations[0].reservationStatus === "rejected" ? (n(), l("span", Ct, "Rejected")) : (n(), l("span", It, "Pending")),
|
|
503
|
+
s.reservations[0].reservationPrice || s.reservations[0].reservationPrice === 0 ? (n(), l("div", St, " €" + d(s.totalPrice.toFixed(2)), 1)) : D("", !0)
|
|
509
504
|
])
|
|
510
505
|
])
|
|
511
|
-
], 8,
|
|
506
|
+
], 8, dt)) : (n(), l("div", Pt, [
|
|
512
507
|
a("div", {
|
|
513
|
-
class: "
|
|
514
|
-
onClick: (c) => o(
|
|
508
|
+
class: "px-6 py-3 @5xl:px-3 bg-muted/30 hover:bg-muted/50 transition-colors cursor-pointer",
|
|
509
|
+
onClick: (c) => o(F)?.openDialog(s)
|
|
515
510
|
}, [
|
|
516
|
-
a("div",
|
|
517
|
-
a("div",
|
|
518
|
-
a("div",
|
|
519
|
-
a("div",
|
|
511
|
+
a("div", Nt, [
|
|
512
|
+
a("div", zt, [
|
|
513
|
+
a("div", Ot, [
|
|
514
|
+
a("div", jt, d(s.customerInfo?.firstName || s.customerInfo?.lastName ? [s.customerInfo?.firstName, s.customerInfo?.lastName].filter(Boolean).join(" ") : "Unknown Customer"), 1),
|
|
520
515
|
r(u, {
|
|
521
516
|
variant: "secondary",
|
|
522
|
-
class: "text-xs"
|
|
517
|
+
class: "text-xs whitespace-nowrap"
|
|
523
518
|
}, {
|
|
524
|
-
default:
|
|
525
|
-
w(
|
|
519
|
+
default: f(() => [
|
|
520
|
+
w(d(s.reservations.length) + " reservations ", 1)
|
|
526
521
|
]),
|
|
527
522
|
_: 2
|
|
528
523
|
}, 1024)
|
|
529
524
|
]),
|
|
530
|
-
a("div", Tt,
|
|
531
|
-
a("div",
|
|
532
|
-
a("div",
|
|
525
|
+
a("div", Tt, d(s.customerInfo?.email), 1),
|
|
526
|
+
a("div", Rt, d(s.customerInfo?.phone), 1),
|
|
527
|
+
a("div", Ft, [
|
|
533
528
|
r(o(le), { size: 12 }),
|
|
534
|
-
a("span", null, "Ordered at " +
|
|
529
|
+
a("span", null, "Ordered at " + d(K(s.createdAt)), 1)
|
|
535
530
|
]),
|
|
536
|
-
r(
|
|
531
|
+
r(H, {
|
|
537
532
|
metadata: s.metadata,
|
|
538
|
-
schema: o(
|
|
533
|
+
schema: o(T),
|
|
539
534
|
"display-filter": ["highlight", "badge"],
|
|
540
535
|
compact: "",
|
|
541
536
|
class: "mt-1"
|
|
542
537
|
}, null, 8, ["metadata", "schema"])
|
|
543
538
|
]),
|
|
544
|
-
a("div",
|
|
545
|
-
s.status === "pending" ? (n(), l("span",
|
|
546
|
-
a("div",
|
|
539
|
+
a("div", Bt, [
|
|
540
|
+
s.status === "pending" ? (n(), l("span", $t, "Pending")) : s.status === "cancelled" ? (n(), l("span", Mt, "Cancelled")) : (n(), l("span", Vt, "Confirmed")),
|
|
541
|
+
a("div", Ut, " €" + d(s.totalPrice.toFixed(2)), 1)
|
|
547
542
|
])
|
|
548
543
|
])
|
|
549
|
-
], 8,
|
|
550
|
-
(n(!0), l(
|
|
544
|
+
], 8, At),
|
|
545
|
+
(n(!0), l(z, null, U(s.reservations, (c) => (n(), l("div", {
|
|
551
546
|
key: c.res_id,
|
|
552
|
-
class: "
|
|
553
|
-
onClick: (
|
|
547
|
+
class: "px-6 py-3 @5xl:px-3 border-t bg-muted/50 dark:bg-transparent dark:hover:bg-muted/50 transition-colors cursor-pointer",
|
|
548
|
+
onClick: (as) => o(P)?.openDialog(c)
|
|
554
549
|
}, [
|
|
555
|
-
a("div",
|
|
556
|
-
a("div",
|
|
557
|
-
a("div", Ht, [
|
|
558
|
-
r(o(H), { size: 12 }),
|
|
559
|
-
a("span", null, i(W(c.date)) + " · " + i(c.startTime) + " - " + i(c.endTime), 1)
|
|
560
|
-
]),
|
|
550
|
+
a("div", Et, [
|
|
551
|
+
a("div", Ht, [
|
|
561
552
|
a("div", qt, [
|
|
562
553
|
r(o(E), { size: 12 }),
|
|
563
|
-
a("span", null,
|
|
554
|
+
a("span", null, d(W(c.date)) + " · " + d(c.startTime) + " - " + d(c.endTime), 1)
|
|
555
|
+
]),
|
|
556
|
+
a("div", Qt, [
|
|
557
|
+
r(o(L), { size: 12 }),
|
|
558
|
+
a("span", null, d(c.spots) + " spots", 1)
|
|
564
559
|
]),
|
|
565
|
-
c.resourceName ? (n(), l("div",
|
|
560
|
+
c.resourceName ? (n(), l("div", Xt, [
|
|
566
561
|
a("div", {
|
|
567
562
|
class: "w-3 h-3 rounded-full",
|
|
568
563
|
style: ne({ backgroundColor: c.resourceColor || "#6b7280" })
|
|
569
564
|
}, null, 4),
|
|
570
|
-
a("span", null,
|
|
565
|
+
a("span", null, d(c.resourceName), 1)
|
|
571
566
|
])) : D("", !0)
|
|
572
567
|
]),
|
|
573
|
-
c.status === "confirmed" ? (n(), l("div",
|
|
574
|
-
c.reservationStatus === "needs_approval" ? (n(), l("span",
|
|
575
|
-
c.reservationPrice || c.reservationPrice === 0 ? (n(), l("div",
|
|
568
|
+
c.status === "confirmed" ? (n(), l("div", Yt, [
|
|
569
|
+
c.reservationStatus === "needs_approval" ? (n(), l("span", Gt, "Needs Approval")) : c.reservationStatus === "approved" ? (n(), l("span", Jt, "Approved")) : c.reservationStatus === "cancelled" ? (n(), l("span", Kt, "Cancelled")) : c.reservationStatus === "rejected" ? (n(), l("span", Wt, "Rejected")) : (n(), l("span", Zt, "Pending")),
|
|
570
|
+
c.reservationPrice || c.reservationPrice === 0 ? (n(), l("div", es, " €" + d(c.reservationPrice.toFixed(2)), 1)) : D("", !0)
|
|
576
571
|
])) : D("", !0)
|
|
577
572
|
]),
|
|
578
|
-
r(
|
|
573
|
+
r(H, {
|
|
579
574
|
metadata: c.reservationMetadata,
|
|
580
|
-
schema: o(
|
|
575
|
+
schema: o(T),
|
|
581
576
|
"display-filter": ["highlight", "badge"],
|
|
582
577
|
compact: "",
|
|
583
578
|
class: "mt-1"
|
|
584
579
|
}, null, 8, ["metadata", "schema"])
|
|
585
|
-
], 8,
|
|
586
|
-
]
|
|
580
|
+
], 8, Lt))), 128))
|
|
581
|
+
]))
|
|
587
582
|
]))), 128))
|
|
588
583
|
]))
|
|
589
584
|
]),
|
|
@@ -598,27 +593,27 @@ const qe = { class: "space-y-6" }, Ye = { class: "flex flex-col sm:flex-row sm:i
|
|
|
598
593
|
}),
|
|
599
594
|
r(Ue, {
|
|
600
595
|
ref_key: "reservationDetailDialog",
|
|
601
|
-
ref:
|
|
602
|
-
"agenda-data": o(
|
|
603
|
-
resources: o(
|
|
596
|
+
ref: P,
|
|
597
|
+
"agenda-data": o(R),
|
|
598
|
+
resources: o(I),
|
|
604
599
|
"show-order-link": "",
|
|
605
|
-
onCancelled:
|
|
606
|
-
onConfirmed:
|
|
607
|
-
onRejected:
|
|
608
|
-
onTransferred:
|
|
600
|
+
onCancelled: y,
|
|
601
|
+
onConfirmed: y,
|
|
602
|
+
onRejected: y,
|
|
603
|
+
onTransferred: y,
|
|
609
604
|
onOpenOrder: e[2] || (e[2] = (s) => te(s))
|
|
610
605
|
}, null, 8, ["agenda-data", "resources"]),
|
|
611
606
|
r(Le, {
|
|
612
607
|
ref_key: "orderDetailDialog",
|
|
613
|
-
ref:
|
|
614
|
-
"agenda-data": o(
|
|
615
|
-
resources: o(
|
|
616
|
-
onOpenReservation: e[3] || (e[3] = (s) =>
|
|
608
|
+
ref: F,
|
|
609
|
+
"agenda-data": o(R),
|
|
610
|
+
resources: o(I),
|
|
611
|
+
onOpenReservation: e[3] || (e[3] = (s) => ge(s))
|
|
617
612
|
}, null, 8, ["agenda-data", "resources"])
|
|
618
613
|
], 64);
|
|
619
614
|
};
|
|
620
615
|
}
|
|
621
|
-
}),
|
|
616
|
+
}), cs = /* @__PURE__ */ He(ts, [["__scopeId", "data-v-5178678e"]]);
|
|
622
617
|
export {
|
|
623
|
-
|
|
618
|
+
cs as default
|
|
624
619
|
};
|