feat: generation of modules from the server, moved modules fields from the general tab
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { useMemo } from "react";
|
||||
import { MRT_ColumnDef } from "mantine-react-table";
|
||||
import { CardEmployeesSchema } from "../../../../../client";
|
||||
|
||||
|
||||
const useEmployeeTableColumns = () => {
|
||||
return useMemo<MRT_ColumnDef<CardEmployeesSchema>[]>(
|
||||
() => [
|
||||
{
|
||||
accessorKey: "createdAt",
|
||||
header: "Дата назначения",
|
||||
Cell: ({ cell }) => new Date(cell.getValue() as string).toLocaleString("ru"),
|
||||
},
|
||||
{
|
||||
header: "ФИО",
|
||||
Cell: ({ row }) =>
|
||||
`${row.original.user.secondName} ${row.original.user.firstName} ${row.original.user.patronymic}`,
|
||||
},
|
||||
{
|
||||
accessorKey: "user.role.name",
|
||||
header: "Роль",
|
||||
},
|
||||
{
|
||||
accessorKey: "user.position.name",
|
||||
header: "Должность",
|
||||
},
|
||||
{
|
||||
accessorKey: "user.comment",
|
||||
header: "Дополнительная информация",
|
||||
},
|
||||
],
|
||||
[],
|
||||
);
|
||||
};
|
||||
|
||||
export default useEmployeeTableColumns;
|
||||
Reference in New Issue
Block a user