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