Created the Licenses columns.jsx

This commit is contained in:
Mathias Wagner 2023-09-10 16:08:31 +02:00
parent be5ef192aa
commit 5a8eecd557
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -0,0 +1,17 @@
import {IconButton, Stack} from "@mui/material";
import {Delete, Edit} from "@mui/icons-material";
export default [
{field: 'key', headerName: 'Schlüssel', width: 250},
{field: 'groups', headerName: 'Gruppen', width: 200},
{field: 'permissions', headerName: 'Berechtigungen', width: 200},
{field: 'currentUses', headerName: 'Aktuelle Nutzungen', width: 180},
{field: 'maxUses', headerName: 'Maximale Nutzungen', width: 180, renderCell: (params) =>
params.value === -1 ? "Unbegrenzt" : params.value},
{field: 'expirationDate', headerName: 'Ablaufdatum', width: 200, renderCell: (params) =>
new Date(params.value).getTime() !== 0 ? "Nie" : new Date(params.value).toLocaleString()},
{field: 'actions', headerName: 'Aktionen', width: 80, renderCell: () => <Stack direction="row" gap={1}>
<IconButton size="small" color="primary"><Edit /></IconButton>
<IconButton size="small" color="error"><Delete /></IconButton>
</Stack>, sortable: false, filterable: false, align: 'center'}
];