import type { TableConfig } from '../../components/GenericTable'; import { TableTag } from '../../components/TableTag/TableTag'; import type { ConsRussianStatus, QuarterEnum } from '../../types/consolidations/common_types'; import type { ConsRow } from '../../types/consolidations/consolidations'; import { versionLabel } from '../../utils/consolidations'; import { formatMoscowDate } from '../../utils/dates'; import { quarterShortLabel } from '../../utils/labels'; import { statusColorMapping } from './consts'; const ruDate = (v: unknown) => (typeof v === 'string' ? (formatMoscowDate(v) ?? '—') : '—'); export const consConfigBase: TableConfig = { rowKey: 'id', // no searchableKeys — table has no cross-column search columns: [ { key: 'year', title: 'Год', features: { sort: true, multiselect: true } }, { key: 'quarter', title: 'Квартал', features: { multiselect: true }, render: (v) => quarterShortLabel(v as QuarterEnum) }, { key: 'version_no', title: 'Версия', features: { sort: true }, render: (v) => versionLabel(Number(v)) }, { key: 'status', title: 'Статус', features: { multiselect: true, sort: true }, render: (v) => , }, // ГСК в версии не хранится (решение владельца П-3) — колонка как в макете [34], пустая { key: 'gsk', title: 'ГСК', features: { search: true, multiselect: true }, render: () => '—' }, { key: 'created_at', title: 'Дата создания', features: {}, render: ruDate }, // даты верификации в API нет (VersionBrief), до маршрута согласования (Срез 7) — прочерк { key: 'verified_at', title: 'Дата верификации', features: {}, render: () => '—' }, { key: 'members_count', title: 'Организаций', features: {} }, ], };