hide fields | set default values
This commit is contained in:
parent
f9a00396bf
commit
32c12b7df6
@ -1201,15 +1201,15 @@ const sections: ISection[] = [
|
||||
// valueName: 'insPeriod',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
Component: Button,
|
||||
props: {
|
||||
type: 'ghost',
|
||||
name: 'btnFranschise',
|
||||
text: 'Заявление на франшизу',
|
||||
onClick: undefined,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// Component: Button,
|
||||
// props: {
|
||||
// type: 'ghost',
|
||||
// name: 'btnFranschise',
|
||||
// text: 'Заявление на франшизу',
|
||||
// onClick: undefined,
|
||||
// },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
@ -1250,15 +1250,15 @@ const sections: ISection[] = [
|
||||
// valueName: 'INNForCalc',
|
||||
// },
|
||||
// },
|
||||
{
|
||||
Component: Button,
|
||||
props: {
|
||||
type: 'ghost',
|
||||
name: 'btnDriversApplication',
|
||||
text: 'Заявление на ограничения по водителям',
|
||||
onClick: undefined,
|
||||
},
|
||||
},
|
||||
// {
|
||||
// Component: Button,
|
||||
// props: {
|
||||
// type: 'ghost',
|
||||
// name: 'btnDriversApplication',
|
||||
// text: 'Заявление на ограничения по водителям',
|
||||
// onClick: undefined,
|
||||
// },
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@ -1259,25 +1259,25 @@ const reactionEffects: IReactionEffect[] = [
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { leasingPeriod } = calculationStore.values;
|
||||
return leasingPeriod;
|
||||
},
|
||||
effect: leasingPeriod => {
|
||||
if (leasingPeriod) {
|
||||
if (parseInt(leasingPeriod) < 12) {
|
||||
calculationStore.setStatus('radioBalanceHolder', Status.Disabled);
|
||||
calculationStore.setValue('balanceHolder', 100000000);
|
||||
} else {
|
||||
calculationStore.setStatus('radioBalanceHolder', Status.Default);
|
||||
}
|
||||
}
|
||||
},
|
||||
options: {
|
||||
fireImmediately: true,
|
||||
},
|
||||
}),
|
||||
// calculationStore => ({
|
||||
// expression: () => {
|
||||
// const { leasingPeriod } = calculationStore.values;
|
||||
// return leasingPeriod;
|
||||
// },
|
||||
// effect: leasingPeriod => {
|
||||
// if (leasingPeriod) {
|
||||
// if (parseInt(leasingPeriod) < 12) {
|
||||
// calculationStore.setStatus('radioBalanceHolder', Status.Disabled);
|
||||
// calculationStore.setValue('balanceHolder', 100000000);
|
||||
// } else {
|
||||
// calculationStore.setStatus('radioBalanceHolder', Status.Default);
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// options: {
|
||||
// fireImmediately: true,
|
||||
// },
|
||||
// }),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
|
||||
@ -36,6 +36,8 @@ const initialStatuses: TElements<Status> = {
|
||||
selectAgent: Status.Disabled,
|
||||
tbxCommentLead: Status.Disabled,
|
||||
btnCreateLead: Status.Disabled,
|
||||
|
||||
radioBalanceHolder: Status.Disabled,
|
||||
};
|
||||
|
||||
export default initialStatuses;
|
||||
|
||||
@ -18,7 +18,7 @@ const tableInsurance: ITable = {
|
||||
),
|
||||
},
|
||||
insured: {
|
||||
value: null,
|
||||
value: 100000000,
|
||||
},
|
||||
insCost: {
|
||||
value: 0,
|
||||
@ -42,7 +42,7 @@ const tableInsurance: ITable = {
|
||||
),
|
||||
},
|
||||
insured: {
|
||||
value: null,
|
||||
value: 100000000,
|
||||
},
|
||||
insCost: {
|
||||
value: 0,
|
||||
|
||||
@ -26,7 +26,7 @@ const initialValues: TValues<TValue> = {
|
||||
highSeasonStart: 100000000,
|
||||
comissionPerc: 0,
|
||||
comissionRub: 0,
|
||||
saleBonus: 1.25,
|
||||
saleBonus: 1.3,
|
||||
IRR_Perc: 20,
|
||||
brand: null,
|
||||
model: null,
|
||||
|
||||
Reference in New Issue
Block a user