From 79642e7c7142ed7bfcce2f6f3a2a4fae6e09ca99 Mon Sep 17 00:00:00 2001 From: Chika Date: Thu, 26 Nov 2020 18:01:22 +0300 Subject: [PATCH] hide sections & elements --- .../Containers/Calculation/Info/infoList.ts | 29 ++ .../ResultsTable/resultsTableList.ts | 2 +- .../Calculation/Sections/sectionsList.ts | 329 +++++++++--------- 3 files changed, 185 insertions(+), 175 deletions(-) diff --git a/src/client/Containers/Calculation/Info/infoList.ts b/src/client/Containers/Calculation/Info/infoList.ts index 600e6ef..e96b86e 100644 --- a/src/client/Containers/Calculation/Info/infoList.ts +++ b/src/client/Containers/Calculation/Info/infoList.ts @@ -2,6 +2,7 @@ import { IGroup } from 'core/types/Calculation/components'; import Label from 'client/Elements/Label'; import { ElementType } from 'core/types/Calculation/Store/elements'; import Button from 'client/Elements/Button'; +import InputNumber from 'client/Elements/InputNumber'; export const controlsList: IGroup[] = [ { @@ -38,4 +39,32 @@ export const controlsList: IGroup[] = [ }, ], }, + { + title: 'Параметры расчета', + blocks: [ + { + elements: [ + { + title: 'IRR, %', + Component: InputNumber, + props: { + min: '0.0000', + max: '100.0000', + step: '0.0001', + name: 'tbxIRR_Perc', + valueName: 'IRR_Perc', + }, + }, + { + title: 'Диапазон IRR (Номинал)', + Component: Label, + props: { + name: 'labelIrrInfo', + computedValueName: 'irrInfo', + }, + }, + ], + }, + ], + }, ]; diff --git a/src/client/Containers/Calculation/ResultsTable/resultsTableList.ts b/src/client/Containers/Calculation/ResultsTable/resultsTableList.ts index c57be8b..f84ad65 100644 --- a/src/client/Containers/Calculation/ResultsTable/resultsTableList.ts +++ b/src/client/Containers/Calculation/ResultsTable/resultsTableList.ts @@ -8,13 +8,13 @@ export const resultsTable: IGroup[] = [ { blocks: [ { + title: 'График платежей', layout: { newLine: true, }, elements: [ { type: ElementType.Table, - title: 'График платежей', Component: Table, props: { name: 'tableResults', diff --git a/src/client/Containers/Calculation/Sections/sectionsList.ts b/src/client/Containers/Calculation/Sections/sectionsList.ts index 2a89fe9..0cf2e24 100644 --- a/src/client/Containers/Calculation/Sections/sectionsList.ts +++ b/src/client/Containers/Calculation/Sections/sectionsList.ts @@ -317,24 +317,24 @@ const sections: ISection[] = [ }, ], }, - { - elements: [ - { - title: 'Тип клиента', - Component: Select, - props: { - name: 'selectClientType', - valueName: 'clientType', - }, - }, - ], - }, + // { + // elements: [ + // { + // title: 'Тип клиента', + // Component: Select, + // props: { + // name: 'selectClientType', + // valueName: 'clientType', + // }, + // }, + // ], + // }, ], }, { blocks: [ { - title: 'Стоимость предмета лизинга и доп.оборудование', + // title: 'Стоимость предмета лизинга', elements: [ { title: 'Валюта поставщика', @@ -379,10 +379,30 @@ const sections: ISection[] = [ valueName: 'supplierDiscountPerc', }, }, + { + title: 'Балансодержатель', + Component: Radio, + props: { + name: 'radioBalanceHolder', + valueName: 'balanceHolder', + style: 'button', + }, + }, + { + title: 'Размер бонуса МПЛ', + Component: InputNumber, + props: { + min: '0.00', + max: '1.30', + step: '0.1', + name: 'tbxSaleBonus', + valueName: 'saleBonus', + }, + }, ], }, { - title: 'Параметры договора лизинга', + // title: 'Параметры договора лизинга', elements: [ // TODO Input x Addon { @@ -390,7 +410,7 @@ const sections: ISection[] = [ Component: InputNumber, props: { min: '0', - max: '100', + max: '50', name: 'tbxFirstPaymentPerc', valueName: 'firstPaymentPerc', }, @@ -420,7 +440,7 @@ const sections: ISection[] = [ Component: InputNumber, props: { min: '0', - max: '100', + max: '15', step: '1.000000', name: 'tbxLastPaymentPerc', valueName: 'lastPaymentPerc', @@ -447,15 +467,6 @@ const sections: ISection[] = [ valueName: 'leasingPeriod', }, }, - { - title: 'Балансодержатель', - Component: Radio, - props: { - name: 'radioBalanceHolder', - valueName: 'balanceHolder', - style: 'button', - }, - }, ], }, { @@ -504,7 +515,7 @@ const sections: ISection[] = [ }, }, { - title: 'Параметры расчета', + // title: 'Параметры расчета', elements: [ // { // title: 'Комиссия, %', @@ -527,36 +538,6 @@ const sections: ISection[] = [ // valueName: 'comissionRub', // }, // }, - { - title: 'IRR, %', - Component: InputNumber, - props: { - min: '0.0000', - max: '100.0000', - step: '0.0001', - name: 'tbxIRR_Perc', - valueName: 'IRR_Perc', - }, - }, - { - title: 'Диапазон IRR (Номинал)', - Component: Label, - props: { - name: 'labelIrrInfo', - computedValueName: 'irrInfo', - }, - }, - { - title: 'Размер бонуса МПЛ', - Component: InputNumber, - props: { - min: '0.00', - max: '1.30', - step: '0.1', - name: 'tbxSaleBonus', - valueName: 'saleBonus', - }, - }, ], }, { @@ -1564,124 +1545,124 @@ const sections: ISection[] = [ }, ], }, - { - title: 'Без ограничений', - groups: [ - // { - // blocks: [ - // { - // elements: [ - // { - // title: 'Загрузить сессию пользователя', - // Component: Select, - // props: { - // name: 'selectUserSession', - // valueName: 'userSession', - // }, - // }, - // ], - // }, - // ], - // }, - { - blocks: [ - { - elements: [ - // { - // title: 'Отключить все проверки', - // Component: Switch, - // props: { - // name: 'cbxDisableChecks', - // valueName: 'disableChecks', - // }, - // }, - { - title: 'Тариф', - Component: Select, - props: { - name: 'selectTarif', - valueName: 'tarif', - }, - }, - { - title: 'Ставка привлечения, %', - Component: InputNumber, - props: { - min: '0.00', - max: '99.99', - step: '0.1', - name: 'tbxCreditRate', - valueName: 'creditRate', - }, - }, - { - title: 'Ставка привлечения', - Component: Select, - props: { - name: 'selectRate', - valueName: 'rate', - }, - }, - { - title: 'Требование телематики', - Component: Radio, - props: { - name: 'radioRequirementTelematic', - valueName: 'requirementTelematic', - style: 'button', - }, - }, - ], - }, - { - elements: [ - // { - // title: 'Децентрализованное страхование', - // Component: Switch, - // props: { - // name: 'cbxInsDecentral', - // valueName: 'insDecentral', - // }, - // }, - { - title: 'Макс.возможное изменение стоимости ПЛ', - Component: InputNumber, - props: { - min: '0', - max: '1000000000', - step: '10000.00', - name: 'tbxMaxPriceChange', - valueName: 'maxPriceChange', - }, - }, - { - title: 'АВ импортера,%', - Component: InputNumber, - props: { - min: '0.00', - max: '99.99', - step: '0.1', - name: 'tbxImporterRewardPerc', - valueName: 'importerRewardPerc', - }, - }, - { - title: 'АВ импортера,руб.', - Component: InputNumber, - props: { - min: '0', - max: '1000000000', - step: '10000.00', - name: 'tbxImporterRewardRub', - valueName: 'importerRewardRub', - }, - }, - ], - }, - ], - }, - ], - }, + // { + // title: 'Без ограничений', + // groups: [ + // // { + // // blocks: [ + // // { + // // elements: [ + // // { + // // title: 'Загрузить сессию пользователя', + // // Component: Select, + // // props: { + // // name: 'selectUserSession', + // // valueName: 'userSession', + // // }, + // // }, + // // ], + // // }, + // // ], + // // }, + // { + // blocks: [ + // { + // elements: [ + // // { + // // title: 'Отключить все проверки', + // // Component: Switch, + // // props: { + // // name: 'cbxDisableChecks', + // // valueName: 'disableChecks', + // // }, + // // }, + // { + // title: 'Тариф', + // Component: Select, + // props: { + // name: 'selectTarif', + // valueName: 'tarif', + // }, + // }, + // { + // title: 'Ставка привлечения, %', + // Component: InputNumber, + // props: { + // min: '0.00', + // max: '99.99', + // step: '0.1', + // name: 'tbxCreditRate', + // valueName: 'creditRate', + // }, + // }, + // { + // title: 'Ставка привлечения', + // Component: Select, + // props: { + // name: 'selectRate', + // valueName: 'rate', + // }, + // }, + // { + // title: 'Требование телематики', + // Component: Radio, + // props: { + // name: 'radioRequirementTelematic', + // valueName: 'requirementTelematic', + // style: 'button', + // }, + // }, + // ], + // }, + // { + // elements: [ + // // { + // // title: 'Децентрализованное страхование', + // // Component: Switch, + // // props: { + // // name: 'cbxInsDecentral', + // // valueName: 'insDecentral', + // // }, + // // }, + // { + // title: 'Макс.возможное изменение стоимости ПЛ', + // Component: InputNumber, + // props: { + // min: '0', + // max: '1000000000', + // step: '10000.00', + // name: 'tbxMaxPriceChange', + // valueName: 'maxPriceChange', + // }, + // }, + // { + // title: 'АВ импортера,%', + // Component: InputNumber, + // props: { + // min: '0.00', + // max: '99.99', + // step: '0.1', + // name: 'tbxImporterRewardPerc', + // valueName: 'importerRewardPerc', + // }, + // }, + // { + // title: 'АВ импортера,руб.', + // Component: InputNumber, + // props: { + // min: '0', + // max: '1000000000', + // step: '10000.00', + // name: 'tbxImporterRewardRub', + // valueName: 'importerRewardRub', + // }, + // }, + // ], + // }, + // ], + // }, + // ], + // }, ]; export default sections;