import Form from './WaybillForm'; import Panel from './WaybillPanel'; import { transformOperation, transformStatus } from '../transforms'; import { ServiceParams } from '../../lib/ServiceContext'; import { Waybill } from '../types'; const service: ServiceParams = { route: 'waybills', name: 'Накладные', nameSingular: 'Накладная', tableFields: [ { key: 'status', label: 'Статус', transform: transformStatus }, { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'total', label: 'Сумма' }, { key: 'contractor.name', label: 'Контрагент' }, ], filters: [ { key: 'status', label: 'Статус', transform: transformStatus }, { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'contractor._id', label: 'Контрагент', as: 'contractor.name' }, ], default: { operation: 'in', records: [], }, Form, Panel, }; export default service;