import TablePagination from "@/components/TablePagination"; import { Clock, Lock } from "lucide-react"; import type { UserRecord } from "@/lib/api"; import { getRoleMeta } from "@/app/users/components/user-role-config"; import { formatRelativeDate, getInitials, getServerAccessSummary, } from "@/app/users/components/user-utils"; interface ArchivedUsersPanelProps { loading: boolean; items: UserRecord[]; currentPage: number; totalPages: number; totalItems: number; startItem: number; endItem: number; onPageChange: (page: number) => void; } export default function ArchivedUsersPanel({ loading, items, currentPage, totalPages, totalItems, startItem, endItem, onPageChange, }: ArchivedUsersPanelProps) { return (

Archived / Inactive Users

Legacy accounts that were previously deactivated remain visible here for reference.

{loading ? (
Loading archived users...
) : items.length === 0 ? (
No archived users.
) : ( <> {items.map((item) => { const role = getRoleMeta(item.role); const RoleIcon = role.icon; const access = getServerAccessSummary({ role: item.role, allServersAccess: item.allServersAccess, names: item.serverAssignments.map( (assignment) => assignment.server.name, ), }); return ( ); })}
User Role Server Access Status Last Login
{getInitials(item.name)}

{item.name}

{item.email}

{role.label} {access.label} inactive {formatRelativeDate(item.lastLogin)}
)}
); }