diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index 8bd893e9..3e6a617e 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -116,6 +116,10 @@ const endpoints = Object.freeze({ url: `${ACCOUNT_BASE_URL}/`, method: 'GET' }, + TaxOrderItems: { + url: '/price/api/v1/price/taxed-order-items', + method: 'GET' + }, LogExperimentExposureIfAssigned: { url: `${EXPERIMENTS_BASE_URL}/log-exposure`, method: 'POST' diff --git a/src/iss-components/vehicle-banner/vehicle-banner.vue b/src/iss-components/vehicle-banner/vehicle-banner.vue index d86e7bfc..387118c1 100644 --- a/src/iss-components/vehicle-banner/vehicle-banner.vue +++ b/src/iss-components/vehicle-banner/vehicle-banner.vue @@ -23,7 +23,13 @@ export default { return this.genericVehicleImage; } - const { imageUrl } = this.mainStore.order.vehicle; + let imageUrl = ''; + if (this.mainStore.hasSubmittedOrder()) { + imageUrl = this.mainStore.submittedOrder.vehicle.imageUrl; + } else { + imageUrl = this.mainStore.order.vehicle.imageUrl; + } + if (!imageUrl || imageUrl === 'NULL') { return this.getUnmatchedVehicleIcon(); } diff --git a/src/layouts/order-confirmation/order-confirmation.vue b/src/layouts/order-confirmation/order-confirmation.vue index f1bddf9e..6d94001d 100644 --- a/src/layouts/order-confirmation/order-confirmation.vue +++ b/src/layouts/order-confirmation/order-confirmation.vue @@ -58,7 +58,9 @@ import settleAllPromises from '@/helpers/layout-helper'; import { Form } from 'vee-validate'; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; -import { get12HourTimeFormat, get12HourTimeMobileFormat, convertDateStringToDate, +import { get12HourTimeFormat, + get12HourTimeMobileFormat, + convertDateStringToDate, getDisplayTextForDurationLength } from '@/helpers/date-helper.js'; import { toTitleCase } from '@/helpers/text-helper.js'; import { AppointmentTypeStrings } from '@/constants/schedule-constants'; @@ -66,14 +68,15 @@ import { AppointmentTypeStrings } from '@/constants/schedule-constants'; export default { name: 'order-confirmation', components: { + // eslint-disable-next-line vue/no-reserved-component-names + Form, siteHeader, vehicleBanner, - siteFooter, - // eslint-disable-next-line vue/no-reserved-component-names - Form + siteFooter }, mixins: [BaseFormMixin], async beforeRouteEnter(to, from, next) { + useMainStore().createSubmittedOrder(); // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.issPage); // Settle promises and get results @@ -90,7 +93,8 @@ export default { }, setup() { const mainStore = useMainStore(); - return { mainStore }; + const { submittedOrder } = mainStore; + return { mainStore, submittedOrder }; }, computed: { carrierName() { @@ -106,16 +110,16 @@ export default { return this.getCmsContent('OrderConfirmationContent', 'Image'); }, appointmentType() { - return this.mainStore.order.serviceLocation.appointmentType; + return this.submittedOrder.serviceLocation.appointmentType; }, appointmentDate() { - return this.mainStore.order.schedule.date; + return this.submittedOrder.schedule.date; }, appointmentStartTime() { - return this.mainStore.order.schedule.startTime; + return this.submittedOrder.schedule.startTime; }, appointmentEndTime() { - return this.mainStore.order.schedule.endTime; + return this.submittedOrder.schedule.endTime; }, appointmentDateFormatted() { // This conversion ensures we don't get get GMT induced date changes @@ -144,35 +148,35 @@ export default { return this.getBodyText2FromCms('DropOffAndInShopWordingWidget'); }, serviceLocationAddress() { - return this.mainStore.order.serviceLocation.address; + return this.submittedOrder.serviceLocation.address; }, serviceLocationAddress2() { - return this.mainStore.order.serviceLocation.address2; + return this.submittedOrder.serviceLocation.address2; }, serviceLocationCity() { - return this.mainStore.order.serviceLocation.city; + return this.submittedOrder.serviceLocation.city; }, serviceLocationState() { - return this.mainStore.order.serviceLocation.state; + return this.submittedOrder.serviceLocation.state; }, serviceLocationZipCode() { - return this.mainStore.order.serviceLocation.zipCode; + return this.submittedOrder.serviceLocation.zipCode; }, serviceLocationFullAddress() { // eslint-disable-next-line max-len - return `
${this.serviceLocationAddress}, ${this.serviceLocationAddress2 ? `${this.serviceLocationAddress2},` : ''}
${this.serviceLocationCity}, ${this.serviceLocationState} ${this.serviceLocationZipCode}
`; + return `${this.serviceLocationAddress}, ${this.serviceLocationAddress2 ? `${this.serviceLocationAddress2},` : ''}
${this.serviceLocationCity}, ${this.serviceLocationState} ${this.serviceLocationZipCode}`; }, providerAddress() { - return toTitleCase(this.mainStore.order.serviceLocation.provider.address.streetAddress); + return toTitleCase(this.submittedOrder.serviceLocation.provider.address.streetAddress); }, providerCity() { - return toTitleCase(this.mainStore.order.serviceLocation.provider.address.city); + return toTitleCase(this.submittedOrder.serviceLocation.provider.address.city); }, providerState() { - return this.mainStore.order.serviceLocation.provider.address.state; + return this.submittedOrder.serviceLocation.provider.address.state; }, providerZipCode() { - return this.mainStore.order.serviceLocation.provider.address.zipCode; + return this.submittedOrder.serviceLocation.provider.address.zipCode; }, providerFullAddress() { // eslint-disable-next-line max-len @@ -217,18 +221,19 @@ export default { } }, mobileAppointment() { - return this.mainStore.isMobileAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE + || this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP; }, inShopAppointment() { - return this.mainStore.isInShopAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.IN_SHOP; }, dropOffAppointment() { - return this.mainStore.isDropOffAppointment; + return this.submittedOrder.serviceLocation.appointmentType === AppointmentTypeStrings.DROP_OFF; }, inShopAppointmentDuration() { const inshopDurationTime = getDisplayTextForDurationLength( - this.mainStore.order.schedule.jobMinMinutes, - this.mainStore.order.schedule.jobMaxMinutes + this.submittedOrder.schedule.jobMinMinutes, + this.submittedOrder.schedule.jobMaxMinutes ); return inshopDurationTime; } @@ -310,6 +315,9 @@ $page-side-padding: 1.5rem; } .appointment-text { + :deep(p) { + margin: 0; + } :deep(strong) { font-weight: $font-weight-bold; color: $black; diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index ab362f4c..c7440bf6 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -33,7 +33,6 @@ ref="siteFooter" cmsWidgetName="SiteFooterWidget" :isForwardActionDisabled="!meta.valid" - :isBackButtonHidden="shouldHideBackButton" :isStackedVertically="true" @backClicked="navigateBack" @ForwardClicked="forwardButtonAction" /> diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 1f77de74..85c7f707 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -1,9 +1,5 @@