@burdenoff/microfe-kadaikodi 2026.704.1 → 2026.704.3

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 (77) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +77 -26
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +297 -479
  4. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminDashboard.js +114 -400
  6. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +166 -292
  8. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  10. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  12. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  14. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  16. package/dist/kadaikodi/pages/admin/UserManagementPage.js +5 -5
  17. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  18. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  19. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  20. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  21. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  22. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +323 -422
  23. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  24. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -383
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  26. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  27. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  28. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  30. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  32. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  33. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  34. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  35. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  36. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  37. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  38. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  40. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  42. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  44. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  46. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  48. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  49. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  50. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  52. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  53. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  54. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  55. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +232 -343
  56. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  58. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +127 -294
  60. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  61. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +204 -290
  62. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  63. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  64. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  65. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +399 -487
  66. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  67. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +13 -13
  68. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  69. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +192 -296
  70. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  71. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +245 -397
  72. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  73. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +85 -117
  74. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  75. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +177 -395
  76. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  77. package/package.json +1 -1
@@ -1,668 +1,497 @@
1
- import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { MetricsCard as r } from "../../components/MetricsCard.js";
5
- import { EmptyState as i } from "../../components/EmptyState.js";
6
- import { formatCurrency as a } from "../../utils/formatters.js";
7
- import { useEffect as o, useMemo as s, useState as c } from "react";
8
- import { AlertCircle as l, CheckCircle2 as u, Clock as d, Eye as f, IndianRupee as p, Loader2 as m, MapPin as h, Phone as g, RefreshCw as _, Search as v, ShoppingBag as y, TrendingUp as b, Truck as x, User as S, X as C, XCircle as w } from "lucide-react";
9
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
10
- import { EmphasisPanel as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
1
+ import { cn as e } from "../../utils/cn.js";
2
+ import { PageLayout as t } from "../../components/PageLayout.js";
3
+ import { MetricsCard as n } from "../../components/MetricsCard.js";
4
+ import { EmptyState as r } from "../../components/EmptyState.js";
5
+ import { useDashboardStats as i, useOrders as a, useUpdateOrderStatus as o } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as s } from "../../utils/formatters.js";
7
+ import { useMemo as c, useState as l } from "react";
8
+ import { AlertCircle as u, CheckCircle2 as d, Clock as f, Eye as p, IndianRupee as m, Loader2 as h, MapPin as g, RefreshCw as _, Search as v, ShoppingBag as y, Store as b, TrendingUp as x, X as S, XCircle as C } from "lucide-react";
9
+ import { jsx as w, jsxs as T } from "react/jsx-runtime";
10
+ import { EmphasisPanel as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
11
11
  //#region src/kadaikodi/pages/admin/AdminOrdersPage.tsx
12
- var k = [
13
- {
14
- id: "ORD-2024-001",
15
- customerName: "Rajesh Kumar",
16
- customerPhone: "+91 98765 43210",
17
- cartName: "Dosa Express",
18
- cartOwner: "Suresh Rao",
19
- items: [
20
- "Masala Dosa x2",
21
- "Filter Coffee x2",
22
- "Vada x1"
23
- ],
24
- total: 280,
25
- status: "delivered",
26
- paymentMethod: "UPI",
27
- paymentStatus: "completed",
28
- orderDate: "2024-01-15T10:30:00",
29
- deliveryTime: "2024-01-15T11:15:00",
30
- deliveryAddress: "123, 4th Cross, Koramangala",
31
- workerAssigned: "Ravi Kumar"
32
- },
33
- {
34
- id: "ORD-2024-002",
35
- customerName: "Priya Sharma",
36
- customerPhone: "+91 87654 32109",
37
- cartName: "Juice Junction",
38
- cartOwner: "Amit Patel",
39
- items: ["Fresh Orange Juice x1", "Watermelon Juice x1"],
40
- total: 120,
41
- status: "preparing",
42
- paymentMethod: "Cash",
43
- paymentStatus: "pending",
44
- orderDate: "2024-01-15T11:45:00",
45
- deliveryTime: "2024-01-15T12:15:00",
46
- deliveryAddress: "456, BTM Layout",
47
- notes: "Extra ice please"
48
- },
49
- {
50
- id: "ORD-2024-003",
51
- customerName: "Amit Singh",
52
- customerPhone: "+91 76543 21098",
53
- cartName: "Chaat Corner",
54
- cartOwner: "Ramesh Verma",
55
- items: [
56
- "Pani Puri x1",
57
- "Bhel Puri x1",
58
- "Dahi Puri x1"
59
- ],
60
- total: 150,
61
- status: "pending",
62
- paymentMethod: "Card",
63
- paymentStatus: "completed",
64
- orderDate: "2024-01-15T12:00:00",
65
- deliveryTime: "2024-01-15T12:30:00",
66
- deliveryAddress: "789, HSR Layout"
67
- }
12
+ var O = [
13
+ "pending",
14
+ "confirmed",
15
+ "preparing",
16
+ "ready",
17
+ "picked_up",
18
+ "out_for_delivery",
19
+ "delivered",
20
+ "cancelled"
68
21
  ];
69
- function A() {
70
- let { navigateTo: A } = e(), [j, M] = c([]), [N, P] = c(null), [F, I] = c(!0), [L, R] = c(""), [z, B] = c("all"), [V, H] = c("today"), [U, W] = c(null), [G, K] = c(!1);
71
- o(() => {
72
- let e = setTimeout(() => {
73
- P({
74
- totalOrders: 156,
75
- pendingOrders: 12,
76
- totalRevenue: 125600,
77
- averageOrderValue: 805
78
- }), M(k), I(!1);
79
- }, 1e3);
80
- return () => clearTimeout(e);
81
- }, []);
82
- let q = (e) => a(e, { minimumFractionDigits: 0 }), J = (e) => new Date(e).toLocaleString("en-IN", {
22
+ function k() {
23
+ let { data: k = [], isLoading: A } = a({}), { data: j } = i(), M = o(), [N, P] = l(""), [F, I] = l("all"), [L, R] = l(null), [z, B] = l(!1), V = (e) => s(e, { minimumFractionDigits: 0 }), H = (e) => e ? new Date(e).toLocaleString("en-IN", {
83
24
  day: "2-digit",
84
25
  month: "short",
85
26
  hour: "2-digit",
86
27
  minute: "2-digit"
87
- }), Y = (e) => ({
28
+ }) : "—", U = c(() => j && j.totalOrders > 0 ? j.totalRevenue / j.totalOrders : k.length === 0 ? 0 : k.reduce((e, t) => e + t.total, 0) / k.length, [j, k]), W = (e) => ({
88
29
  delivered: "bg-status-success-bg-subtle text-status-success-text",
89
30
  preparing: "bg-status-warning-bg-subtle text-status-warning-text",
90
31
  ready: "bg-status-warning-bg-subtle text-status-warning-text",
32
+ picked_up: "bg-[var(--color-accent-soft)] text-text-primary",
91
33
  out_for_delivery: "bg-[var(--color-accent-soft)] text-text-primary",
92
34
  cancelled: "bg-status-error-bg-subtle text-status-error-text",
93
35
  confirmed: "bg-[var(--color-accent-soft)] text-text-primary"
94
- })[e] ?? "bg-bg-sunken text-text-secondary", X = (e) => {
36
+ })[e] ?? "bg-bg-sunken text-text-secondary", G = (e) => {
95
37
  switch (e) {
96
- case "completed": return /* @__PURE__ */ T(u, { className: "h-4 w-4 text-status-success-text" });
97
- case "failed": return /* @__PURE__ */ T(w, { className: "h-4 w-4 text-status-error-text" });
98
- case "refunded": return /* @__PURE__ */ T(_, { className: "h-4 w-4 text-text-primary" });
99
- default: return /* @__PURE__ */ T(l, { className: "h-4 w-4 text-status-warning-text" });
38
+ case "completed": return /* @__PURE__ */ w(d, { className: "h-4 w-4 text-status-success-text" });
39
+ case "failed": return /* @__PURE__ */ w(C, { className: "h-4 w-4 text-status-error-text" });
40
+ case "refunded": return /* @__PURE__ */ w(_, { className: "h-4 w-4 text-text-primary" });
41
+ default: return /* @__PURE__ */ w(u, { className: "h-4 w-4 text-status-warning-text" });
100
42
  }
101
- }, Z = s(() => j.filter((e) => {
102
- let t = !L || e.id.toLowerCase().includes(L.toLowerCase()) || e.customerName.toLowerCase().includes(L.toLowerCase()) || e.cartName.toLowerCase().includes(L.toLowerCase()), n = z === "all" || e.status === z;
43
+ }, K = c(() => k.filter((e) => {
44
+ let t = !N || e.id.toLowerCase().includes(N.toLowerCase()) || e.cartName.toLowerCase().includes(N.toLowerCase()), n = F === "all" || e.status === F;
103
45
  return t && n;
104
46
  }), [
105
- j,
106
- L,
107
- z
108
- ]), Q = (e, t) => {
109
- M((n) => n.map((n) => n.id === e ? {
110
- ...n,
111
- status: t
112
- } : n)), K(!1), alert(`Order ${e} updated to ${t.replace("_", " ")}`);
47
+ k,
48
+ N,
49
+ F
50
+ ]), q = (e, t) => {
51
+ M.mutate({
52
+ id: e,
53
+ status: t.toUpperCase()
54
+ }, { onSuccess: () => {
55
+ R((e) => e && {
56
+ ...e,
57
+ status: t
58
+ });
59
+ } });
60
+ }, J = (e) => {
61
+ let t = e.deliveryAddress, n = [
62
+ t.street,
63
+ t.area,
64
+ t.city,
65
+ t.pincode
66
+ ].filter(Boolean);
67
+ return n.length > 0 ? n.join(", ") : "—";
113
68
  };
114
- return F ? /* @__PURE__ */ T(n, {
69
+ return A ? /* @__PURE__ */ w(t, {
115
70
  title: "Order Management",
116
71
  description: "Loading orders...",
117
- children: /* @__PURE__ */ E("div", {
72
+ children: /* @__PURE__ */ T("div", {
118
73
  className: "flex flex-col items-center justify-center py-20",
119
- children: [/* @__PURE__ */ T(m, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ T("p", {
74
+ children: [/* @__PURE__ */ w(h, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ w("p", {
120
75
  className: "text-text-secondary",
121
76
  children: "Loading orders..."
122
77
  })]
123
78
  })
124
- }) : /* @__PURE__ */ E(n, {
79
+ }) : /* @__PURE__ */ T(t, {
125
80
  title: "Order Management",
126
- description: `${N?.totalOrders ?? 0} total orders on the platform`,
81
+ description: `${j?.totalOrders ?? k.length} total orders on the platform`,
127
82
  children: [
128
- /* @__PURE__ */ T(O, {
83
+ /* @__PURE__ */ w(D, {
129
84
  className: "mb-6",
130
85
  children: "Every order placed across Kadaikodi in one queue. Use this page to keep operations running smoothly — search and filter orders, spot anything pending or stuck, open an order to see its full details, and step in when a customer or cart needs help. The metrics up top give you a live read on volume, revenue and what's awaiting action."
131
86
  }),
132
- N && /* @__PURE__ */ E(D, {
87
+ j && /* @__PURE__ */ T(E, {
133
88
  className: "mb-6",
134
- children: [/* @__PURE__ */ T("h2", {
89
+ children: [/* @__PURE__ */ w("h2", {
135
90
  className: "mb-4 text-lg font-semibold text-text-primary",
136
91
  children: "Orders at a Glance"
137
- }), /* @__PURE__ */ E("div", {
92
+ }), /* @__PURE__ */ T("div", {
138
93
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",
139
94
  children: [
140
- /* @__PURE__ */ T(r, {
141
- icon: /* @__PURE__ */ T(y, { className: "h-5 w-5" }),
142
- value: N.totalOrders,
143
- label: "Total Orders",
144
- trendValue: "Orders today"
95
+ /* @__PURE__ */ w(n, {
96
+ icon: /* @__PURE__ */ w(y, { className: "h-5 w-5" }),
97
+ value: (j.totalOrders ?? 0).toLocaleString("en-IN"),
98
+ label: "Total Orders"
145
99
  }),
146
- /* @__PURE__ */ T(r, {
147
- icon: /* @__PURE__ */ T(p, { className: "h-5 w-5" }),
148
- value: q(N.totalRevenue),
149
- label: "Revenue",
150
- trend: "up",
151
- trendValue: "+15.2% vs yesterday"
100
+ /* @__PURE__ */ w(n, {
101
+ icon: /* @__PURE__ */ w(m, { className: "h-5 w-5" }),
102
+ value: V(j.totalRevenue),
103
+ label: "Total Revenue"
152
104
  }),
153
- /* @__PURE__ */ T(r, {
154
- icon: /* @__PURE__ */ T(b, { className: "h-5 w-5" }),
155
- value: q(N.averageOrderValue),
156
- label: "Avg Order Value",
157
- trendValue: "Average order value"
105
+ /* @__PURE__ */ w(n, {
106
+ icon: /* @__PURE__ */ w(x, { className: "h-5 w-5" }),
107
+ value: V(U),
108
+ label: "Avg Order Value"
158
109
  }),
159
- /* @__PURE__ */ T(r, {
160
- icon: /* @__PURE__ */ T(d, { className: "h-5 w-5" }),
161
- value: N.pendingOrders,
110
+ /* @__PURE__ */ w(n, {
111
+ icon: /* @__PURE__ */ w(f, { className: "h-5 w-5" }),
112
+ value: (j.pendingOrders ?? 0).toLocaleString("en-IN"),
162
113
  label: "Pending Orders",
163
114
  trendValue: "Awaiting action"
164
115
  })
165
116
  ]
166
117
  })]
167
118
  }),
168
- /* @__PURE__ */ T("div", {
119
+ /* @__PURE__ */ w("div", {
169
120
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
170
- children: /* @__PURE__ */ E("div", {
121
+ children: /* @__PURE__ */ T("div", {
171
122
  className: "flex flex-col gap-4",
172
- children: [/* @__PURE__ */ E("div", {
123
+ children: [/* @__PURE__ */ T("div", {
173
124
  className: "relative flex-1",
174
- children: [/* @__PURE__ */ T(v, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ T("input", {
125
+ children: [/* @__PURE__ */ w(v, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ w("input", {
175
126
  type: "text",
176
- placeholder: "Search by order ID, customer, or cart name...",
177
- value: L,
178
- onChange: (e) => R(e.target.value),
127
+ placeholder: "Search by order ID or cart name...",
128
+ value: N,
129
+ onChange: (e) => P(e.target.value),
179
130
  className: "w-full rounded-lg border border-border-subtle bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
180
131
  })]
181
- }), /* @__PURE__ */ E("div", {
182
- className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
183
- children: [/* @__PURE__ */ E("select", {
184
- value: z,
185
- onChange: (e) => B(e.target.value),
186
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
187
- children: [
188
- /* @__PURE__ */ T("option", {
189
- value: "all",
190
- children: "All Status"
191
- }),
192
- /* @__PURE__ */ T("option", {
193
- value: "pending",
194
- children: "Pending"
195
- }),
196
- /* @__PURE__ */ T("option", {
197
- value: "confirmed",
198
- children: "Confirmed"
199
- }),
200
- /* @__PURE__ */ T("option", {
201
- value: "preparing",
202
- children: "Preparing"
203
- }),
204
- /* @__PURE__ */ T("option", {
205
- value: "ready",
206
- children: "Ready"
207
- }),
208
- /* @__PURE__ */ T("option", {
209
- value: "out_for_delivery",
210
- children: "Out for Delivery"
211
- }),
212
- /* @__PURE__ */ T("option", {
213
- value: "delivered",
214
- children: "Delivered"
215
- }),
216
- /* @__PURE__ */ T("option", {
217
- value: "cancelled",
218
- children: "Cancelled"
219
- })
220
- ]
221
- }), /* @__PURE__ */ E("select", {
222
- value: V,
223
- onChange: (e) => H(e.target.value),
224
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
225
- children: [
226
- /* @__PURE__ */ T("option", {
227
- value: "today",
228
- children: "Today"
229
- }),
230
- /* @__PURE__ */ T("option", {
231
- value: "yesterday",
232
- children: "Yesterday"
233
- }),
234
- /* @__PURE__ */ T("option", {
235
- value: "week",
236
- children: "This Week"
237
- }),
238
- /* @__PURE__ */ T("option", {
239
- value: "month",
240
- children: "This Month"
241
- })
242
- ]
243
- })]
132
+ }), /* @__PURE__ */ T("select", {
133
+ value: F,
134
+ onChange: (e) => I(e.target.value),
135
+ className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
136
+ children: [/* @__PURE__ */ w("option", {
137
+ value: "all",
138
+ children: "All Status"
139
+ }), O.map((e) => /* @__PURE__ */ w("option", {
140
+ value: e,
141
+ children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
142
+ }, e))]
244
143
  })]
245
144
  })
246
145
  }),
247
- /* @__PURE__ */ E("div", {
146
+ /* @__PURE__ */ T("div", {
248
147
  className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
249
148
  children: [
250
- /* @__PURE__ */ T("div", {
149
+ /* @__PURE__ */ w("div", {
251
150
  className: "block md:hidden space-y-4 p-4",
252
- children: Z.map((e) => /* @__PURE__ */ E("div", {
151
+ children: K.map((t) => /* @__PURE__ */ T("div", {
253
152
  className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
254
153
  children: [
255
- /* @__PURE__ */ E("div", {
154
+ /* @__PURE__ */ T("div", {
256
155
  className: "flex justify-between items-start mb-3",
257
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
156
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
258
157
  className: "font-medium text-text-primary text-lg",
259
- children: e.id
260
- }), /* @__PURE__ */ T("p", {
158
+ children: t.cartName
159
+ }), /* @__PURE__ */ w("p", {
261
160
  className: "text-sm text-text-secondary",
262
- children: J(e.orderDate)
263
- })] }), /* @__PURE__ */ T("span", {
264
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", Y(e.status)),
265
- children: e.status.replace("_", " ")
161
+ children: H(t.orderDate)
162
+ })] }), /* @__PURE__ */ w("span", {
163
+ className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(t.status)),
164
+ children: t.status.replace(/_/g, " ")
266
165
  })]
267
166
  }),
268
- /* @__PURE__ */ E("div", {
167
+ /* @__PURE__ */ T("div", {
269
168
  className: "grid grid-cols-2 gap-4 mb-3 text-sm",
270
- children: [/* @__PURE__ */ E("div", { children: [
271
- /* @__PURE__ */ T("p", {
272
- className: "text-text-secondary font-medium",
273
- children: "Customer"
274
- }),
275
- /* @__PURE__ */ T("p", {
276
- className: "text-text-primary",
277
- children: e.customerName
278
- }),
279
- /* @__PURE__ */ T("p", {
280
- className: "text-text-secondary text-xs",
281
- children: e.customerPhone
282
- })
283
- ] }), /* @__PURE__ */ E("div", { children: [
284
- /* @__PURE__ */ T("p", {
285
- className: "text-text-secondary font-medium",
286
- children: "Cart"
287
- }),
288
- /* @__PURE__ */ T("p", {
289
- className: "text-text-primary",
290
- children: e.cartName
291
- }),
292
- /* @__PURE__ */ T("p", {
293
- className: "text-text-secondary text-xs",
294
- children: e.cartOwner
295
- })
296
- ] })]
169
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
170
+ className: "text-text-secondary font-medium",
171
+ children: "Items"
172
+ }), /* @__PURE__ */ T("p", {
173
+ className: "text-text-primary",
174
+ children: [t.items.length, " item(s)"]
175
+ })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
176
+ className: "text-text-secondary font-medium",
177
+ children: "Order ID"
178
+ }), /* @__PURE__ */ w("p", {
179
+ className: "text-text-primary font-mono text-xs break-all",
180
+ children: t.id
181
+ })] })]
297
182
  }),
298
- /* @__PURE__ */ E("div", {
183
+ /* @__PURE__ */ T("div", {
299
184
  className: "flex justify-between items-center mb-3",
300
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
185
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
301
186
  className: "text-text-secondary font-medium text-sm",
302
187
  children: "Amount"
303
- }), /* @__PURE__ */ T("p", {
188
+ }), /* @__PURE__ */ w("p", {
304
189
  className: "text-text-primary font-semibold text-lg",
305
- children: q(e.total)
306
- })] }), /* @__PURE__ */ E("div", {
190
+ children: V(t.total)
191
+ })] }), /* @__PURE__ */ T("div", {
307
192
  className: "flex items-center gap-2",
308
- children: [X(e.paymentStatus), /* @__PURE__ */ E("div", {
193
+ children: [G(t.paymentStatus), /* @__PURE__ */ T("div", {
309
194
  className: "text-right",
310
- children: [/* @__PURE__ */ T("p", {
195
+ children: [/* @__PURE__ */ w("p", {
311
196
  className: "text-sm text-text-primary",
312
- children: e.paymentMethod
313
- }), /* @__PURE__ */ T("p", {
197
+ children: t.paymentMethod
198
+ }), /* @__PURE__ */ w("p", {
314
199
  className: "text-xs text-text-secondary capitalize",
315
- children: e.paymentStatus
200
+ children: t.paymentStatus
316
201
  })]
317
202
  })]
318
203
  })]
319
204
  }),
320
- /* @__PURE__ */ E("button", {
205
+ /* @__PURE__ */ T("button", {
321
206
  type: "button",
322
207
  onClick: () => {
323
- W(e), K(!0);
208
+ R(t), B(!0);
324
209
  },
325
210
  className: "w-full rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors flex items-center justify-center gap-2",
326
- children: [/* @__PURE__ */ T(f, { className: "h-4 w-4" }), " View Details"]
211
+ children: [/* @__PURE__ */ w(p, { className: "h-4 w-4" }), " View Details"]
327
212
  })
328
213
  ]
329
- }, e.id))
214
+ }, t.id))
330
215
  }),
331
- /* @__PURE__ */ T("div", {
216
+ /* @__PURE__ */ w("div", {
332
217
  className: "hidden md:block overflow-x-auto",
333
- children: /* @__PURE__ */ E("table", {
218
+ children: /* @__PURE__ */ T("table", {
334
219
  className: "w-full",
335
- children: [/* @__PURE__ */ T("thead", { children: /* @__PURE__ */ E("tr", {
220
+ children: [/* @__PURE__ */ w("thead", { children: /* @__PURE__ */ T("tr", {
336
221
  className: "border-b border-border-subtle bg-bg-sunken/50",
337
222
  children: [
338
- /* @__PURE__ */ T("th", {
223
+ /* @__PURE__ */ w("th", {
339
224
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
340
225
  children: "Order ID"
341
226
  }),
342
- /* @__PURE__ */ T("th", {
227
+ /* @__PURE__ */ w("th", {
343
228
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
344
- children: "Customer"
229
+ children: "Cart"
345
230
  }),
346
- /* @__PURE__ */ T("th", {
231
+ /* @__PURE__ */ w("th", {
347
232
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
348
- children: "Cart"
233
+ children: "Items"
349
234
  }),
350
- /* @__PURE__ */ T("th", {
235
+ /* @__PURE__ */ w("th", {
351
236
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
352
237
  children: "Amount"
353
238
  }),
354
- /* @__PURE__ */ T("th", {
239
+ /* @__PURE__ */ w("th", {
355
240
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
356
241
  children: "Status"
357
242
  }),
358
- /* @__PURE__ */ T("th", {
243
+ /* @__PURE__ */ w("th", {
359
244
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
360
245
  children: "Payment"
361
246
  }),
362
- /* @__PURE__ */ T("th", {
247
+ /* @__PURE__ */ w("th", {
363
248
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
364
249
  children: "Time"
365
250
  }),
366
- /* @__PURE__ */ T("th", {
251
+ /* @__PURE__ */ w("th", {
367
252
  className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
368
253
  children: "Actions"
369
254
  })
370
255
  ]
371
- }) }), /* @__PURE__ */ T("tbody", {
256
+ }) }), /* @__PURE__ */ w("tbody", {
372
257
  className: "divide-y divide-border",
373
- children: Z.map((e) => /* @__PURE__ */ E("tr", {
258
+ children: K.map((t) => /* @__PURE__ */ T("tr", {
374
259
  className: "hover:bg-accent/50 transition-colors",
375
260
  children: [
376
- /* @__PURE__ */ T("td", {
261
+ /* @__PURE__ */ w("td", {
377
262
  className: "px-4 py-3 text-sm font-mono font-medium text-text-primary",
378
- children: e.id
379
- }),
380
- /* @__PURE__ */ E("td", {
381
- className: "px-4 py-3",
382
- children: [/* @__PURE__ */ T("div", {
383
- className: "text-sm font-medium text-text-primary",
384
- children: e.customerName
385
- }), /* @__PURE__ */ T("div", {
386
- className: "text-xs text-text-secondary",
387
- children: e.customerPhone
388
- })]
263
+ children: t.id.slice(0, 12)
389
264
  }),
390
- /* @__PURE__ */ E("td", {
265
+ /* @__PURE__ */ w("td", {
391
266
  className: "px-4 py-3",
392
- children: [/* @__PURE__ */ T("div", {
267
+ children: /* @__PURE__ */ w("div", {
393
268
  className: "text-sm font-medium text-text-primary",
394
- children: e.cartName
395
- }), /* @__PURE__ */ T("div", {
396
- className: "text-xs text-text-secondary",
397
- children: e.cartOwner
398
- })]
269
+ children: t.cartName
270
+ })
399
271
  }),
400
272
  /* @__PURE__ */ T("td", {
273
+ className: "px-4 py-3 text-sm text-text-secondary",
274
+ children: [t.items.length, " item(s)"]
275
+ }),
276
+ /* @__PURE__ */ w("td", {
401
277
  className: "px-4 py-3 text-sm font-semibold text-text-primary",
402
- children: q(e.total)
278
+ children: V(t.total)
403
279
  }),
404
- /* @__PURE__ */ T("td", {
280
+ /* @__PURE__ */ w("td", {
405
281
  className: "px-4 py-3",
406
- children: /* @__PURE__ */ T("span", {
407
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", Y(e.status)),
408
- children: e.status.replace("_", " ")
282
+ children: /* @__PURE__ */ w("span", {
283
+ className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(t.status)),
284
+ children: t.status.replace(/_/g, " ")
409
285
  })
410
286
  }),
411
- /* @__PURE__ */ T("td", {
287
+ /* @__PURE__ */ w("td", {
412
288
  className: "px-4 py-3",
413
- children: /* @__PURE__ */ E("div", {
289
+ children: /* @__PURE__ */ T("div", {
414
290
  className: "flex items-center gap-2",
415
- children: [X(e.paymentStatus), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("div", {
291
+ children: [G(t.paymentStatus), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("div", {
416
292
  className: "text-sm text-text-primary",
417
- children: e.paymentMethod
418
- }), /* @__PURE__ */ T("div", {
293
+ children: t.paymentMethod
294
+ }), /* @__PURE__ */ w("div", {
419
295
  className: "text-xs text-text-secondary capitalize",
420
- children: e.paymentStatus
296
+ children: t.paymentStatus
421
297
  })] })]
422
298
  })
423
299
  }),
424
- /* @__PURE__ */ T("td", {
300
+ /* @__PURE__ */ w("td", {
425
301
  className: "px-4 py-3 text-sm text-text-secondary",
426
- children: J(e.orderDate)
302
+ children: H(t.orderDate)
427
303
  }),
428
- /* @__PURE__ */ T("td", {
304
+ /* @__PURE__ */ w("td", {
429
305
  className: "px-4 py-3",
430
- children: /* @__PURE__ */ T("button", {
306
+ children: /* @__PURE__ */ w("button", {
431
307
  type: "button",
432
308
  onClick: () => {
433
- W(e), K(!0);
309
+ R(t), B(!0);
434
310
  },
435
311
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
436
- children: /* @__PURE__ */ T(f, { className: "h-4 w-4" })
312
+ children: /* @__PURE__ */ w(p, { className: "h-4 w-4" })
437
313
  })
438
314
  })
439
315
  ]
440
- }, e.id))
316
+ }, t.id))
441
317
  })]
442
318
  })
443
319
  }),
444
- Z.length === 0 && /* @__PURE__ */ T(i, {
320
+ K.length === 0 && /* @__PURE__ */ w(r, {
445
321
  illustration: "empty-search",
446
- title: "No orders found",
447
- description: "No orders match your current search and filters. Try a different status, date range or search term.",
448
- action: /* @__PURE__ */ T("button", {
322
+ title: k.length === 0 ? "No orders yet" : "No orders found",
323
+ description: k.length === 0 ? "Orders placed across the platform will appear here as they come in." : "No orders match your current search and filters. Try a different status or search term.",
324
+ action: k.length > 0 ? /* @__PURE__ */ w("button", {
449
325
  type: "button",
450
326
  onClick: () => {
451
- R(""), B("all"), H("today");
327
+ P(""), I("all");
452
328
  },
453
329
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
454
330
  children: "Clear filters"
455
- })
331
+ }) : void 0
456
332
  })
457
333
  ]
458
334
  }),
459
- G && U && /* @__PURE__ */ T("div", {
335
+ z && L && /* @__PURE__ */ w("div", {
460
336
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
461
- children: /* @__PURE__ */ E("div", {
337
+ children: /* @__PURE__ */ T("div", {
462
338
  className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
463
- children: [/* @__PURE__ */ E("div", {
339
+ children: [/* @__PURE__ */ T("div", {
464
340
  className: "flex items-center justify-between p-4 border-b border-border-subtle",
465
- children: [/* @__PURE__ */ T("h2", {
341
+ children: [/* @__PURE__ */ w("h2", {
466
342
  className: "text-lg font-semibold text-text-primary",
467
343
  children: "Order Details"
468
- }), /* @__PURE__ */ T("button", {
344
+ }), /* @__PURE__ */ w("button", {
469
345
  type: "button",
470
- onClick: () => K(!1),
346
+ onClick: () => B(!1),
471
347
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
472
- children: /* @__PURE__ */ T(C, { className: "h-5 w-5" })
348
+ children: /* @__PURE__ */ w(S, { className: "h-5 w-5" })
473
349
  })]
474
- }), /* @__PURE__ */ E("div", {
350
+ }), /* @__PURE__ */ T("div", {
475
351
  className: "p-4 space-y-6",
476
352
  children: [
477
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
353
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
478
354
  className: "font-semibold text-text-primary mb-3",
479
355
  children: "Order Information"
480
- }), /* @__PURE__ */ E("div", {
356
+ }), /* @__PURE__ */ T("div", {
481
357
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
482
358
  children: [
483
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
359
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
484
360
  className: "text-sm text-text-secondary",
485
361
  children: "Order ID"
486
- }), /* @__PURE__ */ T("p", {
487
- className: "font-medium text-text-primary",
488
- children: U.id
362
+ }), /* @__PURE__ */ w("p", {
363
+ className: "font-medium text-text-primary font-mono text-sm break-all",
364
+ children: L.id
489
365
  })] }),
490
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
366
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
491
367
  className: "text-sm text-text-secondary",
492
368
  children: "Status"
493
- }), /* @__PURE__ */ T("span", {
494
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", Y(U.status)),
495
- children: U.status.replace("_", " ")
369
+ }), /* @__PURE__ */ w("span", {
370
+ className: e("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", W(L.status)),
371
+ children: L.status.replace(/_/g, " ")
496
372
  })] }),
497
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
373
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
498
374
  className: "text-sm text-text-secondary",
499
375
  children: "Order Date"
500
- }), /* @__PURE__ */ T("p", {
376
+ }), /* @__PURE__ */ w("p", {
501
377
  className: "font-medium text-text-primary",
502
- children: J(U.orderDate)
378
+ children: H(L.orderDate)
503
379
  })] }),
504
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
380
+ L.estimatedDeliveryTime && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
505
381
  className: "text-sm text-text-secondary",
506
- children: "Delivery Time"
507
- }), /* @__PURE__ */ T("p", {
382
+ children: "Estimated Delivery"
383
+ }), /* @__PURE__ */ w("p", {
508
384
  className: "font-medium text-text-primary",
509
- children: J(U.deliveryTime)
385
+ children: H(L.estimatedDeliveryTime)
510
386
  })] })
511
387
  ]
512
388
  })] }),
513
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
389
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ T("h3", {
514
390
  className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
515
- children: [/* @__PURE__ */ T(S, { className: "h-4 w-4" }), " Customer Details"]
516
- }), /* @__PURE__ */ E("div", {
517
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
518
- children: [
519
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
520
- className: "text-sm text-text-secondary",
521
- children: "Name"
522
- }), /* @__PURE__ */ T("p", {
523
- className: "font-medium text-text-primary",
524
- children: U.customerName
525
- })] }),
526
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
527
- className: "text-sm text-text-secondary",
528
- children: "Phone"
529
- }), /* @__PURE__ */ E("p", {
530
- className: "font-medium text-text-primary flex items-center gap-1",
531
- children: [/* @__PURE__ */ T(g, { className: "h-3 w-3" }), U.customerPhone]
532
- })] }),
533
- /* @__PURE__ */ E("div", {
534
- className: "sm:col-span-2",
535
- children: [/* @__PURE__ */ T("p", {
536
- className: "text-sm text-text-secondary",
537
- children: "Delivery Address"
538
- }), /* @__PURE__ */ E("p", {
539
- className: "font-medium text-text-primary flex items-center gap-1",
540
- children: [/* @__PURE__ */ T(h, { className: "h-3 w-3" }), U.deliveryAddress]
541
- })]
542
- })
543
- ]
391
+ children: [/* @__PURE__ */ w(b, { className: "h-4 w-4" }), " Cart"]
392
+ }), /* @__PURE__ */ w("p", {
393
+ className: "font-medium text-text-primary",
394
+ children: L.cartName
544
395
  })] }),
545
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
396
+ J(L) !== "—" && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
546
397
  className: "font-semibold text-text-primary mb-3",
547
- children: "Cart Details"
548
- }), /* @__PURE__ */ E("div", {
549
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
550
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
551
- className: "text-sm text-text-secondary",
552
- children: "Cart Name"
553
- }), /* @__PURE__ */ T("p", {
554
- className: "font-medium text-text-primary",
555
- children: U.cartName
556
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
557
- className: "text-sm text-text-secondary",
558
- children: "Cart Owner"
559
- }), /* @__PURE__ */ T("p", {
560
- className: "font-medium text-text-primary",
561
- children: U.cartOwner
562
- })] })]
398
+ children: "Delivery Address"
399
+ }), /* @__PURE__ */ T("p", {
400
+ className: "font-medium text-text-primary flex items-start gap-1",
401
+ children: [/* @__PURE__ */ w(g, { className: "h-3 w-3 mt-1 shrink-0" }), J(L)]
563
402
  })] }),
564
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
403
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
565
404
  className: "font-semibold text-text-primary mb-3",
566
405
  children: "Order Items"
567
- }), /* @__PURE__ */ E("div", {
406
+ }), /* @__PURE__ */ T("div", {
568
407
  className: "rounded-lg bg-bg-sunken/50 p-4",
569
- children: [/* @__PURE__ */ T("ul", {
408
+ children: [L.items.length > 0 ? /* @__PURE__ */ w("ul", {
570
409
  className: "space-y-2",
571
- children: U.items.map((e, t) => /* @__PURE__ */ T("li", {
572
- className: "text-sm text-text-primary",
573
- children: e
574
- }, t))
575
- }), /* @__PURE__ */ E("div", {
576
- className: "mt-4 pt-4 border-t border-border-subtle flex justify-between items-center",
577
- children: [/* @__PURE__ */ T("span", {
578
- className: "font-semibold text-text-primary",
579
- children: "Total Amount"
580
- }), /* @__PURE__ */ T("span", {
581
- className: "font-semibold text-lg text-text-primary",
582
- children: q(U.total)
583
- })]
410
+ children: L.items.map((e) => /* @__PURE__ */ T("li", {
411
+ className: "flex justify-between text-sm text-text-primary",
412
+ children: [/* @__PURE__ */ T("span", { children: [
413
+ e.name,
414
+ " × ",
415
+ e.quantity
416
+ ] }), /* @__PURE__ */ w("span", {
417
+ className: "font-medium",
418
+ children: V(e.price * e.quantity)
419
+ })]
420
+ }, e.id))
421
+ }) : /* @__PURE__ */ w("p", {
422
+ className: "text-sm text-text-secondary",
423
+ children: "No line items recorded."
424
+ }), /* @__PURE__ */ T("div", {
425
+ className: "mt-4 pt-4 border-t border-border-subtle space-y-1 text-sm",
426
+ children: [
427
+ /* @__PURE__ */ T("div", {
428
+ className: "flex justify-between text-text-secondary",
429
+ children: [/* @__PURE__ */ w("span", { children: "Subtotal" }), /* @__PURE__ */ w("span", { children: V(L.subtotal) })]
430
+ }),
431
+ /* @__PURE__ */ T("div", {
432
+ className: "flex justify-between text-text-secondary",
433
+ children: [/* @__PURE__ */ w("span", { children: "Taxes" }), /* @__PURE__ */ w("span", { children: V(L.taxes) })]
434
+ }),
435
+ /* @__PURE__ */ T("div", {
436
+ className: "flex justify-between text-text-secondary",
437
+ children: [/* @__PURE__ */ w("span", { children: "Delivery Fee" }), /* @__PURE__ */ w("span", { children: V(L.deliveryFee) })]
438
+ }),
439
+ L.discount ? /* @__PURE__ */ T("div", {
440
+ className: "flex justify-between text-text-secondary",
441
+ children: [/* @__PURE__ */ w("span", { children: "Discount" }), /* @__PURE__ */ T("span", { children: ["-", V(L.discount)] })]
442
+ }) : null,
443
+ /* @__PURE__ */ T("div", {
444
+ className: "flex justify-between pt-2 border-t border-border-subtle font-semibold text-text-primary text-base",
445
+ children: [/* @__PURE__ */ w("span", { children: "Total" }), /* @__PURE__ */ w("span", { children: V(L.total) })]
446
+ })
447
+ ]
584
448
  })]
585
449
  })] }),
586
- /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
450
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
587
451
  className: "font-semibold text-text-primary mb-3",
588
452
  children: "Payment Details"
589
- }), /* @__PURE__ */ E("div", {
453
+ }), /* @__PURE__ */ T("div", {
590
454
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
591
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
455
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
592
456
  className: "text-sm text-text-secondary",
593
457
  children: "Method"
594
- }), /* @__PURE__ */ T("p", {
458
+ }), /* @__PURE__ */ w("p", {
595
459
  className: "font-medium text-text-primary",
596
- children: U.paymentMethod
597
- })] }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
460
+ children: L.paymentMethod
461
+ })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
598
462
  className: "text-sm text-text-secondary",
599
463
  children: "Status"
600
- }), /* @__PURE__ */ E("div", {
464
+ }), /* @__PURE__ */ T("div", {
601
465
  className: "flex items-center gap-2",
602
- children: [X(U.paymentStatus), /* @__PURE__ */ T("span", {
466
+ children: [G(L.paymentStatus), /* @__PURE__ */ w("span", {
603
467
  className: "font-medium text-text-primary capitalize",
604
- children: U.paymentStatus
468
+ children: L.paymentStatus
605
469
  })]
606
470
  })] })]
607
471
  })] }),
608
- U.workerAssigned && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("h3", {
609
- className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
610
- children: [/* @__PURE__ */ T(x, { className: "h-4 w-4" }), " Delivery Assignment"]
611
- }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
612
- className: "text-sm text-text-secondary",
613
- children: "Assigned Worker"
614
- }), /* @__PURE__ */ T("p", {
615
- className: "font-medium text-text-primary",
616
- children: U.workerAssigned
617
- })] })] }),
618
- U.notes && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
472
+ L.customerNotes && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h3", {
619
473
  className: "font-semibold text-text-primary mb-3",
620
474
  children: "Special Instructions"
621
- }), /* @__PURE__ */ T("p", {
475
+ }), /* @__PURE__ */ w("p", {
622
476
  className: "text-sm rounded-lg bg-bg-sunken/50 p-3 text-text-primary",
623
- children: U.notes
477
+ children: L.customerNotes
624
478
  })] }),
625
- /* @__PURE__ */ E("div", {
479
+ /* @__PURE__ */ T("div", {
626
480
  className: "flex flex-col sm:flex-row sm:justify-end gap-3 pt-2",
627
- children: [/* @__PURE__ */ T("button", {
481
+ children: [/* @__PURE__ */ w("button", {
628
482
  type: "button",
629
- onClick: () => K(!1),
483
+ onClick: () => B(!1),
630
484
  className: "rounded-lg border border-border-subtle py-2 px-4 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
631
485
  children: "Close"
632
- }), U.status !== "delivered" && U.status !== "cancelled" && /* @__PURE__ */ E("select", {
633
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
634
- value: U.status,
635
- onChange: (e) => Q(U.id, e.target.value),
636
- children: [
637
- /* @__PURE__ */ T("option", {
638
- value: "pending",
639
- children: "Pending"
640
- }),
641
- /* @__PURE__ */ T("option", {
642
- value: "confirmed",
643
- children: "Confirmed"
644
- }),
645
- /* @__PURE__ */ T("option", {
646
- value: "preparing",
647
- children: "Preparing"
648
- }),
649
- /* @__PURE__ */ T("option", {
650
- value: "ready",
651
- children: "Ready"
652
- }),
653
- /* @__PURE__ */ T("option", {
654
- value: "out_for_delivery",
655
- children: "Out for Delivery"
656
- }),
657
- /* @__PURE__ */ T("option", {
658
- value: "delivered",
659
- children: "Delivered"
660
- }),
661
- /* @__PURE__ */ T("option", {
662
- value: "cancelled",
663
- children: "Cancelled"
664
- })
665
- ]
486
+ }), L.status !== "delivered" && L.status !== "cancelled" && /* @__PURE__ */ w("select", {
487
+ disabled: M.isPending,
488
+ className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] disabled:opacity-50",
489
+ value: L.status,
490
+ onChange: (e) => q(L.id, e.target.value),
491
+ children: O.map((e) => /* @__PURE__ */ w("option", {
492
+ value: e,
493
+ children: e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())
494
+ }, e))
666
495
  })]
667
496
  })
668
497
  ]
@@ -673,6 +502,6 @@ function A() {
673
502
  });
674
503
  }
675
504
  //#endregion
676
- export { A as AdminOrdersPage };
505
+ export { k as AdminOrdersPage };
677
506
 
678
507
  //# sourceMappingURL=AdminOrdersPage.js.map