feat: generation of modules from the server, moved modules fields from the general tab

This commit is contained in:
2025-03-05 16:56:39 +04:00
parent 5d19d254da
commit 56135ae10c
85 changed files with 924 additions and 367 deletions

View File

@@ -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;