Add password status column to admin users page
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
40c3dcf33f
commit
752924a323
2 changed files with 10 additions and 0 deletions
|
|
@ -174,6 +174,7 @@ export default function AdminUsers() {
|
||||||
<tr>
|
<tr>
|
||||||
<th className="px-4 py-3 text-left text-sm font-medium">User</th>
|
<th className="px-4 py-3 text-left text-sm font-medium">User</th>
|
||||||
<th className="px-4 py-3 text-left text-sm font-medium">Family</th>
|
<th className="px-4 py-3 text-left text-sm font-medium">Family</th>
|
||||||
|
<th className="px-4 py-3 text-left text-sm font-medium">Password</th>
|
||||||
<th className="px-4 py-3 text-left text-sm font-medium">Joined</th>
|
<th className="px-4 py-3 text-left text-sm font-medium">Joined</th>
|
||||||
<th className="px-4 py-3 text-left text-sm font-medium">Actions</th>
|
<th className="px-4 py-3 text-left text-sm font-medium">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -186,6 +187,13 @@ export default function AdminUsers() {
|
||||||
<div className="text-xs text-gray-500">{user.email}</div>
|
<div className="text-xs text-gray-500">{user.email}</div>
|
||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-3">{user.familyName || "-"}</td>
|
<td className="px-4 py-3">{user.familyName || "-"}</td>
|
||||||
|
<td className="px-4 py-3">
|
||||||
|
{user.hasPassword ? (
|
||||||
|
<span className="text-emerald-400 text-sm">✓ Set</span>
|
||||||
|
) : (
|
||||||
|
<span className="text-amber-400 text-sm">Not set</span>
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
<td className="px-4 py-3 text-sm text-gray-400">
|
<td className="px-4 py-3 text-sm text-gray-400">
|
||||||
{user.createdAt?.slice(0, 10)}
|
{user.createdAt?.slice(0, 10)}
|
||||||
</td>
|
</td>
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ export async function GET(request: Request) {
|
||||||
u.id,
|
u.id,
|
||||||
u.email,
|
u.email,
|
||||||
u.name,
|
u.name,
|
||||||
|
u.password_hash,
|
||||||
fm.family_id,
|
fm.family_id,
|
||||||
fm.id as member_id,
|
fm.id as member_id,
|
||||||
f.name as family_name,
|
f.name as family_name,
|
||||||
|
|
@ -30,6 +31,7 @@ export async function GET(request: Request) {
|
||||||
id: u.id,
|
id: u.id,
|
||||||
email: u.email,
|
email: u.email,
|
||||||
name: u.name,
|
name: u.name,
|
||||||
|
hasPassword: !!u.password_hash,
|
||||||
familyId: u.family_id,
|
familyId: u.family_id,
|
||||||
memberId: u.member_id,
|
memberId: u.member_id,
|
||||||
familyName: u.family_name,
|
familyName: u.family_name,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue