diff options
Diffstat (limited to 'src/services.js')
-rw-r--r-- | src/services.js | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/src/services.js b/src/services.js deleted file mode 100644 index dfb166e..0000000 --- a/src/services.js +++ /dev/null @@ -1,104 +0,0 @@ -import { ServiceParams } from './containers/Service/ServiceContext'; - - -const waybillStatusNames = { - waiting: 'Ожидание', - executed: 'Проведена', - cancelled: 'Отменена', -}; - -const operationNames = { - in: 'Приход', - out: 'Расход', -}; - -const services: ServiceParams[] = [ - { - route: 'products', - name: 'Товары', - nameSingular: 'Товар', - tableFields: [ - { key: 'name', label: 'Название' }, - { key: 'price', label: 'Цена' }, - { key: 'quantity', label: 'На складе' }, - ], - default: { - name: '', - price: '', - quantity: 0, - }, - }, - { - route: 'contractors', - name: 'Контрагенты', - nameSingular: 'Контрагент', - tableFields: [ - { key: 'vatId', label: 'УНП' }, - { key: 'name', label: 'Название' }, - { key: 'debt', label: 'Долг' }, - ], - default: { - name: '', - vatId: '', - debt: 0, - }, - }, - { - route: 'waybills', - name: 'Накладные', - nameSingular: 'Накладная', - tableFields: [ - { key: 'status', label: 'Статус', transform: status => waybillStatusNames[status] }, - { key: 'operation', label: 'Операция', transform: op => operationNames[op] }, - { key: 'total', label: 'Сумма' }, - { key: 'contractor.name', label: 'Контрагент' }, - ], - default: { - operation: 'in', - records: [], - }, - }, - { - route: 'transfers', - name: 'Переводы', - nameSingular: 'Перевод', - tableFields: [ - { key: 'date', label: 'Дата', transform: date => new Date(date).toLocaleDateString() }, - { key: 'contractor.name', label: 'Контрагент' }, - { key: 'operation', label: 'Операция', transform: op => operationNames[op] }, - { key: 'amount', label: 'Сумма' }, - ], - actions: [ - { - name: 'Загрузить выписку', - route: '/transfers/upload', - variant: 'outlined', - }, - { - name: 'Добавить', - route: '/transfers/add', - }, - ], - default: { - operation: 'in', - records: [], - }, - }, - { - route: 'account', - name: 'Рассчётный счёт', - tableFields: [ - { key: 'date', label: 'Дата', transform: date => new Date(date).toLocaleDateString() }, - { key: 'amount', label: 'Сумма' }, - ], - actions: [ - { - name: 'Загрузить выписку', - route: '/transfers/upload', - }, - ], - rowLink: item => `/transfers?date=${item.date}`, - }, -]; - -export default services; |