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