import Form from './TransferForm'; import UploadPage from './TransfersUpload'; import { transformDate, transformOperation } from '../transforms'; import { ServiceParams } from '../../lib/ServiceContext'; import { Transfer } from '../types'; const service: ServiceParams = { route: 'transfers', name: 'Платежи', nameSingular: 'Платёж', tableFields: [ { key: 'date', label: 'Дата', transform: transformDate }, { key: 'contractor.name', label: 'Контрагент' }, { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'amount', label: 'Сумма' }, ], filters: [ { key: 'date', label: 'Дата', date: true }, { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'contractorId', label: 'Контрагент', as: 'contractor.name' }, ], actions: [ { name: 'Загрузить выписку', route: '/transfers/upload', variant: 'outlined', }, { name: 'Добавить', route: '/transfers/add', }, ], default: { operation: 'in', }, routes: { upload: UploadPage }, Form, }; export default service;