@burdenoff/microfe-subscriberbot 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 (141) hide show
  1. package/dist/index.js +4 -4
  2. package/dist/subscriberbot/SubscriberBotRoot.js +61 -133
  3. package/dist/subscriberbot/SubscriberBotRoot.js.map +1 -1
  4. package/dist/subscriberbot/SubscriberBotRoutes.js +56 -187
  5. package/dist/subscriberbot/SubscriberBotRoutes.js.map +1 -1
  6. package/dist/subscriberbot/components/StateViews.js +49 -0
  7. package/dist/subscriberbot/components/StateViews.js.map +1 -0
  8. package/dist/subscriberbot/components/StatusBadge.js +45 -47
  9. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  10. package/dist/subscriberbot/context/SubscriberBotContext.js +22 -30
  11. package/dist/subscriberbot/context/SubscriberBotContext.js.map +1 -1
  12. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +342 -195
  13. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  14. package/dist/subscriberbot/index.js +1 -1
  15. package/dist/subscriberbot/pages/DashboardPage.js +269 -0
  16. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -0
  17. package/dist/subscriberbot/pages/InboxPage.js +186 -0
  18. package/dist/subscriberbot/pages/InboxPage.js.map +1 -0
  19. package/dist/subscriberbot/pages/InvoicesPage.js +211 -0
  20. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -0
  21. package/dist/subscriberbot/pages/WorkflowsPage.js +236 -0
  22. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -0
  23. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +160 -0
  24. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -0
  25. package/dist/subscriberbot/pages/agents/AgentNewPage.js +140 -0
  26. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -0
  27. package/dist/subscriberbot/pages/agents/AgentsListPage.js +178 -0
  28. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -0
  29. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +179 -0
  30. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -0
  31. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +185 -0
  32. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -0
  33. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +254 -0
  34. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -0
  35. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +306 -0
  36. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -0
  37. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +253 -0
  38. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -0
  39. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +248 -0
  40. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -0
  41. package/dist/subscriberbot/utils/formatters.js +50 -32
  42. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  43. package/package.json +1 -1
  44. package/dist/subscriberbot/components/InvestmentCard.js +0 -97
  45. package/dist/subscriberbot/components/InvestmentCard.js.map +0 -1
  46. package/dist/subscriberbot/components/RatingDisplay.js +0 -35
  47. package/dist/subscriberbot/components/RatingDisplay.js.map +0 -1
  48. package/dist/subscriberbot/mocks/data.js +0 -1517
  49. package/dist/subscriberbot/mocks/data.js.map +0 -1
  50. package/dist/subscriberbot/mocks/users.js +0 -34
  51. package/dist/subscriberbot/mocks/users.js.map +0 -1
  52. package/dist/subscriberbot/pages/HomePage.js +0 -930
  53. package/dist/subscriberbot/pages/HomePage.js.map +0 -1
  54. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js +0 -651
  55. package/dist/subscriberbot/pages/admin/AdminAnalyticsPage.js.map +0 -1
  56. package/dist/subscriberbot/pages/admin/AdminDashboard.js +0 -679
  57. package/dist/subscriberbot/pages/admin/AdminDashboard.js.map +0 -1
  58. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js +0 -427
  59. package/dist/subscriberbot/pages/admin/AdminFinancialPage.js.map +0 -1
  60. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js +0 -665
  61. package/dist/subscriberbot/pages/admin/AdminOrdersPage.js.map +0 -1
  62. package/dist/subscriberbot/pages/admin/AdminProfilePage.js +0 -261
  63. package/dist/subscriberbot/pages/admin/AdminProfilePage.js.map +0 -1
  64. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js +0 -654
  65. package/dist/subscriberbot/pages/admin/AdminSettingsPage.js.map +0 -1
  66. package/dist/subscriberbot/pages/admin/CartManagementPage.js +0 -874
  67. package/dist/subscriberbot/pages/admin/CartManagementPage.js.map +0 -1
  68. package/dist/subscriberbot/pages/admin/UserManagementPage.js +0 -898
  69. package/dist/subscriberbot/pages/admin/UserManagementPage.js.map +0 -1
  70. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js +0 -839
  71. package/dist/subscriberbot/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
  72. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js +0 -705
  73. package/dist/subscriberbot/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
  74. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js +0 -802
  75. package/dist/subscriberbot/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
  76. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js +0 -891
  77. package/dist/subscriberbot/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
  78. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js +0 -633
  79. package/dist/subscriberbot/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
  80. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js +0 -910
  81. package/dist/subscriberbot/pages/cart-owner/InventoryManagementPage.js.map +0 -1
  82. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js +0 -879
  83. package/dist/subscriberbot/pages/cart-owner/OrderManagementPage.js.map +0 -1
  84. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js +0 -838
  85. package/dist/subscriberbot/pages/cart-owner/StaffManagementPage.js.map +0 -1
  86. package/dist/subscriberbot/pages/common/HelpSupportPage.js +0 -1323
  87. package/dist/subscriberbot/pages/common/HelpSupportPage.js.map +0 -1
  88. package/dist/subscriberbot/pages/common/NotificationCenterPage.js +0 -672
  89. package/dist/subscriberbot/pages/common/NotificationCenterPage.js.map +0 -1
  90. package/dist/subscriberbot/pages/common/SettingsPage.js +0 -973
  91. package/dist/subscriberbot/pages/common/SettingsPage.js.map +0 -1
  92. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js +0 -626
  93. package/dist/subscriberbot/pages/customer/BookingDetailsPage.js.map +0 -1
  94. package/dist/subscriberbot/pages/customer/CartDetailPage.js +0 -654
  95. package/dist/subscriberbot/pages/customer/CartDetailPage.js.map +0 -1
  96. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js +0 -555
  97. package/dist/subscriberbot/pages/customer/CartDiscoveryPage.js.map +0 -1
  98. package/dist/subscriberbot/pages/customer/CheckoutPage.js +0 -529
  99. package/dist/subscriberbot/pages/customer/CheckoutPage.js.map +0 -1
  100. package/dist/subscriberbot/pages/customer/CustomerDashboard.js +0 -532
  101. package/dist/subscriberbot/pages/customer/CustomerDashboard.js.map +0 -1
  102. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js +0 -630
  103. package/dist/subscriberbot/pages/customer/CustomerProfilePage.js.map +0 -1
  104. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js +0 -633
  105. package/dist/subscriberbot/pages/customer/DirectServiceBookingPage.js.map +0 -1
  106. package/dist/subscriberbot/pages/customer/FavoritesPage.js +0 -484
  107. package/dist/subscriberbot/pages/customer/FavoritesPage.js.map +0 -1
  108. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js +0 -446
  109. package/dist/subscriberbot/pages/customer/OrderHistoryPage.js.map +0 -1
  110. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js +0 -394
  111. package/dist/subscriberbot/pages/customer/OrderTrackingPage.js.map +0 -1
  112. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js +0 -495
  113. package/dist/subscriberbot/pages/customer/PaymentMethodsPage.js.map +0 -1
  114. package/dist/subscriberbot/pages/customer/ReviewsPage.js +0 -613
  115. package/dist/subscriberbot/pages/customer/ReviewsPage.js.map +0 -1
  116. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js +0 -450
  117. package/dist/subscriberbot/pages/customer/SavedAddressesPage.js.map +0 -1
  118. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js +0 -886
  119. package/dist/subscriberbot/pages/investor/InvestmentDetailsPage.js.map +0 -1
  120. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js +0 -947
  121. package/dist/subscriberbot/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
  122. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js +0 -687
  123. package/dist/subscriberbot/pages/investor/InvestorAnalyticsPage.js.map +0 -1
  124. package/dist/subscriberbot/pages/investor/InvestorDashboard.js +0 -451
  125. package/dist/subscriberbot/pages/investor/InvestorDashboard.js.map +0 -1
  126. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js +0 -406
  127. package/dist/subscriberbot/pages/investor/InvestorInvestmentsPage.js.map +0 -1
  128. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js +0 -575
  129. package/dist/subscriberbot/pages/investor/InvestorPortfolioPage.js.map +0 -1
  130. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js +0 -1070
  131. package/dist/subscriberbot/pages/investor/InvestorProfilePage.js.map +0 -1
  132. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js +0 -535
  133. package/dist/subscriberbot/pages/worker/TaskDetailsPage.js.map +0 -1
  134. package/dist/subscriberbot/pages/worker/WorkerDashboard.js +0 -666
  135. package/dist/subscriberbot/pages/worker/WorkerDashboard.js.map +0 -1
  136. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js +0 -681
  137. package/dist/subscriberbot/pages/worker/WorkerOrdersPage.js.map +0 -1
  138. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js +0 -692
  139. package/dist/subscriberbot/pages/worker/WorkerProfilePage.js.map +0 -1
  140. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js +0 -588
  141. package/dist/subscriberbot/pages/worker/WorkerSchedulePage.js.map +0 -1
@@ -1,898 +0,0 @@
1
- import { useSubscriberBot as e } from "../../context/SubscriberBotContext.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/subscriberbot/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-status-info-bg/20 text-status-info-text",
177
- cart_owner: "bg-status-success-bg/20 text-status-success-text",
178
- worker: "bg-status-warning-bg/20 text-status-warning-text",
179
- investor: "bg-accent-purple-subtle text-accent-purple",
180
- admin: "bg-status-error-bg/20 text-status-error-text"
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-status-success-bg/20 text-status-success-text",
192
- inactive: "bg-secondary text-secondary-foreground",
193
- suspended: "bg-status-error-bg/20 text-status-error-text",
194
- pending: "bg-status-warning-bg/20 text-status-warning-text"
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
- icon: /* @__PURE__ */ x(v, { className: "h-4 w-4" }),
214
- className: "mb-6",
215
- children: "The directory of everyone on the platform — customers, cart owners, workers and investors. Search and filter to find an account, review its status and role, and take action when something looks off (verify, suspend or follow up). Use the stats up top to keep a pulse on growth and active users."
216
- }),
217
- /* @__PURE__ */ x(C, {
218
- className: "grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-8 gap-3 mb-6",
219
- children: [
220
- {
221
- label: "Total Users",
222
- value: U.totalUsers.toLocaleString("en-IN"),
223
- cls: ""
224
- },
225
- {
226
- label: "Active",
227
- value: U.activeUsers.toLocaleString("en-IN"),
228
- cls: "bg-status-success-bg/10 border-status-success-border/30"
229
- },
230
- {
231
- label: "New (30d)",
232
- value: U.newUsers.toString(),
233
- cls: "bg-status-info-bg/10 border-status-info-border/30"
234
- },
235
- {
236
- label: "Verified",
237
- value: U.verifiedUsers.toLocaleString("en-IN"),
238
- cls: "bg-accent-purple-subtle border-accent-purple/30"
239
- },
240
- {
241
- label: "Customers",
242
- value: U.customers.toLocaleString("en-IN"),
243
- cls: ""
244
- },
245
- {
246
- label: "Cart Owners",
247
- value: U.cartOwners.toString(),
248
- cls: ""
249
- },
250
- {
251
- label: "Workers",
252
- value: U.workers.toString(),
253
- cls: ""
254
- },
255
- {
256
- label: "Investors",
257
- value: U.investors.toString(),
258
- cls: ""
259
- }
260
- ].map((e) => /* @__PURE__ */ S("div", {
261
- className: t("rounded-lg border border-border-seam bg-bg-surface p-3", e.cls),
262
- children: [/* @__PURE__ */ x("p", {
263
- className: "text-xs text-text-secondary",
264
- children: e.label
265
- }), /* @__PURE__ */ x("p", {
266
- className: "text-lg font-bold text-text-primary",
267
- children: e.value
268
- })]
269
- }, e.label))
270
- }),
271
- /* @__PURE__ */ x("div", {
272
- className: "rounded-lg border border-border-seam bg-bg-surface p-4 mb-6",
273
- children: /* @__PURE__ */ S("div", {
274
- className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-3",
275
- children: [
276
- /* @__PURE__ */ S("div", {
277
- className: "relative",
278
- 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", {
279
- type: "text",
280
- placeholder: "Search users...",
281
- value: V.searchQuery,
282
- onChange: (e) => G("searchQuery", e.target.value),
283
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 pl-10 pr-4 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
284
- })]
285
- }),
286
- /* @__PURE__ */ S("select", {
287
- value: V.role,
288
- onChange: (e) => G("role", e.target.value),
289
- className: "rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
290
- children: [
291
- /* @__PURE__ */ x("option", {
292
- value: "",
293
- children: "All Roles"
294
- }),
295
- /* @__PURE__ */ x("option", {
296
- value: "customer",
297
- children: "Customers"
298
- }),
299
- /* @__PURE__ */ x("option", {
300
- value: "cart_owner",
301
- children: "Cart Owners"
302
- }),
303
- /* @__PURE__ */ x("option", {
304
- value: "worker",
305
- children: "Workers"
306
- }),
307
- /* @__PURE__ */ x("option", {
308
- value: "investor",
309
- children: "Investors"
310
- })
311
- ]
312
- }),
313
- /* @__PURE__ */ S("select", {
314
- value: V.status,
315
- onChange: (e) => G("status", e.target.value),
316
- className: "rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
317
- children: [
318
- /* @__PURE__ */ x("option", {
319
- value: "",
320
- children: "All Status"
321
- }),
322
- /* @__PURE__ */ x("option", {
323
- value: "active",
324
- children: "Active"
325
- }),
326
- /* @__PURE__ */ x("option", {
327
- value: "inactive",
328
- children: "Inactive"
329
- }),
330
- /* @__PURE__ */ x("option", {
331
- value: "suspended",
332
- children: "Suspended"
333
- }),
334
- /* @__PURE__ */ x("option", {
335
- value: "pending",
336
- children: "Pending"
337
- })
338
- ]
339
- }),
340
- /* @__PURE__ */ S("select", {
341
- value: V.registrationDate,
342
- onChange: (e) => G("registrationDate", e.target.value),
343
- className: "rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
344
- children: [
345
- /* @__PURE__ */ x("option", {
346
- value: "",
347
- children: "All Time"
348
- }),
349
- /* @__PURE__ */ x("option", {
350
- value: "1",
351
- children: "Last 24 hours"
352
- }),
353
- /* @__PURE__ */ x("option", {
354
- value: "7",
355
- children: "Last 7 days"
356
- }),
357
- /* @__PURE__ */ x("option", {
358
- value: "30",
359
- children: "Last 30 days"
360
- }),
361
- /* @__PURE__ */ x("option", {
362
- value: "90",
363
- children: "Last 90 days"
364
- })
365
- ]
366
- }),
367
- /* @__PURE__ */ S("select", {
368
- value: V.sortBy,
369
- onChange: (e) => G("sortBy", e.target.value),
370
- className: "rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
371
- children: [
372
- /* @__PURE__ */ x("option", {
373
- value: "recent",
374
- children: "Most Recent"
375
- }),
376
- /* @__PURE__ */ x("option", {
377
- value: "name",
378
- children: "Name A-Z"
379
- }),
380
- /* @__PURE__ */ x("option", {
381
- value: "activity",
382
- children: "Last Activity"
383
- })
384
- ]
385
- })
386
- ]
387
- })
388
- }),
389
- /* @__PURE__ */ S("div", {
390
- className: "rounded-lg border border-border-seam bg-bg-surface overflow-hidden",
391
- children: [
392
- /* @__PURE__ */ x("div", {
393
- className: "block md:hidden space-y-4 p-4",
394
- children: Z.map((e) => /* @__PURE__ */ S("div", {
395
- className: "rounded-lg border border-border-seam bg-bg-sunken/30 p-4",
396
- children: [
397
- /* @__PURE__ */ S("div", {
398
- className: "flex items-center mb-3",
399
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
400
- src: e.profilePicture,
401
- alt: `${e.firstName} ${e.lastName}`,
402
- className: "w-12 h-12 rounded-full object-cover mr-3"
403
- }) : /* @__PURE__ */ x("div", {
404
- className: "w-12 h-12 rounded-full bg-bg-sunken flex items-center justify-center mr-3",
405
- children: /* @__PURE__ */ x(v, { className: "h-6 w-6 text-text-secondary" })
406
- }), /* @__PURE__ */ S("div", {
407
- className: "flex-1 min-w-0",
408
- children: [
409
- /* @__PURE__ */ S("h3", {
410
- className: "font-medium text-text-primary",
411
- children: [
412
- e.firstName,
413
- " ",
414
- e.lastName
415
- ]
416
- }),
417
- /* @__PURE__ */ x("p", {
418
- className: "text-sm text-text-secondary truncate",
419
- children: e.email
420
- }),
421
- /* @__PURE__ */ x("p", {
422
- className: "text-sm text-text-secondary",
423
- children: e.phone
424
- })
425
- ]
426
- })]
427
- }),
428
- /* @__PURE__ */ S("div", {
429
- className: "flex flex-wrap gap-2 mb-3",
430
- children: [Q(e.role), $(e.status)]
431
- }),
432
- /* @__PURE__ */ S("div", {
433
- className: "grid grid-cols-2 gap-4 text-sm mb-3",
434
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
435
- className: "text-text-secondary",
436
- children: "Registered"
437
- }), /* @__PURE__ */ x("p", {
438
- className: "text-text-primary",
439
- children: Y(e.registrationDate)
440
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
441
- className: "text-text-secondary",
442
- children: "Last Login"
443
- }), /* @__PURE__ */ x("p", {
444
- className: "text-text-primary",
445
- children: e.lastLoginTime ? Y(e.lastLoginTime) : "Never"
446
- })] })]
447
- }),
448
- /* @__PURE__ */ S("div", {
449
- className: "flex flex-wrap gap-3 mb-3",
450
- children: [
451
- /* @__PURE__ */ S("div", {
452
- className: "flex items-center",
453
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
454
- className: "text-sm text-text-secondary",
455
- children: "Email"
456
- })]
457
- }),
458
- /* @__PURE__ */ S("div", {
459
- className: "flex items-center",
460
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
461
- className: "text-sm text-text-secondary",
462
- children: "Phone"
463
- })]
464
- }),
465
- e.kycStatus && /* @__PURE__ */ S("div", {
466
- className: "flex items-center",
467
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full mr-2", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
468
- className: "text-sm text-text-secondary",
469
- children: "KYC"
470
- })]
471
- })
472
- ]
473
- }),
474
- /* @__PURE__ */ S("div", {
475
- className: "flex flex-wrap gap-2",
476
- children: [
477
- /* @__PURE__ */ x("button", {
478
- type: "button",
479
- onClick: () => K(e, "edit"),
480
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
481
- children: "Edit"
482
- }),
483
- e.status === "active" ? /* @__PURE__ */ x("button", {
484
- type: "button",
485
- onClick: () => K(e, "suspend"),
486
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors",
487
- children: "Suspend"
488
- }) : /* @__PURE__ */ x("button", {
489
- type: "button",
490
- onClick: () => K(e, "activate"),
491
- className: "rounded-lg border border-border-seam px-3 py-1.5 text-sm font-medium text-status-success-text hover:bg-status-success-bg/10 transition-colors",
492
- children: "Activate"
493
- }),
494
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
495
- type: "button",
496
- onClick: () => K(e, "verify"),
497
- 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",
498
- children: "Verify"
499
- })
500
- ]
501
- })
502
- ]
503
- }, e.id))
504
- }),
505
- /* @__PURE__ */ x("div", {
506
- className: "hidden md:block overflow-x-auto",
507
- children: /* @__PURE__ */ S("table", {
508
- className: "w-full",
509
- children: [/* @__PURE__ */ x("thead", { children: /* @__PURE__ */ S("tr", {
510
- className: "border-b border-border-seam bg-bg-sunken/50",
511
- children: [
512
- /* @__PURE__ */ x("th", {
513
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
514
- children: "User"
515
- }),
516
- /* @__PURE__ */ x("th", {
517
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
518
- children: "Role & Status"
519
- }),
520
- /* @__PURE__ */ x("th", {
521
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
522
- children: "Activity"
523
- }),
524
- /* @__PURE__ */ x("th", {
525
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
526
- children: "Performance"
527
- }),
528
- /* @__PURE__ */ x("th", {
529
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
530
- children: "Verification"
531
- }),
532
- /* @__PURE__ */ x("th", {
533
- className: "px-4 py-3 text-left text-xs font-medium text-text-secondary uppercase tracking-wider",
534
- children: "Actions"
535
- })
536
- ]
537
- }) }), /* @__PURE__ */ x("tbody", {
538
- className: "divide-y divide-border",
539
- children: Z.map((e) => /* @__PURE__ */ S("tr", {
540
- className: "hover:bg-accent/50 transition-colors",
541
- children: [
542
- /* @__PURE__ */ x("td", {
543
- className: "px-4 py-3",
544
- children: /* @__PURE__ */ S("div", {
545
- className: "flex items-center gap-3",
546
- children: [e.profilePicture ? /* @__PURE__ */ x("img", {
547
- src: e.profilePicture,
548
- alt: `${e.firstName}`,
549
- className: "w-10 h-10 rounded-full object-cover"
550
- }) : /* @__PURE__ */ x("div", {
551
- className: "w-10 h-10 rounded-full bg-bg-sunken flex items-center justify-center",
552
- children: /* @__PURE__ */ x(v, { className: "h-5 w-5 text-text-secondary" })
553
- }), /* @__PURE__ */ S("div", { children: [
554
- /* @__PURE__ */ S("p", {
555
- className: "text-sm font-medium text-text-primary",
556
- children: [
557
- e.firstName,
558
- " ",
559
- e.lastName
560
- ]
561
- }),
562
- /* @__PURE__ */ x("p", {
563
- className: "text-xs text-text-secondary",
564
- children: e.email
565
- }),
566
- /* @__PURE__ */ x("p", {
567
- className: "text-xs text-text-secondary",
568
- children: e.phone
569
- })
570
- ] })]
571
- })
572
- }),
573
- /* @__PURE__ */ x("td", {
574
- className: "px-4 py-3",
575
- children: /* @__PURE__ */ S("div", {
576
- className: "space-y-1",
577
- children: [
578
- Q(e.role),
579
- /* @__PURE__ */ x("br", {}),
580
- $(e.status)
581
- ]
582
- })
583
- }),
584
- /* @__PURE__ */ S("td", {
585
- className: "px-4 py-3 text-sm",
586
- children: [
587
- /* @__PURE__ */ S("p", {
588
- className: "text-text-primary",
589
- children: ["Registered: ", Y(e.registrationDate)]
590
- }),
591
- e.lastLoginTime && /* @__PURE__ */ S("p", {
592
- className: "text-text-secondary",
593
- children: ["Last login: ", Y(e.lastLoginTime)]
594
- }),
595
- e.deviceInfo && /* @__PURE__ */ S("p", {
596
- className: "text-text-secondary flex items-center gap-1",
597
- children: [/* @__PURE__ */ x(m, { className: "h-3 w-3" }), e.deviceInfo]
598
- })
599
- ]
600
- }),
601
- /* @__PURE__ */ S("td", {
602
- className: "px-4 py-3 text-sm",
603
- children: [
604
- e.role === "customer" && e.totalOrders != null && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("p", {
605
- className: "text-text-primary",
606
- children: [e.totalOrders, " orders"]
607
- }), /* @__PURE__ */ S("p", {
608
- className: "text-text-secondary",
609
- children: [X(e.totalSpent ?? 0), " spent"]
610
- })] }),
611
- (e.role === "cart_owner" || e.role === "worker") && e.totalEarnings != null && /* @__PURE__ */ S("p", {
612
- className: "text-text-primary",
613
- children: [X(e.totalEarnings), " earned"]
614
- }),
615
- e.role === "investor" && e.riskScore != null && /* @__PURE__ */ S("p", {
616
- className: "text-text-primary",
617
- children: [
618
- "Risk: ",
619
- e.riskScore,
620
- "/5"
621
- ]
622
- })
623
- ]
624
- }),
625
- /* @__PURE__ */ x("td", {
626
- className: "px-4 py-3",
627
- children: /* @__PURE__ */ S("div", {
628
- className: "space-y-1",
629
- children: [
630
- /* @__PURE__ */ S("div", {
631
- className: "flex items-center gap-2",
632
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isEmailVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
633
- className: "text-sm text-text-secondary",
634
- children: "Email"
635
- })]
636
- }),
637
- /* @__PURE__ */ S("div", {
638
- className: "flex items-center gap-2",
639
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.isPhoneVerified ? "bg-status-success-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
640
- className: "text-sm text-text-secondary",
641
- children: "Phone"
642
- })]
643
- }),
644
- e.kycStatus && /* @__PURE__ */ S("div", {
645
- className: "flex items-center gap-2",
646
- children: [/* @__PURE__ */ x("span", { className: t("w-2 h-2 rounded-full", e.kycStatus === "verified" ? "bg-status-success-text" : e.kycStatus === "pending" ? "bg-status-warning-text" : "bg-status-error-text") }), /* @__PURE__ */ x("span", {
647
- className: "text-sm text-text-secondary",
648
- children: "KYC"
649
- })]
650
- })
651
- ]
652
- })
653
- }),
654
- /* @__PURE__ */ x("td", {
655
- className: "px-4 py-3",
656
- children: /* @__PURE__ */ S("div", {
657
- className: "flex gap-1",
658
- children: [
659
- /* @__PURE__ */ x("button", {
660
- type: "button",
661
- onClick: () => K(e, "edit"),
662
- title: "Edit",
663
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
664
- children: /* @__PURE__ */ x(u, { className: "h-4 w-4" })
665
- }),
666
- e.status === "active" ? /* @__PURE__ */ x("button", {
667
- type: "button",
668
- onClick: () => K(e, "suspend"),
669
- title: "Suspend",
670
- className: "rounded p-1.5 text-text-secondary hover:text-status-error-text hover:bg-status-error-bg/10 transition-colors",
671
- children: /* @__PURE__ */ x(_, { className: "h-4 w-4" })
672
- }) : /* @__PURE__ */ x("button", {
673
- type: "button",
674
- onClick: () => K(e, "activate"),
675
- title: "Activate",
676
- className: "rounded p-1.5 text-text-secondary hover:text-status-success-text hover:bg-status-success-bg/10 transition-colors",
677
- children: /* @__PURE__ */ x(g, { className: "h-4 w-4" })
678
- }),
679
- e.kycStatus === "pending" && /* @__PURE__ */ x("button", {
680
- type: "button",
681
- onClick: () => K(e, "verify"),
682
- title: "Verify",
683
- className: "rounded p-1.5 text-text-secondary hover:text-status-info-text hover:bg-status-info-bg/10 transition-colors",
684
- children: /* @__PURE__ */ x(p, { className: "h-4 w-4" })
685
- })
686
- ]
687
- })
688
- })
689
- ]
690
- }, e.id))
691
- })]
692
- })
693
- }),
694
- D.length === 0 && /* @__PURE__ */ x(r, {
695
- illustration: "empty-people",
696
- title: "No users found",
697
- description: "No users match your current filters. Try broadening your search criteria."
698
- })
699
- ]
700
- }),
701
- /* @__PURE__ */ S("div", {
702
- className: "mt-6 flex flex-col sm:flex-row sm:items-center justify-between gap-4",
703
- children: [/* @__PURE__ */ S("p", {
704
- className: "text-sm text-text-secondary text-center sm:text-left",
705
- children: [
706
- "Showing",
707
- " ",
708
- /* @__PURE__ */ x("span", {
709
- className: "font-medium",
710
- children: Math.min((z - 1) * 10 + 1, D.length)
711
- }),
712
- " ",
713
- "to",
714
- " ",
715
- /* @__PURE__ */ x("span", {
716
- className: "font-medium",
717
- children: Math.min(z * 10, D.length)
718
- }),
719
- " ",
720
- "of ",
721
- /* @__PURE__ */ x("span", {
722
- className: "font-medium",
723
- children: D.length
724
- }),
725
- " results"
726
- ]
727
- }), /* @__PURE__ */ S("div", {
728
- className: "flex justify-center sm:justify-end gap-2",
729
- children: [/* @__PURE__ */ S("button", {
730
- type: "button",
731
- disabled: z === 1,
732
- onClick: () => B((e) => Math.max(1, e - 1)),
733
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam 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__ */ x(c, { className: "h-4 w-4" }), "Previous"]
735
- }), /* @__PURE__ */ S("button", {
736
- type: "button",
737
- disabled: z * 10 >= D.length,
738
- onClick: () => B((e) => e + 1),
739
- className: "flex items-center gap-1.5 rounded-lg border border-border-seam 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__ */ x(l, { className: "h-4 w-4" })]
741
- })]
742
- })]
743
- }),
744
- N && j && /* @__PURE__ */ x("div", {
745
- className: "fixed inset-0 z-50 flex items-center justify-center bg-bg-canvas/50 p-4",
746
- children: /* @__PURE__ */ S("div", {
747
- className: "w-full max-w-md rounded-lg border border-border-seam bg-bg-surface shadow-lg max-h-[90vh] overflow-y-auto",
748
- children: [/* @__PURE__ */ S("div", {
749
- className: "flex items-center justify-between p-4 border-b border-border-seam",
750
- children: [/* @__PURE__ */ x("h3", {
751
- className: "text-lg font-semibold text-text-primary",
752
- children: F === "edit" ? "Edit User" : "Delete User"
753
- }), /* @__PURE__ */ x("button", {
754
- type: "button",
755
- onClick: () => P(!1),
756
- className: "rounded p-1.5 text-text-secondary hover:text-text-primary hover:bg-accent transition-colors",
757
- children: /* @__PURE__ */ x(y, { className: "h-5 w-5" })
758
- })]
759
- }), /* @__PURE__ */ x("div", {
760
- className: "p-4",
761
- children: F === "delete" ? /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("p", {
762
- className: "text-text-secondary mb-4",
763
- children: [
764
- "Are you sure you want to delete user \"",
765
- j.firstName,
766
- " ",
767
- j.lastName,
768
- "\"? This action cannot be undone."
769
- ]
770
- }), /* @__PURE__ */ S("div", {
771
- className: "flex gap-3",
772
- children: [/* @__PURE__ */ x("button", {
773
- type: "button",
774
- onClick: () => P(!1),
775
- className: "flex-1 rounded-lg border border-border-seam py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
776
- children: "Cancel"
777
- }), /* @__PURE__ */ x("button", {
778
- type: "button",
779
- onClick: q,
780
- className: "flex-1 rounded-lg bg-status-error-text hover:bg-status-error-text py-2 text-sm font-medium text-text-inverse transition-colors",
781
- children: "Delete User"
782
- })]
783
- })] }) : /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("div", {
784
- className: "space-y-4",
785
- children: [
786
- /* @__PURE__ */ S("div", {
787
- className: "grid grid-cols-2 gap-4",
788
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
789
- className: "block text-sm font-medium text-text-secondary mb-1",
790
- children: "First Name"
791
- }), /* @__PURE__ */ x("input", {
792
- type: "text",
793
- value: L.firstName,
794
- onChange: (e) => R((t) => ({
795
- ...t,
796
- firstName: e.target.value
797
- })),
798
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
799
- })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
800
- className: "block text-sm font-medium text-text-secondary mb-1",
801
- children: "Last Name"
802
- }), /* @__PURE__ */ x("input", {
803
- type: "text",
804
- value: L.lastName,
805
- onChange: (e) => R((t) => ({
806
- ...t,
807
- lastName: e.target.value
808
- })),
809
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
810
- })] })]
811
- }),
812
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
813
- className: "block text-sm font-medium text-text-secondary mb-1",
814
- children: "Email"
815
- }), /* @__PURE__ */ x("input", {
816
- type: "email",
817
- value: L.email,
818
- onChange: (e) => R((t) => ({
819
- ...t,
820
- email: e.target.value
821
- })),
822
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
823
- })] }),
824
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
825
- className: "block text-sm font-medium text-text-secondary mb-1",
826
- children: "Phone"
827
- }), /* @__PURE__ */ x("input", {
828
- type: "tel",
829
- value: L.phone,
830
- onChange: (e) => R((t) => ({
831
- ...t,
832
- phone: e.target.value
833
- })),
834
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
835
- })] }),
836
- /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
837
- className: "block text-sm font-medium text-text-secondary mb-1",
838
- children: "Role"
839
- }), /* @__PURE__ */ S("select", {
840
- value: L.role,
841
- onChange: (e) => R((t) => ({
842
- ...t,
843
- role: e.target.value
844
- })),
845
- className: "w-full rounded-lg border border-border-seam bg-bg-surface py-2 px-3 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
846
- children: [
847
- /* @__PURE__ */ x("option", {
848
- value: "customer",
849
- children: "Customer"
850
- }),
851
- /* @__PURE__ */ x("option", {
852
- value: "cart_owner",
853
- children: "Cart Owner"
854
- }),
855
- /* @__PURE__ */ x("option", {
856
- value: "worker",
857
- children: "Worker"
858
- }),
859
- /* @__PURE__ */ x("option", {
860
- value: "investor",
861
- children: "Investor"
862
- })
863
- ]
864
- })] })
865
- ]
866
- }), /* @__PURE__ */ S("div", {
867
- className: "flex gap-3 mt-6",
868
- children: [
869
- /* @__PURE__ */ x("button", {
870
- type: "button",
871
- onClick: () => P(!1),
872
- className: "flex-1 rounded-lg border border-border-seam py-2 text-sm font-medium text-text-primary hover:bg-accent transition-colors",
873
- children: "Cancel"
874
- }),
875
- /* @__PURE__ */ x("button", {
876
- type: "button",
877
- onClick: J,
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__ */ x("button", {
882
- type: "button",
883
- onClick: () => I("delete"),
884
- className: "rounded-lg border border-border-seam py-2 px-3 text-sm font-medium text-status-error-text hover:bg-status-error-bg/10 transition-colors",
885
- children: /* @__PURE__ */ x(h, { className: "h-4 w-4" })
886
- })
887
- ]
888
- })] })
889
- })]
890
- })
891
- })
892
- ]
893
- });
894
- }
895
- //#endregion
896
- export { E as UserManagementPage };
897
-
898
- //# sourceMappingURL=UserManagementPage.js.map