CSR-2179: pass experiment boolean via prop from /quote & refactor
This commit is contained in:
parent
a4a25ad547
commit
7cfcf07dd6
2 changed files with 11 additions and 9 deletions
|
|
@ -31,6 +31,8 @@
|
|||
groupName="ServicePackageQuestion"
|
||||
:availableLineItems="availableLineItems"
|
||||
:isInsuranceSelected="isInsuranceSelected"
|
||||
:isRecalibrationOnOrder="isRecalibrationOnOrder"
|
||||
:shouldHideRecalibration="shouldHideRecalibration"
|
||||
@vapsItemsSelected="vapsItemsSelectedAction"
|
||||
@servicePackageDiscountSelected="servicePackageDiscountSelectedAction"
|
||||
:servicePackage="servicePackage"
|
||||
|
|
@ -336,10 +338,13 @@ export default {
|
|||
return recalSettingValue;
|
||||
},
|
||||
showAfterpayBanner() {
|
||||
return !this.isInsuranceSelected && (!this.isRecalibrationOnOrder || !this.shouldHideRecalibration)
|
||||
return (
|
||||
!this.isInsuranceSelected &&
|
||||
(!this.isRecalibrationOnOrder || !this.shouldHideRecalibration)
|
||||
);
|
||||
},
|
||||
showRecalDisclaimer() {
|
||||
return this.isRecalibrationOnOrder && this.shouldHideRecalibration
|
||||
return this.isRecalibrationOnOrder && this.shouldHideRecalibration;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
|||
|
|
@ -49,6 +49,8 @@ export default {
|
|||
availableLineItems: null,
|
||||
activePromos: null,
|
||||
servicePackage: null,
|
||||
isRecalibrationOnOrder: Boolean,
|
||||
shouldHideRecalibration: Boolean,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -141,12 +143,6 @@ export default {
|
|||
}));
|
||||
return modifiedAnswers;
|
||||
},
|
||||
isRecalibrationOnOrder() {
|
||||
return containsLineItemWithPartType(
|
||||
partTypeStrings.RECALIBRATION,
|
||||
this.nullSafeAvailableLineItems
|
||||
);
|
||||
},
|
||||
isServicePackageDiscountOnOrder() {
|
||||
return containsLineItemWithPartType(
|
||||
partTypeStrings.SERVICE_PACKAGE_DISCOUNT,
|
||||
|
|
@ -242,7 +238,8 @@ export default {
|
|||
},
|
||||
getPackagePrice(packageName, { discountedPrice = false, servicePackageDiscount = false }) {
|
||||
var lineItemsToPrice = [...this.nullSafeAvailableLineItems];
|
||||
if (this.isRecalibrationOnOrder) {
|
||||
|
||||
if (this.isRecalibrationOnOrder && this.shouldHideRecalibration) {
|
||||
lineItemsToPrice = lineItemsToPrice.filter((item) => {
|
||||
return item.partType != partTypeStrings.RECALIBRATION;
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue