@burdenoff/microfe-atheletebridge 2026.625.2 → 2026.628.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/atheletebridge/AthleteBridgeRoot.js +49 -129
  2. package/dist/atheletebridge/AthleteBridgeRoot.js.map +1 -1
  3. package/dist/atheletebridge/AthleteBridgeRoutes.js +65 -184
  4. package/dist/atheletebridge/AthleteBridgeRoutes.js.map +1 -1
  5. package/dist/atheletebridge/components/CursorPager.js +34 -0
  6. package/dist/atheletebridge/components/CursorPager.js.map +1 -0
  7. package/dist/atheletebridge/components/FilterSelect.js +22 -0
  8. package/dist/atheletebridge/components/FilterSelect.js.map +1 -0
  9. package/dist/atheletebridge/components/FixtureCard.js +76 -0
  10. package/dist/atheletebridge/components/FixtureCard.js.map +1 -0
  11. package/dist/atheletebridge/components/LoadingState.js +36 -0
  12. package/dist/atheletebridge/components/LoadingState.js.map +1 -0
  13. package/dist/atheletebridge/components/ProgramCard.js +69 -0
  14. package/dist/atheletebridge/components/ProgramCard.js.map +1 -0
  15. package/dist/atheletebridge/components/SessionCard.js +76 -0
  16. package/dist/atheletebridge/components/SessionCard.js.map +1 -0
  17. package/dist/atheletebridge/components/StatusBadge.js +44 -35
  18. package/dist/atheletebridge/components/StatusBadge.js.map +1 -1
  19. package/dist/atheletebridge/components/TeamCard.js +81 -0
  20. package/dist/atheletebridge/components/TeamCard.js.map +1 -0
  21. package/dist/atheletebridge/components/domain.js +47 -0
  22. package/dist/atheletebridge/components/domain.js.map +1 -0
  23. package/dist/atheletebridge/components/form.js +29 -0
  24. package/dist/atheletebridge/components/form.js.map +1 -0
  25. package/dist/atheletebridge/context/AthleteBridgeContext.js +6 -6
  26. package/dist/atheletebridge/context/AthleteBridgeContext.js.map +1 -1
  27. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js +342 -165
  28. package/dist/atheletebridge/hooks/useAthleteBridgeApi.js.map +1 -1
  29. package/dist/atheletebridge/index.js +1 -1
  30. package/dist/atheletebridge/pages/DashboardPage.js +169 -0
  31. package/dist/atheletebridge/pages/DashboardPage.js.map +1 -0
  32. package/dist/atheletebridge/pages/StandingsPage.js +166 -0
  33. package/dist/atheletebridge/pages/StandingsPage.js.map +1 -0
  34. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js +201 -0
  35. package/dist/atheletebridge/pages/fixtures/FixtureDetailPage.js.map +1 -0
  36. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js +205 -0
  37. package/dist/atheletebridge/pages/fixtures/FixtureFormPage.js.map +1 -0
  38. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js +92 -0
  39. package/dist/atheletebridge/pages/fixtures/FixturesListPage.js.map +1 -0
  40. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js +374 -0
  41. package/dist/atheletebridge/pages/programs/ProgramDetailPage.js.map +1 -0
  42. package/dist/atheletebridge/pages/programs/ProgramFormPage.js +207 -0
  43. package/dist/atheletebridge/pages/programs/ProgramFormPage.js.map +1 -0
  44. package/dist/atheletebridge/pages/programs/ProgramsListPage.js +113 -0
  45. package/dist/atheletebridge/pages/programs/ProgramsListPage.js.map +1 -0
  46. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js +224 -0
  47. package/dist/atheletebridge/pages/sessions/SessionDetailPage.js.map +1 -0
  48. package/dist/atheletebridge/pages/sessions/SessionFormPage.js +206 -0
  49. package/dist/atheletebridge/pages/sessions/SessionFormPage.js.map +1 -0
  50. package/dist/atheletebridge/pages/sessions/SessionsListPage.js +92 -0
  51. package/dist/atheletebridge/pages/sessions/SessionsListPage.js.map +1 -0
  52. package/dist/atheletebridge/pages/teams/TeamDetailPage.js +350 -0
  53. package/dist/atheletebridge/pages/teams/TeamDetailPage.js.map +1 -0
  54. package/dist/atheletebridge/pages/teams/TeamFormPage.js +222 -0
  55. package/dist/atheletebridge/pages/teams/TeamFormPage.js.map +1 -0
  56. package/dist/atheletebridge/pages/teams/TeamsListPage.js +101 -0
  57. package/dist/atheletebridge/pages/teams/TeamsListPage.js.map +1 -0
  58. package/dist/atheletebridge/store/atheletebridgeStore.js +2 -13
  59. package/dist/atheletebridge/store/atheletebridgeStore.js.map +1 -1
  60. package/dist/atheletebridge/utils/datetime.js +10 -0
  61. package/dist/atheletebridge/utils/datetime.js.map +1 -0
  62. package/dist/atheletebridge/utils/formatters.js +1 -4
  63. package/dist/atheletebridge/utils/formatters.js.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/atheletebridge/components/InvestmentCard.js +0 -96
  66. package/dist/atheletebridge/components/InvestmentCard.js.map +0 -1
  67. package/dist/atheletebridge/components/RatingDisplay.js +0 -35
  68. package/dist/atheletebridge/components/RatingDisplay.js.map +0 -1
  69. package/dist/atheletebridge/mocks/data.js +0 -1517
  70. package/dist/atheletebridge/mocks/data.js.map +0 -1
  71. package/dist/atheletebridge/mocks/users.js +0 -34
  72. package/dist/atheletebridge/mocks/users.js.map +0 -1
  73. package/dist/atheletebridge/pages/HomePage.js +0 -936
  74. package/dist/atheletebridge/pages/HomePage.js.map +0 -1
  75. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js +0 -653
  76. package/dist/atheletebridge/pages/admin/AdminAnalyticsPage.js.map +0 -1
  77. package/dist/atheletebridge/pages/admin/AdminDashboard.js +0 -671
  78. package/dist/atheletebridge/pages/admin/AdminDashboard.js.map +0 -1
  79. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js +0 -429
  80. package/dist/atheletebridge/pages/admin/AdminFinancialPage.js.map +0 -1
  81. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js +0 -667
  82. package/dist/atheletebridge/pages/admin/AdminOrdersPage.js.map +0 -1
  83. package/dist/atheletebridge/pages/admin/AdminProfilePage.js +0 -261
  84. package/dist/atheletebridge/pages/admin/AdminProfilePage.js.map +0 -1
  85. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js +0 -653
  86. package/dist/atheletebridge/pages/admin/AdminSettingsPage.js.map +0 -1
  87. package/dist/atheletebridge/pages/admin/CartManagementPage.js +0 -876
  88. package/dist/atheletebridge/pages/admin/CartManagementPage.js.map +0 -1
  89. package/dist/atheletebridge/pages/admin/UserManagementPage.js +0 -900
  90. package/dist/atheletebridge/pages/admin/UserManagementPage.js.map +0 -1
  91. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js +0 -839
  92. package/dist/atheletebridge/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  93. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js +0 -704
  94. package/dist/atheletebridge/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  95. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js +0 -792
  96. package/dist/atheletebridge/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  97. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  98. package/dist/atheletebridge/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  99. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js +0 -633
  100. package/dist/atheletebridge/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  101. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js +0 -913
  102. package/dist/atheletebridge/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  103. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js +0 -881
  104. package/dist/atheletebridge/pages/cart-owner/OrderManagementPage.js.map +0 -1
  105. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js +0 -841
  106. package/dist/atheletebridge/pages/cart-owner/StaffManagementPage.js.map +0 -1
  107. package/dist/atheletebridge/pages/common/HelpSupportPage.js +0 -1319
  108. package/dist/atheletebridge/pages/common/HelpSupportPage.js.map +0 -1
  109. package/dist/atheletebridge/pages/common/NotificationCenterPage.js +0 -674
  110. package/dist/atheletebridge/pages/common/NotificationCenterPage.js.map +0 -1
  111. package/dist/atheletebridge/pages/common/SettingsPage.js +0 -972
  112. package/dist/atheletebridge/pages/common/SettingsPage.js.map +0 -1
  113. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js +0 -602
  114. package/dist/atheletebridge/pages/customer/BookingDetailsPage.js.map +0 -1
  115. package/dist/atheletebridge/pages/customer/CartDetailPage.js +0 -656
  116. package/dist/atheletebridge/pages/customer/CartDetailPage.js.map +0 -1
  117. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js +0 -558
  118. package/dist/atheletebridge/pages/customer/CartDiscoveryPage.js.map +0 -1
  119. package/dist/atheletebridge/pages/customer/CheckoutPage.js +0 -536
  120. package/dist/atheletebridge/pages/customer/CheckoutPage.js.map +0 -1
  121. package/dist/atheletebridge/pages/customer/CustomerDashboard.js +0 -539
  122. package/dist/atheletebridge/pages/customer/CustomerDashboard.js.map +0 -1
  123. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js +0 -657
  124. package/dist/atheletebridge/pages/customer/CustomerProfilePage.js.map +0 -1
  125. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js +0 -635
  126. package/dist/atheletebridge/pages/customer/DirectServiceBookingPage.js.map +0 -1
  127. package/dist/atheletebridge/pages/customer/FavoritesPage.js +0 -486
  128. package/dist/atheletebridge/pages/customer/FavoritesPage.js.map +0 -1
  129. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js +0 -447
  130. package/dist/atheletebridge/pages/customer/OrderHistoryPage.js.map +0 -1
  131. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js +0 -393
  132. package/dist/atheletebridge/pages/customer/OrderTrackingPage.js.map +0 -1
  133. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js +0 -494
  134. package/dist/atheletebridge/pages/customer/PaymentMethodsPage.js.map +0 -1
  135. package/dist/atheletebridge/pages/customer/ReviewsPage.js +0 -615
  136. package/dist/atheletebridge/pages/customer/ReviewsPage.js.map +0 -1
  137. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js +0 -451
  138. package/dist/atheletebridge/pages/customer/SavedAddressesPage.js.map +0 -1
  139. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js +0 -881
  140. package/dist/atheletebridge/pages/investor/InvestmentDetailsPage.js.map +0 -1
  141. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js +0 -945
  142. package/dist/atheletebridge/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  143. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js +0 -686
  144. package/dist/atheletebridge/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  145. package/dist/atheletebridge/pages/investor/InvestorDashboard.js +0 -453
  146. package/dist/atheletebridge/pages/investor/InvestorDashboard.js.map +0 -1
  147. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js +0 -405
  148. package/dist/atheletebridge/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  149. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js +0 -577
  150. package/dist/atheletebridge/pages/investor/InvestorPortfolioPage.js.map +0 -1
  151. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js +0 -1069
  152. package/dist/atheletebridge/pages/investor/InvestorProfilePage.js.map +0 -1
  153. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js +0 -530
  154. package/dist/atheletebridge/pages/worker/TaskDetailsPage.js.map +0 -1
  155. package/dist/atheletebridge/pages/worker/WorkerDashboard.js +0 -669
  156. package/dist/atheletebridge/pages/worker/WorkerDashboard.js.map +0 -1
  157. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js +0 -681
  158. package/dist/atheletebridge/pages/worker/WorkerOrdersPage.js.map +0 -1
  159. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js +0 -691
  160. package/dist/atheletebridge/pages/worker/WorkerProfilePage.js.map +0 -1
  161. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js +0 -588
  162. package/dist/atheletebridge/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,876 +0,0 @@
1
- import { useAthleteBridge as e } from "../../context/AthleteBridgeContext.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/atheletebridge/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-green-500/20 text-green-600 dark:text-green-400",
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-yellow-500/20 text-yellow-600 dark:text-yellow-400",
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-blue-500/20 text-blue-600 dark:text-blue-400",
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-red-500/20 text-red-600 dark:text-red-400",
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-green-500/20 text-green-600 dark:text-green-400",
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-green-500" : e >= 60 ? "bg-yellow-500" : "bg-red-500"),
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
- className: "mb-6",
212
- children: "Oversee every service provider on the platform. Approve or reject new cart applications, monitor active and rejected carts, search and filter the full directory, and act on any cart that needs attention. This is mission control for the provider side of the marketplace."
213
- }),
214
- /* @__PURE__ */ v(b, {
215
- className: "mb-6",
216
- children: /* @__PURE__ */ v("div", {
217
- className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3",
218
- children: [
219
- {
220
- label: "Total Carts",
221
- value: R.totalCarts,
222
- cls: ""
223
- },
224
- {
225
- label: "Active",
226
- value: R.activeCarts,
227
- cls: "bg-green-500/10 border-green-500/30"
228
- },
229
- {
230
- label: "Pending",
231
- value: R.pendingApproval,
232
- cls: "bg-yellow-500/10 border-yellow-500/30"
233
- },
234
- {
235
- label: "Rejected",
236
- value: R.rejectedCarts,
237
- cls: "bg-red-500/10 border-red-500/30"
238
- },
239
- {
240
- label: "Total Revenue",
241
- value: i(R.totalRevenue, { minimumFractionDigits: 0 }),
242
- cls: "col-span-2 min-w-fit"
243
- },
244
- {
245
- label: "Avg Rating",
246
- value: `${R.averageRating}`,
247
- cls: ""
248
- },
249
- {
250
- label: "New Apps",
251
- value: R.newApplications,
252
- cls: "bg-blue-500/10 border-blue-500/30"
253
- }
254
- ].map((e) => /* @__PURE__ */ y("div", {
255
- className: t("rounded-lg border border-border-subtle bg-bg-surface p-3", e.cls),
256
- children: [/* @__PURE__ */ v("p", {
257
- className: "text-xs text-text-secondary",
258
- children: e.label
259
- }), /* @__PURE__ */ v("p", {
260
- className: "text-lg font-bold text-text-primary",
261
- children: e.value
262
- })]
263
- }, e.label))
264
- })
265
- }),
266
- /* @__PURE__ */ v("div", {
267
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
268
- children: /* @__PURE__ */ y("div", {
269
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3",
270
- children: [
271
- /* @__PURE__ */ y("div", {
272
- className: "relative",
273
- 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", {
274
- type: "text",
275
- placeholder: "Search carts...",
276
- value: I.searchQuery,
277
- onChange: (e) => B("searchQuery", e.target.value),
278
- className: "w-full rounded-lg border border-border-subtle 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)]"
279
- })]
280
- }),
281
- /* @__PURE__ */ y("select", {
282
- value: I.status,
283
- onChange: (e) => B("status", e.target.value),
284
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
285
- children: [
286
- /* @__PURE__ */ v("option", {
287
- value: "",
288
- children: "All Status"
289
- }),
290
- /* @__PURE__ */ v("option", {
291
- value: "active",
292
- children: "Active"
293
- }),
294
- /* @__PURE__ */ v("option", {
295
- value: "inactive",
296
- children: "Inactive"
297
- })
298
- ]
299
- }),
300
- /* @__PURE__ */ y("select", {
301
- value: I.verificationStatus,
302
- onChange: (e) => B("verificationStatus", e.target.value),
303
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
304
- children: [
305
- /* @__PURE__ */ v("option", {
306
- value: "",
307
- children: "All Verification"
308
- }),
309
- /* @__PURE__ */ v("option", {
310
- value: "verified",
311
- children: "Verified"
312
- }),
313
- /* @__PURE__ */ v("option", {
314
- value: "pending",
315
- children: "Pending"
316
- }),
317
- /* @__PURE__ */ v("option", {
318
- value: "rejected",
319
- children: "Rejected"
320
- })
321
- ]
322
- }),
323
- /* @__PURE__ */ y("select", {
324
- value: I.category,
325
- onChange: (e) => B("category", e.target.value),
326
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
327
- children: [
328
- /* @__PURE__ */ v("option", {
329
- value: "",
330
- children: "All Categories"
331
- }),
332
- /* @__PURE__ */ v("option", {
333
- value: "Food & Beverage",
334
- children: "Food & Beverage"
335
- }),
336
- /* @__PURE__ */ v("option", {
337
- value: "Beverages",
338
- children: "Beverages"
339
- }),
340
- /* @__PURE__ */ v("option", {
341
- value: "Street Food",
342
- children: "Street Food"
343
- }),
344
- /* @__PURE__ */ v("option", {
345
- value: "Fast Food",
346
- children: "Fast Food"
347
- })
348
- ]
349
- }),
350
- /* @__PURE__ */ v("input", {
351
- type: "text",
352
- placeholder: "Location...",
353
- value: I.location,
354
- onChange: (e) => B("location", e.target.value),
355
- className: "rounded-lg border border-border-subtle 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)]"
356
- }),
357
- /* @__PURE__ */ y("select", {
358
- value: I.sortBy,
359
- onChange: (e) => B("sortBy", e.target.value),
360
- className: "rounded-lg border border-border-subtle bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
361
- children: [
362
- /* @__PURE__ */ v("option", {
363
- value: "recent",
364
- children: "Most Recent"
365
- }),
366
- /* @__PURE__ */ v("option", {
367
- value: "name",
368
- children: "Name A-Z"
369
- }),
370
- /* @__PURE__ */ v("option", {
371
- value: "rating",
372
- children: "Highest Rated"
373
- }),
374
- /* @__PURE__ */ v("option", {
375
- value: "revenue",
376
- children: "Highest Revenue"
377
- }),
378
- /* @__PURE__ */ v("option", {
379
- value: "compliance",
380
- children: "Best Compliance"
381
- })
382
- ]
383
- })
384
- ]
385
- })
386
- }),
387
- /* @__PURE__ */ y("div", {
388
- className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
389
- children: [
390
- /* @__PURE__ */ v("div", {
391
- className: "block md:hidden space-y-4 p-4",
392
- children: w.map((e) => /* @__PURE__ */ y("div", {
393
- className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
394
- children: [
395
- /* @__PURE__ */ y("div", {
396
- className: "flex items-center mb-3",
397
- children: [/* @__PURE__ */ v("img", {
398
- src: e.image,
399
- alt: e.name,
400
- className: "w-16 h-16 rounded-lg object-cover mr-3"
401
- }), /* @__PURE__ */ y("div", {
402
- className: "flex-1 min-w-0",
403
- children: [
404
- /* @__PURE__ */ v("h3", {
405
- className: "font-medium text-text-primary text-lg truncate",
406
- children: e.name
407
- }),
408
- /* @__PURE__ */ v("p", {
409
- className: "text-sm text-text-secondary truncate",
410
- children: e.category
411
- }),
412
- /* @__PURE__ */ v("p", {
413
- className: "text-sm text-text-secondary truncate",
414
- children: e.address
415
- })
416
- ]
417
- })]
418
- }),
419
- /* @__PURE__ */ y("div", {
420
- className: "grid grid-cols-2 gap-4 mb-3 text-sm",
421
- children: [/* @__PURE__ */ y("div", { children: [
422
- /* @__PURE__ */ v("p", {
423
- className: "text-text-secondary font-medium",
424
- children: "Owner"
425
- }),
426
- /* @__PURE__ */ v("p", {
427
- className: "text-text-primary",
428
- children: e.ownerName
429
- }),
430
- /* @__PURE__ */ v("p", {
431
- className: "text-text-secondary text-xs",
432
- children: e.ownerPhone
433
- })
434
- ] }), /* @__PURE__ */ y("div", { children: [
435
- /* @__PURE__ */ v("p", {
436
- className: "text-text-secondary font-medium",
437
- children: "Performance"
438
- }),
439
- /* @__PURE__ */ y("p", {
440
- className: "text-text-primary",
441
- children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
442
- }),
443
- /* @__PURE__ */ y("p", {
444
- className: "text-text-secondary text-xs",
445
- children: [e.monthlyOrders, " orders"]
446
- })
447
- ] })]
448
- }),
449
- /* @__PURE__ */ y("div", {
450
- className: "flex flex-wrap gap-2 mb-3",
451
- children: [
452
- G(e.isActive),
453
- W(e),
454
- e.rating > 0 && /* @__PURE__ */ y("span", {
455
- className: "inline-flex items-center gap-1 rounded-full px-2.5 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
456
- children: [
457
- /* @__PURE__ */ v(m, { className: "h-3 w-3 fill-current" }),
458
- e.rating,
459
- " (",
460
- e.reviewCount,
461
- ")"
462
- ]
463
- })
464
- ]
465
- }),
466
- /* @__PURE__ */ y("div", {
467
- className: "mb-3",
468
- children: [
469
- /* @__PURE__ */ y("div", {
470
- className: "flex items-center justify-between text-sm mb-1",
471
- children: [/* @__PURE__ */ v("span", {
472
- className: "text-text-secondary",
473
- children: "Compliance"
474
- }), /* @__PURE__ */ y("span", {
475
- className: "font-medium text-text-primary",
476
- children: [e.complianceScore, "%"]
477
- })]
478
- }),
479
- K(e.complianceScore),
480
- /* @__PURE__ */ y("p", {
481
- className: "text-xs text-text-secondary mt-1",
482
- children: [
483
- "Docs: ",
484
- e.documentsSubmitted,
485
- "/",
486
- e.documentsRequired,
487
- " • Applied:",
488
- " ",
489
- U(e.applicationDate)
490
- ]
491
- })
492
- ]
493
- }),
494
- /* @__PURE__ */ y("div", {
495
- className: "flex flex-wrap gap-2",
496
- children: [
497
- /* @__PURE__ */ v("button", {
498
- type: "button",
499
- onClick: () => V(e, "view"),
500
- className: "flex-1 rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
501
- children: "View Details"
502
- }),
503
- !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("button", {
504
- type: "button",
505
- onClick: () => V(e, "approve"),
506
- 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",
507
- children: "Approve"
508
- }), /* @__PURE__ */ v("button", {
509
- type: "button",
510
- onClick: () => V(e, "reject"),
511
- className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
512
- children: "Reject"
513
- })] }),
514
- e.inspectionStatus === "pending" && /* @__PURE__ */ v("button", {
515
- type: "button",
516
- onClick: () => V(e, "inspect"),
517
- className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
518
- children: "Inspect"
519
- }),
520
- e.isActive && /* @__PURE__ */ v("button", {
521
- type: "button",
522
- onClick: () => V(e, "suspend"),
523
- className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
524
- children: "Suspend"
525
- })
526
- ]
527
- })
528
- ]
529
- }, e.id))
530
- }),
531
- /* @__PURE__ */ v("div", {
532
- className: "hidden md:block overflow-x-auto",
533
- children: /* @__PURE__ */ y("table", {
534
- className: "w-full",
535
- children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
536
- className: "border-b border-border-subtle bg-bg-sunken/50",
537
- children: [
538
- /* @__PURE__ */ v("th", {
539
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
540
- children: "Cart"
541
- }),
542
- /* @__PURE__ */ v("th", {
543
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
544
- children: "Owner"
545
- }),
546
- /* @__PURE__ */ v("th", {
547
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
548
- children: "Status"
549
- }),
550
- /* @__PURE__ */ v("th", {
551
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
552
- children: "Performance"
553
- }),
554
- /* @__PURE__ */ v("th", {
555
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
556
- children: "Compliance"
557
- }),
558
- /* @__PURE__ */ v("th", {
559
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
560
- children: "Actions"
561
- })
562
- ]
563
- }) }), /* @__PURE__ */ v("tbody", {
564
- className: "divide-y divide-border",
565
- children: w.map((e) => /* @__PURE__ */ y("tr", {
566
- className: "hover:bg-accent/50 transition-colors",
567
- children: [
568
- /* @__PURE__ */ v("td", {
569
- className: "px-4 py-3",
570
- children: /* @__PURE__ */ y("div", {
571
- className: "flex items-center gap-3",
572
- children: [/* @__PURE__ */ v("img", {
573
- src: e.image,
574
- alt: e.name,
575
- className: "w-12 h-12 rounded-lg object-cover"
576
- }), /* @__PURE__ */ y("div", {
577
- className: "min-w-0",
578
- children: [
579
- /* @__PURE__ */ v("p", {
580
- className: "text-sm font-medium text-text-primary truncate",
581
- children: e.name
582
- }),
583
- /* @__PURE__ */ v("p", {
584
- className: "text-xs text-text-secondary truncate",
585
- children: e.category
586
- }),
587
- /* @__PURE__ */ v("p", {
588
- className: "text-xs text-text-secondary truncate",
589
- children: e.address
590
- })
591
- ]
592
- })]
593
- })
594
- }),
595
- /* @__PURE__ */ y("td", {
596
- className: "px-4 py-3 text-sm",
597
- children: [
598
- /* @__PURE__ */ v("p", {
599
- className: "font-medium text-text-primary",
600
- children: e.ownerName
601
- }),
602
- /* @__PURE__ */ v("p", {
603
- className: "text-xs text-text-secondary",
604
- children: e.ownerEmail
605
- }),
606
- /* @__PURE__ */ v("p", {
607
- className: "text-xs text-text-secondary",
608
- children: e.ownerPhone
609
- })
610
- ]
611
- }),
612
- /* @__PURE__ */ v("td", {
613
- className: "px-4 py-3",
614
- children: /* @__PURE__ */ y("div", {
615
- className: "space-y-1",
616
- children: [
617
- G(e.isActive),
618
- /* @__PURE__ */ v("br", {}),
619
- W(e),
620
- e.rating > 0 && /* @__PURE__ */ y("div", {
621
- className: "text-sm flex items-center gap-1 mt-1",
622
- children: [
623
- /* @__PURE__ */ v(m, { className: "h-3 w-3 fill-yellow-400 text-yellow-400" }),
624
- e.rating,
625
- " ",
626
- /* @__PURE__ */ y("span", {
627
- className: "text-text-secondary",
628
- children: [
629
- "(",
630
- e.reviewCount,
631
- ")"
632
- ]
633
- })
634
- ]
635
- })
636
- ]
637
- })
638
- }),
639
- /* @__PURE__ */ y("td", {
640
- className: "px-4 py-3 text-sm",
641
- children: [/* @__PURE__ */ y("p", {
642
- className: "text-text-primary",
643
- children: [i(e.monthlyRevenue, { minimumFractionDigits: 0 }), "/mo"]
644
- }), /* @__PURE__ */ y("p", {
645
- className: "text-text-secondary",
646
- children: [e.monthlyOrders, " orders/mo"]
647
- })]
648
- }),
649
- /* @__PURE__ */ y("td", {
650
- className: "px-4 py-3 text-sm",
651
- children: [
652
- /* @__PURE__ */ y("div", {
653
- className: "flex items-center gap-2 mb-1",
654
- children: [/* @__PURE__ */ v("div", {
655
- className: "w-16",
656
- children: K(e.complianceScore)
657
- }), /* @__PURE__ */ y("span", {
658
- className: "font-medium text-text-primary",
659
- children: [e.complianceScore, "%"]
660
- })]
661
- }),
662
- /* @__PURE__ */ y("p", {
663
- className: "text-xs text-text-secondary",
664
- children: [
665
- "Docs: ",
666
- e.documentsSubmitted,
667
- "/",
668
- e.documentsRequired
669
- ]
670
- }),
671
- /* @__PURE__ */ y("p", {
672
- className: "text-xs text-text-secondary",
673
- children: ["Applied: ", U(e.applicationDate)]
674
- })
675
- ]
676
- }),
677
- /* @__PURE__ */ v("td", {
678
- className: "px-4 py-3",
679
- children: /* @__PURE__ */ y("div", {
680
- className: "flex flex-col gap-1",
681
- children: [
682
- /* @__PURE__ */ y("button", {
683
- type: "button",
684
- onClick: () => V(e, "view"),
685
- 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",
686
- children: [/* @__PURE__ */ v(u, { className: "h-4 w-4" }), " View"]
687
- }),
688
- !e.isVerified && e.inspectionStatus !== "failed" && /* @__PURE__ */ y("div", {
689
- className: "flex gap-1",
690
- children: [/* @__PURE__ */ v("button", {
691
- type: "button",
692
- onClick: () => V(e, "approve"),
693
- className: "rounded p-1.5 text-text-secondary hover:text-green-600 hover:bg-green-500/10 transition-colors",
694
- children: /* @__PURE__ */ v(c, { className: "h-4 w-4" })
695
- }), /* @__PURE__ */ v("button", {
696
- type: "button",
697
- onClick: () => V(e, "reject"),
698
- className: "rounded p-1.5 text-text-secondary hover:text-red-600 hover:bg-red-500/10 transition-colors",
699
- children: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
700
- })]
701
- }),
702
- e.inspectionStatus === "pending" && /* @__PURE__ */ y("button", {
703
- type: "button",
704
- onClick: () => V(e, "inspect"),
705
- className: "rounded p-1.5 text-text-secondary hover:text-blue-600 hover:bg-blue-500/10 transition-colors inline-flex items-center gap-1 text-xs",
706
- children: [/* @__PURE__ */ v(l, { className: "h-4 w-4" }), " Inspect"]
707
- }),
708
- e.isActive && /* @__PURE__ */ v("button", {
709
- type: "button",
710
- onClick: () => V(e, "suspend"),
711
- className: "rounded p-1.5 text-text-secondary hover:text-red-600 hover:bg-red-500/10 transition-colors",
712
- children: /* @__PURE__ */ v(f, { className: "h-4 w-4" })
713
- })
714
- ]
715
- })
716
- })
717
- ]
718
- }, e.id))
719
- })]
720
- })
721
- }),
722
- w.length === 0 && /* @__PURE__ */ v(r, {
723
- illustration: "empty-search",
724
- title: "No carts found",
725
- description: "No service providers match your current filters. Try adjusting your search or status filter."
726
- })
727
- ]
728
- }),
729
- A && O && /* @__PURE__ */ v("div", {
730
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
731
- children: /* @__PURE__ */ y("div", {
732
- className: "w-full max-w-2xl rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
733
- children: [/* @__PURE__ */ y("div", {
734
- className: "flex items-center justify-between p-4 border-b border-border-subtle",
735
- children: [/* @__PURE__ */ v("h3", {
736
- className: "text-lg font-semibold text-text-primary",
737
- children: M === "view" ? "Cart Details" : M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
738
- }), /* @__PURE__ */ v("button", {
739
- type: "button",
740
- onClick: () => j(!1),
741
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
742
- children: /* @__PURE__ */ v(h, { className: "h-5 w-5" })
743
- })]
744
- }), /* @__PURE__ */ y("div", {
745
- className: "p-4 space-y-4",
746
- children: [
747
- /* @__PURE__ */ y("div", {
748
- className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
749
- children: [
750
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
751
- className: "text-sm text-text-secondary",
752
- children: "Cart Name"
753
- }), /* @__PURE__ */ v("p", {
754
- className: "font-medium text-text-primary",
755
- children: O.name
756
- })] }),
757
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
758
- className: "text-sm text-text-secondary",
759
- children: "Category"
760
- }), /* @__PURE__ */ v("p", {
761
- className: "font-medium text-text-primary",
762
- children: O.category
763
- })] }),
764
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
765
- className: "text-sm text-text-secondary",
766
- children: "Owner"
767
- }), /* @__PURE__ */ v("p", {
768
- className: "font-medium text-text-primary",
769
- children: O.ownerName
770
- })] }),
771
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
772
- className: "text-sm text-text-secondary",
773
- children: "Contact"
774
- }), /* @__PURE__ */ v("p", {
775
- className: "font-medium text-text-primary",
776
- children: O.ownerPhone
777
- })] })
778
- ]
779
- }),
780
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
781
- className: "text-sm text-text-secondary",
782
- children: "Description"
783
- }), /* @__PURE__ */ v("p", {
784
- className: "font-medium text-text-primary",
785
- children: O.description
786
- })] }),
787
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
788
- className: "text-sm text-text-secondary",
789
- children: "Location"
790
- }), /* @__PURE__ */ v("p", {
791
- className: "font-medium text-text-primary",
792
- children: O.address
793
- })] }),
794
- /* @__PURE__ */ y("div", {
795
- className: "grid grid-cols-1 sm:grid-cols-3 gap-4",
796
- children: [
797
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
798
- className: "text-sm text-text-secondary",
799
- children: "Compliance Score"
800
- }), /* @__PURE__ */ y("p", {
801
- className: "font-medium text-text-primary",
802
- children: [O.complianceScore, "%"]
803
- })] }),
804
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
805
- className: "text-sm text-text-secondary",
806
- children: "Documents"
807
- }), /* @__PURE__ */ y("p", {
808
- className: "font-medium text-text-primary",
809
- children: [
810
- O.documentsSubmitted,
811
- "/",
812
- O.documentsRequired
813
- ]
814
- })] }),
815
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
816
- className: "text-sm text-text-secondary",
817
- children: "Monthly Revenue"
818
- }), /* @__PURE__ */ v("p", {
819
- className: "font-medium text-text-primary",
820
- children: i(O.monthlyRevenue, { minimumFractionDigits: 0 })
821
- })] })
822
- ]
823
- }),
824
- O.rejectionReason && /* @__PURE__ */ y("div", {
825
- className: "rounded-lg border border-red-500/30 bg-red-500/10 p-4",
826
- children: [/* @__PURE__ */ v("p", {
827
- className: "text-sm font-medium text-red-600 dark:text-red-400",
828
- children: "Previous Rejection Reason:"
829
- }), /* @__PURE__ */ v("p", {
830
- className: "text-sm text-red-600/80 dark:text-red-400/80",
831
- children: O.rejectionReason
832
- })]
833
- }),
834
- M === "reject" && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
835
- className: "block text-sm font-medium text-text-primary mb-2",
836
- children: "Rejection Reason *"
837
- }), /* @__PURE__ */ v("textarea", {
838
- className: "w-full rounded-lg border border-border-subtle 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]",
839
- rows: 4,
840
- value: P,
841
- onChange: (e) => F(e.target.value),
842
- placeholder: "Please provide a detailed reason for rejection..."
843
- })] }),
844
- M === "approve" && /* @__PURE__ */ v("div", {
845
- className: "rounded-lg border border-green-500/30 bg-green-500/10 p-4",
846
- children: /* @__PURE__ */ v("p", {
847
- className: "text-sm text-green-600 dark:text-green-400",
848
- children: "This will approve the cart for operation on the platform. The cart owner will be notified and the cart will become active."
849
- })
850
- }),
851
- /* @__PURE__ */ y("div", {
852
- className: "flex gap-3 pt-2",
853
- children: [/* @__PURE__ */ v("button", {
854
- type: "button",
855
- onClick: () => j(!1),
856
- className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
857
- children: "Cancel"
858
- }), M !== "view" && /* @__PURE__ */ v("button", {
859
- type: "button",
860
- onClick: H,
861
- disabled: M === "reject" && !P.trim(),
862
- 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",
863
- children: M === "approve" ? "Approve Cart" : M === "reject" ? "Reject Cart" : M === "suspend" ? "Suspend Cart" : "Schedule Inspection"
864
- })]
865
- })
866
- ]
867
- })]
868
- })
869
- })
870
- ]
871
- });
872
- }
873
- //#endregion
874
- export { C as CartManagementPage };
875
-
876
- //# sourceMappingURL=CartManagementPage.js.map