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