Removed LineItemUtilities as it is no longer needed

This commit is contained in:
Leah Schumann 2023-10-31 06:37:55 -04:00
parent 5472b8b3f8
commit 0ae599c35e
3 changed files with 2 additions and 11 deletions

View file

@ -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: {

View file

@ -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

View file

@ -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);