crap
This commit is contained in:
@@ -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: 'Название'
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user