From 183f4388195da3d29a7a4b5f76da6fd52270cfcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=BB=D0=B0=D0=B4=D0=B8=D1=81=D0=BB=D0=B0=D0=B2=20?= =?UTF-8?q?=D0=A7=D0=B8=D0=BA=D0=B0=D0=BB=D0=BA=D0=B8=D0=BD?= Date: Wed, 11 Nov 2020 17:37:00 +0300 Subject: [PATCH] remove fields --- .../Calculation/Sections/sectionsList.ts | 60 ------------------- .../CalculationStore/Effects/autorun.ts | 7 --- src/core/config/initialOptions.ts | 11 ---- src/core/config/initialValues.ts | 5 -- src/core/types/Calculation/Store/elements.ts | 6 -- src/core/types/Calculation/Store/values.ts | 6 -- 6 files changed, 95 deletions(-) diff --git a/src/client/Containers/Calculation/Sections/sectionsList.ts b/src/client/Containers/Calculation/Sections/sectionsList.ts index 06b403b..9e452d7 100644 --- a/src/client/Containers/Calculation/Sections/sectionsList.ts +++ b/src/client/Containers/Calculation/Sections/sectionsList.ts @@ -394,36 +394,6 @@ const sections: ISections[] = [ valueName: 'supplierDiscountPerc', }, }, - // TODO Input x Addon - // { - // title: 'Валюта доп.оборудования', - // Component: Select, - // props: { - // name: 'selectAddEquipmentCurrency', - // valueName: 'addEquipmentCurrency', - // }, - // }, - // { - // title: 'Стоимость доп.оборудования', - // Component: InputNumber, - // props: { - // min: '0', - // max: '1000000000', - // step: '10000.00', - // name: 'tbxAddEquipmentPrice', - // valueName: 'addEquipmentPrice', - // }, - // }, - // { - // title: 'Плательщик доп.оборудования', - // Component: Radio, - // props: { - // name: 'radioAddEquipmentPayer', - // valueName: 'addEquipmentPayer', - // withSearch: false, - // style: 'button', - // }, - // }, ], }, { @@ -857,17 +827,6 @@ const sections: ISections[] = [ valueName: 'maxSpeed', }, }, - { - title: 'Грузоподъемность, т', - Component: InputNumber, - props: { - min: '0', - max: '999999999', - step: '100', - name: 'tbxTonnage', - valueName: 'tonnage', - }, - }, { title: 'ТС с прицепом', Component: Select, @@ -1265,17 +1224,6 @@ const sections: ISections[] = [ onClick: undefined, }, }, - // { - // title: 'Стоимость страхования доп.оборудования', - // Component: InputNumber, - // props: { - // min: '10000', - // max: '1000000000', - // step: '10000.00', - // name: 'tbxInsAddEquipmentPrice', - // valueName: 'insAddEquipmentPrice', - // }, - // }, ], }, { @@ -1531,14 +1479,6 @@ const sections: ISections[] = [ valueName: 'insurance', }, }, - { - title: 'Отображать доп. оборудование', - Component: Switch, - props: { - name: 'cbxAddEquipment', - valueName: 'addEquipment', - }, - }, { title: 'Отображать регистрацию', Component: Switch, diff --git a/src/client/stores/CalculationStore/Effects/autorun.ts b/src/client/stores/CalculationStore/Effects/autorun.ts index 10d8d72..2bc4549 100644 --- a/src/client/stores/CalculationStore/Effects/autorun.ts +++ b/src/client/stores/CalculationStore/Effects/autorun.ts @@ -81,7 +81,6 @@ const autorunEffects: IAutorunEffect[] = [ leaseObjectCategory, maxMass, withTrailer, - tonnage, } = calculationStore.values; if (leaseObjectCategory === 100000002) { if (!maxMass) { @@ -89,11 +88,6 @@ const autorunEffects: IAutorunEffect[] = [ } else { calculationStore.setValidation('tbxMaxMass', true); } - if (!tonnage) { - calculationStore.setValidation('tbxTonnage', false); - } else { - calculationStore.setValidation('tbxTonnage', true); - } if (!withTrailer) { calculationStore.setValidation('selectWithTrailer', false); } else { @@ -101,7 +95,6 @@ const autorunEffects: IAutorunEffect[] = [ } } else { calculationStore.setValidation('tbxMaxMass', true); - calculationStore.setValidation('tbxTonnage', true); calculationStore.setValidation('selectWithTrailer', true); } }, diff --git a/src/core/config/initialOptions.ts b/src/core/config/initialOptions.ts index 903a3db..b687c3b 100644 --- a/src/core/config/initialOptions.ts +++ b/src/core/config/initialOptions.ts @@ -36,17 +36,6 @@ const initialOptions: TElements = { }, ], - radioAddEquipmentPayer: [ - { - name: 'Лизингополучатель', - value: 100000000, - }, - { - name: 'Лизингодатель', - value: 100000001, - }, - ], - radioLastPaymentRule: [ { name: 'рублей', diff --git a/src/core/config/initialValues.ts b/src/core/config/initialValues.ts index e7b48a7..d037a4a 100644 --- a/src/core/config/initialValues.ts +++ b/src/core/config/initialValues.ts @@ -7,9 +7,6 @@ const initialValues: TValues = { supplierCurrency: 'RUB', supplierDiscountRub: 0, supplierDiscountPerc: 0, - // addEquipmentCurrency: 'RUB', - addEquipmentPrice: 0, - addEquipmentPayer: 100000000, leasingPeriod: 12, firstPaymentPerc: 25, firstPaymentRub: 0, @@ -35,7 +32,6 @@ const initialValues: TValues = { maxMass: 0, countSeats: 0, maxSpeed: 0, - tonnage: 0, leaseObjectYear: 2020, engineType: 100000000, leaseObjectCategory: 100000001, @@ -64,7 +60,6 @@ const initialValues: TValues = { priceWithDiscount: false, costIncrease: true, insurance: true, - addEquipment: true, registrationQuote: true, technicalCardQuote: true, NSIB: true, diff --git a/src/core/types/Calculation/Store/elements.ts b/src/core/types/Calculation/Store/elements.ts index 8719717..b1fb899 100644 --- a/src/core/types/Calculation/Store/elements.ts +++ b/src/core/types/Calculation/Store/elements.ts @@ -28,9 +28,6 @@ export type ElementsNames = | 'selectSupplierCurrency' | 'tbxSupplierDiscountRub' | 'tbxSupplierDiscountPerc' - | 'selectAddEquipmentCurrency' - | 'tbxAddEquipmentPrice' - | 'radioAddEquipmentPayer' | 'tbxLeasingPeriod' | 'tbxFirstPaymentPerc' | 'tbxFirstPaymentRub' @@ -57,7 +54,6 @@ export type ElementsNames = | 'tbxMaxMass' | 'tbxCountSeats' | 'tbxMaxSpeed' - | 'tbxTonnage' | 'selectBrand' | 'selectModel' | 'selectConfiguration' @@ -97,7 +93,6 @@ export type ElementsNames = | 'btnInsCalculation' | 'selectInsPeriod' | 'tbxInsFranchise' - | 'tbxInsAddEquipmentPrice' | 'cbxInsUnlimitDrivers' | 'tbxInsAgeDrivers' | 'tbxInsExpDrivers' @@ -107,7 +102,6 @@ export type ElementsNames = | 'cbxPriceWithDiscount' | 'cbxCostIncrease' | 'cbxInsurance' - | 'cbxAddEquipment' | 'cbxRegistrationQuote' | 'cbxTechnicalCardQuote' | 'cbxNSIB' diff --git a/src/core/types/Calculation/Store/values.ts b/src/core/types/Calculation/Store/values.ts index bc491ea..9140bf4 100644 --- a/src/core/types/Calculation/Store/values.ts +++ b/src/core/types/Calculation/Store/values.ts @@ -27,9 +27,6 @@ export type ValuesNames = | 'supplierCurrency' | 'supplierDiscountRub' | 'supplierDiscountPerc' - | 'addEquipmentCurrency' - | 'addEquipmentPrice' - | 'addEquipmentPayer' | 'leasingPeriod' | 'firstPaymentPerc' | 'firstPaymentRub' @@ -56,7 +53,6 @@ export type ValuesNames = | 'maxMass' | 'countSeats' | 'maxSpeed' - | 'tonnage' | 'brand' | 'model' | 'configuration' @@ -95,7 +91,6 @@ export type ValuesNames = | 'insDecentral' | 'insPeriod' | 'insFranchise' - | 'insAddEquipmentPrice' | 'insUnlimitDrivers' | 'insAgeDrivers' | 'insExpDrivers' @@ -104,7 +99,6 @@ export type ValuesNames = | 'priceWithDiscount' | 'costIncrease' | 'insurance' - | 'addEquipment' | 'registrationQuote' | 'technicalCardQuote' | 'NSIB'