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 textLink from "@/ux-components/text-link/text-link";
import textBlock from "@/digital-components/text-block/text-block"; import textBlock from "@/digital-components/text-block/text-block";
import { LineItemUtilities } from "@/store";
import { deepClone } from "@/helpers/object-helper"; import { deepClone } from "@/helpers/object-helper";
import { partTypeStrings } from "@/constants/part-type-strings"; import { partTypeStrings } from "@/constants/part-type-strings";
import { cartItemCategories } from "@/constants/cart-item-categories"; import { cartItemCategories } from "@/constants/cart-item-categories";
@ -101,7 +100,6 @@ export default {
currency: "USD", currency: "USD",
}), }),
lineItems: deepClone(this.modelValue), lineItems: deepClone(this.modelValue),
lineItemUtilities: new LineItemUtilities(),
}; };
}, },
methods: { methods: {

View file

@ -174,6 +174,8 @@ export default {
false false
); );
// Match all available line items to the line items as they are in the store
// and rebuild the original structure.
const lineItems = mapTaxedAvailableLineItemsToStoreFormat( const lineItems = mapTaxedAvailableLineItemsToStoreFormat(
availableLineItems, availableLineItems,
lineItemsFromStore lineItemsFromStore

View file

@ -2554,15 +2554,6 @@ function addTaxesToPricedLineItems(pricedLineItems, taxingLineItems = []) {
return pricedLineItems; return pricedLineItems;
} }
export class LineItemUtilities {
constructor() {
this.getArrayOfAllLineItems = getArrayOfAllLineItems;
this.getFlattenedArrayOfLineItemsWithChildParts =
getFlattenedArrayOfLineItemsWithChildParts;
this.addGuidToLineItemsIfNotAlreadyThere = addGuidToLineItemsIfNotAlreadyThere;
}
}
export function mapTaxedAvailableLineItemsToStoreFormat(availableLineItems, storeLineItems) { export function mapTaxedAvailableLineItemsToStoreFormat(availableLineItems, storeLineItems) {
// clone the lineItems array because what we're passing in is referencing the store directly // clone the lineItems array because what we're passing in is referencing the store directly
const lineItems = deepClone(storeLineItems); const lineItems = deepClone(storeLineItems);