diff --git a/Components/Calculation/Form/LeasingObject/config.ts b/Components/Calculation/Form/LeasingObject/config.ts new file mode 100644 index 0000000..6f558a7 --- /dev/null +++ b/Components/Calculation/Form/LeasingObject/config.ts @@ -0,0 +1,20 @@ +/* eslint-disable object-curly-newline */ +import type { FormComponentConfig } from '../../lib/renderFormComponent'; + +const config: FormComponentConfig = { + id: 'leasingObject', + title: 'ПЛ', + rows: [ + [['selectLeaseObjectType', 'labelDepreciationGroup'], { gridTemplateColumns: '2fr 1fr' }], + [['selectBrand', 'cbxLeaseObjectUsed'], { gridTemplateColumns: '2fr 1fr' }], + [['selectModel', 'cbxWithTrailer'], { gridTemplateColumns: '2fr 1fr' }], + [['selectConfiguration', 'radioDeliveryTime'], { gridTemplateColumns: '2fr 1fr' }], + [['selectLeaseObjectUseFor'], { gridTemplateColumns: '1fr' }], + [['tbxLeaseObjectCount', 'selectEngineType', 'tbxMaxSpeed']], + [['tbxLeaseObjectYear', 'tbxLeaseObjectMotorPower', 'tbxCountSeats']], + [['selectLeaseObjectCategory', 'tbxEngineVolume', 'tbxMileage']], + [['tbxMaxMass', 'tbxEngineHours']], + ], +}; + +export default config; diff --git a/Components/Calculation/Form/LeasingObject/index.jsx b/Components/Calculation/Form/LeasingObject/index.jsx new file mode 100644 index 0000000..8864c58 --- /dev/null +++ b/Components/Calculation/Form/LeasingObject/index.jsx @@ -0,0 +1,12 @@ +import renderFormComponent from 'Components/Calculation/lib/renderFormComponent'; +import config from './config'; + +function LeasingObject() { + return renderFormComponent(config); +} + +export default { + id: config.id, + title: config.title, + Component: LeasingObject, +}; diff --git a/Components/Calculation/Form/index.jsx b/Components/Calculation/Form/index.jsx index 478cf80..b652b7f 100644 --- a/Components/Calculation/Form/index.jsx +++ b/Components/Calculation/Form/index.jsx @@ -1,9 +1,10 @@ import Background from 'Elements/layout/Background'; import { Tabs, Wrapper } from 'Elements/layout/Tabs'; import Leasing from './Leasing'; +import LeasingObject from './LeasingObject'; import Payments from './Payments'; -const formTabs = [Leasing, Payments]; +const formTabs = [Leasing, Payments, LeasingObject]; function Form() { return (