@burdenoff/microfe-labsofscience 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 (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,874 +0,0 @@
1
- import { useLabsOfScience as e } from "../../context/LabsOfScienceContext.js";
2
- import { cn as t } from "../../utils/cn.js";
3
- import { PageLayout as n } from "../../components/PageLayout.js";
4
- import { EmptyState as r } from "../../components/EmptyState.js";
5
- import { formatCurrency as i } from "../../utils/formatters.js";
6
- import { useCallback as a, useEffect as o, useState as s } from "react";
7
- import { CheckCircle2 as c, ClipboardCheck as l, Eye as u, Loader2 as d, Pause as f, Search as p, Star as m, X as h, XCircle as g } from "lucide-react";
8
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
9
- import { EmphasisPanel as b, PagePurpose as x } from "@burdenoff/fe-libs/ui";
10
- //#region src/labsofscience/pages/admin/CartManagementPage.tsx
11
- var S = [
12
- {
13
- id: "cart-001",
14
- name: "South Indian Express",
15
- description: "Authentic South Indian breakfast and snacks",
16
- category: "Food & Beverage",
17
- image: "https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=200",
18
- ownerName: "Rajesh Kumar",
19
- ownerEmail: "rajesh@gmail.com",
20
- ownerPhone: "+91 98765 43210",
21
- address: "MG Road, Bangalore",
22
- city: "Bangalore",
23
- isActive: !0,
24
- isVerified: !0,
25
- rating: 4.8,
26
- reviewCount: 342,
27
- monthlyRevenue: 185e3,
28
- monthlyOrders: 1250,
29
- complianceScore: 95,
30
- documentsSubmitted: 8,
31
- documentsRequired: 8,
32
- inspectionStatus: "completed",
33
- inspectionDate: "2023-07-01T10:00:00Z",
34
- applicationDate: "2023-06-15T09:30:00Z",
35
- licenseNumber: "BBMP/2023/001234"
36
- },
37
- {
38
- id: "cart-002",
39
- name: "Fresh Juice Corner",
40
- description: "Fresh fruit juices and smoothies",
41
- category: "Beverages",
42
- image: "https://images.unsplash.com/photo-1600271886742-f049cd451bba?w=200",
43
- ownerName: "Priya Sharma",
44
- ownerEmail: "priya@gmail.com",
45
- ownerPhone: "+91 98765 43211",
46
- address: "Koramangala, Bangalore",
47
- city: "Bangalore",
48
- isActive: !1,
49
- isVerified: !1,
50
- rating: 0,
51
- reviewCount: 0,
52
- monthlyRevenue: 0,
53
- monthlyOrders: 0,
54
- complianceScore: 78,
55
- documentsSubmitted: 6,
56
- documentsRequired: 8,
57
- inspectionStatus: "pending",
58
- applicationDate: "2024-06-20T11:15:00Z"
59
- },
60
- {
61
- id: "cart-003",
62
- name: "Street Chaat Masters",
63
- description: "Authentic Indian street food and chaat",
64
- category: "Street Food",
65
- image: "https://images.unsplash.com/photo-1601050690597-df0568f70950?w=200",
66
- ownerName: "Amit Patel",
67
- ownerEmail: "amit@gmail.com",
68
- ownerPhone: "+91 98765 43212",
69
- address: "Brigade Road, Bangalore",
70
- city: "Bangalore",
71
- isActive: !1,
72
- isVerified: !1,
73
- rating: 4.2,
74
- reviewCount: 89,
75
- monthlyRevenue: 45e3,
76
- monthlyOrders: 450,
77
- complianceScore: 65,
78
- documentsSubmitted: 5,
79
- documentsRequired: 8,
80
- inspectionStatus: "failed",
81
- inspectionDate: "2024-06-15T11:00:00Z",
82
- applicationDate: "2024-05-10T14:20:00Z",
83
- rejectionReason: "Hygiene standards not met, missing food safety certification"
84
- }
85
- ];
86
- function C() {
87
- let { navigateTo: C } = e(), [w, T] = s([]), [E, D] = s(!0), [O, k] = s(null), [A, j] = s(!1), [M, N] = s("view"), [P, F] = s(""), [I, L] = s({
88
- searchQuery: "",
89
- status: "",
90
- verificationStatus: "",
91
- category: "",
92
- location: "",
93
- sortBy: "recent"
94
- }), [R] = s({
95
- totalCarts: 156,
96
- activeCarts: 134,
97
- pendingApproval: 18,
98
- rejectedCarts: 4,
99
- totalRevenue: 125e5,
100
- averageRating: 4.6,
101
- complianceRate: 89,
102
- newApplications: 8
103
- }), z = a(() => {
104
- D(!0), setTimeout(() => {
105
- let e = [...S];
106
- if (I.searchQuery) {
107
- let t = I.searchQuery.toLowerCase();
108
- e = e.filter((e) => e.name.toLowerCase().includes(t) || e.ownerName.toLowerCase().includes(t) || e.description.toLowerCase().includes(t) || e.address.toLowerCase().includes(t));
109
- }
110
- switch (I.status && (I.status === "active" && (e = e.filter((e) => e.isActive)), I.status === "inactive" && (e = e.filter((e) => !e.isActive))), I.verificationStatus && (I.verificationStatus === "verified" && (e = e.filter((e) => e.isVerified)), I.verificationStatus === "pending" && (e = e.filter((e) => !e.isVerified && e.inspectionStatus !== "failed")), I.verificationStatus === "rejected" && (e = e.filter((e) => e.inspectionStatus === "failed"))), I.category && (e = e.filter((e) => e.category === I.category)), I.location && (e = e.filter((e) => e.city.toLowerCase().includes(I.location.toLowerCase()))), I.sortBy) {
111
- case "name":
112
- e.sort((e, t) => e.name.localeCompare(t.name));
113
- break;
114
- case "rating":
115
- e.sort((e, t) => t.rating - e.rating);
116
- break;
117
- case "revenue":
118
- e.sort((e, t) => t.monthlyRevenue - e.monthlyRevenue);
119
- break;
120
- case "compliance":
121
- e.sort((e, t) => t.complianceScore - e.complianceScore);
122
- break;
123
- default: e.sort((e, t) => new Date(t.applicationDate).getTime() - new Date(e.applicationDate).getTime());
124
- }
125
- T(e), D(!1);
126
- }, 800);
127
- }, [I]);
128
- o(() => {
129
- z();
130
- }, [z]);
131
- let B = (e, t) => {
132
- L((n) => ({
133
- ...n,
134
- [e]: t
135
- }));
136
- }, V = (e, t) => {
137
- k(e), N(t), F(""), j(!0);
138
- }, H = () => {
139
- if (!O) return;
140
- let e = "";
141
- switch (M) {
142
- case "approve":
143
- e = `Cart "${O.name}" approved successfully`;
144
- break;
145
- case "reject":
146
- if (!P.trim()) {
147
- alert("Please provide a rejection reason");
148
- return;
149
- }
150
- e = `Cart "${O.name}" rejected`;
151
- break;
152
- case "suspend":
153
- e = `Cart "${O.name}" suspended`;
154
- break;
155
- case "inspect":
156
- e = `Inspection scheduled for "${O.name}"`;
157
- break;
158
- }
159
- alert(e), j(!1), F(""), z();
160
- }, U = (e) => new Date(e).toLocaleDateString("en-IN", {
161
- year: "numeric",
162
- month: "short",
163
- day: "numeric"
164
- }), W = (e) => e.isVerified ? /* @__PURE__ */ v("span", {
165
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
166
- children: "Verified"
167
- }) : e.inspectionStatus === "pending" ? /* @__PURE__ */ v("span", {
168
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
169
- children: "Pending Review"
170
- }) : e.inspectionStatus === "scheduled" ? /* @__PURE__ */ v("span", {
171
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-info-bg-subtle text-status-info-text",
172
- children: "Inspection Scheduled"
173
- }) : e.inspectionStatus === "failed" ? /* @__PURE__ */ v("span", {
174
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-error-bg-subtle text-status-error-text",
175
- children: "Rejected"
176
- }) : /* @__PURE__ */ v("span", {
177
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
178
- children: "Under Review"
179
- }), G = (e) => e ? /* @__PURE__ */ v("span", {
180
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-success-bg-subtle text-status-success-text",
181
- children: "Active"
182
- }) : /* @__PURE__ */ v("span", {
183
- className: "inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium bg-secondary text-secondary-foreground",
184
- children: "Inactive"
185
- }), K = (e) => /* @__PURE__ */ v("div", {
186
- className: "w-full bg-bg-sunken rounded-full h-2",
187
- children: /* @__PURE__ */ v("div", {
188
- className: t("h-2 rounded-full", e >= 80 ? "bg-status-success-bg" : e >= 60 ? "bg-status-warning-bg" : "bg-status-error-bg"),
189
- style: { width: `${e}%` }
190
- })
191
- });
192
- return E ? /* @__PURE__ */ v(n, {
193
- title: "Cart Management",
194
- description: "Loading carts...",
195
- children: /* @__PURE__ */ y("div", {
196
- className: "flex flex-col items-center justify-center py-20",
197
- children: [/* @__PURE__ */ v(d, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ v("p", {
198
- className: "text-text-secondary",
199
- children: "Loading carts..."
200
- })]
201
- })
202
- }) : /* @__PURE__ */ y(n, {
203
- title: "Cart Management",
204
- description: `${R.totalCarts} service providers on the platform`,
205
- actions: /* @__PURE__ */ y("span", {
206
- className: "text-sm text-text-secondary",
207
- children: [R.pendingApproval, " pending approval"]
208
- }),
209
- children: [
210
- /* @__PURE__ */ v(x, {
211
- icon: /* @__PURE__ */ v(l, { className: "h-4 w-4" }),
212
- className: "mb-6",
213
- children: "The approval and oversight desk for every cart on the platform. Review new applications, approve or reject carts before they go live, and pause or inspect any existing cart — this is how you keep the marketplace trustworthy."
214
- }),
215
- /* @__PURE__ */ v(b, {
216
- className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3 mb-6",
217
- children: [
218
- {
219
- label: "Total Carts",
220
- value: R.totalCarts,
221
- cls: ""
222
- },
223
- {
224
- label: "Active",
225
- value: R.activeCarts,
226
- cls: "bg-status-success-bg-subtle border-status-success-border"
227
- },
228
- {
229
- label: "Pending",
230
- value: R.pendingApproval,
231
- cls: "bg-status-warning-bg-subtle border-status-warning-border"
232
- },
233
- {
234
- label: "Rejected",
235
- value: R.rejectedCarts,
236
- cls: "bg-status-error-bg-subtle border-status-error-border"
237
- },
238
- {
239
- label: "Total Revenue",
240
- value: i(R.totalRevenue, { minimumFractionDigits: 0 }),
241
- cls: "col-span-2 min-w-fit"
242
- },
243
- {
244
- label: "Avg Rating",
245
- value: `${R.averageRating}`,
246
- cls: ""
247
- },
248
- {
249
- label: "New Apps",
250
- value: R.newApplications,
251
- cls: "bg-status-info-bg-subtle border-status-info-border"
252
- }
253
- ].map((e) => /* @__PURE__ */ y("div", {
254
- className: t("rounded-lg border border-border-seam bg-bg-surface p-3", e.cls),
255
- children: [/* @__PURE__ */ v("p", {
256
- className: "text-xs text-text-secondary",
257
- children: e.label
258
- }), /* @__PURE__ */ v("p", {
259
- className: "text-lg font-bold text-text-primary",
260
- children: e.value
261
- })]
262
- }, e.label))
263
- }),
264
- /* @__PURE__ */ v("div", {
265
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6",
266
- children: /* @__PURE__ */ y("div", {
267
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",
268
- children: [
269
- /* @__PURE__ */ y("div", {
270
- className: "relative",
271
- children: [/* @__PURE__ */ v(p, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ v("input", {
272
- type: "text",
273
- placeholder: "Search carts...",
274
- value: I.searchQuery,
275
- onChange: (e) => B("searchQuery", e.target.value),
276
- 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)]"
277
- })]
278
- }),
279
- /* @__PURE__ */ y("select", {
280
- value: I.status,
281
- onChange: (e) => B("status", e.target.value),
282
- 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)]",
283
- children: [
284
- /* @__PURE__ */ v("option", {
285
- value: "",
286
- children: "All Status"
287
- }),
288
- /* @__PURE__ */ v("option", {
289
- value: "active",
290
- children: "Active"
291
- }),
292
- /* @__PURE__ */ v("option", {
293
- value: "inactive",
294
- children: "Inactive"
295
- })
296
- ]
297
- }),
298
- /* @__PURE__ */ y("select", {
299
- value: I.verificationStatus,
300
- onChange: (e) => B("verificationStatus", e.target.value),
301
- 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)]",
302
- children: [
303
- /* @__PURE__ */ v("option", {
304
- value: "",
305
- children: "All Verification"
306
- }),
307
- /* @__PURE__ */ v("option", {
308
- value: "verified",
309
- children: "Verified"
310
- }),
311
- /* @__PURE__ */ v("option", {
312
- value: "pending",
313
- children: "Pending"
314
- }),
315
- /* @__PURE__ */ v("option", {
316
- value: "rejected",
317
- children: "Rejected"
318
- })
319
- ]
320
- }),
321
- /* @__PURE__ */ y("select", {
322
- value: I.category,
323
- onChange: (e) => B("category", e.target.value),
324
- 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)]",
325
- children: [
326
- /* @__PURE__ */ v("option", {
327
- value: "",
328
- children: "All Categories"
329
- }),
330
- /* @__PURE__ */ v("option", {
331
- value: "Food & Beverage",
332
- children: "Food & Beverage"
333
- }),
334
- /* @__PURE__ */ v("option", {
335
- value: "Beverages",
336
- children: "Beverages"
337
- }),
338
- /* @__PURE__ */ v("option", {
339
- value: "Street Food",
340
- children: "Street Food"
341
- }),
342
- /* @__PURE__ */ v("option", {
343
- value: "Fast Food",
344
- children: "Fast Food"
345
- })
346
- ]
347
- }),
348
- /* @__PURE__ */ v("input", {
349
- type: "text",
350
- placeholder: "Location...",
351
- value: I.location,
352
- onChange: (e) => B("location", e.target.value),
353
- className: "rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
354
- }),
355
- /* @__PURE__ */ y("select", {
356
- value: I.sortBy,
357
- onChange: (e) => B("sortBy", e.target.value),
358
- 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)]",
359
- children: [
360
- /* @__PURE__ */ v("option", {
361
- value: "recent",
362
- children: "Most Recent"
363
- }),
364
- /* @__PURE__ */ v("option", {
365
- value: "name",
366
- children: "Name A-Z"
367
- }),
368
- /* @__PURE__ */ v("option", {
369
- value: "rating",
370
- children: "Highest Rated"
371
- }),
372
- /* @__PURE__ */ v("option", {
373
- value: "revenue",
374
- children: "Highest Revenue"
375
- }),
376
- /* @__PURE__ */ v("option", {
377
- value: "compliance",
378
- children: "Best Compliance"
379
- })
380
- ]
381
- })
382
- ]
383
- })
384
- }),
385
- /* @__PURE__ */ y("div", {
386
- className: "rounded-lg border border-border-seam bg-bg-surface overflow-hidden",
387
- children: [
388
- /* @__PURE__ */ v("div", {
389
- className: "block md:hidden space-y-4 p-4",
390
- children: w.map((e) => /* @__PURE__ */ y("div", {
391
- className: "rounded-lg border border-border-seam bg-bg-sunken/30 p-4",
392
- children: [
393
- /* @__PURE__ */ y("div", {
394
- className: "flex items-center mb-3",
395
- children: [/* @__PURE__ */ v("img", {
396
- src: e.image,
397
- alt: e.name,
398
- className: "w-16 h-16 rounded-lg object-cover mr-3"
399
- }), /* @__PURE__ */ y("div", {
400
- className: "flex-1 min-w-0",
401
- children: [
402
- /* @__PURE__ */ v("h3", {
403
- className: "font-medium text-text-primary text-lg truncate",
404
- children: e.name
405
- }),
406
- /* @__PURE__ */ v("p", {
407
- className: "text-sm text-text-secondary truncate",
408
- children: e.category
409
- }),
410
- /* @__PURE__ */ v("p", {
411
- className: "text-sm text-text-secondary truncate",
412
- children: e.address
413
- })
414
- ]
415
- })]
416
- }),
417
- /* @__PURE__ */ y("div", {
418
- className: "grid grid-cols-2 gap-4 mb-3 text-sm",
419
- children: [/* @__PURE__ */ y("div", { children: [
420
- /* @__PURE__ */ v("p", {
421
- className: "text-text-secondary font-medium",
422
- children: "Owner"
423
- }),
424
- /* @__PURE__ */ v("p", {
425
- className: "text-text-primary",
426
- children: e.ownerName
427
- }),
428
- /* @__PURE__ */ v("p", {
429
- className: "text-text-secondary text-xs",
430
- children: e.ownerPhone
431
- })
432
- ] }), /* @__PURE__ */ y("div", { children: [
433
- /* @__PURE__ */ v("p", {
434
- className: "text-text-secondary font-medium",
435
- children: "Performance"
436
- }),
437
- /* @__PURE__ */ y("p", {
438
- className: "text-text-primary",
439
- children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
440
- }),
441
- /* @__PURE__ */ y("p", {
442
- className: "text-text-secondary text-xs",
443
- children: [e.monthlyOrders, " orders"]
444
- })
445
- ] })]
446
- }),
447
- /* @__PURE__ */ y("div", {
448
- className: "flex flex-wrap gap-2 mb-3",
449
- children: [
450
- G(e.isActive),
451
- W(e),
452
- e.rating > 0 && /* @__PURE__ */ y("span", {
453
- className: "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-status-warning-bg-subtle text-status-warning-text",
454
- children: [
455
- /* @__PURE__ */ v(m, { className: "h-3 w-3 fill-current" }),
456
- e.rating,
457
- " (",
458
- e.reviewCount,
459
- ")"
460
- ]
461
- })
462
- ]
463
- }),
464
- /* @__PURE__ */ y("div", {
465
- className: "mb-3",
466
- children: [
467
- /* @__PURE__ */ y("div", {
468
- className: "flex items-center justify-between text-sm mb-1",
469
- children: [/* @__PURE__ */ v("span", {
470
- className: "text-text-secondary",
471
- children: "Compliance"
472
- }), /* @__PURE__ */ y("span", {
473
- className: "font-medium text-text-primary",
474
- children: [e.complianceScore, "%"]
475
- })]
476
- }),
477
- K(e.complianceScore),
478
- /* @__PURE__ */ y("p", {
479
- className: "text-xs text-text-secondary mt-1",
480
- children: [
481
- "Docs: ",
482
- e.documentsSubmitted,
483
- "/",
484
- e.documentsRequired,
485
- " • Applied:",
486
- " ",
487
- U(e.applicationDate)
488
- ]
489
- })
490
- ]
491
- }),
492
- /* @__PURE__ */ y("div", {
493
- className: "flex flex-wrap gap-2",
494
- children: [
495
- /* @__PURE__ */ v("button", {
496
- type: "button",
497
- onClick: () => V(e, "view"),
498
- className: "flex-1 rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
499
- children: "View Details"
500
- }),
501
- !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
502
- type: "button",
503
- onClick: () => V(e, "approve"),
504
- className: "rounded-lg bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
505
- children: "Approve"
506
- }), /* @__PURE__ */ v("button", {
507
- type: "button",
508
- onClick: () => V(e, "reject"),
509
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
510
- children: "Reject"
511
- })] }),
512
- e.inspectionStatus === "pending" && /* @__PURE__ */ v("button", {
513
- type: "button",
514
- onClick: () => V(e, "inspect"),
515
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
516
- children: "Inspect"
517
- }),
518
- e.isActive && /* @__PURE__ */ v("button", {
519
- type: "button",
520
- onClick: () => V(e, "suspend"),
521
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
522
- children: "Suspend"
523
- })
524
- ]
525
- })
526
- ]
527
- }, e.id))
528
- }),
529
- /* @__PURE__ */ v("div", {
530
- className: "hidden md:block overflow-x-auto",
531
- children: /* @__PURE__ */ y("table", {
532
- className: "w-full",
533
- children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
534
- className: "border-b border-border-seam bg-bg-sunken/50",
535
- children: [
536
- /* @__PURE__ */ v("th", {
537
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
538
- children: "Cart"
539
- }),
540
- /* @__PURE__ */ v("th", {
541
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
542
- children: "Owner"
543
- }),
544
- /* @__PURE__ */ v("th", {
545
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
546
- children: "Status"
547
- }),
548
- /* @__PURE__ */ v("th", {
549
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
550
- children: "Performance"
551
- }),
552
- /* @__PURE__ */ v("th", {
553
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
554
- children: "Compliance"
555
- }),
556
- /* @__PURE__ */ v("th", {
557
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
558
- children: "Actions"
559
- })
560
- ]
561
- }) }), /* @__PURE__ */ v("tbody", {
562
- className: "divide-y divide-border",
563
- children: w.map((e) => /* @__PURE__ */ y("tr", {
564
- className: "hover:bg-accent/50 transition-colors",
565
- children: [
566
- /* @__PURE__ */ v("td", {
567
- className: "px-4 py-3",
568
- children: /* @__PURE__ */ y("div", {
569
- className: "flex items-center gap-3",
570
- children: [/* @__PURE__ */ v("img", {
571
- src: e.image,
572
- alt: e.name,
573
- className: "w-12 h-12 rounded-lg object-cover"
574
- }), /* @__PURE__ */ y("div", {
575
- className: "min-w-0",
576
- children: [
577
- /* @__PURE__ */ v("p", {
578
- className: "text-sm font-medium text-text-primary truncate",
579
- children: e.name
580
- }),
581
- /* @__PURE__ */ v("p", {
582
- className: "text-xs text-text-secondary truncate",
583
- children: e.category
584
- }),
585
- /* @__PURE__ */ v("p", {
586
- className: "text-xs text-text-secondary truncate",
587
- children: e.address
588
- })
589
- ]
590
- })]
591
- })
592
- }),
593
- /* @__PURE__ */ y("td", {
594
- className: "px-4 py-3 text-sm",
595
- children: [
596
- /* @__PURE__ */ v("p", {
597
- className: "font-medium text-text-primary",
598
- children: e.ownerName
599
- }),
600
- /* @__PURE__ */ v("p", {
601
- className: "text-xs text-text-secondary",
602
- children: e.ownerEmail
603
- }),
604
- /* @__PURE__ */ v("p", {
605
- className: "text-xs text-text-secondary",
606
- children: e.ownerPhone
607
- })
608
- ]
609
- }),
610
- /* @__PURE__ */ v("td", {
611
- className: "px-4 py-3",
612
- children: /* @__PURE__ */ y("div", {
613
- className: "space-y-1",
614
- children: [
615
- G(e.isActive),
616
- /* @__PURE__ */ v("br", {}),
617
- W(e),
618
- e.rating > 0 && /* @__PURE__ */ y("div", {
619
- className: "text-sm flex items-center gap-1 mt-1",
620
- children: [
621
- /* @__PURE__ */ v(m, { className: "h-3 w-3 fill-status-warning-text text-status-warning-text" }),
622
- e.rating,
623
- " ",
624
- /* @__PURE__ */ y("span", {
625
- className: "text-text-secondary",
626
- children: [
627
- "(",
628
- e.reviewCount,
629
- ")"
630
- ]
631
- })
632
- ]
633
- })
634
- ]
635
- })
636
- }),
637
- /* @__PURE__ */ y("td", {
638
- className: "px-4 py-3 text-sm",
639
- children: [/* @__PURE__ */ y("p", {
640
- className: "text-text-primary",
641
- children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
642
- }), /* @__PURE__ */ y("p", {
643
- className: "text-text-secondary",
644
- children: [e.monthlyOrders, " orders/mo"]
645
- })]
646
- }),
647
- /* @__PURE__ */ y("td", {
648
- className: "px-4 py-3 text-sm",
649
- children: [
650
- /* @__PURE__ */ y("div", {
651
- className: "flex items-center gap-2 mb-1",
652
- children: [/* @__PURE__ */ v("div", {
653
- className: "w-16",
654
- children: K(e.complianceScore)
655
- }), /* @__PURE__ */ y("span", {
656
- className: "font-medium text-text-primary",
657
- children: [e.complianceScore, "%"]
658
- })]
659
- }),
660
- /* @__PURE__ */ y("p", {
661
- className: "text-xs text-text-secondary",
662
- children: [
663
- "Docs: ",
664
- e.documentsSubmitted,
665
- "/",
666
- e.documentsRequired
667
- ]
668
- }),
669
- /* @__PURE__ */ y("p", {
670
- className: "text-xs text-text-secondary",
671
- children: ["Applied: ", U(e.applicationDate)]
672
- })
673
- ]
674
- }),
675
- /* @__PURE__ */ v("td", {
676
- className: "px-4 py-3",
677
- children: /* @__PURE__ */ y("div", {
678
- className: "flex flex-col gap-1",
679
- children: [
680
- /* @__PURE__ */ y("button", {
681
- type: "button",
682
- onClick: () => V(e, "view"),
683
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors inline-flex items-center gap-1 text-xs",
684
- children: [/* @__PURE__ */ v(u, { className: "h-4 w-4" }), " View"]
685
- }),
686
- !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y("div", {
687
- className: "flex gap-1",
688
- children: [/* @__PURE__ */ v("button", {
689
- type: "button",
690
- onClick: () => V(e, "approve"),
691
- className: "rounded p-1.5 text-text-secondary hover:text-status-success-text hover:bg-status-success-bg-subtle transition-colors",
692
- children: /* @__PURE__ */ v(c, { className: "h-4 w-4" })
693
- }), /* @__PURE__ */ v("button", {
694
- type: "button",
695
- onClick: () => V(e, "reject"),
696
- className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
697
- children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
698
- })]
699
- }),
700
- e.inspectionStatus === "pending" && /* @__PURE__ */ y("button", {
701
- type: "button",
702
- onClick: () => V(e, "inspect"),
703
- className: "rounded p-1.5 text-text-secondary hover:text-status-info-text hover:bg-status-info-bg-subtle transition-colors inline-flex items-center gap-1 text-xs",
704
- children: [/* @__PURE__ */ v(l, { className: "h-4 w-4" }), " Inspect"]
705
- }),
706
- e.isActive && /* @__PURE__ */ v("button", {
707
- type: "button",
708
- onClick: () => V(e, "suspend"),
709
- className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
710
- children: /* @__PURE__ */ v(f, { className: "h-4 w-4" })
711
- })
712
- ]
713
- })
714
- })
715
- ]
716
- }, e.id))
717
- })]
718
- })
719
- }),
720
- w.length === 0 && /* @__PURE__ */ v(r, {
721
- illustration: "empty-search",
722
- title: "No carts found",
723
- description: "No carts match your current search or filters. Adjust them to see more service providers."
724
- })
725
- ]
726
- }),
727
- A && O && /* @__PURE__ */ v("div", {
728
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
729
- children: /* @__PURE__ */ y("div", {
730
- className: "w-full max-w-2xl rounded-lg border border-border-seam bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
731
- children: [/* @__PURE__ */ y("div", {
732
- className: "flex items-center justify-between p-4 border-b border-border-seam",
733
- children: [/* @__PURE__ */ v("h3", {
734
- className: "text-lg font-semibold text-text-primary",
735
- children: M === "view" ? "Cart Details" : M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
736
- }), /* @__PURE__ */ v("button", {
737
- type: "button",
738
- onClick: () => j(!1),
739
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
740
- children: /* @__PURE__ */ v(h, { className: "h-5 w-5" })
741
- })]
742
- }), /* @__PURE__ */ y("div", {
743
- className: "p-4 space-y-4",
744
- children: [
745
- /* @__PURE__ */ y("div", {
746
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
747
- children: [
748
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
749
- className: "text-sm text-text-secondary",
750
- children: "Cart Name"
751
- }), /* @__PURE__ */ v("p", {
752
- className: "font-medium text-text-primary",
753
- children: O.name
754
- })] }),
755
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
756
- className: "text-sm text-text-secondary",
757
- children: "Category"
758
- }), /* @__PURE__ */ v("p", {
759
- className: "font-medium text-text-primary",
760
- children: O.category
761
- })] }),
762
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
763
- className: "text-sm text-text-secondary",
764
- children: "Owner"
765
- }), /* @__PURE__ */ v("p", {
766
- className: "font-medium text-text-primary",
767
- children: O.ownerName
768
- })] }),
769
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
770
- className: "text-sm text-text-secondary",
771
- children: "Contact"
772
- }), /* @__PURE__ */ v("p", {
773
- className: "font-medium text-text-primary",
774
- children: O.ownerPhone
775
- })] })
776
- ]
777
- }),
778
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
779
- className: "text-sm text-text-secondary",
780
- children: "Description"
781
- }), /* @__PURE__ */ v("p", {
782
- className: "font-medium text-text-primary",
783
- children: O.description
784
- })] }),
785
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
786
- className: "text-sm text-text-secondary",
787
- children: "Location"
788
- }), /* @__PURE__ */ v("p", {
789
- className: "font-medium text-text-primary",
790
- children: O.address
791
- })] }),
792
- /* @__PURE__ */ y("div", {
793
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
794
- children: [
795
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
796
- className: "text-sm text-text-secondary",
797
- children: "Compliance Score"
798
- }), /* @__PURE__ */ y("p", {
799
- className: "font-medium text-text-primary",
800
- children: [O.complianceScore, "%"]
801
- })] }),
802
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
803
- className: "text-sm text-text-secondary",
804
- children: "Documents"
805
- }), /* @__PURE__ */ y("p", {
806
- className: "font-medium text-text-primary",
807
- children: [
808
- O.documentsSubmitted,
809
- "/",
810
- O.documentsRequired
811
- ]
812
- })] }),
813
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
814
- className: "text-sm text-text-secondary",
815
- children: "Monthly Revenue"
816
- }), /* @__PURE__ */ v("p", {
817
- className: "font-medium text-text-primary",
818
- children: i(O.monthlyRevenue, { minimumFractionDigits: 0 })
819
- })] })
820
- ]
821
- }),
822
- O.rejectionReason && /* @__PURE__ */ y("div", {
823
- className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle p-4",
824
- children: [/* @__PURE__ */ v("p", {
825
- className: "text-sm font-medium text-status-error-text",
826
- children: "Previous Rejection Reason:"
827
- }), /* @__PURE__ */ v("p", {
828
- className: "text-sm text-status-error-text",
829
- children: O.rejectionReason
830
- })]
831
- }),
832
- M === "reject" && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
833
- className: "block text-sm font-medium text-text-primary mb-2",
834
- children: "Rejection Reason *"
835
- }), /* @__PURE__ */ v("textarea", {
836
- className: "w-full rounded-lg border border-border-seam bg-bg-surface p-3 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] min-h-[100px]",
837
- rows: 4,
838
- value: P,
839
- onChange: (e) => F(e.target.value),
840
- placeholder: "Please provide a detailed reason for rejection..."
841
- })] }),
842
- M === "approve" && /* @__PURE__ */ v("div", {
843
- className: "rounded-lg border border-status-success-border bg-status-success-bg-subtle p-4",
844
- children: /* @__PURE__ */ v("p", {
845
- className: "text-sm text-status-success-text",
846
- children: "This will approve the cart for operation on the platform. The cart owner will be notified and the cart will become active."
847
- })
848
- }),
849
- /* @__PURE__ */ y("div", {
850
- className: "flex gap-3 pt-2",
851
- children: [/* @__PURE__ */ v("button", {
852
- type: "button",
853
- onClick: () => j(!1),
854
- className: "flex-1 rounded-lg border border-border-seam py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
855
- children: "Cancel"
856
- }), M !== "view" && /* @__PURE__ */ v("button", {
857
- type: "button",
858
- onClick: H,
859
- disabled: M === "reject" && !P.trim(),
860
- className: "flex-1 rounded-lg bg-action-primary-bg py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
861
- children: M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
862
- })]
863
- })
864
- ]
865
- })]
866
- })
867
- })
868
- ]
869
- });
870
- }
871
- //#endregion
872
- export { C as CartManagementPage };
873
-
874
- //# sourceMappingURL=CartManagementPage.js.map