CSR-2166: remove recal from calculation if experiment says it should be hidden
This commit is contained in:
parent
add23e7165
commit
2560787b4f
1 changed files with 15 additions and 9 deletions
|
|
@ -296,8 +296,11 @@ export default {
|
|||
const serviceLocationState = store.getters.order.serviceLocation.state;
|
||||
// Override if coming back from QuoteDetails. Remove override after Quote release
|
||||
const isInsuranceOverrideValue = to.query?.isInsurance;
|
||||
|
||||
const defaultIsInsuranceSelectedValue = store.getters.order.payment.isInsurance;
|
||||
const hideRecalCost = experimentMixin.methods.getSettingValue(
|
||||
experimentSettings.RECAL_PRICE_REMOVE
|
||||
);
|
||||
|
||||
//Default to Insurance Tab if user Service zip is from certain States
|
||||
if (
|
||||
serviceLocationState != null &&
|
||||
|
|
@ -309,15 +312,18 @@ export default {
|
|||
} else if (defaultIsInsuranceSelectedValue != null) {
|
||||
return defaultIsInsuranceSelectedValue;
|
||||
} else {
|
||||
// TEMPORARY CODE WHILE DEVELOPING
|
||||
if (availableLineItems) {
|
||||
let tierOnePackagePriceTemp = baseMixin.methods.getTierOnePackagePrice(
|
||||
baseMixin.methods.filterOutFees(availableLineItems)
|
||||
);
|
||||
let whatToReturn = baseMixin.methods.getTierOnePackagePrice(
|
||||
baseMixin.methods.filterOutFees(availableLineItems)
|
||||
) > insuranceThreshold;
|
||||
return whatToReturn; // TODO AJC: TIGHTEN THIS BACK UP AFTER TESTING
|
||||
|
||||
const lineItemsForCalculatingPrice =
|
||||
(hideRecalCost === "true") ?
|
||||
baseMixin.methods.filterOutFees(
|
||||
baseMixin.methods.filterOutRecalibration(availableLineItems) // Strip out recal before filtering out fees
|
||||
) :
|
||||
baseMixin.methods.filterOutFees(availableLineItems);
|
||||
|
||||
let tierOnePackagePriceTemp = baseMixin.methods.getTierOnePackagePrice(lineItemsForCalculatingPrice); // TEMP, FOR TESTING /// TODO AJC: TIGHTEN THIS BACK UP AFTER TESTING
|
||||
|
||||
return baseMixin.methods.getTierOnePackagePrice(lineItemsForCalculatingPrice) > insuranceThreshold; // compare base price vs arbitrary threshold (representing insurance price)
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue