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