CSR-1520 | Formatting
This commit is contained in:
parent
abd09c48a8
commit
3d9c1b97fb
3 changed files with 12 additions and 12 deletions
|
|
@ -22,9 +22,7 @@ export function getPromosWithAddableVaps(promoList) {
|
|||
return [];
|
||||
}
|
||||
|
||||
return promoList.filter((promo) =>
|
||||
addableVapsPromoPartNumbers.includes(promo.partNumber)
|
||||
);
|
||||
return promoList.filter((promo) => addableVapsPromoPartNumbers.includes(promo.partNumber));
|
||||
}
|
||||
|
||||
export function getLineItemsThatMatchPromos(promos, availableLineItems) {
|
||||
|
|
@ -32,9 +30,7 @@ export function getLineItemsThatMatchPromos(promos, availableLineItems) {
|
|||
promos.forEach((promo) => {
|
||||
promo.discountedLineItemIds.forEach((discountedLineItemId) => {
|
||||
matchingLineItems.push(
|
||||
...availableLineItems.filter(
|
||||
(lineItem) => lineItem.id === discountedLineItemId
|
||||
)
|
||||
...availableLineItems.filter((lineItem) => lineItem.id === discountedLineItemId)
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -223,9 +223,15 @@ export default {
|
|||
},
|
||||
selectDefaultPackage() {
|
||||
const promosWithAddableVaps = getPromosWithAddableVaps(this.activePromos);
|
||||
const vapsThatMatchPromos = getLineItemsThatMatchPromos(promosWithAddableVaps, this.nullSafeAvailableLineItems);
|
||||
const vapsThatMatchPromos = getLineItemsThatMatchPromos(
|
||||
promosWithAddableVaps,
|
||||
this.nullSafeAvailableLineItems
|
||||
);
|
||||
const vapsFromStore = this.$store.getters.lineItems.vaps ?? [];
|
||||
const vapsToUseForDefaultPackageSelection = this.combineLineItemsWithoutDuplicates(vapsThatMatchPromos, vapsFromStore);
|
||||
const vapsToUseForDefaultPackageSelection = this.combineLineItemsWithoutDuplicates(
|
||||
vapsThatMatchPromos,
|
||||
vapsFromStore
|
||||
);
|
||||
|
||||
this.selectedPackageName = getHighestRequiredTier(
|
||||
this.glassToReplace,
|
||||
|
|
@ -256,9 +262,7 @@ export default {
|
|||
const combinedLineItemArray = [...lineItemsTwo];
|
||||
lineItemsOne.forEach((lineItemOne) => {
|
||||
if (
|
||||
!lineItemsTwo.filter(
|
||||
(lineItemTwo) => lineItemTwo.id === lineItemOne.id
|
||||
).length
|
||||
!lineItemsTwo.filter((lineItemTwo) => lineItemTwo.id === lineItemOne.id).length
|
||||
) {
|
||||
combinedLineItemArray.push(lineItemOne);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const mockProps = {
|
|||
"<ul><li>buttonBodyCopy test copy</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>",
|
||||
buttonFooterCopy: "buttonFooterCopy test copy",
|
||||
buttonAuxillaryCopy: "buttonAuxillaryCopy test copy",
|
||||
additionalButtonData: { strikeThroughPrice: "strikeThroughPrice test copy"},
|
||||
additionalButtonData: { strikeThroughPrice: "strikeThroughPrice test copy" },
|
||||
};
|
||||
|
||||
function setupMocks({ mountOptionsMockData = {} }) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue