@burdenoff/microfe-auth 2026.518.4 → 2026.519.1
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/auth/pages/LoginPage.d.ts.map +1 -1
- package/dist/auth/pages/LoginPage.js +2 -0
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/MfaSetupPage.d.ts.map +1 -1
- package/dist/auth/pages/MfaSetupPage.js +9 -4
- package/dist/auth/pages/MfaSetupPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.d.ts.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +7 -0
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.d.ts.map +1 -1
- package/dist/auth/pages/RegisterPage.js +8 -0
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SSODepositPage.d.ts.map +1 -1
- package/dist/auth/pages/SSODepositPage.js.map +1 -1
- package/dist/auth/pages/SecurityPage.d.ts.map +1 -1
- package/dist/auth/pages/SecurityPage.js +9 -0
- package/dist/auth/pages/SecurityPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.d.ts.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +39 -1
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.d.ts.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +8 -5
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserDetailsPage.d.ts +1 -1
- package/dist/auth/pages/UserDetailsPage.d.ts.map +1 -1
- package/dist/auth/pages/UserDetailsPage.js +251 -174
- package/dist/auth/pages/UserDetailsPage.js.map +1 -1
- package/dist/translations/en.d.ts +55 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,16 +3,18 @@ import { useUserOperations as t } from "../hooks/useUserOperations.js";
|
|
|
3
3
|
import { useAuthPermissions as n } from "../hooks/useAuthPermissions.js";
|
|
4
4
|
import "../hooks/index.js";
|
|
5
5
|
import { AlertIcon as r, SpinnerIcon as i } from "../components/AuthIcons.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { useCreateAuthExportJobMutation as a } from "../../generated/wspace-operations.js";
|
|
7
|
+
import { ConfirmActionDialog as o } from "../components/ConfirmActionDialog.js";
|
|
8
|
+
import { useEffect as s, useState as c } from "react";
|
|
9
|
+
import { useNavigate as l, useParams as u } from "react-router-dom";
|
|
10
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
12
|
//#region src/auth/pages/UserDetailsPage.tsx
|
|
11
|
-
var
|
|
13
|
+
var h = [
|
|
12
14
|
"SUPER_ADMIN",
|
|
13
15
|
"TENANT_ADMIN",
|
|
14
16
|
"ORG_ADMIN"
|
|
15
|
-
],
|
|
17
|
+
], g = (e) => {
|
|
16
18
|
switch (e) {
|
|
17
19
|
case "SUPER_ADMIN": return "bg-accent-purple-subtle text-accent-purple";
|
|
18
20
|
case "TENANT_ADMIN": return "bg-status-info-bg-subtle text-status-info-text";
|
|
@@ -22,7 +24,7 @@ var f = [
|
|
|
22
24
|
case "GUEST": return "bg-bg-sunken text-text-primary";
|
|
23
25
|
default: return "bg-bg-sunken text-text-primary";
|
|
24
26
|
}
|
|
25
|
-
},
|
|
27
|
+
}, _ = (e) => {
|
|
26
28
|
switch (e) {
|
|
27
29
|
case "ACTIVE": return "bg-status-success-bg-subtle text-status-success-text";
|
|
28
30
|
case "INACTIVE": return "bg-status-warning-bg-subtle text-status-warning-text";
|
|
@@ -31,308 +33,383 @@ var f = [
|
|
|
31
33
|
default: return "bg-bg-sunken text-text-primary";
|
|
32
34
|
}
|
|
33
35
|
};
|
|
34
|
-
function
|
|
35
|
-
let { id:
|
|
36
|
-
|
|
36
|
+
function v() {
|
|
37
|
+
let { id: v } = u(), y = l(), { t: b } = d(), x = (e, t) => {
|
|
38
|
+
let n = b(e);
|
|
39
|
+
return n === e ? t : n;
|
|
40
|
+
}, S = e((e) => e.isAuthenticated), C = e((e) => e.user), { canViewUsers: w, canDeleteUsers: T, isLoading: E } = n(), { getUser: D, deleteUser: O, hardDeleteUser: k } = t(), [A, j] = c(null), [M, N] = c(!0), [P, F] = c(null), [I, L] = c(null), [R, z] = c(null), [B, { loading: V }] = a(), [H, U] = c(null);
|
|
41
|
+
s(() => {
|
|
37
42
|
let e = !1;
|
|
38
|
-
if (!
|
|
39
|
-
|
|
43
|
+
if (!v) {
|
|
44
|
+
F("Missing user id"), N(!1);
|
|
40
45
|
return;
|
|
41
46
|
}
|
|
42
|
-
if (!
|
|
43
|
-
|
|
47
|
+
if (!S) {
|
|
48
|
+
N(!1);
|
|
44
49
|
return;
|
|
45
50
|
}
|
|
46
|
-
return
|
|
47
|
-
e || (t ?
|
|
51
|
+
return N(!0), F(null), D(v).then((t) => {
|
|
52
|
+
e || (t ? j(t) : F(x("auth.userDetails.userNotFound", "User not found")));
|
|
48
53
|
}).catch((t) => {
|
|
49
|
-
e ||
|
|
54
|
+
e || F(t instanceof Error ? t.message : "Failed to fetch user details");
|
|
50
55
|
}).finally(() => {
|
|
51
|
-
e ||
|
|
56
|
+
e || N(!1);
|
|
52
57
|
}), () => {
|
|
53
58
|
e = !0;
|
|
54
59
|
};
|
|
55
60
|
}, [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
v,
|
|
62
|
+
D,
|
|
63
|
+
S
|
|
59
64
|
]);
|
|
60
|
-
let
|
|
61
|
-
if (
|
|
62
|
-
let e = await
|
|
65
|
+
let W = async () => {
|
|
66
|
+
if (A) try {
|
|
67
|
+
let e = await O(A.id);
|
|
63
68
|
if (e.success) {
|
|
64
|
-
|
|
65
|
-
let e = await
|
|
66
|
-
e &&
|
|
67
|
-
} else
|
|
69
|
+
L(x("auth.userDetails.userDeactivated", "User \"{email}\" has been deactivated.").replace("{email}", A.email)), z(null);
|
|
70
|
+
let e = await D(A.id);
|
|
71
|
+
e && j(e);
|
|
72
|
+
} else F(e.message);
|
|
68
73
|
} catch (e) {
|
|
69
|
-
|
|
74
|
+
F(e instanceof Error ? e.message : "Failed to delete user");
|
|
70
75
|
}
|
|
71
|
-
},
|
|
72
|
-
if (
|
|
73
|
-
let e = await
|
|
74
|
-
e.success ? (
|
|
76
|
+
}, G = async () => {
|
|
77
|
+
if (A) try {
|
|
78
|
+
let e = await k(A.id);
|
|
79
|
+
e.success ? (z(null), y("/auth/users")) : F(e.message);
|
|
75
80
|
} catch (e) {
|
|
76
|
-
|
|
81
|
+
F(e instanceof Error ? e.message : "Failed to hard delete user");
|
|
82
|
+
}
|
|
83
|
+
}, K = async () => {
|
|
84
|
+
if (A) {
|
|
85
|
+
U(null);
|
|
86
|
+
try {
|
|
87
|
+
await B({ variables: { input: {
|
|
88
|
+
name: `User Data Export - ${A.email}`,
|
|
89
|
+
entityTypes: [
|
|
90
|
+
"user_profile",
|
|
91
|
+
"user_sessions",
|
|
92
|
+
"permission_audit_logs"
|
|
93
|
+
],
|
|
94
|
+
format: "CSV",
|
|
95
|
+
exportScope: "INDIVIDUAL",
|
|
96
|
+
includeMetadata: !0
|
|
97
|
+
} } });
|
|
98
|
+
} catch (e) {
|
|
99
|
+
U(e instanceof Error ? e.message : "Failed to start export");
|
|
100
|
+
}
|
|
77
101
|
}
|
|
78
102
|
};
|
|
79
|
-
return
|
|
103
|
+
return S ? C && !h.includes(C.role) ? /* @__PURE__ */ p("div", {
|
|
80
104
|
className: "max-w-4xl mx-auto p-6",
|
|
81
|
-
children: /* @__PURE__ */
|
|
105
|
+
children: /* @__PURE__ */ m("div", {
|
|
82
106
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
83
|
-
children: [/* @__PURE__ */
|
|
107
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
84
108
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
85
|
-
children: "You are not allowed to access this page"
|
|
86
|
-
}), /* @__PURE__ */
|
|
109
|
+
children: x("auth.userDetails.notAllowed", "You are not allowed to access this page")
|
|
110
|
+
}), /* @__PURE__ */ p("p", {
|
|
87
111
|
className: "text-text-secondary",
|
|
88
|
-
children: "This page is restricted to administrators only."
|
|
112
|
+
children: x("auth.userDetails.notAllowedDesc", "This page is restricted to administrators only.")
|
|
89
113
|
})]
|
|
90
114
|
})
|
|
91
|
-
}) :
|
|
115
|
+
}) : E || M ? /* @__PURE__ */ p("div", {
|
|
92
116
|
className: "max-w-4xl mx-auto p-6",
|
|
93
|
-
children: /* @__PURE__ */
|
|
117
|
+
children: /* @__PURE__ */ m("div", {
|
|
94
118
|
className: "text-center py-16",
|
|
95
|
-
|
|
119
|
+
"aria-live": "polite",
|
|
120
|
+
"aria-busy": "true",
|
|
121
|
+
children: [/* @__PURE__ */ p(i, {
|
|
122
|
+
className: "w-8 h-8 mx-auto text-text-secondary animate-spin",
|
|
123
|
+
"aria-hidden": "true"
|
|
124
|
+
}), /* @__PURE__ */ p("p", {
|
|
96
125
|
className: "mt-4 text-text-secondary",
|
|
97
|
-
children: "Loading user..."
|
|
126
|
+
children: x("auth.userDetails.loading", "Loading user...")
|
|
98
127
|
})]
|
|
99
128
|
})
|
|
100
|
-
}) :
|
|
129
|
+
}) : w ? P || !A ? /* @__PURE__ */ m("div", {
|
|
101
130
|
className: "max-w-4xl mx-auto p-6",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
103
|
-
|
|
131
|
+
children: [/* @__PURE__ */ m("button", {
|
|
132
|
+
type: "button",
|
|
133
|
+
onClick: () => y("/auth/users"),
|
|
104
134
|
className: "mb-6 flex items-center gap-2 text-text-link hover:underline font-medium",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
106
136
|
className: "w-4 h-4",
|
|
107
137
|
fill: "none",
|
|
108
138
|
viewBox: "0 0 24 24",
|
|
109
139
|
stroke: "currentColor",
|
|
110
|
-
|
|
140
|
+
"aria-hidden": "true",
|
|
141
|
+
children: /* @__PURE__ */ p("path", {
|
|
111
142
|
strokeLinecap: "round",
|
|
112
143
|
strokeLinejoin: "round",
|
|
113
144
|
strokeWidth: 2,
|
|
114
145
|
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
115
146
|
})
|
|
116
|
-
}), "Back to Users"]
|
|
117
|
-
}), /* @__PURE__ */
|
|
147
|
+
}), x("auth.userDetails.backToUsers", "Back to Users")]
|
|
148
|
+
}), /* @__PURE__ */ m("div", {
|
|
149
|
+
role: "alert",
|
|
118
150
|
className: "flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ p(r, {
|
|
152
|
+
className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5",
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}), /* @__PURE__ */ p("p", {
|
|
120
155
|
className: "text-sm text-status-error-text",
|
|
121
|
-
children:
|
|
156
|
+
children: P ?? x("auth.userDetails.userNotFound", "User not found")
|
|
122
157
|
})]
|
|
123
158
|
})]
|
|
124
|
-
}) : /* @__PURE__ */
|
|
159
|
+
}) : /* @__PURE__ */ m("div", {
|
|
125
160
|
className: "max-w-4xl mx-auto p-6",
|
|
126
161
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
open:
|
|
162
|
+
/* @__PURE__ */ p(o, {
|
|
163
|
+
open: R !== null,
|
|
129
164
|
onOpenChange: (e) => {
|
|
130
|
-
e ||
|
|
165
|
+
e || z(null);
|
|
131
166
|
},
|
|
132
|
-
title:
|
|
133
|
-
description:
|
|
134
|
-
confirmText:
|
|
135
|
-
variant:
|
|
167
|
+
title: R === "hard-delete" ? x("auth.userDetails.hardDeleteTitle", "Permanently delete user?") : x("auth.userDetails.deactivateTitle", "Deactivate user?"),
|
|
168
|
+
description: R === "hard-delete" ? x("auth.userDetails.hardDeleteDesc", "This permanently deletes \"{email}\" and cannot be undone.").replace("{email}", A.email) : x("auth.userDetails.deactivateDesc", "\"{email}\" will be prevented from signing in until reactivated.").replace("{email}", A.email),
|
|
169
|
+
confirmText: R === "hard-delete" ? x("auth.userDetails.hardDeleteConfirm", "Delete permanently") : x("auth.userDetails.deactivateConfirm", "Deactivate user"),
|
|
170
|
+
variant: R === "hard-delete" ? "danger" : "warning",
|
|
136
171
|
onConfirm: async () => {
|
|
137
|
-
|
|
172
|
+
R === "hard-delete" ? await G() : R === "deactivate" && await W();
|
|
138
173
|
}
|
|
139
174
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
175
|
+
/* @__PURE__ */ m("div", {
|
|
176
|
+
className: "flex items-center justify-between mb-6",
|
|
177
|
+
children: [/* @__PURE__ */ m("button", {
|
|
178
|
+
type: "button",
|
|
179
|
+
onClick: () => y("/auth/users"),
|
|
180
|
+
className: "flex items-center gap-2 text-text-link hover:underline font-medium",
|
|
181
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
182
|
+
className: "w-4 h-4",
|
|
183
|
+
fill: "none",
|
|
184
|
+
viewBox: "0 0 24 24",
|
|
185
|
+
stroke: "currentColor",
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
children: /* @__PURE__ */ p("path", {
|
|
188
|
+
strokeLinecap: "round",
|
|
189
|
+
strokeLinejoin: "round",
|
|
190
|
+
strokeWidth: 2,
|
|
191
|
+
d: "M10 19l-7-7m0 0l7-7m-7 7h18"
|
|
192
|
+
})
|
|
193
|
+
}), x("auth.userDetails.backToUsers", "Back to Users")]
|
|
194
|
+
}), /* @__PURE__ */ p("button", {
|
|
195
|
+
type: "button",
|
|
196
|
+
onClick: () => void K(),
|
|
197
|
+
disabled: V,
|
|
198
|
+
"aria-label": x("auth.userDetails.exportAriaLabel", "Export user data"),
|
|
199
|
+
className: "flex items-center gap-2 px-4 py-2.5 rounded-xl border border-border-default text-text-primary bg-bg-surface hover:bg-bg-sunken disabled:opacity-50 disabled:cursor-not-allowed transition-colors font-medium",
|
|
200
|
+
children: V ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, {
|
|
201
|
+
className: "w-4 h-4 animate-spin",
|
|
202
|
+
"aria-hidden": "true"
|
|
203
|
+
}), x("auth.userDetails.exporting", "Exporting...")] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("svg", {
|
|
204
|
+
className: "w-4 h-4",
|
|
205
|
+
fill: "none",
|
|
206
|
+
viewBox: "0 0 24 24",
|
|
207
|
+
stroke: "currentColor",
|
|
208
|
+
"aria-hidden": "true",
|
|
209
|
+
children: /* @__PURE__ */ p("path", {
|
|
210
|
+
strokeLinecap: "round",
|
|
211
|
+
strokeLinejoin: "round",
|
|
212
|
+
strokeWidth: 2,
|
|
213
|
+
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
214
|
+
})
|
|
215
|
+
}), x("auth.userDetails.exportButton", "Export User Data")] })
|
|
216
|
+
})]
|
|
217
|
+
}),
|
|
218
|
+
H && /* @__PURE__ */ m("div", {
|
|
219
|
+
role: "alert",
|
|
220
|
+
className: "mb-6 flex items-start gap-3 p-4 rounded-xl bg-status-error-bg-subtle border border-status-error-border",
|
|
221
|
+
children: [/* @__PURE__ */ p(r, {
|
|
222
|
+
className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5",
|
|
223
|
+
"aria-hidden": "true"
|
|
224
|
+
}), /* @__PURE__ */ p("p", {
|
|
225
|
+
className: "text-sm text-status-error-text",
|
|
226
|
+
children: H
|
|
227
|
+
})]
|
|
155
228
|
}),
|
|
156
|
-
|
|
229
|
+
I && /* @__PURE__ */ m("div", {
|
|
157
230
|
className: "mb-6 p-4 rounded-xl bg-status-success-bg-subtle border border-status-success-border",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ p("p", {
|
|
159
232
|
className: "text-status-success-text",
|
|
160
|
-
children:
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
-
|
|
233
|
+
children: I
|
|
234
|
+
}), /* @__PURE__ */ p("button", {
|
|
235
|
+
type: "button",
|
|
236
|
+
onClick: () => L(null),
|
|
163
237
|
className: "mt-2 text-sm text-status-success-text hover:underline",
|
|
164
|
-
children: "Dismiss"
|
|
238
|
+
children: x("auth.userDetails.dismiss", "Dismiss")
|
|
165
239
|
})]
|
|
166
240
|
}),
|
|
167
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ m("div", {
|
|
168
242
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface shadow-sm",
|
|
169
243
|
children: [
|
|
170
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ m("div", {
|
|
171
245
|
className: "flex items-center gap-4 mb-8",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
246
|
+
children: [/* @__PURE__ */ p("div", {
|
|
173
247
|
className: "auth-brand-badge flex h-20 w-20 items-center justify-center rounded-full text-3xl font-semibold",
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
248
|
+
"aria-hidden": "true",
|
|
249
|
+
children: (A.name || A.username || A.email).charAt(0).toUpperCase()
|
|
250
|
+
}), /* @__PURE__ */ m("div", { children: [
|
|
251
|
+
/* @__PURE__ */ p("h1", {
|
|
177
252
|
className: "text-2xl font-semibold text-text-primary",
|
|
178
|
-
children:
|
|
253
|
+
children: A.name || A.username
|
|
179
254
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ p("p", {
|
|
181
256
|
className: "text-text-secondary",
|
|
182
257
|
"data-testid": "user-email",
|
|
183
|
-
children:
|
|
258
|
+
children: A.email
|
|
184
259
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ m("div", {
|
|
186
261
|
className: "flex items-center gap-2 mt-2",
|
|
187
|
-
children: [/* @__PURE__ */
|
|
188
|
-
className: `px-2.5 py-1 rounded-full text-xs font-medium ${
|
|
189
|
-
children:
|
|
190
|
-
}), /* @__PURE__ */
|
|
191
|
-
className: `px-2.5 py-1 rounded-full text-xs font-medium ${
|
|
192
|
-
children:
|
|
262
|
+
children: [/* @__PURE__ */ p("span", {
|
|
263
|
+
className: `px-2.5 py-1 rounded-full text-xs font-medium ${g(A.role)}`,
|
|
264
|
+
children: A.role.replace("_", " ")
|
|
265
|
+
}), /* @__PURE__ */ p("span", {
|
|
266
|
+
className: `px-2.5 py-1 rounded-full text-xs font-medium ${_(A.status)}`,
|
|
267
|
+
children: A.status
|
|
193
268
|
})]
|
|
194
269
|
})
|
|
195
270
|
] })]
|
|
196
271
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ m("dl", {
|
|
198
273
|
className: "grid grid-cols-2 gap-6",
|
|
199
274
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ m("div", {
|
|
201
276
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
202
|
-
children: [/* @__PURE__ */
|
|
203
|
-
className: "
|
|
204
|
-
children: "Username"
|
|
205
|
-
}), /* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
278
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
279
|
+
children: x("auth.userDetails.username", "Username")
|
|
280
|
+
}), /* @__PURE__ */ p("dd", {
|
|
206
281
|
className: "text-text-primary font-medium",
|
|
207
|
-
children:
|
|
282
|
+
children: A.username
|
|
208
283
|
})]
|
|
209
284
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ m("div", {
|
|
211
286
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
className: "
|
|
214
|
-
children: "Email"
|
|
215
|
-
}), /* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
288
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
289
|
+
children: x("auth.userDetails.email", "Email")
|
|
290
|
+
}), /* @__PURE__ */ p("dd", {
|
|
216
291
|
className: "text-text-primary font-medium",
|
|
217
|
-
children:
|
|
292
|
+
children: A.email
|
|
218
293
|
})]
|
|
219
294
|
}),
|
|
220
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ m("div", {
|
|
221
296
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
-
className: "
|
|
224
|
-
children: "Email Verified"
|
|
225
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
298
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
299
|
+
children: x("auth.userDetails.emailVerified", "Email Verified")
|
|
300
|
+
}), /* @__PURE__ */ p("dd", {
|
|
226
301
|
className: "text-text-primary font-medium",
|
|
227
|
-
children:
|
|
302
|
+
children: A.emailVerified ? /* @__PURE__ */ p("span", {
|
|
228
303
|
className: "text-status-success-text",
|
|
229
|
-
children: "Yes"
|
|
230
|
-
}) : /* @__PURE__ */
|
|
304
|
+
children: x("auth.userDetails.yes", "Yes")
|
|
305
|
+
}) : /* @__PURE__ */ p("span", {
|
|
231
306
|
className: "text-status-warning-text",
|
|
232
|
-
children: "No"
|
|
307
|
+
children: x("auth.userDetails.no", "No")
|
|
233
308
|
})
|
|
234
309
|
})]
|
|
235
310
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
311
|
+
/* @__PURE__ */ m("div", {
|
|
237
312
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
-
className: "
|
|
240
|
-
children: "MFA Enabled"
|
|
241
|
-
}), /* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
314
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
315
|
+
children: x("auth.userDetails.mfaEnabled", "MFA Enabled")
|
|
316
|
+
}), /* @__PURE__ */ p("dd", {
|
|
242
317
|
className: "text-text-primary font-medium",
|
|
243
|
-
children:
|
|
318
|
+
children: A.mfaEnabled ? /* @__PURE__ */ p("span", {
|
|
244
319
|
className: "text-status-success-text",
|
|
245
|
-
children: "Yes"
|
|
246
|
-
}) : /* @__PURE__ */
|
|
320
|
+
children: x("auth.userDetails.yes", "Yes")
|
|
321
|
+
}) : /* @__PURE__ */ p("span", {
|
|
247
322
|
className: "text-text-secondary",
|
|
248
|
-
children: "No"
|
|
323
|
+
children: x("auth.userDetails.no", "No")
|
|
249
324
|
})
|
|
250
325
|
})]
|
|
251
326
|
}),
|
|
252
|
-
|
|
327
|
+
A.phoneNumber && /* @__PURE__ */ m("div", {
|
|
253
328
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
254
|
-
children: [/* @__PURE__ */
|
|
255
|
-
className: "
|
|
256
|
-
children: "Phone Number"
|
|
257
|
-
}), /* @__PURE__ */
|
|
329
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
330
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
331
|
+
children: x("auth.userDetails.phoneNumber", "Phone Number")
|
|
332
|
+
}), /* @__PURE__ */ p("dd", {
|
|
258
333
|
className: "text-text-primary font-medium",
|
|
259
|
-
children:
|
|
334
|
+
children: A.phoneNumber
|
|
260
335
|
})]
|
|
261
336
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ m("div", {
|
|
263
338
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
264
|
-
children: [/* @__PURE__ */
|
|
265
|
-
className: "
|
|
266
|
-
children: "Last Login"
|
|
267
|
-
}), /* @__PURE__ */
|
|
339
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
340
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
341
|
+
children: x("auth.userDetails.lastLogin", "Last Login")
|
|
342
|
+
}), /* @__PURE__ */ p("dd", {
|
|
268
343
|
className: "text-text-primary font-medium",
|
|
269
|
-
children:
|
|
344
|
+
children: A.lastLoginAt ? new Date(A.lastLoginAt).toLocaleString() : x("auth.userDetails.never", "Never")
|
|
270
345
|
})]
|
|
271
346
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ m("div", {
|
|
273
348
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
274
|
-
children: [/* @__PURE__ */
|
|
275
|
-
className: "
|
|
276
|
-
children: "Created"
|
|
277
|
-
}), /* @__PURE__ */
|
|
349
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
350
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
351
|
+
children: x("auth.userDetails.created", "Created")
|
|
352
|
+
}), /* @__PURE__ */ p("dd", {
|
|
278
353
|
className: "text-text-primary font-medium",
|
|
279
|
-
children: new Date(
|
|
354
|
+
children: new Date(A.createdAt).toLocaleString()
|
|
280
355
|
})]
|
|
281
356
|
}),
|
|
282
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ m("div", {
|
|
283
358
|
className: "p-4 rounded-lg bg-bg-canvas/50",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
285
|
-
className: "
|
|
286
|
-
children: "Last Updated"
|
|
287
|
-
}), /* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ p("dt", {
|
|
360
|
+
className: "text-sm font-medium text-text-secondary mb-1",
|
|
361
|
+
children: x("auth.userDetails.lastUpdated", "Last Updated")
|
|
362
|
+
}), /* @__PURE__ */ p("dd", {
|
|
288
363
|
className: "text-text-primary font-medium",
|
|
289
|
-
children: new Date(
|
|
364
|
+
children: new Date(A.updatedAt).toLocaleString()
|
|
290
365
|
})]
|
|
291
366
|
})
|
|
292
367
|
]
|
|
293
368
|
}),
|
|
294
|
-
/* @__PURE__ */
|
|
369
|
+
/* @__PURE__ */ m("div", {
|
|
295
370
|
className: "mt-8 pt-6 border-t border-border-subtle flex gap-3",
|
|
296
|
-
children: [
|
|
297
|
-
|
|
371
|
+
children: [A.status !== "DELETED" && T && /* @__PURE__ */ p("button", {
|
|
372
|
+
type: "button",
|
|
373
|
+
onClick: () => z("deactivate"),
|
|
298
374
|
className: "px-4 py-2.5 rounded-xl border border-status-error-border text-status-error-text font-medium hover:bg-status-error-bg-subtle transition-colors",
|
|
299
|
-
children: "Deactivate User"
|
|
300
|
-
}),
|
|
301
|
-
|
|
375
|
+
children: x("auth.userDetails.deactivateUser", "Deactivate User")
|
|
376
|
+
}), T && A.status === "DELETED" && C?.role === "SUPER_ADMIN" && /* @__PURE__ */ p("button", {
|
|
377
|
+
type: "button",
|
|
378
|
+
onClick: () => z("hard-delete"),
|
|
302
379
|
className: "px-4 py-2.5 rounded-xl bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover transition-colors",
|
|
303
|
-
children: "Permanently Delete"
|
|
380
|
+
children: x("auth.userDetails.permanentlyDelete", "Permanently Delete")
|
|
304
381
|
})]
|
|
305
382
|
})
|
|
306
383
|
]
|
|
307
384
|
})
|
|
308
385
|
]
|
|
309
|
-
}) : /* @__PURE__ */
|
|
386
|
+
}) : /* @__PURE__ */ p("div", {
|
|
310
387
|
className: "max-w-4xl mx-auto p-6",
|
|
311
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ m("div", {
|
|
312
389
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
314
391
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
315
|
-
children: "Admin Access Required"
|
|
316
|
-
}), /* @__PURE__ */
|
|
392
|
+
children: x("auth.userDetails.adminRequired", "Admin Access Required")
|
|
393
|
+
}), /* @__PURE__ */ p("p", {
|
|
317
394
|
className: "text-text-secondary",
|
|
318
|
-
children: "You need administrator privileges to view user details."
|
|
395
|
+
children: x("auth.userDetails.adminRequiredDesc", "You need administrator privileges to view user details.")
|
|
319
396
|
})]
|
|
320
397
|
})
|
|
321
|
-
}) : /* @__PURE__ */
|
|
398
|
+
}) : /* @__PURE__ */ p("div", {
|
|
322
399
|
className: "max-w-4xl mx-auto p-6",
|
|
323
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ m("div", {
|
|
324
401
|
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
402
|
+
children: [/* @__PURE__ */ p("h2", {
|
|
326
403
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
327
|
-
children: "Authentication Required"
|
|
328
|
-
}), /* @__PURE__ */
|
|
404
|
+
children: x("auth.userDetails.authRequired", "Authentication Required")
|
|
405
|
+
}), /* @__PURE__ */ p("p", {
|
|
329
406
|
className: "text-text-secondary",
|
|
330
|
-
children: "Please sign in to view user details"
|
|
407
|
+
children: x("auth.userDetails.signInToView", "Please sign in to view user details")
|
|
331
408
|
})]
|
|
332
409
|
})
|
|
333
410
|
});
|
|
334
411
|
}
|
|
335
412
|
//#endregion
|
|
336
|
-
export {
|
|
413
|
+
export { v as UserDetailsPage };
|
|
337
414
|
|
|
338
415
|
//# sourceMappingURL=UserDetailsPage.js.map
|