Merge pull request #1994 from Safelite/feature/CSR-2166
CSR-2166: remove recal from calculation if experiment says it should be hidden
This commit is contained in:
commit
7ec1806d6f
1 changed files with 15 additions and 9 deletions
|
|
@ -296,8 +296,11 @@ export default {
|
||||||
const serviceLocationState = store.getters.order.serviceLocation.state;
|
const serviceLocationState = store.getters.order.serviceLocation.state;
|
||||||
// Override if coming back from QuoteDetails. Remove override after Quote release
|
// Override if coming back from QuoteDetails. Remove override after Quote release
|
||||||
const isInsuranceOverrideValue = to.query?.isInsurance;
|
const isInsuranceOverrideValue = to.query?.isInsurance;
|
||||||
|
|
||||||
const defaultIsInsuranceSelectedValue = store.getters.order.payment.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
|
//Default to Insurance Tab if user Service zip is from certain States
|
||||||
if (
|
if (
|
||||||
serviceLocationState != null &&
|
serviceLocationState != null &&
|
||||||
|
|
@ -309,15 +312,18 @@ export default {
|
||||||
} else if (defaultIsInsuranceSelectedValue != null) {
|
} else if (defaultIsInsuranceSelectedValue != null) {
|
||||||
return defaultIsInsuranceSelectedValue;
|
return defaultIsInsuranceSelectedValue;
|
||||||
} else {
|
} else {
|
||||||
// TEMPORARY CODE WHILE DEVELOPING
|
|
||||||
if (availableLineItems) {
|
if (availableLineItems) {
|
||||||
let tierOnePackagePriceTemp = baseMixin.methods.getTierOnePackagePrice(
|
|
||||||
baseMixin.methods.filterOutFees(availableLineItems)
|
const lineItemsForCalculatingPrice =
|
||||||
);
|
(hideRecalCost === "true") ?
|
||||||
let whatToReturn = baseMixin.methods.getTierOnePackagePrice(
|
baseMixin.methods.filterOutFees(
|
||||||
baseMixin.methods.filterOutFees(availableLineItems)
|
baseMixin.methods.filterOutRecalibration(availableLineItems) // Strip out recal before filtering out fees
|
||||||
) > insuranceThreshold;
|
) :
|
||||||
return whatToReturn; // TODO AJC: TIGHTEN THIS BACK UP AFTER TESTING
|
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 {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue