CSR-2166: make shouldHideRecalibration consistent across pages

This commit is contained in:
Adam Caouette 2024-09-23 18:50:01 -04:00
parent 5331699d53
commit 9bb3832610
2 changed files with 14 additions and 9 deletions

View file

@ -169,11 +169,17 @@ export default {
}; };
}, },
computed: { computed: {
isRecalibrationOnOrder() {
return containsLineItemWithPartType(
partTypeStrings.RECALIBRATION,
this?.lineItems?.supportingItems
);
},
shouldHideRecalibration() { shouldHideRecalibration() {
const recalSettingValue = return (
this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE)?.toLowerCase() === this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLowerCase() === "true" &&
"true"; this.isRecalibrationOnOrder
return recalSettingValue; );
}, },
ShowCart() { ShowCart() {
if (this.isPia && this.submittedOrder?.settledTenderAmount == 0) { if (this.isPia && this.submittedOrder?.settledTenderAmount == 0) {

View file

@ -402,11 +402,10 @@ export default {
); );
}, },
shouldHideRecalibration() { shouldHideRecalibration() {
const recalSettingValue = return (
experimentMixin.methods this.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE).toLowerCase() === "true" &&
.getSettingValue(experimentSettings.RECAL_PRICE_REMOVE) this.isRecalibrationOnOrder
?.toLowerCase() === "true"; );
return recalSettingValue;
}, },
showAfterpayBanner() { showAfterpayBanner() {
return ( return (