User table polishing, user delete modal

This commit is contained in:
Jamie Curnow
2025-09-03 19:13:00 +10:00
parent 61a92906f3
commit 6ab7198e61
14 changed files with 197 additions and 43 deletions

View File

@@ -0,0 +1,20 @@
import { intl } from "src/locale";
interface Props {
roles: string[];
}
export function RolesFormatter({ roles }: Props) {
const r = roles || [];
if (r.length === 0) {
r[0] = "standard-user";
}
return (
<>
{r.map((role: string) => (
<span key={role} className="badge bg-yellow-lt me-1">
{intl.formatMessage({ id: `role.${role}` })}
</span>
))}
</>
);
}