CSR-2166: change all instances of hide recal setting from experiments to compare strings not boolean / reformatting
This commit is contained in:
parent
00f34b7c3c
commit
53d4a09a52
4 changed files with 46 additions and 29 deletions
|
|
@ -170,7 +170,10 @@ export default {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE);
|
const recalSettingValue =
|
||||||
|
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
|
||||||
|
"true";
|
||||||
|
return recalSettingValue;
|
||||||
},
|
},
|
||||||
ShowCart() {
|
ShowCart() {
|
||||||
if (this.isPia && this.submittedOrder?.settledTenderAmount == 0) {
|
if (this.isPia && this.submittedOrder?.settledTenderAmount == 0) {
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,10 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
return this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE);
|
const recalSettingValue =
|
||||||
|
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() ===
|
||||||
|
"true";
|
||||||
|
return recalSettingValue;
|
||||||
},
|
},
|
||||||
showApplePay() {
|
showApplePay() {
|
||||||
return baseMixin.methods.showApplePay();
|
return baseMixin.methods.showApplePay();
|
||||||
|
|
|
||||||
|
|
@ -304,9 +304,10 @@ export default {
|
||||||
// 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(
|
const hideRecalCost =
|
||||||
experimentSettings.RECAL_PRICE_REMOVE
|
experimentMixin.methods
|
||||||
);
|
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)
|
||||||
|
?.toLowerCase() === "true";
|
||||||
|
|
||||||
//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 (
|
||||||
|
|
@ -320,17 +321,20 @@ export default {
|
||||||
return defaultIsInsuranceSelectedValue;
|
return defaultIsInsuranceSelectedValue;
|
||||||
} else {
|
} else {
|
||||||
if (availableLineItems) {
|
if (availableLineItems) {
|
||||||
|
const lineItemsForCalculatingPrice = hideRecalCost
|
||||||
|
? baseMixin.methods.filterOutFees(
|
||||||
|
baseMixin.methods.filterOutRecalibration(availableLineItems) // Strip out recal before filtering out fees
|
||||||
|
)
|
||||||
|
: baseMixin.methods.filterOutFees(availableLineItems);
|
||||||
|
|
||||||
const lineItemsForCalculatingPrice =
|
let tierOnePackagePriceTemp = baseMixin.methods.getTierOnePackagePrice(
|
||||||
(hideRecalCost === "true") ?
|
lineItemsForCalculatingPrice
|
||||||
baseMixin.methods.filterOutFees(
|
); // TEMP, FOR TESTING /// TODO AJC: TIGHTEN THIS BACK UP AFTER TESTING
|
||||||
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) >
|
||||||
return baseMixin.methods.getTierOnePackagePrice(lineItemsForCalculatingPrice) > insuranceThreshold; // compare base price vs arbitrary threshold (representing insurance price)
|
insuranceThreshold
|
||||||
|
); // compare base price vs arbitrary threshold (representing insurance price)
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
@ -341,15 +345,20 @@ export default {
|
||||||
experimentSettings.INSURANCE_TAB_TO_DISPLAY_THRESHOLD_INTERNAL
|
experimentSettings.INSURANCE_TAB_TO_DISPLAY_THRESHOLD_INTERNAL
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!store.getters.externalParameterState?.isExternalParameter) { // there are no external parameters
|
if (!store.getters.externalParameterState?.isExternalParameter) {
|
||||||
|
// there are no external parameters
|
||||||
|
|
||||||
if (internalThreshold) thresholdToUse = internalThreshold;
|
if (internalThreshold) thresholdToUse = internalThreshold;
|
||||||
vm.isInsuranceSelected = getIsInsuranceSelectedValue(vm.availableLineItems, thresholdToUse);
|
vm.isInsuranceSelected = getIsInsuranceSelectedValue(
|
||||||
|
vm.availableLineItems,
|
||||||
|
thresholdToUse
|
||||||
|
);
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||||
|
} else {
|
||||||
|
// there ARE external parameters
|
||||||
|
|
||||||
} else { // there ARE external parameters
|
if (store.getters.externalParameterQuote.isInsurance == true) {
|
||||||
|
// did user intentionally select insurance?
|
||||||
if (store.getters.externalParameterQuote.isInsurance == true) { // did user intentionally select insurance?
|
|
||||||
vm.isInsuranceSelected = true;
|
vm.isInsuranceSelected = true;
|
||||||
vm.servicePackage = store.getters.externalParameterQuote.servicePackage;
|
vm.servicePackage = store.getters.externalParameterQuote.servicePackage;
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
@ -361,7 +370,9 @@ export default {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// did user come from external source (LeadGen)?
|
// did user come from external source (LeadGen)?
|
||||||
let externalSource = store.getters.externalParameterSource ? store.getters.externalParameterSource : null;
|
let externalSource = store.getters.externalParameterSource
|
||||||
|
? store.getters.externalParameterSource
|
||||||
|
: null;
|
||||||
|
|
||||||
vm.externalSource = externalSource; // TEMP 9/23
|
vm.externalSource = externalSource; // TEMP 9/23
|
||||||
|
|
||||||
|
|
@ -374,10 +385,12 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
if (internalThreshold) thresholdToUse = internalThreshold;
|
if (internalThreshold) thresholdToUse = internalThreshold;
|
||||||
}
|
}
|
||||||
vm.isInsuranceSelected = getIsInsuranceSelectedValue(vm.availableLineItems, thresholdToUse);
|
vm.isInsuranceSelected = getIsInsuranceSelectedValue(
|
||||||
|
vm.availableLineItems,
|
||||||
|
thresholdToUse
|
||||||
|
);
|
||||||
baseMixin.methods.ResetExternalParamsAndHideModal();
|
baseMixin.methods.ResetExternalParamsAndHideModal();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
vm.thresholdToUse = thresholdToUse;
|
vm.thresholdToUse = thresholdToUse;
|
||||||
|
|
@ -408,9 +421,10 @@ export default {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
shouldHideRecalibration() {
|
shouldHideRecalibration() {
|
||||||
const recalSettingValue = experimentMixin.methods.getSettingValue(
|
const recalSettingValue =
|
||||||
experimentSettings.RECAL_PRICE_REMOVE
|
experimentMixin.methods
|
||||||
)?.toLowerCase() === "true";
|
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)
|
||||||
|
?.toLowerCase() === "true";
|
||||||
return recalSettingValue;
|
return recalSettingValue;
|
||||||
},
|
},
|
||||||
showAfterpayBanner() {
|
showAfterpayBanner() {
|
||||||
|
|
|
||||||
|
|
@ -683,10 +683,7 @@ function updateExternalParameterState() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (externalParameterSource) {
|
if (externalParameterSource) {
|
||||||
store.commit(
|
store.commit(storeMutations.UPDATE_EXTERNAL_PARAMETER_SOURCE, externalParameterSource);
|
||||||
storeMutations.UPDATE_EXTERNAL_PARAMETER_SOURCE,
|
|
||||||
externalParameterSource
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue