@burdenoff/microfe-kadaikodi 2026.626.2 → 2026.704.2

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 (96) hide show
  1. package/dist/kadaikodi/hooks/useKadaikodiApi.js +260 -105
  2. package/dist/kadaikodi/hooks/useKadaikodiApi.js.map +1 -1
  3. package/dist/kadaikodi/pages/HomePage.js +4 -4
  4. package/dist/kadaikodi/pages/HomePage.js.map +1 -1
  5. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js +341 -461
  6. package/dist/kadaikodi/pages/admin/AdminAnalyticsPage.js.map +1 -1
  7. package/dist/kadaikodi/pages/admin/AdminDashboard.js +115 -399
  8. package/dist/kadaikodi/pages/admin/AdminDashboard.js.map +1 -1
  9. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js +140 -283
  10. package/dist/kadaikodi/pages/admin/AdminFinancialPage.js.map +1 -1
  11. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js +282 -453
  12. package/dist/kadaikodi/pages/admin/AdminOrdersPage.js.map +1 -1
  13. package/dist/kadaikodi/pages/admin/AdminProfilePage.js +115 -242
  14. package/dist/kadaikodi/pages/admin/AdminProfilePage.js.map +1 -1
  15. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js +2 -2
  16. package/dist/kadaikodi/pages/admin/AdminSettingsPage.js.map +1 -1
  17. package/dist/kadaikodi/pages/admin/CartManagementPage.js +279 -333
  18. package/dist/kadaikodi/pages/admin/CartManagementPage.js.map +1 -1
  19. package/dist/kadaikodi/pages/admin/UserManagementPage.js +299 -372
  20. package/dist/kadaikodi/pages/admin/UserManagementPage.js.map +1 -1
  21. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js +503 -627
  22. package/dist/kadaikodi/pages/cart-owner/AnalyticsDashboard.js.map +1 -1
  23. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js +339 -282
  24. package/dist/kadaikodi/pages/cart-owner/BusinessSettingsPage.js.map +1 -1
  25. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js +329 -432
  26. package/dist/kadaikodi/pages/cart-owner/CartOwnerDashboard.js.map +1 -1
  27. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js +374 -384
  28. package/dist/kadaikodi/pages/cart-owner/CartOwnerProfilePage.js.map +1 -1
  29. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js +249 -208
  30. package/dist/kadaikodi/pages/cart-owner/CartServiceConfigPage.js.map +1 -1
  31. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js +276 -279
  32. package/dist/kadaikodi/pages/cart-owner/InventoryManagementPage.js.map +1 -1
  33. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js +229 -447
  34. package/dist/kadaikodi/pages/cart-owner/OrderManagementPage.js.map +1 -1
  35. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js +171 -627
  36. package/dist/kadaikodi/pages/cart-owner/StaffManagementPage.js.map +1 -1
  37. package/dist/kadaikodi/pages/common/HelpSupportPage.js +331 -415
  38. package/dist/kadaikodi/pages/common/HelpSupportPage.js.map +1 -1
  39. package/dist/kadaikodi/pages/common/NotificationCenterPage.js +18 -670
  40. package/dist/kadaikodi/pages/common/NotificationCenterPage.js.map +1 -1
  41. package/dist/kadaikodi/pages/common/SettingsPage.js +34 -46
  42. package/dist/kadaikodi/pages/common/SettingsPage.js.map +1 -1
  43. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js +193 -447
  44. package/dist/kadaikodi/pages/customer/BookingDetailsPage.js.map +1 -1
  45. package/dist/kadaikodi/pages/customer/CartDetailPage.js +6 -6
  46. package/dist/kadaikodi/pages/customer/CartDetailPage.js.map +1 -1
  47. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js +2 -2
  48. package/dist/kadaikodi/pages/customer/CartDiscoveryPage.js.map +1 -1
  49. package/dist/kadaikodi/pages/customer/CheckoutPage.js +4 -2
  50. package/dist/kadaikodi/pages/customer/CheckoutPage.js.map +1 -1
  51. package/dist/kadaikodi/pages/customer/CustomerDashboard.js +191 -369
  52. package/dist/kadaikodi/pages/customer/CustomerDashboard.js.map +1 -1
  53. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js +233 -389
  54. package/dist/kadaikodi/pages/customer/CustomerProfilePage.js.map +1 -1
  55. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js +255 -215
  56. package/dist/kadaikodi/pages/customer/DirectServiceBookingPage.js.map +1 -1
  57. package/dist/kadaikodi/pages/customer/FavoritesPage.js +141 -178
  58. package/dist/kadaikodi/pages/customer/FavoritesPage.js.map +1 -1
  59. package/dist/kadaikodi/pages/customer/OrderHistoryPage.js.map +1 -1
  60. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js +155 -161
  61. package/dist/kadaikodi/pages/customer/OrderTrackingPage.js.map +1 -1
  62. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js +76 -118
  63. package/dist/kadaikodi/pages/customer/PaymentMethodsPage.js.map +1 -1
  64. package/dist/kadaikodi/pages/customer/ReviewsPage.js +14 -140
  65. package/dist/kadaikodi/pages/customer/ReviewsPage.js.map +1 -1
  66. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js +135 -213
  67. package/dist/kadaikodi/pages/customer/SavedAddressesPage.js.map +1 -1
  68. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js +272 -774
  69. package/dist/kadaikodi/pages/investor/InvestmentDetailsPage.js.map +1 -1
  70. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js +258 -523
  71. package/dist/kadaikodi/pages/investor/InvestmentOpportunitiesPage.js.map +1 -1
  72. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js +112 -600
  73. package/dist/kadaikodi/pages/investor/InvestorAnalyticsPage.js.map +1 -1
  74. package/dist/kadaikodi/pages/investor/InvestorDashboard.js +128 -295
  75. package/dist/kadaikodi/pages/investor/InvestorDashboard.js.map +1 -1
  76. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js +205 -291
  77. package/dist/kadaikodi/pages/investor/InvestorInvestmentsPage.js.map +1 -1
  78. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js +159 -500
  79. package/dist/kadaikodi/pages/investor/InvestorPortfolioPage.js.map +1 -1
  80. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js +426 -514
  81. package/dist/kadaikodi/pages/investor/InvestorProfilePage.js.map +1 -1
  82. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js +231 -225
  83. package/dist/kadaikodi/pages/worker/TaskDetailsPage.js.map +1 -1
  84. package/dist/kadaikodi/pages/worker/WorkerDashboard.js +197 -301
  85. package/dist/kadaikodi/pages/worker/WorkerDashboard.js.map +1 -1
  86. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js +247 -399
  87. package/dist/kadaikodi/pages/worker/WorkerOrdersPage.js.map +1 -1
  88. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js +294 -327
  89. package/dist/kadaikodi/pages/worker/WorkerProfilePage.js.map +1 -1
  90. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js +179 -397
  91. package/dist/kadaikodi/pages/worker/WorkerSchedulePage.js.map +1 -1
  92. package/package.json +1 -1
  93. package/dist/kadaikodi/mocks/data.js +0 -1517
  94. package/dist/kadaikodi/mocks/data.js.map +0 -1
  95. package/dist/kadaikodi/mocks/users.js +0 -34
  96. package/dist/kadaikodi/mocks/users.js.map +0 -1
@@ -2,247 +2,14 @@ import { useKadaikodi as e } from "../../context/KadaikodiContext.js";
2
2
  import { cn as t } from "../../utils/cn.js";
3
3
  import { PageLayout as n } from "../../components/PageLayout.js";
4
4
  import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { mockOrders as a } from "../../mocks/data.js";
7
- import { useMemo as o, useState as s } from "react";
8
- import { AlertCircle as c, CheckCircle2 as l, ChefHat as u, MapPin as d, PackageCheck as f, Phone as p, RefreshCw as m, Search as h, ShoppingBag as g, Truck as _, X as v, XCircle as y } from "lucide-react";
9
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
10
- import { EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
5
+ import { useOrders as i, useProviders as a, useUpdateOrderStatus as o } from "../../hooks/useKadaikodiApi.js";
6
+ import { formatCurrency as s } from "../../utils/formatters.js";
7
+ import { useEffect as c, useMemo as l, useState as u } from "react";
8
+ import { AlertCircle as d, CheckCircle2 as f, ChefHat as p, MapPin as m, PackageCheck as h, Phone as g, RefreshCw as _, Search as v, ShoppingBag as y, Truck as b, X as x, XCircle as S } from "lucide-react";
9
+ import { Fragment as C, 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/cart-owner/OrderManagementPage.tsx
12
- var T = [
13
- ...a,
14
- {
15
- id: "ORD-010",
16
- cartId: "FOOD-001",
17
- cartName: "Dosa Express",
18
- cartImage: "",
19
- items: [{
20
- id: "food-1",
21
- name: "Masala Dosa",
22
- quantity: 3,
23
- price: 120
24
- }, {
25
- id: "food-2",
26
- name: "Filter Coffee",
27
- quantity: 3,
28
- price: 60
29
- }],
30
- subtotal: 540,
31
- taxes: 54,
32
- deliveryFee: 30,
33
- total: 624,
34
- status: "pending",
35
- orderDate: "2024-01-16T17:30:00Z",
36
- estimatedDeliveryTime: "2024-01-16T18:00:00Z",
37
- deliveryAddress: {
38
- street: "42 Lake Road",
39
- area: "Ulsoor",
40
- city: "Bangalore",
41
- pincode: "560008"
42
- },
43
- paymentMethod: "UPI",
44
- paymentStatus: "completed",
45
- timeline: [{
46
- status: "pending",
47
- timestamp: "2024-01-16T17:30:00Z",
48
- description: "Order placed"
49
- }],
50
- assignedWorker: {
51
- id: "worker-1",
52
- name: "Ravi Kumar",
53
- phone: "+91-9876543210",
54
- rating: 4.8
55
- },
56
- customerName: "Priya Sharma",
57
- customerPhone: "+91-9876543220",
58
- fulfillmentType: "delivery",
59
- specialInstructions: "Extra sambar please"
60
- },
61
- {
62
- id: "ORD-011",
63
- cartId: "FOOD-002",
64
- cartName: "Chaat Corner",
65
- cartImage: "",
66
- items: [{
67
- id: "food-3",
68
- name: "Pani Puri",
69
- quantity: 2,
70
- price: 80
71
- }, {
72
- id: "food-4",
73
- name: "Bhel Puri",
74
- quantity: 1,
75
- price: 70
76
- }],
77
- subtotal: 230,
78
- taxes: 23,
79
- deliveryFee: 0,
80
- total: 253,
81
- status: "confirmed",
82
- orderDate: "2024-01-16T16:00:00Z",
83
- deliveryAddress: {
84
- street: "88 MG Road",
85
- area: "MG Road",
86
- city: "Bangalore",
87
- pincode: "560001"
88
- },
89
- paymentMethod: "Cash",
90
- paymentStatus: "pending",
91
- timeline: [{
92
- status: "pending",
93
- timestamp: "2024-01-16T15:50:00Z",
94
- description: "Order placed"
95
- }, {
96
- status: "confirmed",
97
- timestamp: "2024-01-16T16:00:00Z",
98
- description: "Order confirmed"
99
- }],
100
- customerName: "Amit Patel",
101
- customerPhone: "+91-9876543221",
102
- fulfillmentType: "pickup"
103
- },
104
- {
105
- id: "ORD-012",
106
- cartId: "FOOD-001",
107
- cartName: "Dosa Express",
108
- cartImage: "",
109
- items: [{
110
- id: "food-5",
111
- name: "Rava Dosa",
112
- quantity: 2,
113
- price: 100
114
- }],
115
- subtotal: 200,
116
- taxes: 20,
117
- deliveryFee: 30,
118
- total: 250,
119
- status: "preparing",
120
- orderDate: "2024-01-16T15:00:00Z",
121
- deliveryAddress: {
122
- street: "15 Church Street",
123
- area: "Church Street",
124
- city: "Bangalore",
125
- pincode: "560001"
126
- },
127
- paymentMethod: "UPI",
128
- paymentStatus: "completed",
129
- timeline: [
130
- {
131
- status: "pending",
132
- timestamp: "2024-01-16T14:50:00Z",
133
- description: "Order placed"
134
- },
135
- {
136
- status: "confirmed",
137
- timestamp: "2024-01-16T14:55:00Z",
138
- description: "Order confirmed"
139
- },
140
- {
141
- status: "preparing",
142
- timestamp: "2024-01-16T15:00:00Z",
143
- description: "Preparation started"
144
- }
145
- ],
146
- customerName: "Deepak Reddy",
147
- customerPhone: "+91-9876543222",
148
- fulfillmentType: "delivery",
149
- specialInstructions: "No onions"
150
- },
151
- {
152
- id: "ORD-013",
153
- cartId: "SVC-001",
154
- cartName: "Quick Fix Repairs",
155
- cartImage: "",
156
- items: [{
157
- id: "svc-1",
158
- name: "Mobile Screen Repair",
159
- quantity: 1,
160
- price: 2500
161
- }],
162
- subtotal: 2500,
163
- taxes: 250,
164
- deliveryFee: 0,
165
- total: 2750,
166
- status: "ready",
167
- orderDate: "2024-01-16T12:00:00Z",
168
- deliveryAddress: {
169
- street: "22 HSR Layout",
170
- area: "HSR Layout",
171
- city: "Bangalore",
172
- pincode: "560102"
173
- },
174
- paymentMethod: "Card",
175
- paymentStatus: "completed",
176
- timeline: [
177
- {
178
- status: "pending",
179
- timestamp: "2024-01-16T11:00:00Z",
180
- description: "Order placed"
181
- },
182
- {
183
- status: "confirmed",
184
- timestamp: "2024-01-16T11:10:00Z",
185
- description: "Order confirmed"
186
- },
187
- {
188
- status: "preparing",
189
- timestamp: "2024-01-16T11:30:00Z",
190
- description: "Service started"
191
- },
192
- {
193
- status: "ready",
194
- timestamp: "2024-01-16T12:00:00Z",
195
- description: "Service completed"
196
- }
197
- ],
198
- customerName: "Kiran Nair",
199
- customerPhone: "+91-9876543223",
200
- fulfillmentType: "pickup"
201
- },
202
- {
203
- id: "ORD-014",
204
- cartId: "FOOD-001",
205
- cartName: "Dosa Express",
206
- cartImage: "",
207
- items: [{
208
- id: "food-1",
209
- name: "Masala Dosa",
210
- quantity: 1,
211
- price: 120
212
- }, {
213
- id: "food-2",
214
- name: "Filter Coffee",
215
- quantity: 2,
216
- price: 60
217
- }],
218
- subtotal: 240,
219
- taxes: 24,
220
- deliveryFee: 30,
221
- total: 294,
222
- status: "cancelled",
223
- orderDate: "2024-01-15T18:00:00Z",
224
- deliveryAddress: {
225
- street: "5 BTM Layout",
226
- area: "BTM Layout",
227
- city: "Bangalore",
228
- pincode: "560076"
229
- },
230
- paymentMethod: "UPI",
231
- paymentStatus: "refunded",
232
- timeline: [{
233
- status: "pending",
234
- timestamp: "2024-01-15T17:50:00Z",
235
- description: "Order placed"
236
- }, {
237
- status: "cancelled",
238
- timestamp: "2024-01-15T18:00:00Z",
239
- description: "Order cancelled by customer"
240
- }],
241
- customerName: "Sneha Gupta",
242
- customerPhone: "+91-9876543224",
243
- fulfillmentType: "delivery"
244
- }
245
- ], E = {
12
+ var O = {
246
13
  pending: {
247
14
  color: "bg-status-warning-bg-subtle text-status-warning-text",
248
15
  label: "New Order"
@@ -271,54 +38,58 @@ var T = [
271
38
  color: "bg-status-error-bg-subtle text-status-error-text",
272
39
  label: "Cancelled"
273
40
  }
274
- }, D = {
41
+ }, k = {
275
42
  delivery: {
276
- icon: _,
43
+ icon: b,
277
44
  label: "Delivery",
278
45
  color: "bg-accent-purple-subtle text-text-primary"
279
46
  },
280
47
  pickup: {
281
- icon: g,
48
+ icon: y,
282
49
  label: "Pickup",
283
50
  color: "bg-[var(--color-accent-soft)] text-text-primary"
284
51
  },
285
52
  cart_dispatch: {
286
- icon: d,
53
+ icon: m,
287
54
  label: "Cart Dispatch",
288
55
  color: "bg-bg-sunken text-text-secondary"
289
56
  }
290
- }, O = (e) => {
57
+ }, A = (e) => {
291
58
  let t = new Date(e), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / (1e3 * 60));
292
59
  return n < 1 ? "Just now" : n < 60 ? `${n} min ago` : n < 1440 ? `${Math.floor(n / 60)} hours ago` : t.toLocaleDateString("en-IN", {
293
60
  day: "2-digit",
294
61
  month: "short"
295
62
  });
296
- }, k = (e) => new Date(e).toLocaleTimeString("en-IN", {
63
+ }, j = (e) => new Date(e).toLocaleTimeString("en-IN", {
297
64
  hour: "numeric",
298
65
  minute: "2-digit",
299
66
  hour12: !0
300
- }), A = (e) => {
67
+ }), M = (e) => {
301
68
  let t = ((/* @__PURE__ */ new Date()).getTime() - new Date(e.orderDate).getTime()) / (1e3 * 60);
302
69
  return e.status === "pending" && t > 10 ? "border-status-error-text/50 bg-status-error-bg-subtle" : e.status === "preparing" && t > 30 ? "border-status-warning-text/50 bg-status-warning-bg-subtle" : "border-border-subtle";
303
- }, j = () => {
304
- let { navigateTo: a } = e(), [g, _] = s(T), [j, M] = s({
70
+ }, N = () => {
71
+ let { navigateTo: y, currentUser: b } = e(), { data: N = [] } = a(), { data: P = [], isLoading: F } = i({ providerId: l(() => N.find((e) => e.ownerId === b?.id) ?? N[0], [N, b?.id])?.id }), I = o(), [L, R] = u([]);
72
+ c(() => {
73
+ R(P);
74
+ }, [P]);
75
+ let [z, B] = u({
305
76
  status: "",
306
77
  dateRange: "all",
307
78
  searchQuery: "",
308
79
  sortBy: "recent",
309
80
  fulfillmentType: ""
310
- }), [N, P] = s(null), [F, I] = s(!1), [L, R] = s(null), z = (e, t) => {
311
- R({
81
+ }), [V, H] = u(null), [U, W] = u(!1), [G, K] = u(null), q = (e, t) => {
82
+ K({
312
83
  text: e,
313
84
  type: t
314
- }), setTimeout(() => R(null), 3e3);
315
- }, B = o(() => {
316
- let e = g.length, t = g.filter((e) => e.status === "pending").length, n = g.filter((e) => [
85
+ }), setTimeout(() => K(null), 3e3);
86
+ }, J = l(() => {
87
+ let e = L.length, t = L.filter((e) => e.status === "pending").length, n = L.filter((e) => [
317
88
  "confirmed",
318
89
  "preparing",
319
90
  "ready",
320
91
  "out_for_delivery"
321
- ].includes(e.status)).length, r = g.filter((e) => e.status === "delivered").length, i = g.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
92
+ ].includes(e.status)).length, r = L.filter((e) => e.status === "delivered").length, i = L.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
322
93
  return {
323
94
  total: e,
324
95
  pending: t,
@@ -327,17 +98,17 @@ var T = [
327
98
  totalRevenue: i,
328
99
  avgOrder: r > 0 ? Math.round(i / r) : 0
329
100
  };
330
- }, [g]), V = o(() => {
331
- let e = [...g];
332
- if (j.status && (e = e.filter((e) => e.status === j.status)), j.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === j.fulfillmentType)), j.searchQuery) {
333
- let t = j.searchQuery.toLowerCase();
101
+ }, [L]), Y = l(() => {
102
+ let e = [...L];
103
+ if (z.status && (e = e.filter((e) => e.status === z.status)), z.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === z.fulfillmentType)), z.searchQuery) {
104
+ let t = z.searchQuery.toLowerCase();
334
105
  e = e.filter((e) => e.id.toLowerCase().includes(t) || (e.customerName || "").toLowerCase().includes(t) || e.items.some((e) => e.name.toLowerCase().includes(t)));
335
106
  }
336
- if (j.dateRange !== "all") {
107
+ if (z.dateRange !== "all") {
337
108
  let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
338
- j.dateRange === "today" ? n.setHours(0, 0, 0, 0) : j.dateRange === "7days" ? n.setDate(t.getDate() - 7) : j.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
109
+ z.dateRange === "today" ? n.setHours(0, 0, 0, 0) : z.dateRange === "7days" ? n.setDate(t.getDate() - 7) : z.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
339
110
  }
340
- switch (j.sortBy) {
111
+ switch (z.sortBy) {
341
112
  case "recent":
342
113
  e.sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime());
343
114
  break;
@@ -352,244 +123,252 @@ var T = [
352
123
  break;
353
124
  }
354
125
  return e;
355
- }, [g, j]), H = (e, t) => {
126
+ }, [L, z]), X = (e, t) => {
356
127
  let n = {
357
128
  accept: "confirmed",
358
129
  reject: "cancelled",
359
130
  ready: "ready",
360
131
  complete: "delivered"
361
132
  };
362
- _((r) => r.map((r) => r.id === e ? {
133
+ R((r) => r.map((r) => r.id === e ? {
363
134
  ...r,
364
135
  status: n[t]
365
- } : r)), z({
136
+ } : r)), I.mutate({
137
+ id: e,
138
+ status: {
139
+ accept: "CONFIRMED",
140
+ reject: "CANCELLED",
141
+ ready: "READY",
142
+ complete: "DELIVERED"
143
+ }[t]
144
+ }, { onError: () => q("Could not update the order on the server", "error") }), q({
366
145
  accept: "Order accepted",
367
146
  reject: "Order rejected",
368
147
  ready: "Order marked as ready",
369
148
  complete: "Order completed"
370
- }[t], "success"), F && N?.id === e && I(!1);
149
+ }[t], "success"), U && V?.id === e && W(!1);
371
150
  };
372
- return /* @__PURE__ */ S(n, {
151
+ return /* @__PURE__ */ T(n, {
373
152
  title: "Order Management",
374
153
  description: "Manage incoming and active orders",
375
- actions: /* @__PURE__ */ S("button", {
154
+ actions: /* @__PURE__ */ T("button", {
376
155
  type: "button",
377
- onClick: () => z("Orders refreshed", "success"),
156
+ onClick: () => q("Orders refreshed", "success"),
378
157
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
379
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4" }), "Refresh"]
158
+ children: [/* @__PURE__ */ w(_, { className: "h-4 w-4" }), "Refresh"]
380
159
  }),
381
160
  children: [
382
- /* @__PURE__ */ x(w, {
161
+ /* @__PURE__ */ w(D, {
383
162
  className: "mb-6",
384
163
  children: "Your live order queue. Use this page to run service as it happens — accept new orders, move them through preparing and ready, hand off for pickup, delivery or cart dispatch, and keep customers updated. Filter by status or type to focus on what needs doing right now, and watch today's totals so you know how the day is going."
385
164
  }),
386
- /* @__PURE__ */ S("div", {
165
+ /* @__PURE__ */ T("div", {
387
166
  className: "space-y-4",
388
167
  children: [
389
- L && /* @__PURE__ */ S("div", {
390
- className: t("flex items-center gap-2 rounded-lg border p-3", L.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
391
- children: [L.type === "success" ? /* @__PURE__ */ x(l, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ x(c, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ x("span", {
392
- className: t("text-sm font-medium", L.type === "success" ? "text-status-success-text" : "text-status-error-text"),
393
- children: L.text
168
+ G && /* @__PURE__ */ T("div", {
169
+ className: t("flex items-center gap-2 rounded-lg border p-3", G.type === "success" ? "border-status-success-text/30 bg-status-success-bg-subtle" : "border-status-error-text/30 bg-status-error-bg-subtle"),
170
+ children: [G.type === "success" ? /* @__PURE__ */ w(f, { className: "h-4 w-4 text-status-success-text" }) : /* @__PURE__ */ w(d, { className: "h-4 w-4 text-status-error-text" }), /* @__PURE__ */ w("span", {
171
+ className: t("text-sm font-medium", G.type === "success" ? "text-status-success-text" : "text-status-error-text"),
172
+ children: G.text
394
173
  })]
395
174
  }),
396
- /* @__PURE__ */ S(C, { children: [/* @__PURE__ */ x("h2", {
175
+ /* @__PURE__ */ T(E, { children: [/* @__PURE__ */ w("h2", {
397
176
  className: "mb-4 text-base font-semibold text-text-primary",
398
- children: "Today's Orders"
399
- }), /* @__PURE__ */ S("div", {
177
+ children: "Orders Overview"
178
+ }), /* @__PURE__ */ T("div", {
400
179
  className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
401
180
  children: [
402
- /* @__PURE__ */ S("div", {
181
+ /* @__PURE__ */ T("div", {
403
182
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
404
- children: [/* @__PURE__ */ x("p", {
183
+ children: [/* @__PURE__ */ w("p", {
405
184
  className: "text-xs text-text-secondary",
406
185
  children: "Total Orders"
407
- }), /* @__PURE__ */ x("p", {
186
+ }), /* @__PURE__ */ w("p", {
408
187
  className: "text-2xl font-bold text-text-primary",
409
- children: B.total
188
+ children: J.total
410
189
  })]
411
190
  }),
412
- /* @__PURE__ */ S("div", {
191
+ /* @__PURE__ */ T("div", {
413
192
  className: "rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-4 shadow-sm",
414
- children: [/* @__PURE__ */ x("p", {
193
+ children: [/* @__PURE__ */ w("p", {
415
194
  className: "text-xs text-status-warning-text",
416
195
  children: "Pending"
417
- }), /* @__PURE__ */ x("p", {
196
+ }), /* @__PURE__ */ w("p", {
418
197
  className: "text-2xl font-bold text-status-warning-text",
419
- children: B.pending
198
+ children: J.pending
420
199
  })]
421
200
  }),
422
- /* @__PURE__ */ S("div", {
201
+ /* @__PURE__ */ T("div", {
423
202
  className: "rounded-lg border border-border-focus/30 bg-[var(--color-accent-soft)] p-4 shadow-sm",
424
- children: [/* @__PURE__ */ x("p", {
203
+ children: [/* @__PURE__ */ w("p", {
425
204
  className: "text-xs text-text-primary",
426
205
  children: "Active"
427
- }), /* @__PURE__ */ x("p", {
206
+ }), /* @__PURE__ */ w("p", {
428
207
  className: "text-2xl font-bold text-text-primary",
429
- children: B.active
208
+ children: J.active
430
209
  })]
431
210
  }),
432
- /* @__PURE__ */ S("div", {
211
+ /* @__PURE__ */ T("div", {
433
212
  className: "rounded-lg border border-status-success-text/30 bg-status-success-bg-subtle p-4 shadow-sm",
434
- children: [/* @__PURE__ */ x("p", {
213
+ children: [/* @__PURE__ */ w("p", {
435
214
  className: "text-xs text-status-success-text",
436
215
  children: "Completed"
437
- }), /* @__PURE__ */ x("p", {
216
+ }), /* @__PURE__ */ w("p", {
438
217
  className: "text-2xl font-bold text-status-success-text",
439
- children: B.completed
218
+ children: J.completed
440
219
  })]
441
220
  }),
442
- /* @__PURE__ */ S("div", {
221
+ /* @__PURE__ */ T("div", {
443
222
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
444
- children: [/* @__PURE__ */ x("p", {
223
+ children: [/* @__PURE__ */ w("p", {
445
224
  className: "text-xs text-text-secondary",
446
225
  children: "Total Revenue"
447
- }), /* @__PURE__ */ x("p", {
226
+ }), /* @__PURE__ */ w("p", {
448
227
  className: "text-2xl font-bold text-text-primary",
449
- children: i(B.totalRevenue, { minimumFractionDigits: 0 })
228
+ children: s(J.totalRevenue, { minimumFractionDigits: 0 })
450
229
  })]
451
230
  }),
452
- /* @__PURE__ */ S("div", {
231
+ /* @__PURE__ */ T("div", {
453
232
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
454
- children: [/* @__PURE__ */ x("p", {
233
+ children: [/* @__PURE__ */ w("p", {
455
234
  className: "text-xs text-text-secondary",
456
235
  children: "Avg Order"
457
- }), /* @__PURE__ */ x("p", {
236
+ }), /* @__PURE__ */ w("p", {
458
237
  className: "text-2xl font-bold text-text-primary",
459
- children: i(B.avgOrder, { minimumFractionDigits: 0 })
238
+ children: s(J.avgOrder, { minimumFractionDigits: 0 })
460
239
  })]
461
240
  })
462
241
  ]
463
242
  })] }),
464
- /* @__PURE__ */ x("div", {
243
+ /* @__PURE__ */ w("div", {
465
244
  className: "rounded-lg border border-border-subtle bg-bg-surface p-4 shadow-sm",
466
- children: /* @__PURE__ */ S("div", {
245
+ children: /* @__PURE__ */ T("div", {
467
246
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
468
247
  children: [
469
- /* @__PURE__ */ S("div", {
248
+ /* @__PURE__ */ T("div", {
470
249
  className: "relative sm:col-span-2 lg:col-span-1",
471
- children: [/* @__PURE__ */ x(h, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ x("input", {
250
+ 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", {
472
251
  type: "text",
473
252
  placeholder: "Search orders...",
474
- value: j.searchQuery,
475
- onChange: (e) => M((t) => ({
253
+ value: z.searchQuery,
254
+ onChange: (e) => B((t) => ({
476
255
  ...t,
477
256
  searchQuery: e.target.value
478
257
  })),
479
258
  className: "w-full rounded-md border border-border-subtle bg-bg-surface pl-10 pr-4 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
480
259
  })]
481
260
  }),
482
- /* @__PURE__ */ S("select", {
483
- value: j.status,
484
- onChange: (e) => M((t) => ({
261
+ /* @__PURE__ */ T("select", {
262
+ value: z.status,
263
+ onChange: (e) => B((t) => ({
485
264
  ...t,
486
265
  status: e.target.value
487
266
  })),
488
267
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
489
268
  children: [
490
- /* @__PURE__ */ x("option", {
269
+ /* @__PURE__ */ w("option", {
491
270
  value: "",
492
271
  children: "All Orders"
493
272
  }),
494
- /* @__PURE__ */ x("option", {
273
+ /* @__PURE__ */ w("option", {
495
274
  value: "pending",
496
275
  children: "New Orders"
497
276
  }),
498
- /* @__PURE__ */ x("option", {
277
+ /* @__PURE__ */ w("option", {
499
278
  value: "confirmed",
500
279
  children: "Confirmed"
501
280
  }),
502
- /* @__PURE__ */ x("option", {
281
+ /* @__PURE__ */ w("option", {
503
282
  value: "preparing",
504
283
  children: "Preparing"
505
284
  }),
506
- /* @__PURE__ */ x("option", {
285
+ /* @__PURE__ */ w("option", {
507
286
  value: "ready",
508
287
  children: "Ready"
509
288
  }),
510
- /* @__PURE__ */ x("option", {
289
+ /* @__PURE__ */ w("option", {
511
290
  value: "delivered",
512
291
  children: "Completed"
513
292
  }),
514
- /* @__PURE__ */ x("option", {
293
+ /* @__PURE__ */ w("option", {
515
294
  value: "cancelled",
516
295
  children: "Cancelled"
517
296
  })
518
297
  ]
519
298
  }),
520
- /* @__PURE__ */ S("select", {
521
- value: j.fulfillmentType,
522
- onChange: (e) => M((t) => ({
299
+ /* @__PURE__ */ T("select", {
300
+ value: z.fulfillmentType,
301
+ onChange: (e) => B((t) => ({
523
302
  ...t,
524
303
  fulfillmentType: e.target.value
525
304
  })),
526
305
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
527
306
  children: [
528
- /* @__PURE__ */ x("option", {
307
+ /* @__PURE__ */ w("option", {
529
308
  value: "",
530
309
  children: "All Types"
531
310
  }),
532
- /* @__PURE__ */ x("option", {
311
+ /* @__PURE__ */ w("option", {
533
312
  value: "pickup",
534
313
  children: "Pickup"
535
314
  }),
536
- /* @__PURE__ */ x("option", {
315
+ /* @__PURE__ */ w("option", {
537
316
  value: "delivery",
538
317
  children: "Delivery"
539
318
  }),
540
- /* @__PURE__ */ x("option", {
319
+ /* @__PURE__ */ w("option", {
541
320
  value: "cart_dispatch",
542
321
  children: "Cart Dispatch"
543
322
  })
544
323
  ]
545
324
  }),
546
- /* @__PURE__ */ S("select", {
547
- value: j.dateRange,
548
- onChange: (e) => M((t) => ({
325
+ /* @__PURE__ */ T("select", {
326
+ value: z.dateRange,
327
+ onChange: (e) => B((t) => ({
549
328
  ...t,
550
329
  dateRange: e.target.value
551
330
  })),
552
331
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
553
332
  children: [
554
- /* @__PURE__ */ x("option", {
333
+ /* @__PURE__ */ w("option", {
555
334
  value: "today",
556
335
  children: "Today"
557
336
  }),
558
- /* @__PURE__ */ x("option", {
337
+ /* @__PURE__ */ w("option", {
559
338
  value: "7days",
560
339
  children: "Last 7 Days"
561
340
  }),
562
- /* @__PURE__ */ x("option", {
341
+ /* @__PURE__ */ w("option", {
563
342
  value: "30days",
564
343
  children: "Last 30 Days"
565
344
  }),
566
- /* @__PURE__ */ x("option", {
345
+ /* @__PURE__ */ w("option", {
567
346
  value: "all",
568
347
  children: "All Time"
569
348
  })
570
349
  ]
571
350
  }),
572
- /* @__PURE__ */ S("select", {
573
- value: j.sortBy,
574
- onChange: (e) => M((t) => ({
351
+ /* @__PURE__ */ T("select", {
352
+ value: z.sortBy,
353
+ onChange: (e) => B((t) => ({
575
354
  ...t,
576
355
  sortBy: e.target.value
577
356
  })),
578
357
  className: "rounded-md border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary",
579
358
  children: [
580
- /* @__PURE__ */ x("option", {
359
+ /* @__PURE__ */ w("option", {
581
360
  value: "recent",
582
361
  children: "Most Recent"
583
362
  }),
584
- /* @__PURE__ */ x("option", {
363
+ /* @__PURE__ */ w("option", {
585
364
  value: "oldest",
586
365
  children: "Oldest First"
587
366
  }),
588
- /* @__PURE__ */ x("option", {
367
+ /* @__PURE__ */ w("option", {
589
368
  value: "amount_high",
590
369
  children: "Amount: High to Low"
591
370
  }),
592
- /* @__PURE__ */ x("option", {
371
+ /* @__PURE__ */ w("option", {
593
372
  value: "amount_low",
594
373
  children: "Amount: Low to High"
595
374
  })
@@ -598,70 +377,73 @@ var T = [
598
377
  ]
599
378
  })
600
379
  }),
601
- V.length === 0 ? /* @__PURE__ */ x(r, {
602
- illustration: j.searchQuery || j.status ? "empty-search" : "empty-data",
380
+ F ? /* @__PURE__ */ w("div", {
381
+ className: "flex items-center justify-center py-16",
382
+ children: /* @__PURE__ */ w("div", { className: "h-10 w-10 animate-spin rounded-full border-b-2 border-foreground" })
383
+ }) : Y.length === 0 ? /* @__PURE__ */ w(r, {
384
+ illustration: z.searchQuery || z.status ? "empty-search" : "empty-data",
603
385
  title: "No orders found",
604
- description: j.searchQuery || j.status ? "No orders match your current filters. Try adjusting the status, type or date range." : "New orders from customers will appear here in real time. Make sure your cart is open and accepting orders."
605
- }) : /* @__PURE__ */ x("div", {
386
+ description: z.searchQuery || z.status ? "No orders match your current filters. Try adjusting the status, type or date range." : "New orders from customers will appear here in real time. Make sure your cart is open and accepting orders."
387
+ }) : /* @__PURE__ */ w("div", {
606
388
  className: "space-y-4",
607
- children: V.map((e) => {
608
- let n = E[e.status] || {
389
+ children: Y.map((e) => {
390
+ let n = O[e.status] || {
609
391
  color: "bg-bg-sunken text-text-secondary",
610
392
  label: e.status
611
- }, r = D[e.fulfillmentType || "delivery"] || D.delivery, a = r.icon;
612
- return /* @__PURE__ */ x("div", {
613
- className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", A(e)),
614
- children: /* @__PURE__ */ S("div", {
393
+ }, r = k[e.fulfillmentType || "delivery"] || k.delivery, i = r.icon;
394
+ return /* @__PURE__ */ w("div", {
395
+ className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", M(e)),
396
+ children: /* @__PURE__ */ T("div", {
615
397
  className: "p-4 sm:p-5",
616
398
  children: [
617
- /* @__PURE__ */ S("div", {
399
+ /* @__PURE__ */ T("div", {
618
400
  className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
619
- children: [/* @__PURE__ */ S("div", {
401
+ children: [/* @__PURE__ */ T("div", {
620
402
  className: "min-w-0 flex-1",
621
- children: [/* @__PURE__ */ S("div", {
403
+ children: [/* @__PURE__ */ T("div", {
622
404
  className: "flex flex-wrap items-center gap-2 mb-1",
623
405
  children: [
624
- /* @__PURE__ */ S("h3", {
406
+ /* @__PURE__ */ T("h3", {
625
407
  className: "text-sm sm:text-base font-semibold text-text-primary",
626
408
  children: ["Order #", e.id]
627
409
  }),
628
- /* @__PURE__ */ x("span", {
410
+ /* @__PURE__ */ w("span", {
629
411
  className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
630
412
  children: n.label
631
413
  }),
632
- /* @__PURE__ */ S("span", {
414
+ /* @__PURE__ */ T("span", {
633
415
  className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", r.color),
634
- children: [/* @__PURE__ */ x(a, { className: "h-3 w-3" }), r.label]
416
+ children: [/* @__PURE__ */ w(i, { className: "h-3 w-3" }), r.label]
635
417
  })
636
418
  ]
637
- }), /* @__PURE__ */ S("p", {
419
+ }), /* @__PURE__ */ T("p", {
638
420
  className: "text-xs text-text-secondary",
639
421
  children: [
640
422
  e.customerName || "Customer",
641
423
  " | ",
642
- O(e.orderDate)
424
+ A(e.orderDate)
643
425
  ]
644
426
  })]
645
- }), /* @__PURE__ */ S("div", {
427
+ }), /* @__PURE__ */ T("div", {
646
428
  className: "flex items-center gap-3",
647
- children: [/* @__PURE__ */ x("p", {
429
+ children: [/* @__PURE__ */ w("p", {
648
430
  className: "text-lg font-bold text-text-primary",
649
- children: i(e.total, { minimumFractionDigits: 0 })
650
- }), /* @__PURE__ */ x("button", {
431
+ children: s(e.total, { minimumFractionDigits: 0 })
432
+ }), /* @__PURE__ */ w("button", {
651
433
  type: "button",
652
434
  onClick: () => {
653
- P(e), I(!0);
435
+ H(e), W(!0);
654
436
  },
655
437
  className: "rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
656
438
  children: "View Details"
657
439
  })]
658
440
  })]
659
441
  }),
660
- /* @__PURE__ */ x("div", {
442
+ /* @__PURE__ */ w("div", {
661
443
  className: "border-t border-border-subtle pt-3 mb-3",
662
- children: /* @__PURE__ */ x("div", {
444
+ children: /* @__PURE__ */ w("div", {
663
445
  className: "flex flex-wrap gap-2",
664
- children: e.items.map((e, t) => /* @__PURE__ */ S("span", {
446
+ children: e.items.map((e, t) => /* @__PURE__ */ T("span", {
665
447
  className: "inline-flex items-center rounded bg-bg-sunken px-2 py-1 text-xs text-text-primary",
666
448
  children: [
667
449
  e.quantity,
@@ -671,56 +453,56 @@ var T = [
671
453
  }, t))
672
454
  })
673
455
  }),
674
- /* @__PURE__ */ S("div", {
456
+ /* @__PURE__ */ T("div", {
675
457
  className: "flex flex-wrap gap-2",
676
458
  children: [
677
- e.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("button", {
459
+ e.status === "pending" && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("button", {
678
460
  type: "button",
679
- onClick: () => H(e.id, "accept"),
461
+ onClick: () => X(e.id, "accept"),
680
462
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
681
- children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Accept Order"]
682
- }), /* @__PURE__ */ S("button", {
463
+ children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5" }), "Accept Order"]
464
+ }), /* @__PURE__ */ T("button", {
683
465
  type: "button",
684
- onClick: () => H(e.id, "reject"),
466
+ onClick: () => X(e.id, "reject"),
685
467
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg-subtle px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
686
- children: [/* @__PURE__ */ x(y, { className: "h-3.5 w-3.5" }), "Reject"]
468
+ children: [/* @__PURE__ */ w(S, { className: "h-3.5 w-3.5" }), "Reject"]
687
469
  })] }),
688
- e.status === "confirmed" && /* @__PURE__ */ S("button", {
470
+ e.status === "confirmed" && /* @__PURE__ */ T("button", {
689
471
  type: "button",
690
- onClick: () => H(e.id, "ready"),
472
+ onClick: () => X(e.id, "ready"),
691
473
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-warning-bg-subtle px-3 py-2 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg-subtle transition-colors",
692
- children: [/* @__PURE__ */ x(u, { className: "h-3.5 w-3.5" }), "Start Preparing"]
474
+ children: [/* @__PURE__ */ w(p, { className: "h-3.5 w-3.5" }), "Start Preparing"]
693
475
  }),
694
- e.status === "preparing" && /* @__PURE__ */ S("button", {
476
+ e.status === "preparing" && /* @__PURE__ */ T("button", {
695
477
  type: "button",
696
- onClick: () => H(e.id, "ready"),
478
+ onClick: () => X(e.id, "ready"),
697
479
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
698
- children: [/* @__PURE__ */ x(f, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
480
+ children: [/* @__PURE__ */ w(h, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
699
481
  }),
700
- e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ S("button", {
482
+ e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ T("button", {
701
483
  type: "button",
702
- onClick: () => H(e.id, "complete"),
484
+ onClick: () => X(e.id, "complete"),
703
485
  className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
704
- children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Complete Order"]
486
+ children: [/* @__PURE__ */ w(f, { className: "h-3.5 w-3.5" }), "Complete Order"]
705
487
  }),
706
488
  [
707
489
  "confirmed",
708
490
  "preparing",
709
491
  "ready"
710
- ].includes(e.status) && /* @__PURE__ */ S("button", {
492
+ ].includes(e.status) && /* @__PURE__ */ T("button", {
711
493
  type: "button",
712
494
  onClick: () => alert("Contact feature coming soon!"),
713
495
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
714
- children: [/* @__PURE__ */ x(p, { className: "h-3.5 w-3.5" }), "Contact Customer"]
496
+ children: [/* @__PURE__ */ w(g, { className: "h-3.5 w-3.5" }), "Contact Customer"]
715
497
  })
716
498
  ]
717
499
  }),
718
- e.specialInstructions && /* @__PURE__ */ S("div", {
500
+ e.specialInstructions && /* @__PURE__ */ T("div", {
719
501
  className: "mt-3 rounded-md border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
720
- children: [/* @__PURE__ */ x("p", {
502
+ children: [/* @__PURE__ */ w("p", {
721
503
  className: "text-xs font-medium text-status-warning-text",
722
504
  children: "Special Instructions:"
723
- }), /* @__PURE__ */ x("p", {
505
+ }), /* @__PURE__ */ w("p", {
724
506
  className: "text-xs text-status-warning-text mt-0.5",
725
507
  children: e.specialInstructions
726
508
  })]
@@ -732,140 +514,140 @@ var T = [
732
514
  })
733
515
  ]
734
516
  }),
735
- F && N && /* @__PURE__ */ x("div", {
517
+ U && V && /* @__PURE__ */ w("div", {
736
518
  className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
737
- children: /* @__PURE__ */ x("div", {
519
+ children: /* @__PURE__ */ w("div", {
738
520
  className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-subtle bg-bg-surface shadow-xl",
739
- children: /* @__PURE__ */ S("div", {
521
+ children: /* @__PURE__ */ T("div", {
740
522
  className: "p-6",
741
- children: [/* @__PURE__ */ S("div", {
523
+ children: [/* @__PURE__ */ T("div", {
742
524
  className: "flex items-center justify-between mb-4",
743
- children: [/* @__PURE__ */ x("h3", {
525
+ children: [/* @__PURE__ */ w("h3", {
744
526
  className: "text-lg font-semibold text-text-primary",
745
527
  children: "Order Details"
746
- }), /* @__PURE__ */ x("button", {
528
+ }), /* @__PURE__ */ w("button", {
747
529
  type: "button",
748
- onClick: () => I(!1),
530
+ onClick: () => W(!1),
749
531
  className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
750
- children: /* @__PURE__ */ x(v, { className: "h-5 w-5" })
532
+ children: /* @__PURE__ */ w(x, { className: "h-5 w-5" })
751
533
  })]
752
- }), /* @__PURE__ */ S("div", {
534
+ }), /* @__PURE__ */ T("div", {
753
535
  className: "space-y-4",
754
536
  children: [
755
- /* @__PURE__ */ S("div", {
537
+ /* @__PURE__ */ T("div", {
756
538
  className: "grid grid-cols-2 gap-4",
757
539
  children: [
758
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
540
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
759
541
  className: "text-xs text-text-secondary",
760
542
  children: "Order ID"
761
- }), /* @__PURE__ */ S("p", {
543
+ }), /* @__PURE__ */ T("p", {
762
544
  className: "text-sm font-medium text-text-primary",
763
- children: ["#", N.id]
545
+ children: ["#", V.id]
764
546
  })] }),
765
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
547
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
766
548
  className: "text-xs text-text-secondary",
767
549
  children: "Status"
768
- }), /* @__PURE__ */ x("span", {
769
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (E[N.status] || E.pending).color),
770
- children: (E[N.status] || E.pending).label
550
+ }), /* @__PURE__ */ w("span", {
551
+ className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (O[V.status] || O.pending).color),
552
+ children: (O[V.status] || O.pending).label
771
553
  })] }),
772
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
554
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
773
555
  className: "text-xs text-text-secondary",
774
556
  children: "Customer"
775
- }), /* @__PURE__ */ x("p", {
557
+ }), /* @__PURE__ */ w("p", {
776
558
  className: "text-sm font-medium text-text-primary",
777
- children: N.customerName || "N/A"
559
+ children: V.customerName || "N/A"
778
560
  })] }),
779
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
561
+ /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
780
562
  className: "text-xs text-text-secondary",
781
563
  children: "Order Time"
782
- }), /* @__PURE__ */ x("p", {
564
+ }), /* @__PURE__ */ w("p", {
783
565
  className: "text-sm font-medium text-text-primary",
784
- children: k(N.orderDate)
566
+ children: j(V.orderDate)
785
567
  })] })
786
568
  ]
787
569
  }),
788
- /* @__PURE__ */ S("div", {
570
+ /* @__PURE__ */ T("div", {
789
571
  className: "border-t border-border-subtle pt-4",
790
- children: [/* @__PURE__ */ x("h4", {
572
+ children: [/* @__PURE__ */ w("h4", {
791
573
  className: "text-sm font-medium text-text-primary mb-3",
792
574
  children: "Order Items"
793
- }), /* @__PURE__ */ x("div", {
575
+ }), /* @__PURE__ */ w("div", {
794
576
  className: "space-y-2",
795
- children: N.items.map((e, t) => /* @__PURE__ */ S("div", {
577
+ children: V.items.map((e, t) => /* @__PURE__ */ T("div", {
796
578
  className: "flex justify-between items-start",
797
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
579
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
798
580
  className: "text-sm font-medium text-text-primary",
799
581
  children: e.name
800
- }), /* @__PURE__ */ S("p", {
582
+ }), /* @__PURE__ */ T("p", {
801
583
  className: "text-xs text-text-secondary",
802
584
  children: [
803
- i(e.price, { minimumFractionDigits: 0 }),
585
+ s(e.price, { minimumFractionDigits: 0 }),
804
586
  " x",
805
587
  " ",
806
588
  e.quantity
807
589
  ]
808
- })] }), /* @__PURE__ */ x("p", {
590
+ })] }), /* @__PURE__ */ w("p", {
809
591
  className: "text-sm font-medium text-text-primary",
810
- children: i(e.price * e.quantity, { minimumFractionDigits: 0 })
592
+ children: s(e.price * e.quantity, { minimumFractionDigits: 0 })
811
593
  })]
812
594
  }, t))
813
595
  })]
814
596
  }),
815
- /* @__PURE__ */ S("div", {
597
+ /* @__PURE__ */ T("div", {
816
598
  className: "border-t border-border-subtle pt-4 space-y-2",
817
599
  children: [
818
- /* @__PURE__ */ S("div", {
600
+ /* @__PURE__ */ T("div", {
819
601
  className: "flex justify-between text-sm text-text-secondary",
820
- children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: i(N.subtotal, { minimumFractionDigits: 0 }) })]
602
+ children: [/* @__PURE__ */ w("span", { children: "Subtotal" }), /* @__PURE__ */ w("span", { children: s(V.subtotal, { minimumFractionDigits: 0 }) })]
821
603
  }),
822
- /* @__PURE__ */ S("div", {
604
+ /* @__PURE__ */ T("div", {
823
605
  className: "flex justify-between text-sm text-text-secondary",
824
- children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: i(N.deliveryFee, { minimumFractionDigits: 0 }) })]
606
+ children: [/* @__PURE__ */ w("span", { children: "Delivery Fee" }), /* @__PURE__ */ w("span", { children: s(V.deliveryFee, { minimumFractionDigits: 0 }) })]
825
607
  }),
826
- /* @__PURE__ */ S("div", {
608
+ /* @__PURE__ */ T("div", {
827
609
  className: "flex justify-between text-sm text-text-secondary",
828
- children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: i(N.taxes, { minimumFractionDigits: 0 }) })]
610
+ children: [/* @__PURE__ */ w("span", { children: "Tax" }), /* @__PURE__ */ w("span", { children: s(V.taxes, { minimumFractionDigits: 0 }) })]
829
611
  }),
830
- /* @__PURE__ */ S("div", {
612
+ /* @__PURE__ */ T("div", {
831
613
  className: "flex justify-between font-semibold text-text-primary pt-2 border-t border-border-subtle",
832
- children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: i(N.total, { minimumFractionDigits: 0 }) })]
614
+ children: [/* @__PURE__ */ w("span", { children: "Total" }), /* @__PURE__ */ w("span", { children: s(V.total, { minimumFractionDigits: 0 }) })]
833
615
  })
834
616
  ]
835
617
  }),
836
- N.fulfillmentType === "delivery" && N.deliveryAddress && /* @__PURE__ */ S("div", {
618
+ V.fulfillmentType === "delivery" && V.deliveryAddress && /* @__PURE__ */ T("div", {
837
619
  className: "border-t border-border-subtle pt-4",
838
- children: [/* @__PURE__ */ S("h4", {
620
+ children: [/* @__PURE__ */ T("h4", {
839
621
  className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-1.5",
840
- children: [/* @__PURE__ */ x(d, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
841
- }), /* @__PURE__ */ S("p", {
622
+ children: [/* @__PURE__ */ w(m, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
623
+ }), /* @__PURE__ */ T("p", {
842
624
  className: "text-sm text-text-secondary",
843
625
  children: [
844
- N.deliveryAddress.street,
626
+ V.deliveryAddress.street,
845
627
  ", ",
846
- N.deliveryAddress.area,
847
- /* @__PURE__ */ x("br", {}),
848
- N.deliveryAddress.city,
628
+ V.deliveryAddress.area,
629
+ /* @__PURE__ */ w("br", {}),
630
+ V.deliveryAddress.city,
849
631
  " - ",
850
- N.deliveryAddress.pincode
632
+ V.deliveryAddress.pincode
851
633
  ]
852
634
  })]
853
635
  }),
854
- /* @__PURE__ */ S("div", {
636
+ /* @__PURE__ */ T("div", {
855
637
  className: "flex gap-3 mt-6",
856
- children: [/* @__PURE__ */ x("button", {
638
+ children: [/* @__PURE__ */ w("button", {
857
639
  type: "button",
858
- onClick: () => I(!1),
640
+ onClick: () => W(!1),
859
641
  className: "flex-1 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
860
642
  children: "Close"
861
- }), N.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
643
+ }), V.status === "pending" && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("button", {
862
644
  type: "button",
863
- onClick: () => H(N.id, "accept"),
645
+ onClick: () => X(V.id, "accept"),
864
646
  className: "flex-1 rounded-md bg-status-success-bg-subtle px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
865
647
  children: "Accept Order"
866
- }), /* @__PURE__ */ x("button", {
648
+ }), /* @__PURE__ */ w("button", {
867
649
  type: "button",
868
- onClick: () => H(N.id, "reject"),
650
+ onClick: () => X(V.id, "reject"),
869
651
  className: "flex-1 rounded-md bg-status-error-bg-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
870
652
  children: "Reject Order"
871
653
  })] })]
@@ -879,6 +661,6 @@ var T = [
879
661
  });
880
662
  };
881
663
  //#endregion
882
- export { j as OrderManagementPage };
664
+ export { N as OrderManagementPage };
883
665
 
884
666
  //# sourceMappingURL=OrderManagementPage.js.map