diff --git a/Components/Calculation/Form/Insurance/config.ts b/Components/Calculation/Form/Insurance/config.ts new file mode 100644 index 0000000..655f0c2 --- /dev/null +++ b/Components/Calculation/Form/Insurance/config.ts @@ -0,0 +1,15 @@ +import type { FormComponentConfig } from '../../lib/renderFormComponent'; + +const config: FormComponentConfig = { + id: 'insurance', + title: 'Страхование', + rows: [ + [['tbxLeaseObjectYear', 'selectLeaseObjectUseFor', 'selectLegalClientRegion']], + [['selectEngineType', 'tbxInsFranchise', 'selectLegalClientTown']], + [['selectLeaseObjectCategory', 'tbxMileage', 'tbxINNForCalc']], + [['tbxLeaseObjectMotorPower', 'cbxWithTrailer', 'selectGPSBrand']], + [['tbxEngineVolume', 'cbxInsDecentral', 'selectGPSModel']], + ], +}; + +export default config; diff --git a/Components/Calculation/Form/Insurance/index.jsx b/Components/Calculation/Form/Insurance/index.jsx new file mode 100644 index 0000000..960d635 --- /dev/null +++ b/Components/Calculation/Form/Insurance/index.jsx @@ -0,0 +1,21 @@ +import renderFormComponent from 'Components/Calculation/lib/renderFormComponent'; +import { Flex } from 'UIKit/grid'; +import config from './config'; + +function Insurance() { + const rows = renderFormComponent(config); + + return ( + + {rows} + {/* TODO: add Insurance Table */} + {/* TODO: add FinGAP Table */} + + ); +} + +export default { + id: config.id, + title: config.title, + Component: Insurance, +}; diff --git a/Components/Calculation/Form/index.jsx b/Components/Calculation/Form/index.jsx index d1778c0..d8a67cf 100644 --- a/Components/Calculation/Form/index.jsx +++ b/Components/Calculation/Form/index.jsx @@ -1,11 +1,12 @@ import Background from 'Elements/layout/Background'; import { Tabs, Wrapper } from 'Elements/layout/Tabs'; +import Insurance from './Insurance'; import Leasing from './Leasing'; import LeasingObject from './LeasingObject'; import Payments from './Payments'; import SupplierAgent from './SupplierAgent'; -const formTabs = [Leasing, Payments, LeasingObject, SupplierAgent]; +const formTabs = [Leasing, Payments, LeasingObject, SupplierAgent, Insurance]; function Form() { return (