Add password status column to admin users page

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Manohar Gupta 2026-05-16 15:03:58 +05:30
parent 40c3dcf33f
commit 752924a323
2 changed files with 10 additions and 0 deletions

View file

@ -174,6 +174,7 @@ export default function AdminUsers() {
<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">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">Actions</th>
</tr>
@ -186,6 +187,13 @@ export default function AdminUsers() {
<div className="text-xs text-gray-500">{user.email}</div>
</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">
{user.createdAt?.slice(0, 10)}
</td>

View file

@ -15,6 +15,7 @@ export async function GET(request: Request) {
u.id,
u.email,
u.name,
u.password_hash,
fm.family_id,
fm.id as member_id,
f.name as family_name,
@ -30,6 +31,7 @@ export async function GET(request: Request) {
id: u.id,
email: u.email,
name: u.name,
hasPassword: !!u.password_hash,
familyId: u.family_id,
memberId: u.member_id,
familyName: u.family_name,