commit
9fd4ffd991
2 changed files with 22 additions and 15 deletions
|
|
@ -76,7 +76,11 @@ export default {
|
|||
return this.getCmsContent(this.cmsWidgetName, "SubheaderText");
|
||||
},
|
||||
afterpayPrice() {
|
||||
const allLineItems = getArrayOfAllLineItems(this.lineItems);
|
||||
let allLineItems = getArrayOfAllLineItems(this.lineItems);
|
||||
if (this.lineItems.promos) {
|
||||
allLineItems = allLineItems?.filter((item) => item.partType !== "PROMO_DISCOUNT");
|
||||
}
|
||||
|
||||
let price = baseMixin.methods.getTierOnePackagePrice(
|
||||
baseMixin.methods.filterOutFees(allLineItems)
|
||||
);
|
||||
|
|
@ -87,6 +91,7 @@ export default {
|
|||
});
|
||||
|
||||
if (this.lineItems.promos) {
|
||||
let allLineItems = getArrayOfAllLineItems(this.lineItems);
|
||||
const promos = getPromosThatMatchLineItemsOnOrder(
|
||||
this.lineItems.promos,
|
||||
allLineItems
|
||||
|
|
|
|||
|
|
@ -75,21 +75,23 @@ export default {
|
|||
const servicePackageDiscountPartInSelectedPackage =
|
||||
this.getServicePackageDiscountPartForSelectedPackage(newValue);
|
||||
let supportingItems = this.supportingLineItems;
|
||||
if (servicePackageDiscountPartInSelectedPackage?.length > 0) {
|
||||
supportingItems?.push(servicePackageDiscountPartInSelectedPackage[0]);
|
||||
} else {
|
||||
if (
|
||||
supportingItems?.length > 0 &&
|
||||
containsLineItemWithPartType(
|
||||
partTypeStrings.SERVICE_PACKAGE_DISCOUNT,
|
||||
supportingItems
|
||||
)
|
||||
) {
|
||||
supportingItems = supportingItems.filter(
|
||||
(item) => item.partType !== partTypeStrings.SERVICE_PACKAGE_DISCOUNT
|
||||
);
|
||||
}
|
||||
if (
|
||||
containsLineItemWithPartType(
|
||||
partTypeStrings.SERVICE_PACKAGE_DISCOUNT,
|
||||
supportingItems
|
||||
)
|
||||
) {
|
||||
supportingItems = supportingItems.filter(
|
||||
(item) => item.partType !== partTypeStrings.SERVICE_PACKAGE_DISCOUNT
|
||||
);
|
||||
}
|
||||
if (
|
||||
servicePackageDiscountPartInSelectedPackage?.length > 0 &&
|
||||
supportingItems != null
|
||||
) {
|
||||
supportingItems.push(servicePackageDiscountPartInSelectedPackage[0]);
|
||||
}
|
||||
|
||||
this.$emit("servicePackageDiscountSelected", supportingItems);
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue