@burdenoff/microfe-labsofscience 2026.626.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 (172) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/labsofscience/LabsOfScienceRoot.js +68 -124
  3. package/dist/labsofscience/LabsOfScienceRoot.js.map +1 -1
  4. package/dist/labsofscience/LabsOfScienceRoutes.js +61 -185
  5. package/dist/labsofscience/LabsOfScienceRoutes.js.map +1 -1
  6. package/dist/labsofscience/components/QueryStates.js +40 -0
  7. package/dist/labsofscience/components/QueryStates.js.map +1 -0
  8. package/dist/labsofscience/components/StatusBadge.js +40 -23
  9. package/dist/labsofscience/components/StatusBadge.js.map +1 -1
  10. package/dist/labsofscience/context/LabsOfScienceContext.js +22 -30
  11. package/dist/labsofscience/context/LabsOfScienceContext.js.map +1 -1
  12. package/dist/labsofscience/hooks/useLabsOfScienceApi.js +500 -172
  13. package/dist/labsofscience/hooks/useLabsOfScienceApi.js.map +1 -1
  14. package/dist/labsofscience/pages/OverviewPage.js +195 -0
  15. package/dist/labsofscience/pages/OverviewPage.js.map +1 -0
  16. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js +162 -0
  17. package/dist/labsofscience/pages/datasets/DatasetDetailPage.js.map +1 -0
  18. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js +137 -0
  19. package/dist/labsofscience/pages/datasets/DatasetFormDialog.js.map +1 -0
  20. package/dist/labsofscience/pages/datasets/DatasetsListPage.js +155 -0
  21. package/dist/labsofscience/pages/datasets/DatasetsListPage.js.map +1 -0
  22. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js +220 -0
  23. package/dist/labsofscience/pages/experiments/ExperimentDetailPage.js.map +1 -0
  24. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js +170 -0
  25. package/dist/labsofscience/pages/experiments/ExperimentFormDialog.js.map +1 -0
  26. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js +134 -0
  27. package/dist/labsofscience/pages/experiments/ExperimentsListPage.js.map +1 -0
  28. package/dist/labsofscience/pages/experiments/RunDialogs.js +180 -0
  29. package/dist/labsofscience/pages/experiments/RunDialogs.js.map +1 -0
  30. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js +130 -0
  31. package/dist/labsofscience/pages/instruments/InstrumentDetailPage.js.map +1 -0
  32. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js +132 -0
  33. package/dist/labsofscience/pages/instruments/InstrumentFormDialog.js.map +1 -0
  34. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js +126 -0
  35. package/dist/labsofscience/pages/instruments/InstrumentsListPage.js.map +1 -0
  36. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js +89 -0
  37. package/dist/labsofscience/pages/inventory/AdjustInventoryDialog.js.map +1 -0
  38. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js +138 -0
  39. package/dist/labsofscience/pages/inventory/InventoryDetailPage.js.map +1 -0
  40. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js +211 -0
  41. package/dist/labsofscience/pages/inventory/InventoryFormDialog.js.map +1 -0
  42. package/dist/labsofscience/pages/inventory/InventoryListPage.js +178 -0
  43. package/dist/labsofscience/pages/inventory/InventoryListPage.js.map +1 -0
  44. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js +118 -0
  45. package/dist/labsofscience/pages/notebook/NotebookEntryFormDialog.js.map +1 -0
  46. package/dist/labsofscience/pages/notebook/NotebookListPage.js +144 -0
  47. package/dist/labsofscience/pages/notebook/NotebookListPage.js.map +1 -0
  48. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js +146 -0
  49. package/dist/labsofscience/pages/pipelines/PipelineFormDialog.js.map +1 -0
  50. package/dist/labsofscience/pages/pipelines/PipelinesPage.js +212 -0
  51. package/dist/labsofscience/pages/pipelines/PipelinesPage.js.map +1 -0
  52. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js +109 -0
  53. package/dist/labsofscience/pages/pipelines/RunPipelineDialog.js.map +1 -0
  54. package/dist/labsofscience/pages/projects/ProjectDetailPage.js +174 -0
  55. package/dist/labsofscience/pages/projects/ProjectDetailPage.js.map +1 -0
  56. package/dist/labsofscience/pages/projects/ProjectFormDialog.js +169 -0
  57. package/dist/labsofscience/pages/projects/ProjectFormDialog.js.map +1 -0
  58. package/dist/labsofscience/pages/projects/ProjectsListPage.js +141 -0
  59. package/dist/labsofscience/pages/projects/ProjectsListPage.js.map +1 -0
  60. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js +133 -0
  61. package/dist/labsofscience/pages/protocols/ProtocolDetailPage.js.map +1 -0
  62. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js +151 -0
  63. package/dist/labsofscience/pages/protocols/ProtocolFormDialog.js.map +1 -0
  64. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js +140 -0
  65. package/dist/labsofscience/pages/protocols/ProtocolsListPage.js.map +1 -0
  66. package/dist/labsofscience/pages/shared/DetailComponents.js +64 -0
  67. package/dist/labsofscience/pages/shared/DetailComponents.js.map +1 -0
  68. package/dist/labsofscience/pages/shared/tags.js +16 -0
  69. package/dist/labsofscience/pages/shared/tags.js.map +1 -0
  70. package/dist/labsofscience/store/labsofscienceStore.js +6 -11
  71. package/dist/labsofscience/store/labsofscienceStore.js.map +1 -1
  72. package/dist/labsofscience/utils/formatters.js +28 -13
  73. package/dist/labsofscience/utils/formatters.js.map +1 -1
  74. package/package.json +1 -1
  75. package/dist/labsofscience/components/InvestmentCard.js +0 -98
  76. package/dist/labsofscience/components/InvestmentCard.js.map +0 -1
  77. package/dist/labsofscience/components/RatingDisplay.js +0 -35
  78. package/dist/labsofscience/components/RatingDisplay.js.map +0 -1
  79. package/dist/labsofscience/mocks/data.js +0 -1517
  80. package/dist/labsofscience/mocks/data.js.map +0 -1
  81. package/dist/labsofscience/mocks/users.js +0 -34
  82. package/dist/labsofscience/mocks/users.js.map +0 -1
  83. package/dist/labsofscience/pages/HomePage.js +0 -940
  84. package/dist/labsofscience/pages/HomePage.js.map +0 -1
  85. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js +0 -651
  86. package/dist/labsofscience/pages/admin/AdminAnalyticsPage.js.map +0 -1
  87. package/dist/labsofscience/pages/admin/AdminDashboard.js +0 -672
  88. package/dist/labsofscience/pages/admin/AdminDashboard.js.map +0 -1
  89. package/dist/labsofscience/pages/admin/AdminFinancialPage.js +0 -427
  90. package/dist/labsofscience/pages/admin/AdminFinancialPage.js.map +0 -1
  91. package/dist/labsofscience/pages/admin/AdminOrdersPage.js +0 -665
  92. package/dist/labsofscience/pages/admin/AdminOrdersPage.js.map +0 -1
  93. package/dist/labsofscience/pages/admin/AdminProfilePage.js +0 -261
  94. package/dist/labsofscience/pages/admin/AdminProfilePage.js.map +0 -1
  95. package/dist/labsofscience/pages/admin/AdminSettingsPage.js +0 -651
  96. package/dist/labsofscience/pages/admin/AdminSettingsPage.js.map +0 -1
  97. package/dist/labsofscience/pages/admin/CartManagementPage.js +0 -874
  98. package/dist/labsofscience/pages/admin/CartManagementPage.js.map +0 -1
  99. package/dist/labsofscience/pages/admin/UserManagementPage.js +0 -898
  100. package/dist/labsofscience/pages/admin/UserManagementPage.js.map +0 -1
  101. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js +0 -839
  102. package/dist/labsofscience/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  103. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js +0 -705
  104. package/dist/labsofscience/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  105. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js +0 -791
  106. package/dist/labsofscience/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  107. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  108. package/dist/labsofscience/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  109. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js +0 -636
  110. package/dist/labsofscience/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  111. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js +0 -911
  112. package/dist/labsofscience/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  113. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js +0 -879
  114. package/dist/labsofscience/pages/cart-owner/OrderManagementPage.js.map +0 -1
  115. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js +0 -839
  116. package/dist/labsofscience/pages/cart-owner/StaffManagementPage.js.map +0 -1
  117. package/dist/labsofscience/pages/common/HelpSupportPage.js +0 -1324
  118. package/dist/labsofscience/pages/common/HelpSupportPage.js.map +0 -1
  119. package/dist/labsofscience/pages/common/NotificationCenterPage.js +0 -672
  120. package/dist/labsofscience/pages/common/NotificationCenterPage.js.map +0 -1
  121. package/dist/labsofscience/pages/common/SettingsPage.js +0 -973
  122. package/dist/labsofscience/pages/common/SettingsPage.js.map +0 -1
  123. package/dist/labsofscience/pages/customer/BookingDetailsPage.js +0 -637
  124. package/dist/labsofscience/pages/customer/BookingDetailsPage.js.map +0 -1
  125. package/dist/labsofscience/pages/customer/CartDetailPage.js +0 -653
  126. package/dist/labsofscience/pages/customer/CartDetailPage.js.map +0 -1
  127. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js +0 -559
  128. package/dist/labsofscience/pages/customer/CartDiscoveryPage.js.map +0 -1
  129. package/dist/labsofscience/pages/customer/CheckoutPage.js +0 -530
  130. package/dist/labsofscience/pages/customer/CheckoutPage.js.map +0 -1
  131. package/dist/labsofscience/pages/customer/CustomerDashboard.js +0 -531
  132. package/dist/labsofscience/pages/customer/CustomerDashboard.js.map +0 -1
  133. package/dist/labsofscience/pages/customer/CustomerProfilePage.js +0 -658
  134. package/dist/labsofscience/pages/customer/CustomerProfilePage.js.map +0 -1
  135. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js +0 -633
  136. package/dist/labsofscience/pages/customer/DirectServiceBookingPage.js.map +0 -1
  137. package/dist/labsofscience/pages/customer/FavoritesPage.js +0 -484
  138. package/dist/labsofscience/pages/customer/FavoritesPage.js.map +0 -1
  139. package/dist/labsofscience/pages/customer/OrderHistoryPage.js +0 -445
  140. package/dist/labsofscience/pages/customer/OrderHistoryPage.js.map +0 -1
  141. package/dist/labsofscience/pages/customer/OrderTrackingPage.js +0 -425
  142. package/dist/labsofscience/pages/customer/OrderTrackingPage.js.map +0 -1
  143. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js +0 -495
  144. package/dist/labsofscience/pages/customer/PaymentMethodsPage.js.map +0 -1
  145. package/dist/labsofscience/pages/customer/ReviewsPage.js +0 -613
  146. package/dist/labsofscience/pages/customer/ReviewsPage.js.map +0 -1
  147. package/dist/labsofscience/pages/customer/SavedAddressesPage.js +0 -450
  148. package/dist/labsofscience/pages/customer/SavedAddressesPage.js.map +0 -1
  149. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js +0 -881
  150. package/dist/labsofscience/pages/investor/InvestmentDetailsPage.js.map +0 -1
  151. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js +0 -946
  152. package/dist/labsofscience/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  153. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js +0 -687
  154. package/dist/labsofscience/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  155. package/dist/labsofscience/pages/investor/InvestorDashboard.js +0 -455
  156. package/dist/labsofscience/pages/investor/InvestorDashboard.js.map +0 -1
  157. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js +0 -406
  158. package/dist/labsofscience/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  159. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js +0 -575
  160. package/dist/labsofscience/pages/investor/InvestorPortfolioPage.js.map +0 -1
  161. package/dist/labsofscience/pages/investor/InvestorProfilePage.js +0 -1070
  162. package/dist/labsofscience/pages/investor/InvestorProfilePage.js.map +0 -1
  163. package/dist/labsofscience/pages/worker/TaskDetailsPage.js +0 -537
  164. package/dist/labsofscience/pages/worker/TaskDetailsPage.js.map +0 -1
  165. package/dist/labsofscience/pages/worker/WorkerDashboard.js +0 -665
  166. package/dist/labsofscience/pages/worker/WorkerDashboard.js.map +0 -1
  167. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js +0 -681
  168. package/dist/labsofscience/pages/worker/WorkerOrdersPage.js.map +0 -1
  169. package/dist/labsofscience/pages/worker/WorkerProfilePage.js +0 -692
  170. package/dist/labsofscience/pages/worker/WorkerProfilePage.js.map +0 -1
  171. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js +0 -588
  172. package/dist/labsofscience/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,879 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.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/labsofscience/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-subtle text-status-warning-text",
248
- label: "New Order"
249
- },
250
- confirmed: {
251
- color: "bg-status-info-bg-subtle text-status-info-text",
252
- label: "Confirmed"
253
- },
254
- preparing: {
255
- color: "bg-status-warning-bg-subtle text-status-warning-text",
256
- label: "Preparing"
257
- },
258
- ready: {
259
- color: "bg-status-success-bg-subtle text-status-success-text",
260
- label: "Ready"
261
- },
262
- out_for_delivery: {
263
- color: "bg-status-info-bg-subtle text-status-info-text",
264
- label: "Out for Delivery"
265
- },
266
- delivered: {
267
- color: "bg-status-success-bg-subtle text-status-success-text",
268
- label: "Completed"
269
- },
270
- cancelled: {
271
- color: "bg-status-error-bg-subtle text-status-error-text",
272
- label: "Cancelled"
273
- }
274
- }, D = {
275
- delivery: {
276
- icon: _,
277
- label: "Delivery",
278
- color: "bg-[color-mix(in_oklab,var(--color-accent-purple)_14%,transparent)] text-accent-purple"
279
- },
280
- pickup: {
281
- icon: g,
282
- label: "Pickup",
283
- color: "bg-status-info-bg-subtle 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 bg-status-error-bg-subtle" : e.status === "preparing" && t > 30 ? "border-status-warning-border bg-status-warning-bg-subtle" : "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
- actions: /* @__PURE__ */ S("button", {
376
- type: "button",
377
- onClick: () => B("Orders refreshed", "success"),
378
- 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",
379
- children: [/* @__PURE__ */ x(m, { className: "h-4 w-4" }), "Refresh"]
380
- }),
381
- children: [/* @__PURE__ */ S("div", {
382
- className: "space-y-4",
383
- children: [
384
- R && /* @__PURE__ */ S("div", {
385
- className: t("flex items-center gap-2 rounded-lg border p-3", R.type === "success" ? "border-status-success-border bg-status-success-bg-subtle" : "border-status-error-border bg-status-error-bg-subtle"),
386
- 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", {
387
- className: t("text-sm font-medium", R.type === "success" ? "text-status-success-text" : "text-status-error-text"),
388
- children: R.text
389
- })]
390
- }),
391
- /* @__PURE__ */ x(w, {
392
- icon: /* @__PURE__ */ x(g, { className: "h-4 w-4" }),
393
- children: "Your live order queue. New orders land here in real time — accept or reject them, move them through preparing and ready, and complete pickups. Use the filters to focus on what needs action now, and watch the day's revenue and order counts at a glance."
394
- }),
395
- /* @__PURE__ */ S(C, {
396
- className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",
397
- children: [
398
- /* @__PURE__ */ S("div", {
399
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
400
- children: [/* @__PURE__ */ x("p", {
401
- className: "text-xs text-text-secondary",
402
- children: "Total Orders"
403
- }), /* @__PURE__ */ x("p", {
404
- className: "text-2xl font-bold text-text-primary",
405
- children: V.total
406
- })]
407
- }),
408
- /* @__PURE__ */ S("div", {
409
- className: "rounded-lg border border-status-warning-border bg-status-warning-bg-subtle p-4 shadow-sm",
410
- children: [/* @__PURE__ */ x("p", {
411
- className: "text-xs text-status-warning-text",
412
- children: "Pending"
413
- }), /* @__PURE__ */ x("p", {
414
- className: "text-2xl font-bold text-status-warning-text",
415
- children: V.pending
416
- })]
417
- }),
418
- /* @__PURE__ */ S("div", {
419
- className: "rounded-lg border border-status-info-border bg-status-info-bg-subtle p-4 shadow-sm",
420
- children: [/* @__PURE__ */ x("p", {
421
- className: "text-xs text-status-info-text",
422
- children: "Active"
423
- }), /* @__PURE__ */ x("p", {
424
- className: "text-2xl font-bold text-status-info-text",
425
- children: V.active
426
- })]
427
- }),
428
- /* @__PURE__ */ S("div", {
429
- className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4 shadow-sm",
430
- children: [/* @__PURE__ */ x("p", {
431
- className: "text-xs text-status-success-text",
432
- children: "Completed"
433
- }), /* @__PURE__ */ x("p", {
434
- className: "text-2xl font-bold text-status-success-text",
435
- children: V.completed
436
- })]
437
- }),
438
- /* @__PURE__ */ S("div", {
439
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
440
- children: [/* @__PURE__ */ x("p", {
441
- className: "text-xs text-text-secondary",
442
- children: "Total Revenue"
443
- }), /* @__PURE__ */ x("p", {
444
- className: "text-2xl font-bold text-text-primary",
445
- children: i(V.totalRevenue, { minimumFractionDigits: 0 })
446
- })]
447
- }),
448
- /* @__PURE__ */ S("div", {
449
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
450
- children: [/* @__PURE__ */ x("p", {
451
- className: "text-xs text-text-secondary",
452
- children: "Avg Order"
453
- }), /* @__PURE__ */ x("p", {
454
- className: "text-2xl font-bold text-text-primary",
455
- children: i(V.avgOrder, { minimumFractionDigits: 0 })
456
- })]
457
- })
458
- ]
459
- }),
460
- /* @__PURE__ */ x("div", {
461
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 shadow-sm",
462
- children: /* @__PURE__ */ S("div", {
463
- className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-3",
464
- children: [
465
- /* @__PURE__ */ S("div", {
466
- className: "relative sm:col-span-2 lg:col-span-1",
467
- 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", {
468
- type: "text",
469
- placeholder: "Search orders...",
470
- value: M.searchQuery,
471
- onChange: (e) => N((t) => ({
472
- ...t,
473
- searchQuery: e.target.value
474
- })),
475
- 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)]"
476
- })]
477
- }),
478
- /* @__PURE__ */ S("select", {
479
- value: M.status,
480
- onChange: (e) => N((t) => ({
481
- ...t,
482
- status: e.target.value
483
- })),
484
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
485
- children: [
486
- /* @__PURE__ */ x("option", {
487
- value: "",
488
- children: "All Orders"
489
- }),
490
- /* @__PURE__ */ x("option", {
491
- value: "pending",
492
- children: "New Orders"
493
- }),
494
- /* @__PURE__ */ x("option", {
495
- value: "confirmed",
496
- children: "Confirmed"
497
- }),
498
- /* @__PURE__ */ x("option", {
499
- value: "preparing",
500
- children: "Preparing"
501
- }),
502
- /* @__PURE__ */ x("option", {
503
- value: "ready",
504
- children: "Ready"
505
- }),
506
- /* @__PURE__ */ x("option", {
507
- value: "delivered",
508
- children: "Completed"
509
- }),
510
- /* @__PURE__ */ x("option", {
511
- value: "cancelled",
512
- children: "Cancelled"
513
- })
514
- ]
515
- }),
516
- /* @__PURE__ */ S("select", {
517
- value: M.fulfillmentType,
518
- onChange: (e) => N((t) => ({
519
- ...t,
520
- fulfillmentType: e.target.value
521
- })),
522
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
523
- children: [
524
- /* @__PURE__ */ x("option", {
525
- value: "",
526
- children: "All Types"
527
- }),
528
- /* @__PURE__ */ x("option", {
529
- value: "pickup",
530
- children: "Pickup"
531
- }),
532
- /* @__PURE__ */ x("option", {
533
- value: "delivery",
534
- children: "Delivery"
535
- }),
536
- /* @__PURE__ */ x("option", {
537
- value: "cart_dispatch",
538
- children: "Cart Dispatch"
539
- })
540
- ]
541
- }),
542
- /* @__PURE__ */ S("select", {
543
- value: M.dateRange,
544
- onChange: (e) => N((t) => ({
545
- ...t,
546
- dateRange: e.target.value
547
- })),
548
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
549
- children: [
550
- /* @__PURE__ */ x("option", {
551
- value: "today",
552
- children: "Today"
553
- }),
554
- /* @__PURE__ */ x("option", {
555
- value: "7days",
556
- children: "Last 7 Days"
557
- }),
558
- /* @__PURE__ */ x("option", {
559
- value: "30days",
560
- children: "Last 30 Days"
561
- }),
562
- /* @__PURE__ */ x("option", {
563
- value: "all",
564
- children: "All Time"
565
- })
566
- ]
567
- }),
568
- /* @__PURE__ */ S("select", {
569
- value: M.sortBy,
570
- onChange: (e) => N((t) => ({
571
- ...t,
572
- sortBy: e.target.value
573
- })),
574
- className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary",
575
- children: [
576
- /* @__PURE__ */ x("option", {
577
- value: "recent",
578
- children: "Most Recent"
579
- }),
580
- /* @__PURE__ */ x("option", {
581
- value: "oldest",
582
- children: "Oldest First"
583
- }),
584
- /* @__PURE__ */ x("option", {
585
- value: "amount_high",
586
- children: "Amount: High to Low"
587
- }),
588
- /* @__PURE__ */ x("option", {
589
- value: "amount_low",
590
- children: "Amount: Low to High"
591
- })
592
- ]
593
- })
594
- ]
595
- })
596
- }),
597
- H.length === 0 ? /* @__PURE__ */ x(r, {
598
- illustration: M.searchQuery || M.status ? "empty-search" : "empty-data",
599
- icon: /* @__PURE__ */ x(f, { className: "h-12 w-12" }),
600
- title: "No orders found",
601
- description: M.searchQuery || M.status ? "Try adjusting your filters" : "New orders will appear here as 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-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle 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-subtle px-3 py-2 text-xs font-medium text-status-error-text hover:bg-status-error-bg-subtle 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-subtle px-3 py-2 text-xs font-medium text-status-warning-text hover:bg-status-warning-bg-subtle 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-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle 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-subtle px-3 py-2 text-xs font-medium text-status-success-text hover:bg-status-success-bg-subtle 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 bg-status-warning-bg-subtle 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-black/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-subtle px-4 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg-subtle 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-subtle px-4 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle 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