From 0ae599c35ebe7fd9b38c04077dbe88dce6142c55 Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Tue, 31 Oct 2023 06:37:55 -0400 Subject: [PATCH] Removed LineItemUtilities as it is no longer needed --- src/fmg-components/cart/cart.vue | 2 -- src/layouts/payment-method/payment-method.vue | 2 ++ src/store/index.js | 9 --------- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 440823f67..8cf8a2e56 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -78,7 +78,6 @@ import { getHighestFullySatisfiedTier, getPackageContents } from "@/helpers/serv import textLink from "@/ux-components/text-link/text-link"; import textBlock from "@/digital-components/text-block/text-block"; -import { LineItemUtilities } from "@/store"; import { deepClone } from "@/helpers/object-helper"; import { partTypeStrings } from "@/constants/part-type-strings"; import { cartItemCategories } from "@/constants/cart-item-categories"; @@ -101,7 +100,6 @@ export default { currency: "USD", }), lineItems: deepClone(this.modelValue), - lineItemUtilities: new LineItemUtilities(), }; }, methods: { diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 25715b39f..ba1424542 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -174,6 +174,8 @@ export default { false ); + // Match all available line items to the line items as they are in the store + // and rebuild the original structure. const lineItems = mapTaxedAvailableLineItemsToStoreFormat( availableLineItems, lineItemsFromStore diff --git a/src/store/index.js b/src/store/index.js index 0e556059d..a7e9be549 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2554,15 +2554,6 @@ function addTaxesToPricedLineItems(pricedLineItems, taxingLineItems = []) { return pricedLineItems; } -export class LineItemUtilities { - constructor() { - this.getArrayOfAllLineItems = getArrayOfAllLineItems; - this.getFlattenedArrayOfLineItemsWithChildParts = - getFlattenedArrayOfLineItemsWithChildParts; - this.addGuidToLineItemsIfNotAlreadyThere = addGuidToLineItemsIfNotAlreadyThere; - } -} - export function mapTaxedAvailableLineItemsToStoreFormat(availableLineItems, storeLineItems) { // clone the lineItems array because what we're passing in is referencing the store directly const lineItems = deepClone(storeLineItems);