Documents page, WIP

This commit is contained in:
cracklesparkle
2024-06-28 17:56:34 +09:00
parent 7ba886e966
commit e70d94afec
4 changed files with 106 additions and 20 deletions

View File

@ -15,24 +15,19 @@ export default function Users() {
const columns: GridColDef[] = [
{ field: 'id', headerName: 'ID', type: "number", width: 70 },
{ field: 'email', headerName: 'Email', width: 130, editable: true},
{ field: 'email', headerName: 'Email', width: 130, editable: true },
{ field: 'login', headerName: 'Логин', width: 130, editable: true },
{ field: 'phone', headerName: 'Телефон', width: 90, editable: true },
{ field: 'name', headerName: 'Имя', width: 90, editable: true },
{ field: 'surname', headerName: 'Фамилия', width: 90, editable: true },
{ field: 'is_active', headerName: 'Активен', type: "boolean", width: 90, editable: true},
{ field: 'is_active', headerName: 'Активен', type: "boolean", width: 90, editable: true },
{
field: 'role_id',
headerName: 'Роль',
valueGetter: (value, row) => {
if (roles) {
const roleName = roles.find((role: IRole) => role.id === value).name
return roleName
} else {
return value
}
},
width: 90
valueOptions: roles ? roles.map((role: IRole) => ({ label: role.name, value: role.id })) : [],
type: 'singleSelect',
width: 90,
editable: true
},
];