@oneclick.dev/cms-core-modules 0.0.83 → 0.0.85

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.
Files changed (67) hide show
  1. package/dist/{ContentEditor-CxKirDdL.mjs → ContentEditor-C5ydvk8b.mjs} +7067 -5886
  2. package/dist/{ContentEditor-CRFkD4tE.js → ContentEditor-DiveHwSJ.js} +43 -43
  3. package/dist/{Create-CsqVYhPO.mjs → Create-6uT9HWar.mjs} +35 -35
  4. package/dist/{Create-ip0MnS0o.js → Create-DuZ5nZrX.js} +1 -1
  5. package/dist/{DateFormatter-CvOfaUnU.mjs → DateFormatter-2B0R-DY4.mjs} +204 -400
  6. package/dist/DateFormatter-DbtOLV0L.js +1 -0
  7. package/dist/{Detail-RMXFuSRQ.js → Detail-BZ-iE9vf.js} +1 -1
  8. package/dist/{Detail-B4b_FLDa.mjs → Detail-C1Blq61w.mjs} +90 -90
  9. package/dist/{Detail-BayNaAg9.js → Detail-C8wQiDcv.js} +1 -1
  10. package/dist/{Detail-CbLk1v37.mjs → Detail-CJVMJDP7.mjs} +17 -17
  11. package/dist/{Detail-CnK-qbhE.js → Detail-CPqug27l.js} +1 -1
  12. package/dist/Detail-CjuhjPby.js +1 -0
  13. package/dist/{Detail-U0mgLKt6.mjs → Detail-CtItxMX4.mjs} +62 -63
  14. package/dist/{Detail-CVgWHbMC.mjs → Detail-Dnpnmy4-.mjs} +158 -158
  15. package/dist/{Entries-D7MHylQE.mjs → Entries-BkOPae4R.mjs} +49 -49
  16. package/dist/Entries-CcEW98F5.js +1 -0
  17. package/dist/{Find-XPcJxeRH.mjs → Find-Bd1uLqSa.mjs} +55 -55
  18. package/dist/Find-D4Qa45qC.js +1 -0
  19. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-CDc8MIq2.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-Bc946oSc.mjs} +1 -1
  20. package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-StaNp-3y.js → NewReservationDialog.vue_vue_type_script_setup_true_lang-CqERfyYb.js} +1 -1
  21. package/dist/{Overview-CwCAeBnX.js → Overview-CA8wh_BI.js} +1 -1
  22. package/dist/{Overview-CgViRnNc.mjs → Overview-D4MFwRI_.mjs} +67 -68
  23. package/dist/{Overview-B2bFNGhH.js → Overview-Da0XexiT.js} +1 -1
  24. package/dist/Overview-DeQQ0FY3.js +1 -0
  25. package/dist/{Overview--XpvBbqz.mjs → Overview-DoOASlNz.mjs} +1 -3
  26. package/dist/{Overview-Cczt_dcE.mjs → Overview-gJSvftdE.mjs} +34 -34
  27. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs} +0 -1
  28. package/dist/{ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Vxubki_v.js → ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js} +1 -1
  29. package/dist/{SeoHealth-ZpvB7CS2.mjs → SeoHealth-Bc5chnaa.mjs} +14 -14
  30. package/dist/{SeoHealth-DFZ0LLBH.js → SeoHealth-BkpJ1F2Y.js} +1 -1
  31. package/dist/TableView-Ei_w_-bn.mjs +5745 -0
  32. package/dist/TableView-klOTPJKZ.js +4 -0
  33. package/dist/View-BaFlMcM6.js +1 -0
  34. package/dist/View-C4MBWRlA.mjs +28 -0
  35. package/dist/{agenda-Cl3s_FIE.mjs → agenda-C5grvzSa.mjs} +166 -169
  36. package/dist/agenda-DXMwVWpN.js +1 -0
  37. package/dist/{availability-B-tRp8hB.mjs → availability-C1NqOFsQ.mjs} +81 -81
  38. package/dist/{availability-BiBbzEIM.js → availability-D_wnfLsH.js} +1 -1
  39. package/dist/cms-core-modules.css +1 -1
  40. package/dist/{exceptions-DQPSFSj7.mjs → exceptions-BIwMhYa4.mjs} +1 -1
  41. package/dist/{exceptions-BA3PsW4n.js → exceptions-Cn7zooEu.js} +1 -1
  42. package/dist/{index-CBC9dWZ9.js → index-C9pSS15N.js} +2 -2
  43. package/dist/{index-YOOlBEZB.mjs → index-MwjeLHPP.mjs} +3 -3
  44. package/dist/index.cjs.js +1 -1
  45. package/dist/index.mjs +23 -23
  46. package/dist/{orders-DZzdsHOW.mjs → orders-DhQ2EFXS.mjs} +157 -157
  47. package/dist/orders-V1pch_ih.js +1 -0
  48. package/dist/server-handlers.cjs.js +1 -1
  49. package/dist/server-handlers.mjs +142 -147
  50. package/package.json +2 -2
  51. package/dist/DateFormatter-ls6HfWpS.js +0 -1
  52. package/dist/Detail-BcboL7NF.js +0 -1
  53. package/dist/Entries-BPkZ7Jg5.js +0 -1
  54. package/dist/Find-Ds6OvuH6.js +0 -1
  55. package/dist/Overview-B-8TLLjh.js +0 -1
  56. package/dist/TableView-BUPPcHUW.mjs +0 -89505
  57. package/dist/TableView-CksiPsTL.js +0 -586
  58. package/dist/View-DDXN0tKD.mjs +0 -25
  59. package/dist/View-DfzaVOzS.js +0 -1
  60. package/dist/agenda-rlFma_wn.js +0 -1
  61. package/dist/floating-ui.dom-B9WYoHj2.js +0 -1
  62. package/dist/floating-ui.dom-fpIfhXTZ.mjs +0 -1291
  63. package/dist/index-DYpruS-A-Cw57iwdY.mjs +0 -4210
  64. package/dist/index-DYpruS-A-DwDXo9Tq.js +0 -88
  65. package/dist/index-YMaY4uuk-BgpTtr73.js +0 -1
  66. package/dist/index-YMaY4uuk-C_xV5K9Z.mjs +0 -1300
  67. package/dist/orders-tP4WdF5q.js +0 -1
@@ -1,55 +1,55 @@
1
- import { defineComponent as ee, ref as w, computed as C, provide as te, onMounted as se, watch as oe, resolveComponent as x, openBlock as c, createElementBlock as m, Fragment as U, createVNode as r, withCtx as g, createElementVNode as s, unref as o, createTextVNode as I, createBlock as j, toDisplayString as d, createCommentVNode as S, normalizeClass as ne, isRef as ae, renderList as re, normalizeStyle as ie, nextTick as le } from "vue";
2
- import { useRoute as ce, useRouter as de, useModuleRoute as ue, useModule as me, useFirebaseIntegration as pe } from "@oneclick.dev/cms-kit";
3
- import { ShoppingBag as L, Users as V, ChevronLeft as ge, ChevronRight as fe, RefreshCw as ve, Search as _e, X as xe, Calendar as he, Clock as ye } from "lucide-vue-next";
4
- import { F as De, _ as we } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-B7ks5mbf.mjs";
5
- import { _ as ke } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
6
- const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Ie = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, Se = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Oe = { class: "flex items-center gap-1" }, Pe = { class: "flex items-center gap-1" }, Te = { class: "flex items-center gap-2" }, ze = { class: "flex items-center gap-1" }, Ne = { class: "text-sm text-muted-foreground mt-2" }, Ae = { class: "relative mb-4" }, Re = {
1
+ import { defineComponent as te, ref as w, computed as b, provide as se, onMounted as oe, watch as ae, resolveComponent as x, openBlock as c, createElementBlock as m, Fragment as j, createVNode as r, withCtx as f, createElementVNode as s, unref as o, createTextVNode as C, createBlock as L, toDisplayString as d, createCommentVNode as I, normalizeClass as ne, isRef as re, renderList as ie, normalizeStyle as le, nextTick as ce } from "vue";
2
+ import { useRoute as de, useRouter as ue, useOverlayParams as me, useModuleRoute as pe, useModule as fe, useFirebaseIntegration as ge } from "@oneclick.dev/cms-kit";
3
+ import { ShoppingBag as V, Users as E, ChevronLeft as ve, ChevronRight as _e, RefreshCw as xe, Search as he, X as ye, Calendar as De, Clock as we } from "lucide-vue-next";
4
+ import { F as ke, _ as be } from "./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-Cohhnd5x.mjs";
5
+ import { _ as Ce } from "./EditLayout.vue_vue_type_script_setup_true_lang-CcysXzmW.mjs";
6
+ const Ie = { class: "space-y-6" }, Se = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Pe = { class: "text-2xl font-semibold tracking-tight flex items-center gap-2" }, Oe = { class: "flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4" }, Te = { class: "flex items-center gap-1" }, ze = { class: "flex items-center gap-1" }, Ne = { class: "flex items-center gap-2" }, Ae = { class: "flex items-center gap-1" }, Re = { class: "text-sm text-muted-foreground mt-2" }, Be = { class: "relative mb-4" }, Fe = {
7
7
  key: 0,
8
8
  class: "mb-3 text-sm text-muted-foreground"
9
- }, Be = {
9
+ }, Ue = {
10
10
  key: 1,
11
11
  class: "flex items-center justify-center py-8"
12
- }, Fe = {
12
+ }, je = {
13
13
  key: 2,
14
14
  class: "text-center py-8 text-muted-foreground"
15
- }, Ue = {
15
+ }, Le = {
16
16
  key: 3,
17
17
  class: "text-center py-8 text-muted-foreground"
18
- }, je = {
18
+ }, Ve = {
19
19
  key: 4,
20
20
  class: "space-y-2"
21
- }, Le = ["onClick"], Ve = { class: "flex items-start justify-between" }, Ee = { class: "flex-1" }, $e = { class: "font-medium" }, He = { class: "text-sm text-muted-foreground" }, Me = { class: "text-sm text-muted-foreground" }, qe = { class: "flex items-center gap-4 flex-wrap mt-1" }, Ye = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Qe = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Xe = {
21
+ }, Ee = ["onClick"], $e = { class: "flex items-start justify-between" }, He = { class: "flex-1" }, Me = { class: "font-medium" }, qe = { class: "text-sm text-muted-foreground" }, Ye = { class: "text-sm text-muted-foreground" }, Qe = { class: "flex items-center gap-4 flex-wrap mt-1" }, Xe = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Ge = { class: "flex items-center gap-2 text-xs text-muted-foreground" }, Je = {
22
22
  key: 0,
23
23
  class: "flex items-center gap-1 text-xs text-muted-foreground"
24
- }, Ge = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, Je = { class: "text-right" }, Ke = {
24
+ }, Ke = { class: "flex items-center gap-2 mt-1 text-xs text-muted-foreground" }, We = { class: "text-right" }, Ze = {
25
25
  key: 0,
26
26
  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"
27
- }, We = {
27
+ }, et = {
28
28
  key: 1,
29
29
  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"
30
- }, Ze = {
30
+ }, tt = {
31
31
  key: 2,
32
32
  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"
33
- }, et = {
33
+ }, st = {
34
34
  key: 3,
35
35
  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"
36
- }, tt = {
36
+ }, ot = {
37
37
  key: 4,
38
38
  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"
39
- }, st = {
39
+ }, at = {
40
40
  key: 5,
41
41
  class: "text-sm font-medium mt-1"
42
- }, dt = /* @__PURE__ */ ee({
42
+ }, mt = /* @__PURE__ */ te({
43
43
  __name: "orders",
44
- setup(ot) {
45
- const N = ce();
46
- de();
47
- const { params: F } = ue(), { config: O } = me(), A = pe(O.project), f = w([]), P = w([]), k = w(!0), _ = w(""), b = w(null), h = /* @__PURE__ */ new Date(), p = w(/* @__PURE__ */ new Date()), E = C(() => ({
48
- date: Q(p.value),
44
+ setup(nt) {
45
+ const B = de();
46
+ ue();
47
+ const F = me(), { params: U } = pe(), { config: S } = fe(), z = ge(S.project), g = w([]), P = w([]), k = w(!0), _ = w(""), N = w(null), h = /* @__PURE__ */ new Date(), p = w(/* @__PURE__ */ new Date()), $ = b(() => ({
48
+ date: X(p.value),
49
49
  resource: null
50
50
  }));
51
- te("event", E);
52
- const $ = C(() => {
51
+ se("event", $);
52
+ const H = b(() => {
53
53
  const e = new Date(h);
54
54
  e.setDate(h.getDate() - 1);
55
55
  const t = new Date(h);
@@ -59,29 +59,29 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
59
59
  day: "numeric",
60
60
  year: "numeric"
61
61
  });
62
- }), H = () => {
62
+ }), M = () => {
63
63
  const e = new Date(p.value);
64
64
  e.setDate(e.getDate() - 1), p.value = e;
65
- }, M = () => {
65
+ }, q = () => {
66
66
  const e = new Date(p.value);
67
67
  e.setDate(e.getDate() + 1), e <= h && (p.value = e);
68
- }, q = C(() => {
68
+ }, Y = b(() => {
69
69
  const e = new Date(p.value);
70
70
  return e.setDate(e.getDate() + 1), e <= h;
71
- }), Y = () => {
71
+ }), Q = () => {
72
72
  p.value = /* @__PURE__ */ new Date();
73
- }, Q = (e) => {
74
- const t = e.getFullYear(), a = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
75
- return `${t}-${a}-${i}`;
76
- }, X = (e) => e ? new Date(e).toLocaleTimeString("en-US", {
73
+ }, X = (e) => {
74
+ const t = e.getFullYear(), n = String(e.getMonth() + 1).padStart(2, "0"), i = String(e.getDate()).padStart(2, "0");
75
+ return `${t}-${n}-${i}`;
76
+ }, G = (e) => e ? new Date(e).toLocaleTimeString("en-US", {
77
77
  hour: "2-digit",
78
78
  minute: "2-digit",
79
79
  hour12: !1
80
- }) : "", G = (e) => e ? new Date(e).toLocaleDateString("en-US", {
80
+ }) : "", J = (e) => e ? new Date(e).toLocaleDateString("en-US", {
81
81
  weekday: "short",
82
82
  month: "short",
83
83
  day: "numeric"
84
- }) : "", R = C(() => _.value.trim() ? new De(f.value, {
84
+ }) : "", A = b(() => _.value.trim() ? new ke(g.value, {
85
85
  keys: [
86
86
  "customerInfo.firstName",
87
87
  "customerInfo.lastName",
@@ -91,38 +91,37 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
91
91
  ],
92
92
  threshold: 0.3,
93
93
  ignoreLocation: !0
94
- }).search(_.value).map((t) => t.item) : f.value), T = C(() => ({
95
- spots: f.value.reduce((e, t) => e + (t.spots || 0), 0),
96
- bookings: f.value.length,
97
- revenue: f.value.reduce((e, t) => e + (t.reservationPrice || 0), 0)
98
- })), J = () => {
94
+ }).search(_.value).map((t) => t.item) : g.value), O = b(() => ({
95
+ spots: g.value.reduce((e, t) => e + (t.spots || 0), 0),
96
+ bookings: g.value.length,
97
+ revenue: g.value.reduce((e, t) => e + (t.reservationPrice || 0), 0)
98
+ })), K = () => {
99
99
  _.value = "";
100
- }, K = async () => {
100
+ }, W = async () => {
101
101
  try {
102
- const e = F.value.id, t = await A.get(O.agendaCollection, e);
103
- P.value = t?.resources?.filter((a) => a.isActive) || [];
102
+ const e = U.value.id, t = await z.get(S.agendaCollection, e);
103
+ P.value = t?.resources?.filter((n) => n.isActive) || [];
104
104
  } catch (e) {
105
105
  console.error("Error loading resources:", e), P.value = [];
106
106
  }
107
107
  }, y = async () => {
108
- k.value = !0, f.value = [];
108
+ k.value = !0, g.value = [];
109
109
  try {
110
- const e = F.value.id, t = new Date(p.value);
110
+ const e = U.value.id, t = new Date(p.value);
111
111
  t.setHours(0, 0, 0, 0);
112
- const a = new Date(p.value);
113
- a.setHours(23, 59, 59, 999);
114
- const i = await A.find(O.reservationsCollection, {
112
+ const n = new Date(p.value);
113
+ n.setHours(23, 59, 59, 999);
114
+ const i = await z.find(S.reservationsCollection, {
115
115
  filters: [
116
116
  { field: "agendaId", operator: "==", value: e },
117
117
  { field: "createdAt", operator: ">=", value: t.toISOString() },
118
- { field: "createdAt", operator: "<=", value: a.toISOString() }
118
+ { field: "createdAt", operator: "<=", value: n.toISOString() }
119
119
  ]
120
120
  });
121
- console.log("allOrders", i);
122
121
  let v = [];
123
122
  i.forEach((l) => {
124
123
  (l.reservations || []).forEach((u) => {
125
- const z = P.value.find((B) => B.id === u.resourceId);
124
+ const T = P.value.find((R) => R.id === u.resourceId);
126
125
  v.push({
127
126
  customerInfo: l.customerInfo,
128
127
  amountDue: l.amountDue,
@@ -145,36 +144,36 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
145
144
  reservationAddOnsPrice: u.addOnsPrice,
146
145
  pricingOptionId: u.pricingOptionId,
147
146
  pricingOption: u.pricingOption,
148
- resourceName: z?.name || "Unknown",
149
- resourceColor: z?.color
147
+ resourceName: T?.name || "Unknown",
148
+ resourceColor: T?.color
150
149
  });
151
150
  });
152
- }), f.value = v.sort((l, D) => (D.createdAt || "").localeCompare(l.createdAt || ""));
151
+ }), g.value = v.sort((l, D) => (D.createdAt || "").localeCompare(l.createdAt || ""));
153
152
  } catch (e) {
154
- console.error("Error loading orders:", e), f.value = [];
153
+ console.error("Error loading orders:", e), g.value = [];
155
154
  } finally {
156
155
  k.value = !1;
157
156
  }
158
- }, W = async () => {
159
- await K(), await y();
160
- }, Z = async (e, t) => {
161
- const a = await A.get(O.reservationsCollection, e), i = a?.reservations?.find((v) => v.id === t);
157
+ }, Z = async () => {
158
+ await W(), await y();
159
+ }, ee = async (e, t) => {
160
+ const n = await z.get(S.reservationsCollection, e), i = n?.reservations?.find((v) => v.id === t);
162
161
  if (i) {
163
162
  const v = P.value.find((D) => D.id === i.resourceId), l = {
164
- customerInfo: a.customerInfo,
165
- amountDue: a.amountDue,
166
- amountPaid: a.amountPaid,
167
- status: a.status,
163
+ customerInfo: n.customerInfo,
164
+ amountDue: n.amountDue,
165
+ amountPaid: n.amountPaid,
166
+ status: n.status,
168
167
  reservationStatus: i.status,
169
- subtotal: a.subtotal,
170
- total: a.total,
171
- discount: a.discount,
172
- id: a.id,
168
+ subtotal: n.subtotal,
169
+ total: n.total,
170
+ discount: n.discount,
171
+ id: n.id,
173
172
  res_id: i.id,
174
173
  resourceId: i.resourceId,
175
174
  spots: i.spots,
176
175
  date: i.date,
177
- createdAt: a.createdAt,
176
+ createdAt: n.createdAt,
178
177
  startTime: i.timeslot?.startTime,
179
178
  endTime: i.timeslot?.endTime,
180
179
  reservationPrice: i.totalPrice,
@@ -185,73 +184,74 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
185
184
  resourceName: v?.name || "Unknown",
186
185
  resourceColor: v?.color
187
186
  };
188
- await le(), console.log("Showing order in dialog:", l, b.value, b.value?.openDialog), b.value?.openDialog(l);
187
+ await ce(), N.value?.openDialog(l);
189
188
  }
190
189
  };
191
- return W(), se(async () => {
192
- if (N.query.orderId) {
193
- const e = N.query.orderId, t = N.query.reservationId, a = new URL(window.location.href);
194
- a.searchParams.delete("orderId"), a.searchParams.delete("reservationId"), window.history.replaceState(window.history.state, "", a.toString()), await Z(e, t);
190
+ return Z(), oe(async () => {
191
+ const e = F.value.orderId || B.query.orderId, t = F.value.reservationId || B.query.reservationId;
192
+ if (e) {
193
+ const n = new URL(window.location.href);
194
+ n.searchParams.delete("orderId"), n.searchParams.delete("reservationId"), window.history.replaceState(window.history.state, "", n.toString()), await ee(e, t);
195
195
  }
196
- }), oe(p, () => {
196
+ }), ae(p, () => {
197
197
  y();
198
198
  }), (e, t) => {
199
- const a = x("Badge"), i = x("CardTitle"), v = x("CardDescription"), l = x("Button"), D = x("CardHeader"), u = x("Input"), z = x("CardContent"), B = x("Card");
200
- return c(), m(U, null, [
201
- r(ke, null, {
202
- default: g(() => [
203
- s("div", be, [
204
- s("div", Ce, [
199
+ const n = x("Badge"), i = x("CardTitle"), v = x("CardDescription"), l = x("Button"), D = x("CardHeader"), u = x("Input"), T = x("CardContent"), R = x("Card");
200
+ return c(), m(j, null, [
201
+ r(Ce, null, {
202
+ default: f(() => [
203
+ s("div", Ie, [
204
+ s("div", Se, [
205
205
  s("div", null, [
206
- s("h1", Ie, [
207
- r(o(L), { class: "size-6" }),
208
- t[1] || (t[1] = I(" Orders ", -1))
206
+ s("h1", Pe, [
207
+ r(o(V), { class: "size-6" }),
208
+ t[1] || (t[1] = C(" Orders ", -1))
209
209
  ]),
210
210
  t[2] || (t[2] = s("p", { class: "text-muted-foreground text-sm mt-1" }, " View orders by when they were placed ", -1))
211
211
  ])
212
212
  ]),
213
- r(B, null, {
214
- default: g(() => [
213
+ r(R, null, {
214
+ default: f(() => [
215
215
  r(D, null, {
216
- default: g(() => [
217
- s("div", Se, [
216
+ default: f(() => [
217
+ s("div", Oe, [
218
218
  s("div", null, [
219
219
  r(i, { class: "flex items-center gap-2" }, {
220
- default: g(() => [
221
- t[3] || (t[3] = I(" Orders received ", -1)),
222
- o(T).bookings > 0 ? (c(), j(a, {
220
+ default: f(() => [
221
+ t[3] || (t[3] = C(" Orders received ", -1)),
222
+ o(O).bookings > 0 ? (c(), L(n, {
223
223
  key: 0,
224
224
  variant: "secondary"
225
225
  }, {
226
- default: g(() => [
227
- I(d(o(T).bookings), 1)
226
+ default: f(() => [
227
+ C(d(o(O).bookings), 1)
228
228
  ]),
229
229
  _: 1
230
- })) : S("", !0)
230
+ })) : I("", !0)
231
231
  ]),
232
232
  _: 1
233
233
  }),
234
234
  r(v, { class: "flex items-center gap-4 mt-1" }, {
235
- default: g(() => [
236
- s("span", Oe, [
237
- r(o(V), { size: 14 }),
238
- I(" " + d(o(T).spots) + " spots ", 1)
235
+ default: f(() => [
236
+ s("span", Te, [
237
+ r(o(E), { size: 14 }),
238
+ C(" " + d(o(O).spots) + " spots ", 1)
239
239
  ]),
240
- s("span", Pe, " €" + d(o(T).revenue.toFixed(2)) + " revenue ", 1)
240
+ s("span", ze, " €" + d(o(O).revenue.toFixed(2)) + " revenue ", 1)
241
241
  ]),
242
242
  _: 1
243
243
  })
244
244
  ]),
245
- s("div", Te, [
246
- s("div", ze, [
245
+ s("div", Ne, [
246
+ s("div", Ae, [
247
247
  r(l, {
248
248
  variant: "ghost",
249
249
  size: "icon",
250
250
  class: "size-8",
251
- onClick: H
251
+ onClick: M
252
252
  }, {
253
- default: g(() => [
254
- r(o(ge), { size: 16 })
253
+ default: f(() => [
254
+ r(o(ve), { size: 16 })
255
255
  ]),
256
256
  _: 1
257
257
  }),
@@ -259,10 +259,10 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
259
259
  variant: "ghost",
260
260
  size: "sm",
261
261
  class: "h-8 px-3 text-xs",
262
- onClick: Y
262
+ onClick: Q
263
263
  }, {
264
- default: g(() => [...t[4] || (t[4] = [
265
- I(" Today ", -1)
264
+ default: f(() => [...t[4] || (t[4] = [
265
+ C(" Today ", -1)
266
266
  ])]),
267
267
  _: 1
268
268
  }),
@@ -270,11 +270,11 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
270
270
  variant: "ghost",
271
271
  size: "icon",
272
272
  class: "size-8",
273
- onClick: M,
274
- disabled: !o(q)
273
+ onClick: q,
274
+ disabled: !o(Y)
275
275
  }, {
276
- default: g(() => [
277
- r(o(fe), { size: 16 })
276
+ default: f(() => [
277
+ r(o(_e), { size: 16 })
278
278
  ]),
279
279
  _: 1
280
280
  }, 8, ["disabled"])
@@ -285,8 +285,8 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
285
285
  onClick: y,
286
286
  disabled: o(k)
287
287
  }, {
288
- default: g(() => [
289
- r(o(ve), {
288
+ default: f(() => [
289
+ r(o(xe), {
290
290
  size: 16,
291
291
  class: ne({ "animate-spin": o(k) })
292
292
  }, null, 8, ["class"])
@@ -295,81 +295,81 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
295
295
  }, 8, ["disabled"])
296
296
  ])
297
297
  ]),
298
- s("div", Ne, d(o($)), 1)
298
+ s("div", Re, d(o(H)), 1)
299
299
  ]),
300
300
  _: 1
301
301
  }),
302
- r(z, null, {
303
- default: g(() => [
304
- s("div", Ae, [
305
- r(o(_e), {
302
+ r(T, null, {
303
+ default: f(() => [
304
+ s("div", Be, [
305
+ r(o(he), {
306
306
  size: 16,
307
307
  class: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
308
308
  }),
309
309
  r(u, {
310
310
  modelValue: o(_),
311
- "onUpdate:modelValue": t[0] || (t[0] = (n) => ae(_) ? _.value = n : null),
311
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => re(_) ? _.value = a : null),
312
312
  placeholder: "Search by name, email, or phone...",
313
313
  class: "pl-9 pr-9"
314
314
  }, null, 8, ["modelValue"]),
315
- o(_) ? (c(), j(l, {
315
+ o(_) ? (c(), L(l, {
316
316
  key: 0,
317
317
  variant: "ghost",
318
318
  size: "icon",
319
319
  class: "absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",
320
- onClick: J
320
+ onClick: K
321
321
  }, {
322
- default: g(() => [
323
- r(o(xe), { size: 14 })
322
+ default: f(() => [
323
+ r(o(ye), { size: 14 })
324
324
  ]),
325
325
  _: 1
326
- })) : S("", !0)
326
+ })) : I("", !0)
327
327
  ]),
328
- o(_) ? (c(), m("div", Re, " Showing " + d(o(R).length) + " of " + d(o(f).length) + " orders ", 1)) : S("", !0),
329
- o(k) ? (c(), m("div", Be, [...t[5] || (t[5] = [
328
+ o(_) ? (c(), m("div", Fe, " Showing " + d(o(A).length) + " of " + d(o(g).length) + " orders ", 1)) : I("", !0),
329
+ o(k) ? (c(), m("div", Ue, [...t[5] || (t[5] = [
330
330
  s("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" }, null, -1)
331
- ])])) : o(f).length === 0 ? (c(), m("div", Fe, [
332
- r(o(L), { class: "size-12 mx-auto mb-3 opacity-50" }),
331
+ ])])) : o(g).length === 0 ? (c(), m("div", je, [
332
+ r(o(V), { class: "size-12 mx-auto mb-3 opacity-50" }),
333
333
  t[6] || (t[6] = s("p", null, "No orders received on this day", -1))
334
- ])) : o(R).length === 0 ? (c(), m("div", Ue, " No orders match your search ")) : (c(), m("div", je, [
335
- (c(!0), m(U, null, re(o(R), (n) => (c(), m("div", {
336
- key: n.res_id || n.id,
334
+ ])) : o(A).length === 0 ? (c(), m("div", Le, " No orders match your search ")) : (c(), m("div", Ve, [
335
+ (c(!0), m(j, null, ie(o(A), (a) => (c(), m("div", {
336
+ key: a.res_id || a.id,
337
337
  class: "p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",
338
- onClick: (nt) => o(b)?.openDialog(n)
338
+ onClick: (rt) => o(N)?.openDialog(a)
339
339
  }, [
340
- s("div", Ve, [
341
- s("div", Ee, [
342
- s("div", $e, d(n.customerInfo?.firstName) + " " + d(n.customerInfo?.lastName || "Unknown Customer"), 1),
343
- s("div", He, d(n.customerInfo?.email), 1),
344
- s("div", Me, d(n.customerInfo?.phone), 1),
345
- s("div", qe, [
346
- s("div", Ye, [
347
- r(o(he), { size: 12 }),
348
- s("span", null, d(G(n.date)) + " · " + d(n.startTime) + " - " + d(n.endTime), 1)
340
+ s("div", $e, [
341
+ s("div", He, [
342
+ s("div", Me, d(a.customerInfo?.firstName) + " " + d(a.customerInfo?.lastName || "Unknown Customer"), 1),
343
+ s("div", qe, d(a.customerInfo?.email), 1),
344
+ s("div", Ye, d(a.customerInfo?.phone), 1),
345
+ s("div", Qe, [
346
+ s("div", Xe, [
347
+ r(o(De), { size: 12 }),
348
+ s("span", null, d(J(a.date)) + " · " + d(a.startTime) + " - " + d(a.endTime), 1)
349
349
  ]),
350
- s("div", Qe, [
351
- r(o(V), { size: 12 }),
352
- s("span", null, d(n.spots) + " spots", 1)
350
+ s("div", Ge, [
351
+ r(o(E), { size: 12 }),
352
+ s("span", null, d(a.spots) + " spots", 1)
353
353
  ]),
354
- n.resourceName ? (c(), m("div", Xe, [
354
+ a.resourceName ? (c(), m("div", Je, [
355
355
  s("div", {
356
356
  class: "w-3 h-3 rounded-full",
357
- style: ie({ backgroundColor: n.resourceColor || "#6b7280" })
357
+ style: le({ backgroundColor: a.resourceColor || "#6b7280" })
358
358
  }, null, 4),
359
- s("span", null, d(n.resourceName), 1)
360
- ])) : S("", !0)
359
+ s("span", null, d(a.resourceName), 1)
360
+ ])) : I("", !0)
361
361
  ]),
362
- s("div", Ge, [
363
- r(o(ye), { size: 12 }),
364
- s("span", null, "Ordered at " + d(X(n.createdAt)), 1)
362
+ s("div", Ke, [
363
+ r(o(we), { size: 12 }),
364
+ s("span", null, "Ordered at " + d(G(a.createdAt)), 1)
365
365
  ])
366
366
  ]),
367
- s("div", Je, [
368
- n.reservationStatus === "needs_approval" ? (c(), m("span", Ke, "Needs Approval")) : n.reservationStatus === "approved" ? (c(), m("span", We, "Approved")) : n.reservationStatus === "rejected" ? (c(), m("span", Ze, "Rejected")) : n.reservationStatus === "cancelled" ? (c(), m("span", et, "Cancelled")) : (c(), m("span", tt, "Pending")),
369
- n.reservationPrice || n.reservationPrice === 0 ? (c(), m("div", st, " €" + d(n.reservationPrice.toFixed(2)), 1)) : S("", !0)
367
+ s("div", We, [
368
+ a.reservationStatus === "needs_approval" ? (c(), m("span", Ze, "Needs Approval")) : a.reservationStatus === "approved" ? (c(), m("span", et, "Approved")) : a.reservationStatus === "rejected" ? (c(), m("span", tt, "Rejected")) : a.reservationStatus === "cancelled" ? (c(), m("span", st, "Cancelled")) : (c(), m("span", ot, "Pending")),
369
+ a.reservationPrice || a.reservationPrice === 0 ? (c(), m("div", at, " €" + d(a.reservationPrice.toFixed(2)), 1)) : I("", !0)
370
370
  ])
371
371
  ])
372
- ], 8, Le))), 128))
372
+ ], 8, Ee))), 128))
373
373
  ]))
374
374
  ]),
375
375
  _: 1
@@ -381,9 +381,9 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
381
381
  ]),
382
382
  _: 1
383
383
  }),
384
- r(we, {
384
+ r(be, {
385
385
  ref_key: "reservationDetailDialog",
386
- ref: b,
386
+ ref: N,
387
387
  onCancelled: y,
388
388
  onConfirmed: y,
389
389
  onRejected: y
@@ -393,5 +393,5 @@ const be = { class: "space-y-6" }, Ce = { class: "flex flex-col sm:flex-row sm:i
393
393
  }
394
394
  });
395
395
  export {
396
- dt as default
396
+ mt as default
397
397
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("@oneclick.dev/cms-kit"),i=require("lucide-vue-next"),E=require("./ReservationDetailDialog.vue_vue_type_script_setup_true_lang-VWVIxIr6.js"),M=require("./EditLayout.vue_vue_type_script_setup_true_lang-Czu6Dcde.js"),H={class:"space-y-6"},$={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},Y={class:"text-2xl font-semibold tracking-tight flex items-center gap-2"},K={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"},Q={class:"flex items-center gap-1"},X={class:"flex items-center gap-1"},G={class:"flex items-center gap-2"},J={class:"flex items-center gap-1"},W={class:"text-sm text-muted-foreground mt-2"},Z={class:"relative mb-4"},ee={key:0,class:"mb-3 text-sm text-muted-foreground"},te={key:1,class:"flex items-center justify-center py-8"},oe={key:2,class:"text-center py-8 text-muted-foreground"},ne={key:3,class:"text-center py-8 text-muted-foreground"},se={key:4,class:"space-y-2"},re=["onClick"],ae={class:"flex items-start justify-between"},le={class:"flex-1"},ce={class:"font-medium"},ie={class:"text-sm text-muted-foreground"},de={class:"text-sm text-muted-foreground"},ue={class:"flex items-center gap-4 flex-wrap mt-1"},me={class:"flex items-center gap-2 text-xs text-muted-foreground"},pe={class:"flex items-center gap-2 text-xs text-muted-foreground"},fe={key:0,class:"flex items-center gap-1 text-xs text-muted-foreground"},ge={class:"flex items-center gap-2 mt-1 text-xs text-muted-foreground"},ve={class:"text-right"},_e={key:0,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"},xe={key:1,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"},ye={key:2,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"},he={key:3,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"},ke={key:4,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"},Ne={key:5,class:"text-sm font-medium mt-1"},De=e.defineComponent({__name:"orders",setup(we){const C=v.useRoute();v.useRouter();const S=v.useOverlayParams(),{params:b}=v.useModuleRoute(),{config:x}=v.useModule(),N=v.useFirebaseIntegration(x.project),d=e.ref([]),y=e.ref([]),_=e.ref(!0),m=e.ref(""),D=e.ref(null),p=new Date,c=e.ref(new Date),B=e.computed(()=>({date:A(c.value),resource:null}));e.provide("event",B);const I=e.computed(()=>{const t=new Date(p);t.setDate(p.getDate()-1);const o=new Date(p);return o.setDate(p.getDate()+1),c.value.toDateString()===p.toDateString()?"Today":c.value.toDateString()===t.toDateString()?"Yesterday":c.value.toDateString()===o.toDateString()?"Tomorrow":c.value.toLocaleDateString("en-US",{weekday:"long",month:"long",day:"numeric",year:"numeric"})}),P=()=>{const t=new Date(c.value);t.setDate(t.getDate()-1),c.value=t},T=()=>{const t=new Date(c.value);t.setDate(t.getDate()+1),t<=p&&(c.value=t)},O=e.computed(()=>{const t=new Date(c.value);return t.setDate(t.getDate()+1),t<=p}),z=()=>{c.value=new Date},A=t=>{const o=t.getFullYear(),s=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${o}-${s}-${r}`},R=t=>t?new Date(t).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}):"",U=t=>t?new Date(t).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"}):"",w=e.computed(()=>m.value.trim()?new E.Fuse(d.value,{keys:["customerInfo.firstName","customerInfo.lastName","customerInfo.email","customerInfo.phone","resourceName"],threshold:.3,ignoreLocation:!0}).search(m.value).map(o=>o.item):d.value),h=e.computed(()=>({spots:d.value.reduce((t,o)=>t+(o.spots||0),0),bookings:d.value.length,revenue:d.value.reduce((t,o)=>t+(o.reservationPrice||0),0)})),j=()=>{m.value=""},F=async()=>{try{const t=b.value.id,o=await N.get(x.agendaCollection,t);y.value=o?.resources?.filter(s=>s.isActive)||[]}catch(t){console.error("Error loading resources:",t),y.value=[]}},f=async()=>{_.value=!0,d.value=[];try{const t=b.value.id,o=new Date(c.value);o.setHours(0,0,0,0);const s=new Date(c.value);s.setHours(23,59,59,999);const r=await N.find(x.reservationsCollection,{filters:[{field:"agendaId",operator:"==",value:t},{field:"createdAt",operator:">=",value:o.toISOString()},{field:"createdAt",operator:"<=",value:s.toISOString()}]});let u=[];r.forEach(a=>{(a.reservations||[]).forEach(l=>{const k=y.value.find(V=>V.id===l.resourceId);u.push({customerInfo:a.customerInfo,amountDue:a.amountDue,amountPaid:a.amountPaid,status:a.status,reservationStatus:l.status,subtotal:a.subtotal,total:a.total,discount:a.discount,id:a.id,res_id:l.id,resourceId:l.resourceId,spots:l.spots,date:l.date,createdAt:a.createdAt,startTime:l.timeslot?.startTime,endTime:l.timeslot?.endTime,reservationPrice:l.totalPrice,reservationBasePrice:l.basePrice,reservationAddOnsPrice:l.addOnsPrice,pricingOptionId:l.pricingOptionId,pricingOption:l.pricingOption,resourceName:k?.name||"Unknown",resourceColor:k?.color})})}),d.value=u.sort((a,g)=>(g.createdAt||"").localeCompare(a.createdAt||""))}catch(t){console.error("Error loading orders:",t),d.value=[]}finally{_.value=!1}},L=async()=>{await F(),await f()},q=async(t,o)=>{const s=await N.get(x.reservationsCollection,t),r=s?.reservations?.find(u=>u.id===o);if(r){const u=y.value.find(g=>g.id===r.resourceId),a={customerInfo:s.customerInfo,amountDue:s.amountDue,amountPaid:s.amountPaid,status:s.status,reservationStatus:r.status,subtotal:s.subtotal,total:s.total,discount:s.discount,id:s.id,res_id:r.id,resourceId:r.resourceId,spots:r.spots,date:r.date,createdAt:s.createdAt,startTime:r.timeslot?.startTime,endTime:r.timeslot?.endTime,reservationPrice:r.totalPrice,reservationBasePrice:r.basePrice,reservationAddOnsPrice:r.addOnsPrice,pricingOptionId:r.pricingOptionId,pricingOption:r.pricingOption,resourceName:u?.name||"Unknown",resourceColor:u?.color};await e.nextTick(),D.value?.openDialog(a)}};return L(),e.onMounted(async()=>{const t=S.value.orderId||C.query.orderId,o=S.value.reservationId||C.query.reservationId;if(t){const s=new URL(window.location.href);s.searchParams.delete("orderId"),s.searchParams.delete("reservationId"),window.history.replaceState(window.history.state,"",s.toString()),await q(t,o)}}),e.watch(c,()=>{f()}),(t,o)=>{const s=e.resolveComponent("Badge"),r=e.resolveComponent("CardTitle"),u=e.resolveComponent("CardDescription"),a=e.resolveComponent("Button"),g=e.resolveComponent("CardHeader"),l=e.resolveComponent("Input"),k=e.resolveComponent("CardContent"),V=e.resolveComponent("Card");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(M._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",H,[e.createElementVNode("div",$,[e.createElementVNode("div",null,[e.createElementVNode("h1",Y,[e.createVNode(e.unref(i.ShoppingBag),{class:"size-6"}),o[1]||(o[1]=e.createTextVNode(" Orders ",-1))]),o[2]||(o[2]=e.createElementVNode("p",{class:"text-muted-foreground text-sm mt-1"}," View orders by when they were placed ",-1))])]),e.createVNode(V,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("div",null,[e.createVNode(r,{class:"flex items-center gap-2"},{default:e.withCtx(()=>[o[3]||(o[3]=e.createTextVNode(" Orders received ",-1)),e.unref(h).bookings>0?(e.openBlock(),e.createBlock(s,{key:0,variant:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(h).bookings),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(u,{class:"flex items-center gap-4 mt-1"},{default:e.withCtx(()=>[e.createElementVNode("span",Q,[e.createVNode(e.unref(i.Users),{size:14}),e.createTextVNode(" "+e.toDisplayString(e.unref(h).spots)+" spots ",1)]),e.createElementVNode("span",X," €"+e.toDisplayString(e.unref(h).revenue.toFixed(2))+" revenue ",1)]),_:1})]),e.createElementVNode("div",G,[e.createElementVNode("div",J,[e.createVNode(a,{variant:"ghost",size:"icon",class:"size-8",onClick:P},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ChevronLeft),{size:16})]),_:1}),e.createVNode(a,{variant:"ghost",size:"sm",class:"h-8 px-3 text-xs",onClick:z},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode(" Today ",-1)])]),_:1}),e.createVNode(a,{variant:"ghost",size:"icon",class:"size-8",onClick:T,disabled:!e.unref(O)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ChevronRight),{size:16})]),_:1},8,["disabled"])]),e.createVNode(a,{variant:"ghost",size:"icon",onClick:f,disabled:e.unref(_)},{default:e.withCtx(()=>[e.createVNode(e.unref(i.RefreshCw),{size:16,class:e.normalizeClass({"animate-spin":e.unref(_)})},null,8,["class"])]),_:1},8,["disabled"])])]),e.createElementVNode("div",W,e.toDisplayString(e.unref(I)),1)]),_:1}),e.createVNode(k,null,{default:e.withCtx(()=>[e.createElementVNode("div",Z,[e.createVNode(e.unref(i.Search),{size:16,class:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),e.createVNode(l,{modelValue:e.unref(m),"onUpdate:modelValue":o[0]||(o[0]=n=>e.isRef(m)?m.value=n:null),placeholder:"Search by name, email, or phone...",class:"pl-9 pr-9"},null,8,["modelValue"]),e.unref(m)?(e.openBlock(),e.createBlock(a,{key:0,variant:"ghost",size:"icon",class:"absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7",onClick:j},{default:e.withCtx(()=>[e.createVNode(e.unref(i.X),{size:14})]),_:1})):e.createCommentVNode("",!0)]),e.unref(m)?(e.openBlock(),e.createElementBlock("div",ee," Showing "+e.toDisplayString(e.unref(w).length)+" of "+e.toDisplayString(e.unref(d).length)+" orders ",1)):e.createCommentVNode("",!0),e.unref(_)?(e.openBlock(),e.createElementBlock("div",te,[...o[5]||(o[5]=[e.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary"},null,-1)])])):e.unref(d).length===0?(e.openBlock(),e.createElementBlock("div",oe,[e.createVNode(e.unref(i.ShoppingBag),{class:"size-12 mx-auto mb-3 opacity-50"}),o[6]||(o[6]=e.createElementVNode("p",null,"No orders received on this day",-1))])):e.unref(w).length===0?(e.openBlock(),e.createElementBlock("div",ne," No orders match your search ")):(e.openBlock(),e.createElementBlock("div",se,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(w),n=>(e.openBlock(),e.createElementBlock("div",{key:n.res_id||n.id,class:"p-3 border rounded-lg hover:bg-muted/50 transition-colors cursor-pointer",onClick:Ve=>e.unref(D)?.openDialog(n)},[e.createElementVNode("div",ae,[e.createElementVNode("div",le,[e.createElementVNode("div",ce,e.toDisplayString(n.customerInfo?.firstName)+" "+e.toDisplayString(n.customerInfo?.lastName||"Unknown Customer"),1),e.createElementVNode("div",ie,e.toDisplayString(n.customerInfo?.email),1),e.createElementVNode("div",de,e.toDisplayString(n.customerInfo?.phone),1),e.createElementVNode("div",ue,[e.createElementVNode("div",me,[e.createVNode(e.unref(i.Calendar),{size:12}),e.createElementVNode("span",null,e.toDisplayString(U(n.date))+" · "+e.toDisplayString(n.startTime)+" - "+e.toDisplayString(n.endTime),1)]),e.createElementVNode("div",pe,[e.createVNode(e.unref(i.Users),{size:12}),e.createElementVNode("span",null,e.toDisplayString(n.spots)+" spots",1)]),n.resourceName?(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",{class:"w-3 h-3 rounded-full",style:e.normalizeStyle({backgroundColor:n.resourceColor||"#6b7280"})},null,4),e.createElementVNode("span",null,e.toDisplayString(n.resourceName),1)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",ge,[e.createVNode(e.unref(i.Clock),{size:12}),e.createElementVNode("span",null,"Ordered at "+e.toDisplayString(R(n.createdAt)),1)])]),e.createElementVNode("div",ve,[n.reservationStatus==="needs_approval"?(e.openBlock(),e.createElementBlock("span",_e,"Needs Approval")):n.reservationStatus==="approved"?(e.openBlock(),e.createElementBlock("span",xe,"Approved")):n.reservationStatus==="rejected"?(e.openBlock(),e.createElementBlock("span",ye,"Rejected")):n.reservationStatus==="cancelled"?(e.openBlock(),e.createElementBlock("span",he,"Cancelled")):(e.openBlock(),e.createElementBlock("span",ke,"Pending")),n.reservationPrice||n.reservationPrice===0?(e.openBlock(),e.createElementBlock("div",Ne," €"+e.toDisplayString(n.reservationPrice.toFixed(2)),1)):e.createCommentVNode("",!0)])])],8,re))),128))]))]),_:1})]),_:1})])]),_:1}),e.createVNode(E._sfc_main,{ref_key:"reservationDetailDialog",ref:D,onCancelled:f,onConfirmed:f,onRejected:f},null,512)],64)}}});exports.default=De;