convert selectWithTrailer => cbxWithTrailer

This commit is contained in:
Chika 2020-12-09 22:47:14 +03:00
parent 121f654137
commit d2954a412c
10 changed files with 12 additions and 30 deletions

View File

@ -163,7 +163,7 @@ const sections: ISection[] = [
],
},
{
elements: ['tbxCountSeats', 'tbxMaxSpeed', 'selectWithTrailer'],
elements: ['tbxCountSeats', 'tbxMaxSpeed', 'cbxWithTrailer'],
},
],
},

View File

@ -70,7 +70,7 @@ const elementsComponents: TElements<Component> = {
tbxMaxMass: InputNumber,
tbxCountSeats: InputNumber,
tbxMaxSpeed: InputNumber,
selectWithTrailer: Select,
cbxWithTrailer: Checkbox,
selectDealer: Select,
selectDealerPerson: Select,
selectDealerRewardCondition: Select,

View File

@ -196,9 +196,6 @@ const elementsProps: TElements<ElementProps> = {
min: '0',
max: '2000',
},
selectWithTrailer: {
showSearch: false,
},
selectDealer: {
showSearch: true,
},

View File

@ -50,7 +50,7 @@ const elementsTitles: TElements<string> = {
labelLeaseObjectRisk: 'Риск ПЛ',
labelDepreciationGroup: 'Группа обесценения',
tbxLeaseObjectCount: 'Кол-во ПЛ в расчете',
selectWithTrailer: 'ТС с прицепом',
cbxWithTrailer: 'ТС с прицепом',
cbxLeaseObjectUsed: 'ПЛ БУ',
tbxMaxMass: 'Разрешенная макс.масса(кг)',
tbxCountSeats: 'Количество мест',

View File

@ -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',

View File

@ -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 => () => {

View File

@ -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: {

View File

@ -139,21 +139,6 @@ const initialOptions: TElements<IBaseOption[]> = {
},
],
selectWithTrailer: [
// {
// name: 'пусто',
// value: 100000000,
// },
{
name: 'Да',
value: 100000001,
},
{
name: 'Нет',
value: 100000002,
},
],
selectEngineType: [
{
name: 'Бензин',

View File

@ -32,7 +32,7 @@ const initialValues: TValues<TValue> = {
configuration: null,
deliveryTime: 100000000,
leaseObjectCount: 1,
withTrailer: null,
withTrailer: false,
leaseObjectUsed: false,
maxMass: 0,
countSeats: 0,

View File

@ -48,7 +48,7 @@ export type ElementsNames =
| 'labelLeaseObjectRisk'
| 'labelDepreciationGroup'
| 'tbxLeaseObjectCount'
| 'selectWithTrailer'
| 'cbxWithTrailer'
| 'cbxLeaseObjectUsed'
| 'tbxMaxMass'
| 'tbxCountSeats'