show cbxRecalcWithRevision && convert to checkbox

This commit is contained in:
Chika 2021-01-22 15:14:07 +03:00
parent 70884ee506
commit dae0765b57
5 changed files with 19 additions and 11 deletions

View File

@ -5,16 +5,11 @@ export const controlsList: IGroup[] = [
title: 'Выбор Интереса/ЛС',
blocks: [
{
elements: ['selectLead', 'selectOpportunity', 'selectQuote'],
elements: ['selectLead', 'selectOpportunity'],
},
// {
// elements: ['cbxRecalcWithRevision'],
// layout: {
// newLine: true,
// },
// },
],
},
{ blocks: [{ elements: ['cbxRecalcWithRevision', 'selectQuote'] }] },
{
blocks: [
{

View File

@ -137,7 +137,7 @@ const elementsComponents: TElements<Component> = {
selectLead: Select,
selectOpportunity: Select,
selectQuote: Select,
cbxRecalcWithRevision: Switch,
cbxRecalcWithRevision: Checkbox,
btnCalculate: Button,
tbxIRR_Perc: InputNumber,
labelIrrInfo: Label,

View File

@ -328,6 +328,12 @@ const elementsProps: TElements<ElementProps> = {
step: 100,
precision: 2,
},
cbxRecalcWithRevision: {
text: 'Пересчет без пересмотра',
containerStyle: {
marginBottom: '8px',
},
},
};
const resultElementsProps: TElements<ElementProps> = [

View File

@ -5,7 +5,6 @@ const elementsTitles: TElements<string> = {
selectLead: 'Интерес',
selectOpportunity: 'Лизинговая сделка',
selectQuote: 'Предложение',
cbxRecalcWithRevision: 'Пересчет без пересмотра',
selectTemplate: 'Выбор шаблона',
selectChannel: 'Канал привлечения',
tbxNewClient: 'Новый контрагент',

View File

@ -8,16 +8,24 @@ const Checkbox = ({
status,
validateStatus,
message,
text,
containerStyle,
...props
}) => {
return (
<Form.Item validateStatus={validateStatus} help={message}>
<Form.Item
validateStatus={validateStatus}
help={message}
style={containerStyle}
>
<AntCheckbox
{...props}
disabled={status === ElementStatus.Disabled}
checked={value}
onChange={e => setCurrentValue(e.target.checked)}
/>
>
{text}
</AntCheckbox>
</Form.Item>
);
};