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