From 2c106d1d3f6d59b10ad946e01e8bb3d0df587e40 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sun, 14 Mar 2021 10:10:16 +0300 Subject: refactor: create Service abstraction --- src/services.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/services.js (limited to 'src/services.js') diff --git a/src/services.js b/src/services.js new file mode 100644 index 0000000..83fc425 --- /dev/null +++ b/src/services.js @@ -0,0 +1,29 @@ +import ContractorForm from './containers/ContractorForm'; +import ProductForm from './containers/ProductForm'; +import { ServiceParams } from './containers/Service/ServiceContext'; + +const services: ServiceParams[] = [ + { + route: 'products', + name: 'Товары', + nameSingular: 'Товар', + tableFields: [ + { key: 'name', label: 'Название' }, + { key: 'price', label: 'Цена' }, + ], + Form: ProductForm, + }, + { + route: 'contractors', + name: 'Контрагенты', + nameSingular: 'Контрагент', + tableFields: [ + { key: 'vatId', label: 'УНП' }, + { key: 'name', label: 'Название' }, + { key: 'debt', label: 'Долг' }, + ], + Form: ContractorForm, + }, +]; + +export default services; -- cgit v1.2.3