@burdenoff/microfe-subscriberbot 2026.626.2 → 2026.629.1

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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,879 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
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";
11
- //#region src/subscriberbot/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 = {
246
- pending: {
247
- color: "bg-status-warning-bg/20 text-status-warning-text",
248
- label: "New Order"
249
- },
250
- confirmed: {
251
- color: "bg-status-info-bg/20 text-status-info-text",
252
- label: "Confirmed"
253
- },
254
- preparing: {
255
- color: "bg-status-warning-bg/20 text-status-warning-text",
256
- label: "Preparing"
257
- },
258
- ready: {
259
- color: "bg-status-success-bg/20 text-status-success-text",
260
- label: "Ready"
261
- },
262
- out_for_delivery: {
263
- color: "bg-status-info-bg/20 text-status-info-text",
264
- label: "Out for Delivery"
265
- },
266
- delivered: {
267
- color: "bg-status-success-bg/20 text-status-success-text",
268
- label: "Completed"
269
- },
270
- cancelled: {
271
- color: "bg-status-error-bg/20 text-status-error-text",
272
- label: "Cancelled"
273
- }
274
- }, D = {
275
- delivery: {
276
- icon: _,
277
- label: "Delivery",
278
- color: "bg-accent-purple-subtle text-accent-purple"
279
- },
280
- pickup: {
281
- icon: g,
282
- label: "Pickup",
283
- color: "bg-status-info-bg/20 text-status-info-text"
284
- },
285
- cart_dispatch: {
286
- icon: d,
287
- label: "Cart Dispatch",
288
- color: "bg-bg-sunken text-text-secondary"
289
- }
290
- }, O = (e) => {
291
- let t = new Date(e), n = Math.floor(((/* @__PURE__ */ new Date()).getTime() - t.getTime()) / (1e3 * 60));
292
- return n < 1 ? "Just now" : n < 60 ? `${n} min ago` : n < 1440 ? `${Math.floor(n / 60)} hours ago` : t.toLocaleDateString("en-IN", {
293
- day: "2-digit",
294
- month: "short"
295
- });
296
- }, k = (e) => new Date(e).toLocaleTimeString("en-IN", {
297
- hour: "numeric",
298
- minute: "2-digit",
299
- hour12: !0
300
- }), A = (e) => {
301
- let t = ((/* @__PURE__ */ new Date()).getTime() - new Date(e.orderDate).getTime()) / (1e3 * 60);
302
- return e.status === "pending" && t > 10 ? "border-status-error-border/50 bg-status-error-bg/5" : e.status === "preparing" && t > 30 ? "border-status-warning-border/50 bg-status-warning-bg/5" : "border-border-seam";
303
- }, j = () => {
304
- let { navigateTo: a } = e(), [_, j] = s(T), [M, N] = s({
305
- status: "",
306
- dateRange: "all",
307
- searchQuery: "",
308
- sortBy: "recent",
309
- fulfillmentType: ""
310
- }), [P, F] = s(null), [I, L] = s(!1), [R, z] = s(null), B = (e, t) => {
311
- z({
312
- text: e,
313
- type: t
314
- }), setTimeout(() => z(null), 3e3);
315
- }, V = o(() => {
316
- let e = _.length, t = _.filter((e) => e.status === "pending").length, n = _.filter((e) => [
317
- "confirmed",
318
- "preparing",
319
- "ready",
320
- "out_for_delivery"
321
- ].includes(e.status)).length, r = _.filter((e) => e.status === "delivered").length, i = _.filter((e) => e.status === "delivered").reduce((e, t) => e + t.total, 0);
322
- return {
323
- total: e,
324
- pending: t,
325
- active: n,
326
- completed: r,
327
- totalRevenue: i,
328
- avgOrder: r > 0 ? Math.round(i / r) : 0
329
- };
330
- }, [_]), H = o(() => {
331
- let e = [..._];
332
- if (M.status && (e = e.filter((e) => e.status === M.status)), M.fulfillmentType && (e = e.filter((e) => e.fulfillmentType === M.fulfillmentType)), M.searchQuery) {
333
- let t = M.searchQuery.toLowerCase();
334
- e = e.filter((e) => e.id.toLowerCase().includes(t) || (e.customerName || "").toLowerCase().includes(t) || e.items.some((e) => e.name.toLowerCase().includes(t)));
335
- }
336
- if (M.dateRange !== "all") {
337
- let t = /* @__PURE__ */ new Date(), n = /* @__PURE__ */ new Date();
338
- M.dateRange === "today" ? n.setHours(0, 0, 0, 0) : M.dateRange === "7days" ? n.setDate(t.getDate() - 7) : M.dateRange === "30days" && n.setDate(t.getDate() - 30), e = e.filter((e) => new Date(e.orderDate) >= n);
339
- }
340
- switch (M.sortBy) {
341
- case "recent":
342
- e.sort((e, t) => new Date(t.orderDate).getTime() - new Date(e.orderDate).getTime());
343
- break;
344
- case "oldest":
345
- e.sort((e, t) => new Date(e.orderDate).getTime() - new Date(t.orderDate).getTime());
346
- break;
347
- case "amount_high":
348
- e.sort((e, t) => t.total - e.total);
349
- break;
350
- case "amount_low":
351
- e.sort((e, t) => e.total - t.total);
352
- break;
353
- }
354
- return e;
355
- }, [_, M]), U = (e, t) => {
356
- let n = {
357
- accept: "confirmed",
358
- reject: "cancelled",
359
- ready: "ready",
360
- complete: "delivered"
361
- };
362
- j((r) => r.map((r) => r.id === e ? {
363
- ...r,
364
- status: n[t]
365
- } : r)), B({
366
- accept: "Order accepted",
367
- reject: "Order rejected",
368
- ready: "Order marked as ready",
369
- complete: "Order completed"
370
- }[t], "success"), I && P?.id === e && L(!1);
371
- };
372
- return /* @__PURE__ */ S(n, {
373
- title: "Order Management",
374
- description: "Manage incoming and active orders",
375
- titleGradient: !0,
376
- actions: /* @__PURE__ */ S("button", {
377
- type: "button",
378
- onClick: () => B("Orders refreshed", "success"),
379
- className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
380
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4" }), "Refresh"]
381
- }),
382
- children: [/* @__PURE__ */ S("div", {
383
- className: "space-y-4",
384
- children: [
385
- /* @__PURE__ */ x(w, {
386
- icon: /* @__PURE__ */ x(g, { className: "h-4 w-4" }),
387
- children: "The live queue for every order hitting your cart. Triage new orders the moment they arrive — accept, move them through preparing and ready, and mark them delivered so customers get accurate status updates. Filter by status to focus on what's pending right now, and watch revenue add up through the day."
388
- }),
389
- R && /* @__PURE__ */ S("div", {
390
- className: t("flex items-center gap-2 rounded-lg border p-3", R.type === "success" ? "border-status-success-border/30 bg-status-success-bg/10" : "border-status-error-border/30 bg-status-error-bg/10"),
391
- children: [R.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", R.type === "success" ? "text-status-success-text" : "text-status-error-text"),
393
- children: R.text
394
- })]
395
- }),
396
- /* @__PURE__ */ S(C, {
397
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
398
- children: [
399
- /* @__PURE__ */ S("div", {
400
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
401
- children: [/* @__PURE__ */ x("p", {
402
- className: "text-xs text-text-secondary",
403
- children: "Total Orders"
404
- }), /* @__PURE__ */ x("p", {
405
- className: "text-2xl font-bold text-text-primary",
406
- children: V.total
407
- })]
408
- }),
409
- /* @__PURE__ */ S("div", {
410
- className: "rounded-lg border border-status-warning-border/30 bg-status-warning-bg/5 p-4 shadow-sm",
411
- children: [/* @__PURE__ */ x("p", {
412
- className: "text-xs text-status-warning-text",
413
- children: "Pending"
414
- }), /* @__PURE__ */ x("p", {
415
- className: "text-2xl font-bold text-status-warning-text",
416
- children: V.pending
417
- })]
418
- }),
419
- /* @__PURE__ */ S("div", {
420
- className: "rounded-lg border border-status-info-border/30 bg-status-info-bg/5 p-4 shadow-sm",
421
- children: [/* @__PURE__ */ x("p", {
422
- className: "text-xs text-status-info-text",
423
- children: "Active"
424
- }), /* @__PURE__ */ x("p", {
425
- className: "text-2xl font-bold text-status-info-text",
426
- children: V.active
427
- })]
428
- }),
429
- /* @__PURE__ */ S("div", {
430
- className: "rounded-lg border border-status-success-border/30 bg-status-success-bg/5 p-4 shadow-sm",
431
- children: [/* @__PURE__ */ x("p", {
432
- className: "text-xs text-status-success-text",
433
- children: "Completed"
434
- }), /* @__PURE__ */ x("p", {
435
- className: "text-2xl font-bold text-status-success-text",
436
- children: V.completed
437
- })]
438
- }),
439
- /* @__PURE__ */ S("div", {
440
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
441
- children: [/* @__PURE__ */ x("p", {
442
- className: "text-xs text-text-secondary",
443
- children: "Total Revenue"
444
- }), /* @__PURE__ */ x("p", {
445
- className: "text-2xl font-bold text-text-primary",
446
- children: i(V.totalRevenue, { minimumFractionDigits: 0 })
447
- })]
448
- }),
449
- /* @__PURE__ */ S("div", {
450
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
451
- children: [/* @__PURE__ */ x("p", {
452
- className: "text-xs text-text-secondary",
453
- children: "Avg Order"
454
- }), /* @__PURE__ */ x("p", {
455
- className: "text-2xl font-bold text-text-primary",
456
- children: i(V.avgOrder, { minimumFractionDigits: 0 })
457
- })]
458
- })
459
- ]
460
- }),
461
- /* @__PURE__ */ x("div", {
462
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
463
- children: /* @__PURE__ */ S("div", {
464
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
465
- children: [
466
- /* @__PURE__ */ S("div", {
467
- className: "relative sm:col-span-2 lg:col-span-1",
468
- 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", {
469
- type: "text",
470
- placeholder: "Search orders...",
471
- value: M.searchQuery,
472
- onChange: (e) => N((t) => ({
473
- ...t,
474
- searchQuery: e.target.value
475
- })),
476
- className: "w-full rounded-md border border-border-seam 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)]"
477
- })]
478
- }),
479
- /* @__PURE__ */ S("select", {
480
- value: M.status,
481
- onChange: (e) => N((t) => ({
482
- ...t,
483
- status: e.target.value
484
- })),
485
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
486
- children: [
487
- /* @__PURE__ */ x("option", {
488
- value: "",
489
- children: "All Orders"
490
- }),
491
- /* @__PURE__ */ x("option", {
492
- value: "pending",
493
- children: "New Orders"
494
- }),
495
- /* @__PURE__ */ x("option", {
496
- value: "confirmed",
497
- children: "Confirmed"
498
- }),
499
- /* @__PURE__ */ x("option", {
500
- value: "preparing",
501
- children: "Preparing"
502
- }),
503
- /* @__PURE__ */ x("option", {
504
- value: "ready",
505
- children: "Ready"
506
- }),
507
- /* @__PURE__ */ x("option", {
508
- value: "delivered",
509
- children: "Completed"
510
- }),
511
- /* @__PURE__ */ x("option", {
512
- value: "cancelled",
513
- children: "Cancelled"
514
- })
515
- ]
516
- }),
517
- /* @__PURE__ */ S("select", {
518
- value: M.fulfillmentType,
519
- onChange: (e) => N((t) => ({
520
- ...t,
521
- fulfillmentType: e.target.value
522
- })),
523
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
524
- children: [
525
- /* @__PURE__ */ x("option", {
526
- value: "",
527
- children: "All Types"
528
- }),
529
- /* @__PURE__ */ x("option", {
530
- value: "pickup",
531
- children: "Pickup"
532
- }),
533
- /* @__PURE__ */ x("option", {
534
- value: "delivery",
535
- children: "Delivery"
536
- }),
537
- /* @__PURE__ */ x("option", {
538
- value: "cart_dispatch",
539
- children: "Cart Dispatch"
540
- })
541
- ]
542
- }),
543
- /* @__PURE__ */ S("select", {
544
- value: M.dateRange,
545
- onChange: (e) => N((t) => ({
546
- ...t,
547
- dateRange: e.target.value
548
- })),
549
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
550
- children: [
551
- /* @__PURE__ */ x("option", {
552
- value: "today",
553
- children: "Today"
554
- }),
555
- /* @__PURE__ */ x("option", {
556
- value: "7days",
557
- children: "Last 7 Days"
558
- }),
559
- /* @__PURE__ */ x("option", {
560
- value: "30days",
561
- children: "Last 30 Days"
562
- }),
563
- /* @__PURE__ */ x("option", {
564
- value: "all",
565
- children: "All Time"
566
- })
567
- ]
568
- }),
569
- /* @__PURE__ */ S("select", {
570
- value: M.sortBy,
571
- onChange: (e) => N((t) => ({
572
- ...t,
573
- sortBy: e.target.value
574
- })),
575
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
576
- children: [
577
- /* @__PURE__ */ x("option", {
578
- value: "recent",
579
- children: "Most Recent"
580
- }),
581
- /* @__PURE__ */ x("option", {
582
- value: "oldest",
583
- children: "Oldest First"
584
- }),
585
- /* @__PURE__ */ x("option", {
586
- value: "amount_high",
587
- children: "Amount: High to Low"
588
- }),
589
- /* @__PURE__ */ x("option", {
590
- value: "amount_low",
591
- children: "Amount: Low to High"
592
- })
593
- ]
594
- })
595
- ]
596
- })
597
- }),
598
- H.length === 0 ? /* @__PURE__ */ x(r, {
599
- illustration: M.searchQuery || M.status ? "empty-search" : "empty-sessions",
600
- title: "No orders found",
601
- description: M.searchQuery || M.status ? "Try adjusting your filters to see more orders." : "No orders to display yet. New orders will appear here the moment customers place them."
602
- }) : /* @__PURE__ */ x("div", {
603
- className: "space-y-4",
604
- children: H.map((e) => {
605
- let n = E[e.status] || {
606
- color: "bg-bg-sunken text-text-secondary",
607
- label: e.status
608
- }, r = D[e.fulfillmentType || "delivery"] || D.delivery, a = r.icon;
609
- return /* @__PURE__ */ x("div", {
610
- className: t("rounded-lg border bg-bg-surface shadow-sm transition-shadow hover:shadow-md", A(e)),
611
- children: /* @__PURE__ */ S("div", {
612
- className: "p-4 sm:p-5",
613
- children: [
614
- /* @__PURE__ */ S("div", {
615
- className: "flex flex-col lg:flex-row lg:items-center lg:justify-between gap-3 mb-3",
616
- children: [/* @__PURE__ */ S("div", {
617
- className: "min-w-0 flex-1",
618
- children: [/* @__PURE__ */ S("div", {
619
- className: "flex flex-wrap items-center gap-2 mb-1",
620
- children: [
621
- /* @__PURE__ */ S("h3", {
622
- className: "text-sm sm:text-base font-semibold text-text-primary",
623
- children: ["Order #", e.id]
624
- }),
625
- /* @__PURE__ */ x("span", {
626
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", n.color),
627
- children: n.label
628
- }),
629
- /* @__PURE__ */ S("span", {
630
- className: t("inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium", r.color),
631
- children: [/* @__PURE__ */ x(a, { className: "h-3 w-3" }), r.label]
632
- })
633
- ]
634
- }), /* @__PURE__ */ S("p", {
635
- className: "text-xs text-text-secondary",
636
- children: [
637
- e.customerName || "Customer",
638
- " | ",
639
- O(e.orderDate)
640
- ]
641
- })]
642
- }), /* @__PURE__ */ S("div", {
643
- className: "flex items-center gap-3",
644
- children: [/* @__PURE__ */ x("p", {
645
- className: "text-lg font-bold text-text-primary",
646
- children: i(e.total, { minimumFractionDigits: 0 })
647
- }), /* @__PURE__ */ x("button", {
648
- type: "button",
649
- onClick: () => {
650
- F(e), L(!0);
651
- },
652
- className: "rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
653
- children: "View Details"
654
- })]
655
- })]
656
- }),
657
- /* @__PURE__ */ x("div", {
658
- className: "border-t border-border-seam pt-3 mb-3",
659
- children: /* @__PURE__ */ x("div", {
660
- className: "flex flex-wrap gap-2",
661
- children: e.items.map((e, t) => /* @__PURE__ */ S("span", {
662
- className: "inline-flex items-center rounded bg-bg-sunken px-2 py-1 text-xs text-text-primary",
663
- children: [
664
- e.quantity,
665
- "x ",
666
- e.name
667
- ]
668
- }, t))
669
- })
670
- }),
671
- /* @__PURE__ */ S("div", {
672
- className: "flex flex-wrap gap-2",
673
- children: [
674
- e.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("button", {
675
- type: "button",
676
- onClick: () => U(e.id, "accept"),
677
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
678
- children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Accept Order"]
679
- }), /* @__PURE__ */ S("button", {
680
- type: "button",
681
- onClick: () => U(e.id, "reject"),
682
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-error-bg/10 px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg/20 transition-colors",
683
- children: [/* @__PURE__ */ x(y, { className: "h-3.5 w-3.5" }), "Reject"]
684
- })] }),
685
- e.status === "confirmed" && /* @__PURE__ */ S("button", {
686
- type: "button",
687
- onClick: () => U(e.id, "ready"),
688
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-warning-bg/10 px-3 py-2 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg/20 transition-colors",
689
- children: [/* @__PURE__ */ x(u, { className: "h-3.5 w-3.5" }), "Start Preparing"]
690
- }),
691
- e.status === "preparing" && /* @__PURE__ */ S("button", {
692
- type: "button",
693
- onClick: () => U(e.id, "ready"),
694
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
695
- children: [/* @__PURE__ */ x(f, { className: "h-3.5 w-3.5" }), "Mark as Ready"]
696
- }),
697
- e.status === "ready" && e.fulfillmentType === "pickup" && /* @__PURE__ */ S("button", {
698
- type: "button",
699
- onClick: () => U(e.id, "complete"),
700
- className: "inline-flex items-center gap-1.5 rounded-md bg-status-success-bg/10 px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
701
- children: [/* @__PURE__ */ x(l, { className: "h-3.5 w-3.5" }), "Complete Order"]
702
- }),
703
- [
704
- "confirmed",
705
- "preparing",
706
- "ready"
707
- ].includes(e.status) && /* @__PURE__ */ S("button", {
708
- type: "button",
709
- onClick: () => alert("Contact feature coming soon!"),
710
- className: "inline-flex items-center gap-1.5 rounded-md border border-border-seam px-3 py-2 text-xs font-medium text-text-primary hover:bg-bg-sunken transition-colors",
711
- children: [/* @__PURE__ */ x(p, { className: "h-3.5 w-3.5" }), "Contact Customer"]
712
- })
713
- ]
714
- }),
715
- e.specialInstructions && /* @__PURE__ */ S("div", {
716
- className: "mt-3 rounded-md border border-status-warning-border/30 bg-status-warning-bg/10 p-3",
717
- children: [/* @__PURE__ */ x("p", {
718
- className: "text-xs font-medium text-status-warning-text",
719
- children: "Special Instructions:"
720
- }), /* @__PURE__ */ x("p", {
721
- className: "text-xs text-status-warning-text mt-0.5",
722
- children: e.specialInstructions
723
- })]
724
- })
725
- ]
726
- })
727
- }, e.id);
728
- })
729
- })
730
- ]
731
- }), I && P && /* @__PURE__ */ x("div", {
732
- className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
733
- children: /* @__PURE__ */ x("div", {
734
- className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-lg border border-border-seam bg-bg-surface shadow-xl",
735
- children: /* @__PURE__ */ S("div", {
736
- className: "p-6",
737
- children: [/* @__PURE__ */ S("div", {
738
- className: "flex items-center justify-between mb-4",
739
- children: [/* @__PURE__ */ x("h3", {
740
- className: "text-lg font-semibold text-text-primary",
741
- children: "Order Details"
742
- }), /* @__PURE__ */ x("button", {
743
- type: "button",
744
- onClick: () => L(!1),
745
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
746
- children: /* @__PURE__ */ x(v, { className: "h-5 w-5" })
747
- })]
748
- }), /* @__PURE__ */ S("div", {
749
- className: "space-y-4",
750
- children: [
751
- /* @__PURE__ */ S("div", {
752
- className: "grid grid-cols-2 gap-4",
753
- children: [
754
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
755
- className: "text-xs text-text-secondary",
756
- children: "Order ID"
757
- }), /* @__PURE__ */ S("p", {
758
- className: "text-sm font-medium text-text-primary",
759
- children: ["#", P.id]
760
- })] }),
761
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
762
- className: "text-xs text-text-secondary",
763
- children: "Status"
764
- }), /* @__PURE__ */ x("span", {
765
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium mt-0.5", (E[P.status] || E.pending).color),
766
- children: (E[P.status] || E.pending).label
767
- })] }),
768
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
769
- className: "text-xs text-text-secondary",
770
- children: "Customer"
771
- }), /* @__PURE__ */ x("p", {
772
- className: "text-sm font-medium text-text-primary",
773
- children: P.customerName || "N/A"
774
- })] }),
775
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
776
- className: "text-xs text-text-secondary",
777
- children: "Order Time"
778
- }), /* @__PURE__ */ x("p", {
779
- className: "text-sm font-medium text-text-primary",
780
- children: k(P.orderDate)
781
- })] })
782
- ]
783
- }),
784
- /* @__PURE__ */ S("div", {
785
- className: "border-t border-border-seam pt-4",
786
- children: [/* @__PURE__ */ x("h4", {
787
- className: "text-sm font-medium text-text-primary mb-3",
788
- children: "Order Items"
789
- }), /* @__PURE__ */ x("div", {
790
- className: "space-y-2",
791
- children: P.items.map((e, t) => /* @__PURE__ */ S("div", {
792
- className: "flex justify-between items-start",
793
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
794
- className: "text-sm font-medium text-text-primary",
795
- children: e.name
796
- }), /* @__PURE__ */ S("p", {
797
- className: "text-xs text-text-secondary",
798
- children: [
799
- i(e.price, { minimumFractionDigits: 0 }),
800
- " x",
801
- " ",
802
- e.quantity
803
- ]
804
- })] }), /* @__PURE__ */ x("p", {
805
- className: "text-sm font-medium text-text-primary",
806
- children: i(e.price * e.quantity, { minimumFractionDigits: 0 })
807
- })]
808
- }, t))
809
- })]
810
- }),
811
- /* @__PURE__ */ S("div", {
812
- className: "border-t border-border-seam pt-4 space-y-2",
813
- children: [
814
- /* @__PURE__ */ S("div", {
815
- className: "flex justify-between text-sm text-text-secondary",
816
- children: [/* @__PURE__ */ x("span", { children: "Subtotal" }), /* @__PURE__ */ x("span", { children: i(P.subtotal, { minimumFractionDigits: 0 }) })]
817
- }),
818
- /* @__PURE__ */ S("div", {
819
- className: "flex justify-between text-sm text-text-secondary",
820
- children: [/* @__PURE__ */ x("span", { children: "Delivery Fee" }), /* @__PURE__ */ x("span", { children: i(P.deliveryFee, { minimumFractionDigits: 0 }) })]
821
- }),
822
- /* @__PURE__ */ S("div", {
823
- className: "flex justify-between text-sm text-text-secondary",
824
- children: [/* @__PURE__ */ x("span", { children: "Tax" }), /* @__PURE__ */ x("span", { children: i(P.taxes, { minimumFractionDigits: 0 }) })]
825
- }),
826
- /* @__PURE__ */ S("div", {
827
- className: "flex justify-between font-semibold text-text-primary pt-2 border-t border-border-seam",
828
- children: [/* @__PURE__ */ x("span", { children: "Total" }), /* @__PURE__ */ x("span", { children: i(P.total, { minimumFractionDigits: 0 }) })]
829
- })
830
- ]
831
- }),
832
- P.fulfillmentType === "delivery" && P.deliveryAddress && /* @__PURE__ */ S("div", {
833
- className: "border-t border-border-seam pt-4",
834
- children: [/* @__PURE__ */ S("h4", {
835
- className: "text-sm font-medium text-text-primary mb-2 flex items-center gap-1.5",
836
- children: [/* @__PURE__ */ x(d, { className: "h-4 w-4 text-text-secondary" }), "Delivery Address"]
837
- }), /* @__PURE__ */ S("p", {
838
- className: "text-sm text-text-secondary",
839
- children: [
840
- P.deliveryAddress.street,
841
- ", ",
842
- P.deliveryAddress.area,
843
- /* @__PURE__ */ x("br", {}),
844
- P.deliveryAddress.city,
845
- " - ",
846
- P.deliveryAddress.pincode
847
- ]
848
- })]
849
- }),
850
- /* @__PURE__ */ S("div", {
851
- className: "flex gap-3 mt-6",
852
- children: [/* @__PURE__ */ x("button", {
853
- type: "button",
854
- onClick: () => L(!1),
855
- className: "flex-1 rounded-md border border-border-seam px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken transition-colors",
856
- children: "Close"
857
- }), P.status === "pending" && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("button", {
858
- type: "button",
859
- onClick: () => U(P.id, "accept"),
860
- className: "flex-1 rounded-md bg-status-success-bg/10 px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg/20 transition-colors",
861
- children: "Accept Order"
862
- }), /* @__PURE__ */ x("button", {
863
- type: "button",
864
- onClick: () => U(P.id, "reject"),
865
- className: "flex-1 rounded-md bg-status-error-bg/10 px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg/20 transition-colors",
866
- children: "Reject Order"
867
- })] })]
868
- })
869
- ]
870
- })]
871
- })
872
- })
873
- })]
874
- });
875
- };
876
- //#endregion
877
- export { j as OrderManagementPage };
878
-
879
- //# sourceMappingURL=OrderManagementPage.js.map