import { VerticalAlignTopOutlined } from '@ant-design/icons'; import { Button } from 'antd'; import type { TableConfig } from '../../components/GenericTable'; import { setRelatedGroupFilter } from '../../store/slices/catalogueJurSlice/catalogueJurSlice'; import { store } from '../../store/store'; import type { RelatedGroupOut } from '../../types/api'; export const relateGroupConfig: TableConfig = { rowKey: 'id', searchableKeys: ['code', 'crm_id', 'name', 'members_count', 'created_date'], columns: [ { key: 'code', title: 'ID', features: { search: true, multiselect: true }, }, { key: 'crm_id', title: 'CRM ID', }, { key: 'name', title: 'Наименование', features: { search: true, multiselect: true }, render: (val, row) => { const onClick = () => store.dispatch(setRelatedGroupFilter(row)); return ( ); }, }, { key: 'members_count', title: 'Число участников', features: { search: true, multiselect: true, sort: true }, }, { key: 'created_date', title: 'Дата создания', render: (val) => { return val ? new Date(val as string).toLocaleDateString('ru-RU') : '—'; }, }, ], };