diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 3024a67d9..07dba9498 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -96,7 +96,7 @@ const endpoints = { }, PriceOrderItems: { url: "/price/api/v1/price/order-items", - method: "POST", + method: "GET", }, LogExperimentExposureIfAssigned: { url: "/experiments/api/v1/experiments/log-exposure", diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index c4df053dc..69de6d53e 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -67,6 +67,7 @@ const storeActions = { SAVE_CAPABILITY_QUESTION_ANSWERS: "saveCapabilityQuestionAnswers", SAVE_QUOTE_PAGE_SELECTIONS: "saveQuotePageSelections", SAVE_PAYMENT_TYPE: "savePaymentType", + SAVE_ACCOUNT_NUMBER: "saveAccountNumber", SAVE_SUPPORTING_ITEMS: "saveSupportingItems", SAVE_VAPS: "saveVaps", }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index baad1dedc..840aff30d 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -21,6 +21,7 @@ const storeMutations = { UPDATE_GLASS_PARTS: "updateGlassParts", UPDATE_VAPS: "updateVaps", UPDATE_SUPPORTING_ITEMS: "updateSupportingItems", + UPDATE_LINE_ITEMS_SERVER_DATA: "updateLineItemsServerData", UPDATE_REGISTRATION_LICENSE_PLATE: "updateRegistrationLicensePlate", UPDATE_REGISTRATION_ADDRESS: "updateRegistrationAddress", diff --git a/src/helpers/heritage-integration/order-helper.js b/src/helpers/heritage-integration/order-helper.js index f18cd44de..1f0930477 100644 --- a/src/helpers/heritage-integration/order-helper.js +++ b/src/helpers/heritage-integration/order-helper.js @@ -100,6 +100,7 @@ async function saveSessionHelper() { accountNumber: savedSessionInfo.data.accountNumber?.toString(), savedSessionId: savedSessionInfo.data.savedSessionId, crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(), + eon: savedSessionInfo.data.eon, }, false ); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 3f2a75ebb..8975d5f37 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -25,7 +25,9 @@ groupName="ServicePackageQuestion" :availableLineItems="availableLineItems" :isInsuranceSelected="isInsuranceSelected" - @vapsItemsSelected="vapsItemsSelectedAction" /> + @vapsItemsSelected="vapsItemsSelectedAction" + validationRules="option-required" + isRequired /> { - vm.setCmsContent(cmsContent); - + vm.setCmsContent(resultMap.cmsContent); vm.supportingItems = resultMap.supportingItems; vm.availableLineItems = pricingResults; vm.isInsuranceSelected = vm.getDefaultIsInsuranceSelectedValue(); @@ -150,6 +160,12 @@ export default { vapsItemsSelectedAction(vapsItemsSelected) { this.selectedVaps = vapsItemsSelected; }, + filterOutFees(currentSupportingItems) { + const filteredSupportingItems = currentSupportingItems.filter(item => { + return !item.partType.includes("FEE") || (item.partType === "REPAIR FEE" && item.partNumber != "SUPPLIES-REPAIR"); + }); + return filteredSupportingItems; + }, backButtonAction() { vehicleQuestionsMixin.methods.navigateBack(this); }, @@ -159,6 +175,16 @@ export default { this.isInsuranceSelected, false ); + if(!this.isInsuranceSelected) { // Need to double check this is the way to update to cash parent account number + this.dispatchStoreAction( + this.storeActions.SAVE_ACCOUNT_NUMBER, + applicationConfig.CASH_ACCOUNT_NUMBER, + false + ); + } + if(this.$store.getters.order.accountNumber != applicationConfig.CASH_ACCOUNT_NUMBER) { + this.supportingItems = this.filterOutFees(this.supportingItems); + } this.dispatchStoreAction( this.storeActions.SAVE_SUPPORTING_ITEMS, this.supportingItems, diff --git a/src/layouts/quote/service-package-question/service-package-question.vue b/src/layouts/quote/service-package-question/service-package-question.vue index b642587ab..51cd16a3e 100644 --- a/src/layouts/quote/service-package-question/service-package-question.vue +++ b/src/layouts/quote/service-package-question/service-package-question.vue @@ -5,7 +5,8 @@ buttonTypeString="servicePackageRadio" :buttonTypeObject="servicePackageRadio" v-model="selectedPackageName" - isRequired /> + :validationRules="validationRules" + :isRequired="isRequired" />