diff --git a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue index 64d239868..27fece310 100644 --- a/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue +++ b/src/layouts/payment-method/promo-modal-question/promo-modal-question.vue @@ -255,7 +255,7 @@ export default { this.availableVaps, "payment-method" ); - console.log(promoCodeData); + if (promoCodeData.isValid) { const pricedLineItemsToTax = []; pricedLineItemsToTax.push(...promoCodeData.promoCode); @@ -277,13 +277,12 @@ export default { // Match all line items to the line items as they are in the store // and rebuild the original structure. - console.log(this.lineItems.vaps); this.lineItems = mapTaxedLineItemsToStoreFormat(taxedLineItems, this.lineItems); const taxedVaps = mapTaxedLineItemsToStoreFormat( taxedLineItems, this.availableVaps ); - console.log(this.lineItems.vaps); + const getVaps = getVapsThatNeedToBeAddedToSatisfyPromos( promoCodeData.promoCode, taxedVaps, diff --git a/src/store/index.js b/src/store/index.js index 673c4dfa1..83186d527 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2641,7 +2641,7 @@ function convertGlassPieceNamingFromApi(glassArray) { function addPricesToLineItems(lineItems, pricingLineItems) { lineItems.forEach((lineItem) => { - let lineItemIndex = pricingLineItems.findIndex( + const lineItemIndex = pricingLineItems.findIndex( (pricingLineItem) => pricingLineItem.partNumber === lineItem.partNumber ); @@ -2649,7 +2649,7 @@ function addPricesToLineItems(lineItems, pricingLineItems) { addPricesToLineItems(lineItem.childParts, pricingLineItems); } - let pricedLineItem = pricingLineItems.splice(lineItemIndex, 1)[0]; + const pricedLineItem = pricingLineItems.splice(lineItemIndex, 1)[0]; lineItem.laborAmount = pricedLineItem.laborAmount; lineItem.sellingPrice = pricedLineItem.sellingPrice; lineItem.kitPrice = pricedLineItem.kitPrice;