@burdenoff/microfe-atheletebridge 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 (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,900 +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 { useCallback as i, useEffect as a, useMemo as o, useState as s } from "react";
6
- import { ChevronLeft as c, ChevronRight as l, Edit3 as u, Loader2 as d, Search as f, Shield as p, Smartphone as m, Trash2 as h, UserCheck as g, UserX as _, Users as v, X as y } from "lucide-react";
7
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
8
- import { EmphasisPanel as C, PagePurpose as w } from "@burdenoff/fe-libs/ui";
9
- //#region src/atheletebridge/pages/admin/UserManagementPage.tsx
10
- var T = [
11
- {
12
- id: "user-001",
13
- email: "rahul.sharma@gmail.com",
14
- phone: "+91 98765 43210",
15
- firstName: "Rahul",
16
- lastName: "Sharma",
17
- role: "customer",
18
- isEmailVerified: !0,
19
- isPhoneVerified: !0,
20
- profilePicture: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=100",
21
- status: "active",
22
- lastLoginTime: "2024-06-23T16:45:00Z",
23
- totalOrders: 45,
24
- totalSpent: 12350,
25
- registrationDate: "2024-01-15T08:30:00Z",
26
- deviceInfo: "iPhone 14 Pro"
27
- },
28
- {
29
- id: "user-002",
30
- email: "priya.patel@gmail.com",
31
- phone: "+91 98765 43211",
32
- firstName: "Priya",
33
- lastName: "Patel",
34
- role: "cart_owner",
35
- isEmailVerified: !0,
36
- isPhoneVerified: !0,
37
- profilePicture: "https://images.unsplash.com/photo-1494790108377-be9c29b29330?w=100",
38
- status: "active",
39
- lastLoginTime: "2024-06-24T09:15:00Z",
40
- totalEarnings: 285e3,
41
- kycStatus: "verified",
42
- registrationDate: "2023-08-20T10:15:00Z",
43
- deviceInfo: "Android Samsung"
44
- },
45
- {
46
- id: "user-003",
47
- email: "amit.kumar@gmail.com",
48
- phone: "+91 98765 43212",
49
- firstName: "Amit",
50
- lastName: "Kumar",
51
- role: "worker",
52
- isEmailVerified: !0,
53
- isPhoneVerified: !1,
54
- profilePicture: "https://images.unsplash.com/photo-1500648767791-00dcc994a43e?w=100",
55
- status: "suspended",
56
- lastLoginTime: "2024-06-15T14:30:00Z",
57
- totalEarnings: 45e3,
58
- kycStatus: "pending",
59
- registrationDate: "2024-02-10T12:45:00Z",
60
- deviceInfo: "Web Browser"
61
- },
62
- {
63
- id: "user-004",
64
- email: "sneha.investor@gmail.com",
65
- phone: "+91 98765 43213",
66
- firstName: "Sneha",
67
- lastName: "Reddy",
68
- role: "investor",
69
- isEmailVerified: !0,
70
- isPhoneVerified: !0,
71
- profilePicture: "https://images.unsplash.com/photo-1438761681033-6461ffad8d80?w=100",
72
- status: "active",
73
- lastLoginTime: "2024-06-24T10:30:00Z",
74
- kycStatus: "verified",
75
- riskScore: 2.1,
76
- registrationDate: "2023-12-01T15:20:00Z",
77
- deviceInfo: "MacBook Pro"
78
- },
79
- {
80
- id: "user-005",
81
- email: "new.user@gmail.com",
82
- phone: "+91 98765 43214",
83
- firstName: "New",
84
- lastName: "User",
85
- role: "customer",
86
- isEmailVerified: !1,
87
- isPhoneVerified: !1,
88
- profilePicture: "",
89
- status: "pending",
90
- registrationDate: "2024-06-24T09:00:00Z",
91
- deviceInfo: "iPhone 15"
92
- }
93
- ];
94
- function E() {
95
- let { navigateTo: E } = e(), [D, O] = s([]), [k, A] = s(!0), [j, M] = s(null), [N, P] = s(!1), [F, I] = s("edit"), [L, R] = s({
96
- firstName: "",
97
- lastName: "",
98
- email: "",
99
- phone: "",
100
- role: ""
101
- }), [z, B] = s(1), [V, H] = s({
102
- role: "",
103
- status: "",
104
- searchQuery: "",
105
- sortBy: "recent",
106
- registrationDate: ""
107
- }), [U] = s({
108
- totalUsers: 2456,
109
- activeUsers: 2134,
110
- newUsers: 89,
111
- verifiedUsers: 2021,
112
- customers: 1845,
113
- cartOwners: 342,
114
- workers: 156,
115
- investors: 113
116
- }), W = i(() => {
117
- A(!0), setTimeout(() => {
118
- let e = [...T];
119
- if (V.searchQuery) {
120
- let t = V.searchQuery.toLowerCase();
121
- e = e.filter((e) => e.firstName.toLowerCase().includes(t) || e.lastName.toLowerCase().includes(t) || e.email.toLowerCase().includes(t) || e.phone.includes(t));
122
- }
123
- if (V.role && (e = e.filter((e) => e.role === V.role)), V.status && (e = e.filter((e) => e.status === V.status)), V.registrationDate) {
124
- let t = parseInt(V.registrationDate), n = /* @__PURE__ */ new Date(Date.now() - t * 864e5);
125
- e = e.filter((e) => new Date(e.registrationDate) >= n);
126
- }
127
- switch (V.sortBy) {
128
- case "name":
129
- e.sort((e, t) => e.firstName.localeCompare(t.firstName));
130
- break;
131
- case "activity":
132
- e.sort((e, t) => {
133
- let n = e.lastLoginTime ? new Date(e.lastLoginTime).getTime() : 0;
134
- return (t.lastLoginTime ? new Date(t.lastLoginTime).getTime() : 0) - n;
135
- });
136
- break;
137
- default: e.sort((e, t) => new Date(t.registrationDate).getTime() - new Date(e.registrationDate).getTime());
138
- }
139
- O(e), A(!1);
140
- }, 800);
141
- }, [V]);
142
- a(() => {
143
- W();
144
- }, [W]);
145
- let G = (e, t) => {
146
- H((n) => ({
147
- ...n,
148
- [e]: t
149
- })), B(1);
150
- }, K = (e, t) => {
151
- if (t === "suspend" || t === "activate" || t === "verify") {
152
- let n = t === "suspend" ? `User ${e.firstName} ${e.lastName} suspended` : t === "activate" ? `User ${e.firstName} ${e.lastName} activated` : `User ${e.firstName} ${e.lastName} verified`;
153
- alert(n), W();
154
- return;
155
- }
156
- M(e), I(t), R({
157
- firstName: e.firstName,
158
- lastName: e.lastName,
159
- email: e.email,
160
- phone: e.phone,
161
- role: e.role
162
- }), P(!0);
163
- }, q = () => {
164
- j && (alert(`User ${j.firstName} ${j.lastName} deleted`), P(!1), W());
165
- }, J = () => {
166
- alert("User updated successfully"), P(!1), W();
167
- }, Y = (e) => new Date(e).toLocaleDateString("en-IN", {
168
- year: "numeric",
169
- month: "short",
170
- day: "numeric"
171
- }), X = (e) => `₹${e.toLocaleString("en-IN")}`, Z = o(() => {
172
- let e = (z - 1) * 10;
173
- return D.slice(e, e + 10);
174
- }, [D, z]), Q = (e) => /* @__PURE__ */ x("span", {
175
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium", {
176
- customer: "bg-blue-500/20 text-blue-600 dark:text-blue-400",
177
- cart_owner: "bg-green-500/20 text-green-600 dark:text-green-400",
178
- worker: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400",
179
- investor: "bg-purple-500/20 text-purple-600 dark:text-purple-400",
180
- admin: "bg-red-500/20 text-red-600 dark:text-red-400"
181
- }[e]),
182
- children: {
183
- customer: "Customer",
184
- cart_owner: "Cart Owner",
185
- worker: "Worker",
186
- investor: "Investor",
187
- admin: "Admin"
188
- }[e] ?? e
189
- }), $ = (e) => /* @__PURE__ */ x("span", {
190
- className: t("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium capitalize", {
191
- active: "bg-green-500/20 text-green-600 dark:text-green-400",
192
- inactive: "bg-secondary text-secondary-foreground",
193
- suspended: "bg-red-500/20 text-red-600 dark:text-red-400",
194
- pending: "bg-yellow-500/20 text-yellow-600 dark:text-yellow-400"
195
- }[e]),
196
- children: e
197
- });
198
- return k ? /* @__PURE__ */ x(n, {
199
- title: "User Management",
200
- description: "Loading users...",
201
- children: /* @__PURE__ */ S("div", {
202
- className: "flex flex-col items-center justify-center py-20",
203
- children: [/* @__PURE__ */ x(d, { className: "h-10 w-10 animate-spin text-text-secondary mb-4" }), /* @__PURE__ */ x("p", {
204
- className: "text-text-secondary",
205
- children: "Loading users..."
206
- })]
207
- })
208
- }) : /* @__PURE__ */ S(n, {
209
- title: "User Management",
210
- description: `${U.totalUsers.toLocaleString("en-IN")} registered users on the platform`,
211
- children: [
212
- /* @__PURE__ */ x(w, {
213
- className: "mb-6",
214
- children: "Manage everyone on the platform — customers, cart owners, workers and investors. Search and filter the user base, review verification and activity, and take action on individual accounts. Use this page to keep the community healthy and roles correct."
215
- }),
216
- /* @__PURE__ */ x(C, {
217
- className: "mb-6",
218
- children: /* @__PURE__ */ x("div", {
219
- className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3",
220
- children: [
221
- {
222
- label: "Total Users",
223
- value: U.totalUsers.toLocaleString("en-IN"),
224
- cls: ""
225
- },
226
- {
227
- label: "Active",
228
- value: U.activeUsers.toLocaleString("en-IN"),
229
- cls: "bg-green-500/10 border-green-500/30"
230
- },
231
- {
232
- label: "New (30d)",
233
- value: U.newUsers.toString(),
234
- cls: "bg-blue-500/10 border-blue-500/30"
235
- },
236
- {
237
- label: "Verified",
238
- value: U.verifiedUsers.toLocaleString("en-IN"),
239
- cls: "bg-purple-500/10 border-purple-500/30"
240
- },
241
- {
242
- label: "Customers",
243
- value: U.customers.toLocaleString("en-IN"),
244
- cls: ""
245
- },
246
- {
247
- label: "Cart Owners",
248
- value: U.cartOwners.toString(),
249
- cls: ""
250
- },
251
- {
252
- label: "Workers",
253
- value: U.workers.toString(),
254
- cls: ""
255
- },
256
- {
257
- label: "Investors",
258
- value: U.investors.toString(),
259
- cls: ""
260
- }
261
- ].map((e) => /* @__PURE__ */ S("div", {
262
- className: t("rounded-lg border border-border-subtle bg-bg-surface p-3", e.cls),
263
- children: [/* @__PURE__ */ x("p", {
264
- className: "text-xs text-text-secondary",
265
- children: e.label
266
- }), /* @__PURE__ */ x("p", {
267
- className: "text-lg font-bold text-text-primary",
268
- children: e.value
269
- })]
270
- }, e.label))
271
- })
272
- }),
273
- /* @__PURE__ */ x("div", {
274
- className: "rounded-lg border border-border-subtle bg-bg-surface p-4 mb-6",
275
- children: /* @__PURE__ */ S("div", {
276
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",
277
- children: [
278
- /* @__PURE__ */ S("div", {
279
- className: "relative",
280
- children: [/* @__PURE__ */ x(f, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ x("input", {
281
- type: "text",
282
- placeholder: "Search users...",
283
- value: V.searchQuery,
284
- onChange: (e) => G("searchQuery", e.target.value),
285
- 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)]"
286
- })]
287
- }),
288
- /* @__PURE__ */ S("select", {
289
- value: V.role,
290
- onChange: (e) => G("role", e.target.value),
291
- 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)]",
292
- children: [
293
- /* @__PURE__ */ x("option", {
294
- value: "",
295
- children: "All Roles"
296
- }),
297
- /* @__PURE__ */ x("option", {
298
- value: "customer",
299
- children: "Customers"
300
- }),
301
- /* @__PURE__ */ x("option", {
302
- value: "cart_owner",
303
- children: "Cart Owners"
304
- }),
305
- /* @__PURE__ */ x("option", {
306
- value: "worker",
307
- children: "Workers"
308
- }),
309
- /* @__PURE__ */ x("option", {
310
- value: "investor",
311
- children: "Investors"
312
- })
313
- ]
314
- }),
315
- /* @__PURE__ */ S("select", {
316
- value: V.status,
317
- onChange: (e) => G("status", e.target.value),
318
- 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)]",
319
- children: [
320
- /* @__PURE__ */ x("option", {
321
- value: "",
322
- children: "All Status"
323
- }),
324
- /* @__PURE__ */ x("option", {
325
- value: "active",
326
- children: "Active"
327
- }),
328
- /* @__PURE__ */ x("option", {
329
- value: "inactive",
330
- children: "Inactive"
331
- }),
332
- /* @__PURE__ */ x("option", {
333
- value: "suspended",
334
- children: "Suspended"
335
- }),
336
- /* @__PURE__ */ x("option", {
337
- value: "pending",
338
- children: "Pending"
339
- })
340
- ]
341
- }),
342
- /* @__PURE__ */ S("select", {
343
- value: V.registrationDate,
344
- onChange: (e) => G("registrationDate", e.target.value),
345
- 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)]",
346
- children: [
347
- /* @__PURE__ */ x("option", {
348
- value: "",
349
- children: "All Time"
350
- }),
351
- /* @__PURE__ */ x("option", {
352
- value: "1",
353
- children: "Last 24 hours"
354
- }),
355
- /* @__PURE__ */ x("option", {
356
- value: "7",
357
- children: "Last 7 days"
358
- }),
359
- /* @__PURE__ */ x("option", {
360
- value: "30",
361
- children: "Last 30 days"
362
- }),
363
- /* @__PURE__ */ x("option", {
364
- value: "90",
365
- children: "Last 90 days"
366
- })
367
- ]
368
- }),
369
- /* @__PURE__ */ S("select", {
370
- value: V.sortBy,
371
- onChange: (e) => G("sortBy", e.target.value),
372
- 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)]",
373
- children: [
374
- /* @__PURE__ */ x("option", {
375
- value: "recent",
376
- children: "Most Recent"
377
- }),
378
- /* @__PURE__ */ x("option", {
379
- value: "name",
380
- children: "Name A-Z"
381
- }),
382
- /* @__PURE__ */ x("option", {
383
- value: "activity",
384
- children: "Last Activity"
385
- })
386
- ]
387
- })
388
- ]
389
- })
390
- }),
391
- /* @__PURE__ */ S("div", {
392
- className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
393
- children: [
394
- /* @__PURE__ */ x("div", {
395
- className: "block md:hidden space-y-4 p-4",
396
- children: Z.map((e) => /* @__PURE__ */ S("div", {
397
- className: "rounded-lg border border-border-subtle bg-bg-sunken/30 p-4",
398
- children: [
399
- /* @__PURE__ */ S("div", {
400
- className: "flex items-center mb-3",
401
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
402
- src: e.profilePicture,
403
- alt: `${e.firstName} ${e.lastName}`,
404
- className: "w-12 h-12 rounded-full object-cover mr-3"
405
- }) : /* @__PURE__ */ x("div", {
406
- className: "w-12 h-12 rounded-full bg-bg-sunken flex items-center justify-center mr-3",
407
- children: /* @__PURE__ */ x(v, { className: "h-6 w-6 text-text-secondary" })
408
- }), /* @__PURE__ */ S("div", {
409
- className: "flex-1 min-w-0",
410
- children: [
411
- /* @__PURE__ */ S("h3", {
412
- className: "font-medium text-text-primary",
413
- children: [
414
- e.firstName,
415
- " ",
416
- e.lastName
417
- ]
418
- }),
419
- /* @__PURE__ */ x("p", {
420
- className: "text-sm text-text-secondary truncate",
421
- children: e.email
422
- }),
423
- /* @__PURE__ */ x("p", {
424
- className: "text-sm text-text-secondary",
425
- children: e.phone
426
- })
427
- ]
428
- })]
429
- }),
430
- /* @__PURE__ */ S("div", {
431
- className: "flex flex-wrap gap-2 mb-3",
432
- children: [Q(e.role), $(e.status)]
433
- }),
434
- /* @__PURE__ */ S("div", {
435
- className: "grid grid-cols-2 gap-4 text-sm mb-3",
436
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
437
- className: "text-text-secondary",
438
- children: "Registered"
439
- }), /* @__PURE__ */ x("p", {
440
- className: "text-text-primary",
441
- children: Y(e.registrationDate)
442
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
443
- className: "text-text-secondary",
444
- children: "Last Login"
445
- }), /* @__PURE__ */ x("p", {
446
- className: "text-text-primary",
447
- children: e.lastLoginTime ? Y(e.lastLoginTime) : "Never"
448
- })] })]
449
- }),
450
- /* @__PURE__ */ S("div", {
451
- className: "flex flex-wrap gap-3 mb-3",
452
- children: [
453
- /* @__PURE__ */ S("div", {
454
- className: "flex items-center",
455
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isEmailVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
456
- className: "text-sm text-text-secondary",
457
- children: "Email"
458
- })]
459
- }),
460
- /* @__PURE__ */ S("div", {
461
- className: "flex items-center",
462
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isPhoneVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
463
- className: "text-sm text-text-secondary",
464
- children: "Phone"
465
- })]
466
- }),
467
- e.kycStatus && /* @__PURE__ */ S("div", {
468
- className: "flex items-center",
469
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.kycStatus === "verified" ? "bg-green-500" : e.kycStatus === "pending" ? "bg-yellow-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
470
- className: "text-sm text-text-secondary",
471
- children: "KYC"
472
- })]
473
- })
474
- ]
475
- }),
476
- /* @__PURE__ */ S("div", {
477
- className: "flex flex-wrap gap-2",
478
- children: [
479
- /* @__PURE__ */ x("button", {
480
- type: "button",
481
- onClick: () => K(e, "edit"),
482
- className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
483
- children: "Edit"
484
- }),
485
- e.status === "active" ? /* @__PURE__ */ x("button", {
486
- type: "button",
487
- onClick: () => K(e, "suspend"),
488
- 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",
489
- children: "Suspend"
490
- }) : /* @__PURE__ */ x("button", {
491
- type: "button",
492
- onClick: () => K(e, "activate"),
493
- className: "rounded-lg border border-border-subtle px-3 py-1.5 text-sm font-medium text-green-600 hover:bg-green-500/10 transition-colors",
494
- children: "Activate"
495
- }),
496
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
497
- type: "button",
498
- onClick: () => K(e, "verify"),
499
- 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",
500
- children: "Verify"
501
- })
502
- ]
503
- })
504
- ]
505
- }, e.id))
506
- }),
507
- /* @__PURE__ */ x("div", {
508
- className: "hidden md:block overflow-x-auto",
509
- children: /* @__PURE__ */ S("table", {
510
- className: "w-full",
511
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
512
- className: "border-b border-border-subtle bg-bg-sunken/50",
513
- children: [
514
- /* @__PURE__ */ x("th", {
515
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
516
- children: "User"
517
- }),
518
- /* @__PURE__ */ x("th", {
519
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
520
- children: "Role & Status"
521
- }),
522
- /* @__PURE__ */ x("th", {
523
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
524
- children: "Activity"
525
- }),
526
- /* @__PURE__ */ x("th", {
527
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
528
- children: "Performance"
529
- }),
530
- /* @__PURE__ */ x("th", {
531
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
532
- children: "Verification"
533
- }),
534
- /* @__PURE__ */ x("th", {
535
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
536
- children: "Actions"
537
- })
538
- ]
539
- }) }), /* @__PURE__ */ x("tbody", {
540
- className: "divide-y divide-border",
541
- children: Z.map((e) => /* @__PURE__ */ S("tr", {
542
- className: "hover:bg-accent/50 transition-colors",
543
- children: [
544
- /* @__PURE__ */ x("td", {
545
- className: "px-4 py-3",
546
- children: /* @__PURE__ */ S("div", {
547
- className: "flex items-center gap-3",
548
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
549
- src: e.profilePicture,
550
- alt: `${e.firstName}`,
551
- className: "w-10 h-10 rounded-full object-cover"
552
- }) : /* @__PURE__ */ x("div", {
553
- className: "w-10 h-10 rounded-full bg-bg-sunken flex items-center justify-center",
554
- children: /* @__PURE__ */ x(v, { className: "h-5 w-5 text-text-secondary" })
555
- }), /* @__PURE__ */ S("div", { children: [
556
- /* @__PURE__ */ S("p", {
557
- className: "text-sm font-medium text-text-primary",
558
- children: [
559
- e.firstName,
560
- " ",
561
- e.lastName
562
- ]
563
- }),
564
- /* @__PURE__ */ x("p", {
565
- className: "text-xs text-text-secondary",
566
- children: e.email
567
- }),
568
- /* @__PURE__ */ x("p", {
569
- className: "text-xs text-text-secondary",
570
- children: e.phone
571
- })
572
- ] })]
573
- })
574
- }),
575
- /* @__PURE__ */ x("td", {
576
- className: "px-4 py-3",
577
- children: /* @__PURE__ */ S("div", {
578
- className: "space-y-1",
579
- children: [
580
- Q(e.role),
581
- /* @__PURE__ */ x("br", {}),
582
- $(e.status)
583
- ]
584
- })
585
- }),
586
- /* @__PURE__ */ S("td", {
587
- className: "px-4 py-3 text-sm",
588
- children: [
589
- /* @__PURE__ */ S("p", {
590
- className: "text-text-primary",
591
- children: ["Registered: ", Y(e.registrationDate)]
592
- }),
593
- e.lastLoginTime && /* @__PURE__ */ S("p", {
594
- className: "text-text-secondary",
595
- children: ["Last login: ", Y(e.lastLoginTime)]
596
- }),
597
- e.deviceInfo && /* @__PURE__ */ S("p", {
598
- className: "text-text-secondary flex items-center gap-1",
599
- children: [/* @__PURE__ */ x(m, { className: "h-3 w-3" }), e.deviceInfo]
600
- })
601
- ]
602
- }),
603
- /* @__PURE__ */ S("td", {
604
- className: "px-4 py-3 text-sm",
605
- children: [
606
- e.role === "customer" && e.totalOrders != null && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("p", {
607
- className: "text-text-primary",
608
- children: [e.totalOrders, " orders"]
609
- }), /* @__PURE__ */ S("p", {
610
- className: "text-text-secondary",
611
- children: [X(e.totalSpent ?? 0), " spent"]
612
- })] }),
613
- (e.role === "cart_owner" || e.role === "worker") && e.totalEarnings != null && /* @__PURE__ */ S("p", {
614
- className: "text-text-primary",
615
- children: [X(e.totalEarnings), " earned"]
616
- }),
617
- e.role === "investor" && e.riskScore != null && /* @__PURE__ */ S("p", {
618
- className: "text-text-primary",
619
- children: [
620
- "Risk: ",
621
- e.riskScore,
622
- "/5"
623
- ]
624
- })
625
- ]
626
- }),
627
- /* @__PURE__ */ x("td", {
628
- className: "px-4 py-3",
629
- children: /* @__PURE__ */ S("div", {
630
- className: "space-y-1",
631
- children: [
632
- /* @__PURE__ */ S("div", {
633
- className: "flex items-center gap-2",
634
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isEmailVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
635
- className: "text-sm text-text-secondary",
636
- children: "Email"
637
- })]
638
- }),
639
- /* @__PURE__ */ S("div", {
640
- className: "flex items-center gap-2",
641
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isPhoneVerified ? "bg-green-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
642
- className: "text-sm text-text-secondary",
643
- children: "Phone"
644
- })]
645
- }),
646
- e.kycStatus && /* @__PURE__ */ S("div", {
647
- className: "flex items-center gap-2",
648
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.kycStatus === "verified" ? "bg-green-500" : e.kycStatus === "pending" ? "bg-yellow-500" : "bg-red-500") }), /* @__PURE__ */ x("span", {
649
- className: "text-sm text-text-secondary",
650
- children: "KYC"
651
- })]
652
- })
653
- ]
654
- })
655
- }),
656
- /* @__PURE__ */ x("td", {
657
- className: "px-4 py-3",
658
- children: /* @__PURE__ */ S("div", {
659
- className: "flex gap-1",
660
- children: [
661
- /* @__PURE__ */ x("button", {
662
- type: "button",
663
- onClick: () => K(e, "edit"),
664
- title: "Edit",
665
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
666
- children: /* @__PURE__ */ x(u, { className: "h-4 w-4" })
667
- }),
668
- e.status === "active" ? /* @__PURE__ */ x("button", {
669
- type: "button",
670
- onClick: () => K(e, "suspend"),
671
- title: "Suspend",
672
- className: "rounded p-1.5 text-text-secondary hover:text-red-600 hover:bg-red-500/10 transition-colors",
673
- children: /* @__PURE__ */ x(_, { className: "h-4 w-4" })
674
- }) : /* @__PURE__ */ x("button", {
675
- type: "button",
676
- onClick: () => K(e, "activate"),
677
- title: "Activate",
678
- className: "rounded p-1.5 text-text-secondary hover:text-green-600 hover:bg-green-500/10 transition-colors",
679
- children: /* @__PURE__ */ x(g, { className: "h-4 w-4" })
680
- }),
681
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
682
- type: "button",
683
- onClick: () => K(e, "verify"),
684
- title: "Verify",
685
- className: "rounded p-1.5 text-text-secondary hover:text-blue-600 hover:bg-blue-500/10 transition-colors",
686
- children: /* @__PURE__ */ x(p, { className: "h-4 w-4" })
687
- })
688
- ]
689
- })
690
- })
691
- ]
692
- }, e.id))
693
- })]
694
- })
695
- }),
696
- D.length === 0 && /* @__PURE__ */ x(r, {
697
- illustration: "empty-people",
698
- title: "No users found",
699
- description: "No users match your current filters. Try adjusting your search, role or status filter."
700
- })
701
- ]
702
- }),
703
- /* @__PURE__ */ S("div", {
704
- className: "mt-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",
705
- children: [/* @__PURE__ */ S("p", {
706
- className: "text-sm text-text-secondary text-center sm:text-left",
707
- children: [
708
- "Showing",
709
- " ",
710
- /* @__PURE__ */ x("span", {
711
- className: "font-medium",
712
- children: Math.min((z - 1) * 10 + 1, D.length)
713
- }),
714
- " ",
715
- "to",
716
- " ",
717
- /* @__PURE__ */ x("span", {
718
- className: "font-medium",
719
- children: Math.min(z * 10, D.length)
720
- }),
721
- " ",
722
- "of ",
723
- /* @__PURE__ */ x("span", {
724
- className: "font-medium",
725
- children: D.length
726
- }),
727
- " results"
728
- ]
729
- }), /* @__PURE__ */ S("div", {
730
- className: "flex justify-center sm:justify-end gap-2",
731
- children: [/* @__PURE__ */ S("button", {
732
- type: "button",
733
- disabled: z === 1,
734
- onClick: () => B((e) => Math.max(1, e - 1)),
735
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
736
- children: [/* @__PURE__ */ x(c, { className: "h-4 w-4" }), "Previous"]
737
- }), /* @__PURE__ */ S("button", {
738
- type: "button",
739
- disabled: z * 10 >= D.length,
740
- onClick: () => B((e) => e + 1),
741
- className: "flex items-center gap-1.5 rounded-lg border border-border-subtle px-3 py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
742
- children: ["Next", /* @__PURE__ */ x(l, { className: "h-4 w-4" })]
743
- })]
744
- })]
745
- }),
746
- N && j && /* @__PURE__ */ x("div", {
747
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
748
- children: /* @__PURE__ */ S("div", {
749
- className: "w-full max-w-md rounded-lg border border-border-subtle bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
750
- children: [/* @__PURE__ */ S("div", {
751
- className: "flex items-center justify-between p-4 border-b border-border-subtle",
752
- children: [/* @__PURE__ */ x("h3", {
753
- className: "text-lg font-semibold text-text-primary",
754
- children: F === "edit" ? "Edit User" : "Delete User"
755
- }), /* @__PURE__ */ x("button", {
756
- type: "button",
757
- onClick: () => P(!1),
758
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
759
- children: /* @__PURE__ */ x(y, { className: "h-5 w-5" })
760
- })]
761
- }), /* @__PURE__ */ x("div", {
762
- className: "p-4",
763
- children: F === "delete" ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("p", {
764
- className: "text-text-secondary mb-4",
765
- children: [
766
- "Are you sure you want to delete user \"",
767
- j.firstName,
768
- " ",
769
- j.lastName,
770
- "\"? This action cannot be undone."
771
- ]
772
- }), /* @__PURE__ */ S("div", {
773
- className: "flex gap-3",
774
- children: [/* @__PURE__ */ x("button", {
775
- type: "button",
776
- onClick: () => P(!1),
777
- className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
778
- children: "Cancel"
779
- }), /* @__PURE__ */ x("button", {
780
- type: "button",
781
- onClick: q,
782
- className: "flex-1 rounded-lg bg-red-600 hover:bg-red-700 py-2 text-sm font-medium text-white transition-colors",
783
- children: "Delete User"
784
- })]
785
- })] }) : /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
786
- className: "space-y-4",
787
- children: [
788
- /* @__PURE__ */ S("div", {
789
- className: "grid grid-cols-2 gap-4",
790
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
791
- className: "block text-sm font-medium text-text-secondary mb-1",
792
- children: "First Name"
793
- }), /* @__PURE__ */ x("input", {
794
- type: "text",
795
- value: L.firstName,
796
- onChange: (e) => R((t) => ({
797
- ...t,
798
- firstName: e.target.value
799
- })),
800
- className: "w-full 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)]"
801
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
802
- className: "block text-sm font-medium text-text-secondary mb-1",
803
- children: "Last Name"
804
- }), /* @__PURE__ */ x("input", {
805
- type: "text",
806
- value: L.lastName,
807
- onChange: (e) => R((t) => ({
808
- ...t,
809
- lastName: e.target.value
810
- })),
811
- className: "w-full 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)]"
812
- })] })]
813
- }),
814
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
815
- className: "block text-sm font-medium text-text-secondary mb-1",
816
- children: "Email"
817
- }), /* @__PURE__ */ x("input", {
818
- type: "email",
819
- value: L.email,
820
- onChange: (e) => R((t) => ({
821
- ...t,
822
- email: e.target.value
823
- })),
824
- className: "w-full 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)]"
825
- })] }),
826
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
827
- className: "block text-sm font-medium text-text-secondary mb-1",
828
- children: "Phone"
829
- }), /* @__PURE__ */ x("input", {
830
- type: "tel",
831
- value: L.phone,
832
- onChange: (e) => R((t) => ({
833
- ...t,
834
- phone: e.target.value
835
- })),
836
- className: "w-full 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)]"
837
- })] }),
838
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
839
- className: "block text-sm font-medium text-text-secondary mb-1",
840
- children: "Role"
841
- }), /* @__PURE__ */ S("select", {
842
- value: L.role,
843
- onChange: (e) => R((t) => ({
844
- ...t,
845
- role: e.target.value
846
- })),
847
- className: "w-full 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)]",
848
- children: [
849
- /* @__PURE__ */ x("option", {
850
- value: "customer",
851
- children: "Customer"
852
- }),
853
- /* @__PURE__ */ x("option", {
854
- value: "cart_owner",
855
- children: "Cart Owner"
856
- }),
857
- /* @__PURE__ */ x("option", {
858
- value: "worker",
859
- children: "Worker"
860
- }),
861
- /* @__PURE__ */ x("option", {
862
- value: "investor",
863
- children: "Investor"
864
- })
865
- ]
866
- })] })
867
- ]
868
- }), /* @__PURE__ */ S("div", {
869
- className: "flex gap-3 mt-6",
870
- children: [
871
- /* @__PURE__ */ x("button", {
872
- type: "button",
873
- onClick: () => P(!1),
874
- className: "flex-1 rounded-lg border border-border-subtle py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
875
- children: "Cancel"
876
- }),
877
- /* @__PURE__ */ x("button", {
878
- type: "button",
879
- onClick: J,
880
- 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",
881
- children: "Save Changes"
882
- }),
883
- /* @__PURE__ */ x("button", {
884
- type: "button",
885
- onClick: () => I("delete"),
886
- className: "rounded-lg border border-border-subtle py-2 px-3 text-sm font-medium text-red-600 hover:bg-red-500/10 transition-colors",
887
- children: /* @__PURE__ */ x(h, { className: "h-4 w-4" })
888
- })
889
- ]
890
- })] })
891
- })]
892
- })
893
- })
894
- ]
895
- });
896
- }
897
- //#endregion
898
- export { E as UserManagementPage };
899
-
900
- //# sourceMappingURL=UserManagementPage.js.map