hide options | new autorun effect
This commit is contained in:
parent
a1a8b070f4
commit
78268a7009
@ -110,6 +110,16 @@ const autorunEffects: IAutorunEffect[] = [
|
||||
calculationStore.setValidation('tbxCountSeats', true);
|
||||
}
|
||||
},
|
||||
calculationStore => () => {
|
||||
const { requirementTelematic } = calculationStore.values;
|
||||
if (requirementTelematic) {
|
||||
const tracker = calculationStore.options.selectTracker?.find(x =>
|
||||
x.evo_controls_program?.includes(requirementTelematic),
|
||||
);
|
||||
if (tracker)
|
||||
calculationStore.setValue('tracker', tracker.evo_addproduct_typeid);
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
export default autorunEffects;
|
||||
|
||||
@ -6,7 +6,6 @@ import { shift, shiftRight } from 'core/tools/array';
|
||||
import { IReactionEffect } from 'core/types/Calculation/Store/effect';
|
||||
import { ITableCell, TableProps } from 'core/types/Calculation/Store/tables';
|
||||
import { Status } from 'core/types/statuses';
|
||||
import { last } from 'lodash';
|
||||
import { toJS } from 'mobx';
|
||||
import { calcPrice, calculatePerc, calculateRub } from './lib/tools';
|
||||
|
||||
|
||||
@ -302,14 +302,14 @@ const initialOptions: TElements<IBaseOption[]> = {
|
||||
name: 'START+',
|
||||
value: 100000001,
|
||||
},
|
||||
{
|
||||
name: 'COMFORT',
|
||||
value: 100000002,
|
||||
},
|
||||
{
|
||||
name: 'COMFORT+',
|
||||
value: 100000003,
|
||||
},
|
||||
// {
|
||||
// name: 'COMFORT',
|
||||
// value: 100000002,
|
||||
// },
|
||||
// {
|
||||
// name: 'COMFORT+',
|
||||
// value: 100000003,
|
||||
// },
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@ -37,6 +37,7 @@ const initialStatuses: TElements<Status> = {
|
||||
btnCreateLead: Status.Disabled,
|
||||
|
||||
selectRegistration: Status.Disabled,
|
||||
selectTracker: Status.Disabled,
|
||||
};
|
||||
|
||||
export default initialStatuses;
|
||||
|
||||
Reference in New Issue
Block a user