hide sections & elements

This commit is contained in:
Chika 2020-11-26 18:01:22 +03:00
parent 78268a7009
commit 79642e7c71
3 changed files with 185 additions and 175 deletions

View File

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

View File

@ -8,13 +8,13 @@ export const resultsTable: IGroup[] = [
{
blocks: [
{
title: 'График платежей',
layout: {
newLine: true,
},
elements: [
{
type: ElementType.Table,
title: 'График платежей',
Component: Table,
props: {
name: 'tableResults',

View File

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