diff options
Diffstat (limited to 'src/services/transfers/index.ts')
-rw-r--r-- | src/services/transfers/index.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/services/transfers/index.ts b/src/services/transfers/index.ts index 09f6e04..51be7e3 100644 --- a/src/services/transfers/index.ts +++ b/src/services/transfers/index.ts @@ -1,16 +1,17 @@ import Form from './TransferForm'; import UploadPage from './TransfersUpload'; +import { transformOperation } from '../transforms'; +import { ServiceParams } from '../../containers/Service/ServiceContext'; -import { operationNames } from '../constants'; -const service = { +const service: ServiceParams = { route: 'transfers', name: 'Переводы', nameSingular: 'Перевод', tableFields: [ - { key: 'date', label: 'Дата', transform: (date: string) => new Date(date).toLocaleDateString() }, + { key: 'date', label: 'Дата', transform: date => new Date(date).toLocaleDateString() }, { key: 'contractor.name', label: 'Контрагент' }, - { key: 'operation', label: 'Операция', transform: (op: 'in' | 'out') => operationNames[op] }, + { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'amount', label: 'Сумма' }, ], actions: [ |