|
|
@ -69,7 +69,7 @@ export default function RoleTable({ |
|
|
|
{visibleColumns.map(col => ( |
|
|
|
<TableHead |
|
|
|
key={col.key} |
|
|
|
className={`text-foreground ${col.key === 'actions' ? 'text-right' : ''} ${cellPadding}`} |
|
|
|
className={`text-foreground ${col.key === 'actions' ? 'text-right' : 'text-center'} ${cellPadding}`} |
|
|
|
> |
|
|
|
{col.title} |
|
|
|
</TableHead> |
|
|
@ -93,10 +93,10 @@ export default function RoleTable({ |
|
|
|
roles.map((role) => ( |
|
|
|
<TableRow key={role.id} className={rowClass}> |
|
|
|
{visibleColumns.map(col => { |
|
|
|
if (col.key === 'name') return <TableCell key={col.key} className={`text-foreground ${cellPadding}`}>{role.name}</TableCell>; |
|
|
|
if (col.key === 'description') return <TableCell key={col.key} className={`text-foreground ${cellPadding}`}>{role.description}</TableCell>; |
|
|
|
if (col.key === 'createdAt') return <TableCell key={col.key} className={`text-foreground ${cellPadding}`}>{formatToBeijingTime(role.createdAt)}</TableCell>; |
|
|
|
if (col.key === 'updatedAt') return <TableCell key={col.key} className={`text-foreground ${cellPadding}`}>{formatToBeijingTime(role.updatedAt)}</TableCell>; |
|
|
|
if (col.key === 'name') return <TableCell key={col.key} className={`text-foreground text-center ${cellPadding}`}>{role.name}</TableCell>; |
|
|
|
if (col.key === 'description') return <TableCell key={col.key} className={`text-foreground text-center ${cellPadding}`}>{role.description}</TableCell>; |
|
|
|
if (col.key === 'createdAt') return <TableCell key={col.key} className={`text-foreground text-center ${cellPadding}`}>{formatToBeijingTime(role.createdAt)}</TableCell>; |
|
|
|
if (col.key === 'updatedAt') return <TableCell key={col.key} className={`text-foreground text-center ${cellPadding}`}>{formatToBeijingTime(role.updatedAt)}</TableCell>; |
|
|
|
if (col.key === 'actions') return ( |
|
|
|
<TableCell key={col.key} className={`text-right ${cellPadding}`}> |
|
|
|
<div className="flex justify-end gap-4"> |
|
|
|