@burdenoff/microfe-labsofscience 2026.626.2 → 2026.629.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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,665 +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 { 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/labsofscience/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-subtle text-status-success-text",
89
- preparing: "bg-status-warning-bg-subtle text-status-warning-text",
90
- ready: "bg-status-warning-bg-subtle text-status-warning-text",
91
- out_for_delivery: "bg-status-info-bg-subtle text-status-info-text",
92
- cancelled: "bg-status-error-bg-subtle text-status-error-text",
93
- confirmed: "bg-status-info-bg-subtle 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: "Oversee every order placed across all carts. Search and filter by status, customer or cart, inspect order details, and step in when something needs admin attention like a dispute, refund or stuck delivery."
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 search or filters. Try clearing them to see all platform orders."
443
- })
444
- ]
445
- }),
446
- G && U && /* @__PURE__ */ T("div", {
447
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/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