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