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