convert selectWithTrailer => cbxWithTrailer
This commit is contained in:
parent
121f654137
commit
d2954a412c
@ -163,7 +163,7 @@ const sections: ISection[] = [
|
||||
],
|
||||
},
|
||||
{
|
||||
elements: ['tbxCountSeats', 'tbxMaxSpeed', 'selectWithTrailer'],
|
||||
elements: ['tbxCountSeats', 'tbxMaxSpeed', 'cbxWithTrailer'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@ -70,7 +70,7 @@ const elementsComponents: TElements<Component> = {
|
||||
tbxMaxMass: InputNumber,
|
||||
tbxCountSeats: InputNumber,
|
||||
tbxMaxSpeed: InputNumber,
|
||||
selectWithTrailer: Select,
|
||||
cbxWithTrailer: Checkbox,
|
||||
selectDealer: Select,
|
||||
selectDealerPerson: Select,
|
||||
selectDealerRewardCondition: Select,
|
||||
|
||||
@ -196,9 +196,6 @@ const elementsProps: TElements<ElementProps> = {
|
||||
min: '0',
|
||||
max: '2000',
|
||||
},
|
||||
selectWithTrailer: {
|
||||
showSearch: false,
|
||||
},
|
||||
selectDealer: {
|
||||
showSearch: true,
|
||||
},
|
||||
|
||||
@ -50,7 +50,7 @@ const elementsTitles: TElements<string> = {
|
||||
labelLeaseObjectRisk: 'Риск ПЛ',
|
||||
labelDepreciationGroup: 'Группа обесценения',
|
||||
tbxLeaseObjectCount: 'Кол-во ПЛ в расчете',
|
||||
selectWithTrailer: 'ТС с прицепом',
|
||||
cbxWithTrailer: 'ТС с прицепом',
|
||||
cbxLeaseObjectUsed: 'ПЛ БУ',
|
||||
tbxMaxMass: 'Разрешенная макс.масса(кг)',
|
||||
tbxCountSeats: 'Количество мест',
|
||||
|
||||
@ -52,7 +52,7 @@ export const elementsValues: TElements<ValuesNames> = {
|
||||
radioDeliveryTime: 'deliveryTime',
|
||||
labelDepreciationGroup: 'depreciationGroup',
|
||||
tbxLeaseObjectCount: 'leaseObjectCount',
|
||||
selectWithTrailer: 'withTrailer',
|
||||
cbxWithTrailer: 'withTrailer',
|
||||
cbxLeaseObjectUsed: 'leaseObjectUsed',
|
||||
tbxMaxMass: 'maxMass',
|
||||
tbxCountSeats: 'countSeats',
|
||||
|
||||
@ -89,13 +89,13 @@ const autorunEffects: IAutorunEffect[] = [
|
||||
calculationStore.setValidation('tbxMaxMass', true);
|
||||
}
|
||||
if (!withTrailer) {
|
||||
calculationStore.setValidation('selectWithTrailer', false);
|
||||
calculationStore.setValidation('cbxWithTrailer', false);
|
||||
} else {
|
||||
calculationStore.setValidation('selectWithTrailer', true);
|
||||
calculationStore.setValidation('cbxWithTrailer', true);
|
||||
}
|
||||
} else {
|
||||
calculationStore.setValidation('tbxMaxMass', true);
|
||||
calculationStore.setValidation('selectWithTrailer', true);
|
||||
calculationStore.setValidation('cbxWithTrailer', true);
|
||||
}
|
||||
},
|
||||
calculationStore => () => {
|
||||
|
||||
@ -1488,10 +1488,10 @@ const reactionEffects: IReactionEffect[] = [
|
||||
leaseObjectCategory === 100000001 ||
|
||||
leaseObjectCategory === 100000001
|
||||
) {
|
||||
calculationStore.setValue('withTrailer', null);
|
||||
calculationStore.setStatus('selectWithTrailer', ElementStatus.Disabled);
|
||||
calculationStore.setValue('withTrailer', false);
|
||||
calculationStore.setStatus('cbxWithTrailer', ElementStatus.Disabled);
|
||||
} else {
|
||||
calculationStore.setStatus('selectWithTrailer', ElementStatus.Default);
|
||||
calculationStore.setStatus('cbxWithTrailer', ElementStatus.Default);
|
||||
}
|
||||
},
|
||||
options: {
|
||||
|
||||
@ -139,21 +139,6 @@ const initialOptions: TElements<IBaseOption[]> = {
|
||||
},
|
||||
],
|
||||
|
||||
selectWithTrailer: [
|
||||
// {
|
||||
// name: 'пусто',
|
||||
// value: 100000000,
|
||||
// },
|
||||
{
|
||||
name: 'Да',
|
||||
value: 100000001,
|
||||
},
|
||||
{
|
||||
name: 'Нет',
|
||||
value: 100000002,
|
||||
},
|
||||
],
|
||||
|
||||
selectEngineType: [
|
||||
{
|
||||
name: 'Бензин',
|
||||
|
||||
@ -32,7 +32,7 @@ const initialValues: TValues<TValue> = {
|
||||
configuration: null,
|
||||
deliveryTime: 100000000,
|
||||
leaseObjectCount: 1,
|
||||
withTrailer: null,
|
||||
withTrailer: false,
|
||||
leaseObjectUsed: false,
|
||||
maxMass: 0,
|
||||
countSeats: 0,
|
||||
|
||||
@ -48,7 +48,7 @@ export type ElementsNames =
|
||||
| 'labelLeaseObjectRisk'
|
||||
| 'labelDepreciationGroup'
|
||||
| 'tbxLeaseObjectCount'
|
||||
| 'selectWithTrailer'
|
||||
| 'cbxWithTrailer'
|
||||
| 'cbxLeaseObjectUsed'
|
||||
| 'tbxMaxMass'
|
||||
| 'tbxCountSeats'
|
||||
|
||||
Reference in New Issue
Block a user