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