diff options
Diffstat (limited to 'src/services/waybills/index.ts')
-rw-r--r-- | src/services/waybills/index.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/services/waybills/index.ts b/src/services/waybills/index.ts index f8a4be6..4e50f54 100644 --- a/src/services/waybills/index.ts +++ b/src/services/waybills/index.ts @@ -1,18 +1,15 @@ import Form from './WaybillForm'; import Panel from './WaybillPanel'; -import { waybillStatusNames, operationNames } from '../constants'; +import { transformOperation, transformStatus } from '../transforms'; +import { ServiceParams } from '../../containers/Service/ServiceContext'; -const service = { +const service: ServiceParams = { route: 'waybills', name: 'Накладные', nameSingular: 'Накладная', tableFields: [ - { - key: 'status', - label: 'Статус', - transform: (status: 'waiting' | 'executed' | 'cancelled') => waybillStatusNames[status], - }, - { key: 'operation', label: 'Операция', transform: (op: 'in' | 'out') => operationNames[op] }, + { key: 'status', label: 'Статус', transform: transformStatus }, + { key: 'operation', label: 'Операция', transform: transformOperation }, { key: 'total', label: 'Сумма' }, { key: 'contractor.name', label: 'Контрагент' }, ], |