rate values changes
This commit is contained in:
parent
1822213ad5
commit
9147c0fdc8
@ -250,8 +250,10 @@ const query = gql`
|
||||
}
|
||||
}
|
||||
selectRate: evo_rates(
|
||||
statecode: $statecode # evo_datefrom_param: { lte: $currentDate } # evo_dateto_param: { gte: $currentDate }
|
||||
) {
|
||||
statecode: $statecode
|
||||
) # evo_datefrom_param: { lte: $currentDate }
|
||||
# evo_dateto_param: { gte: $currentDate }
|
||||
{
|
||||
evo_id
|
||||
evo_rateid
|
||||
evo_name
|
||||
|
||||
@ -63,6 +63,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
INNForCalc,
|
||||
regionRegistration,
|
||||
creditRate,
|
||||
rate,
|
||||
infuranceOPF,
|
||||
} = calculationStore.values;
|
||||
|
||||
@ -237,10 +238,6 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
}),
|
||||
);
|
||||
|
||||
const rate = calculationStore.getOption('selectRate', {
|
||||
evo_rateid: quote.evo_rateid,
|
||||
});
|
||||
|
||||
let clientRisk = quote.evo_client_riskid;
|
||||
if (opportunity) {
|
||||
const current_opportunity = calculationStore.getOption(
|
||||
@ -291,7 +288,7 @@ const loadKpReaction: IReactionEffect = calculationStore => ({
|
||||
...newValues,
|
||||
product: base_product?.evo_id,
|
||||
...addProducts,
|
||||
rate: rate?.evo_id,
|
||||
rate,
|
||||
lead,
|
||||
opportunity,
|
||||
quote: quoteId,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { openNotification } from 'client/Elements/Notification';
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import { pipe } from 'core/tools/func';
|
||||
import { IReactionEffect } from 'core/types/Calculation/Store/effect';
|
||||
import { Process } from 'core/types/Calculation/Store/process';
|
||||
@ -1754,6 +1755,18 @@ const reactionEffects: IReactionEffect[] = [
|
||||
calculationStore.setValue('INNForCalc', inn);
|
||||
},
|
||||
}),
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
return calculationStore.getOption('selectRate');
|
||||
},
|
||||
effect: ({ evo_base_rate }) => {
|
||||
calculationStore.setValue(
|
||||
'creditRate',
|
||||
evo_base_rate || valuesConstants.RATE,
|
||||
);
|
||||
},
|
||||
}),
|
||||
];
|
||||
|
||||
export default reactionEffects;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import valuesConstants from 'core/constants/values';
|
||||
import { currentYear } from 'core/tools/date';
|
||||
import { TValue, TValues } from 'core/types/Calculation/Store/values';
|
||||
|
||||
@ -71,7 +72,7 @@ const initialValues: TValues<TValue> = {
|
||||
NSIB: true,
|
||||
quoteContactGender: 100000000,
|
||||
quoteRedemptionGraph: true,
|
||||
creditRate: 7.75,
|
||||
creditRate: valuesConstants.RATE,
|
||||
requirementTelematic: 100000000,
|
||||
maxPriceChange: 0,
|
||||
importerRewardPerc: 0,
|
||||
|
||||
@ -8,4 +8,5 @@ export default {
|
||||
MAX_VEHICLE_MASS: 3500,
|
||||
MAX_VEHICLE_SEATS: 20,
|
||||
PERIODS_NUMBER: 12,
|
||||
RATE: 7.75,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user