merge release/dyn-1068_filter-types-leasing-obj
This commit is contained in:
parent
90be89dd50
commit
a2e982df6e
@ -1142,10 +1142,28 @@ const reactionEffects: IReactionEffect[] = [
|
||||
|
||||
calculationStore => ({
|
||||
expression: () => {
|
||||
const { product, leasingPeriod, deliveryTime } = calculationStore.values;
|
||||
return { product_evo_id: product, leasingPeriod, deliveryTime };
|
||||
const {
|
||||
product,
|
||||
leasingPeriod,
|
||||
deliveryTime,
|
||||
firstPaymentPerc,
|
||||
lastPaymentPerc,
|
||||
} = calculationStore.values;
|
||||
return {
|
||||
product_evo_id: product,
|
||||
leasingPeriod,
|
||||
deliveryTime,
|
||||
firstPaymentPerc,
|
||||
lastPaymentPerc,
|
||||
};
|
||||
},
|
||||
effect: ({ product_evo_id, leasingPeriod, deliveryTime }) => {
|
||||
effect: ({
|
||||
product_evo_id,
|
||||
leasingPeriod,
|
||||
deliveryTime,
|
||||
firstPaymentPerc,
|
||||
lastPaymentPerc,
|
||||
}) => {
|
||||
if (product_evo_id && leasingPeriod && deliveryTime) {
|
||||
const product = calculationStore.getOption('selectProduct', {
|
||||
evo_id: product_evo_id,
|
||||
@ -1154,11 +1172,13 @@ const reactionEffects: IReactionEffect[] = [
|
||||
const tarif = calculationStore.options.selectTarif?.find(
|
||||
x =>
|
||||
x.evo_baseproductid === product.evo_baseproductid &&
|
||||
x.evo_min_period &&
|
||||
x.evo_min_period <= leasingPeriod &&
|
||||
x.evo_max_period &&
|
||||
x.evo_max_period >= leasingPeriod &&
|
||||
x.evo_delivery_time?.includes(deliveryTime),
|
||||
x.evo_delivery_time?.includes(deliveryTime) &&
|
||||
x.evo_min_first_payment <= firstPaymentPerc &&
|
||||
x.evo_max_first_payment >= firstPaymentPerc &&
|
||||
x.evo_min_last_payment <= lastPaymentPerc &&
|
||||
x.evo_max_last_payment >= lastPaymentPerc,
|
||||
);
|
||||
calculationStore.setValue('tarif', tarif?.evo_tarifid);
|
||||
}
|
||||
|
||||
@ -172,6 +172,13 @@ query GetMainOptions(
|
||||
evo_leasingobject_typeid
|
||||
}
|
||||
evo_delivery_time
|
||||
evo_graphtype_exception
|
||||
evo_seasons_type_exception
|
||||
evo_min_decreasing_perc
|
||||
evo_min_first_payment
|
||||
evo_max_first_payment
|
||||
evo_min_last_payment
|
||||
evo_max_last_payment
|
||||
}
|
||||
selectRate: evo_rates(
|
||||
statecode: $statecode
|
||||
|
||||
Reference in New Issue
Block a user