From 75aebb97e36adf65f0551aac32365b823ba4b2ab 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: Thu, 3 Sep 2020 18:53:11 +0300 Subject: [PATCH] 2nd section complete --- .../Containers/Calculation/Sections/index.jsx | 2 +- .../Containers/Calculation/Sections/list.js | 130 ++++++++++++++---- 2 files changed, 102 insertions(+), 30 deletions(-) diff --git a/src/client/Containers/Calculation/Sections/index.jsx b/src/client/Containers/Calculation/Sections/index.jsx index 30f18d8..c9f96f6 100644 --- a/src/client/Containers/Calculation/Sections/index.jsx +++ b/src/client/Containers/Calculation/Sections/index.jsx @@ -26,7 +26,7 @@ const Title = styled.h5` `; const Sections = () => ( - + {SectionsList.map(({ title, elements }, i) => ( diff --git a/src/client/Containers/Calculation/Sections/list.js b/src/client/Containers/Calculation/Sections/list.js index 723951b..f8c5518 100644 --- a/src/client/Containers/Calculation/Sections/list.js +++ b/src/client/Containers/Calculation/Sections/list.js @@ -324,14 +324,7 @@ export default [ }, /** */ - { - title: 'Стоимость предмета лизинга', - Component: InputNumber, - props: { - name: 'tbxLeaseObjectPrice', - valueName: 'leaseObjectPrice', - }, - }, + // TODO Input x Addon { title: 'Валюта поставщика', Component: Select, @@ -340,25 +333,37 @@ export default [ valueName: 'supplierCurrency', }, }, - - /** */ { - divider: { empty: true }, + title: 'Стоимость предмета лизинга', + Component: InputNumber, + props: { + min: '10000', + max: '1000000000', + step: '10000.00', + name: 'tbxLeaseObjectPrice', + valueName: 'leaseObjectPrice', + }, }, - /** */ - + // TODO formatter + rub, parser { title: 'Скидка от поставщика, рубли', Component: InputNumber, props: { + min: '0', + max: '1000000000', + step: '10000.00', name: 'tbxSupplierDiscountRub', valueName: 'SupplierDiscountRub', }, }, + + // TODO formatter + %, parser { title: 'Скидка от поставщика, %', Component: InputNumber, props: { + min: '0', + max: '100', name: 'tbxSupplierDiscountPerc', valueName: 'supplierDiscountPerc', }, @@ -370,14 +375,7 @@ export default [ }, /** */ - { - title: 'Стоимость доп.оборудования', - Component: InputNumber, - props: { - name: 'tbxAddEquipmentPrice', - valueName: 'addEquipmentPrice', - }, - }, + // TODO Input x Addon { title: 'Валюта доп.оборудования', Component: Select, @@ -386,12 +384,24 @@ export default [ valueName: 'addEquipmentCurrency', }, }, + { + title: 'Стоимость доп.оборудования', + Component: InputNumber, + props: { + min: '0', + max: '1000000000', + step: '10000.00', + name: 'tbxAddEquipmentPrice', + valueName: 'addEquipmentPrice', + }, + }, { title: 'Плательщик доп.оборудования', Component: Select, props: { name: 'selectAddEquipmentPayer', valueName: 'addEquipmentPayer', + withSearch: false, }, }, @@ -401,18 +411,12 @@ export default [ }, /** */ - { - title: 'Срок лизинга, мес', - Component: InputNumber, - props: { - name: 'tbxLeasingPeriod', - valueName: 'leasingPeriod', - }, - }, { title: 'Первый платеж, %', Component: InputNumber, props: { + min: '0', + max: '100', name: 'tbxFirstPaymentPerc', valueName: 'firstPaymentPerc', }, @@ -421,6 +425,9 @@ export default [ title: 'Первый платеж, руб.', Component: InputNumber, props: { + min: '0', + max: '1000000000', + step: '10000.00', name: 'tbxFirstPaymentRub', valueName: 'firstPaymentRub', }, @@ -444,6 +451,8 @@ export default [ title: 'Последний платеж, %', Component: InputNumber, props: { + min: '0', + max: '100', name: 'tbxLastPaymentPerc', valueName: 'lastPaymentPerc', }, @@ -452,6 +461,9 @@ export default [ title: 'Последний платеж, руб.', Component: InputNumber, props: { + min: '0', + max: '1000000000', + step: '10000.00', name: 'tbxLastPaymentRub', valueName: 'lastPaymentRub', }, @@ -463,20 +475,69 @@ export default [ }, /** */ + { + title: 'Срок лизинга, мес', + Component: InputNumber, + props: { + min: '7', + max: '60', + name: 'tbxLeasingPeriod', + valueName: 'leasingPeriod', + }, + }, { title: 'Балансодержатель', Component: Select, props: { name: 'selectBalanceHolder', valueName: 'balanceHolder', + withSearch: false, }, }, + + /** */ + { + divider: { empty: true }, + }, + /** */ + { title: 'Вид графика', Component: Select, props: { name: 'selectGraphType', valueName: 'graphType', + withSearch: false, + }, + }, + + // TODO: formatter, parser: % + { + title: 'Процент убывания платежей', + Component: InputNumber, + props: { + min: '50', + max: '99', + name: 'tbxParmentsDecreasePercent', + valueName: 'parmentsDecreasePercent', + }, + }, + { + title: 'Тип сезонности', + Component: Select, + props: { + name: 'selectSeasonType', + valueName: 'seasonType', + withSearch: false, + }, + }, + { + title: 'С какого платежа начинается высокий сезон', + Component: Select, + props: { + name: 'selectHighSeasonStart', + valueName: 'highSeasonStart', + withSearch: false, }, }, @@ -490,6 +551,8 @@ export default [ title: 'Комиссия, %', Component: InputNumber, props: { + min: '0', + max: '100', name: 'tbxComissionPerc', valueName: 'comissionPerc', }, @@ -498,6 +561,9 @@ export default [ title: 'Комиссия, руб.', Component: InputNumber, props: { + min: '0', + max: '1000000000', + step: '10000.00', name: 'tbxComissionRub', valueName: 'comissionRub', }, @@ -513,6 +579,9 @@ export default [ title: 'IRR, %', Component: InputNumber, props: { + min: '0.0000', + max: '100.0000', + step: '0.0001', name: 'tbxIRR_Perc', valueName: 'IRR_Perc', }, @@ -521,6 +590,9 @@ export default [ title: 'Размер бонуса МПЛ', Component: InputNumber, props: { + min: '0.00', + max: '100.00', + step: '1.00', name: 'tbxSaleBonus', valueName: 'saleBonus', },