Calculation/Form: add LeasingObject Component

This commit is contained in:
vchikalkin 2022-06-02 13:56:29 +03:00
parent 9635089bac
commit 502d6b607a
3 changed files with 34 additions and 1 deletions

View File

@ -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;

View File

@ -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,
};

View File

@ -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 (