This commit is contained in:
2024-03-19 09:02:58 +03:00
parent cc14105276
commit c9f3d4ee12
56 changed files with 995 additions and 121 deletions

View File

@@ -1,12 +1,25 @@
import {Client} from "../../../../types/Client.ts";
import {useMemo} from "react";
import {MRT_ColumnDef} from "mantine-react-table";
import {ClientSchema} from "../../../../client";
type Column = {
accessorKey: keyof Client;
header: string;
export const useClientsTableColumns = () => {
return useMemo<MRT_ColumnDef<ClientSchema>[]>(() => [
{
accessorKey: "name",
header: "Имя",
},
{
accessorKey: "details.address",
header: "Адрес"
},
{
accessorKey: "details.email",
header: "EMAIL"
},
{
accessorKey: "details.phone_number",
header: "Телефон"
}
], []);
}
export const columns: Column[] = [
{
accessorKey: 'name',
header: 'Название'
}
]