min insurance value

This commit is contained in:
vchikalkin 2021-06-21 11:01:20 +03:00
parent 5ea97faf42
commit 3ac5757e76
3 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import {
MAX_FRANCHISE,
MAX_INSURANCE,
MIN_INSURANCE,
} from 'core/constants/stores/Calculation/limits';
import { ICalculationStore } from 'core/types/Calculation/Store';
@ -24,6 +25,12 @@ export default function (
};
}
if (kaskoSum < MIN_INSURANCE) {
return {
message: `Сумма по страховке не должна быть меньше ${MIN_INSURANCE}`,
};
}
this.setValue('insFranchise', totalFranchise);
this.setTableRows(

View File

@ -1,4 +1,7 @@
import { MAX_INSURANCE } from 'core/constants/stores/Calculation/limits';
import {
MAX_INSURANCE,
MIN_INSURANCE,
} from 'core/constants/stores/Calculation/limits';
import { ICalculationStore } from 'core/types/Calculation/Store';
export default function (
@ -16,6 +19,12 @@ export default function (
};
}
if (premiumSum < MIN_INSURANCE) {
return {
message: `Сумма по страховке не должна быть меньше ${MIN_INSURANCE}`,
};
}
this.setTableRow(
'tableInsurance',
0,

View File

@ -1,2 +1,3 @@
export const MAX_FRANCHISE = 75000;
export const MAX_INSURANCE = 2500000;
export const MIN_INSURANCE = 3000;