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