diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index b23ccece2..f14075c16 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -688,17 +688,18 @@ export default { if (!this.months) return; this.isLoading = true; let monthToShow; - let monthStartDateNum = 0; + let monthStartDate; if (this.hideSomeDaysForInitialView) { monthToShow = this.months.find( ({ isMonthThatHidesSomeDaysForInitialView }) => isMonthThatHidesSomeDaysForInitialView ); + // find the first day-hidden to become the next api call start date - monthStartDateNum = - monthToShow.dates.find(({ dayClasses }) => dayClasses.includes("day-hidden")) - .dateNum - 1; + monthStartDate = monthToShow.dates.find(({ dayClasses }) => + dayClasses.includes("day-hidden") + ); } else { if (this.calendarViewDirection === "future") { monthToShow = this.months.find((month) => @@ -713,9 +714,13 @@ export default { } } if (monthToShow) { + const monthStartDateString = monthStartDate + ? monthStartDate.inputValue + : monthToShow.dates[0].inputValue; + // make new API call with this month's start and end dates const moreSelectableDatesData = await this.updateSelectableDates( - monthToShow.dates[monthStartDateNum].inputValue, + monthStartDateString, monthToShow.dates[monthToShow.dates.length - 1].inputValue ); this.isLoading = false; @@ -854,7 +859,7 @@ export default { } .calendar-grid-container { margin: 0 auto 1rem auto; - max-width: 400px; + max-width: 360px; position: relative; transition: height ease 2s, @@ -864,9 +869,6 @@ export default { justify-content: center; align-items: center; padding: 0; - @include media-breakpoint-up(md) { - padding: 0 0.75rem; - } opacity: 1; .grid-item { diff --git a/src/layouts/service-location/shop-question/shop-question.vue b/src/layouts/service-location/shop-question/shop-question.vue index 72862440b..5a9278d78 100644 --- a/src/layouts/service-location/shop-question/shop-question.vue +++ b/src/layouts/service-location/shop-question/shop-question.vue @@ -225,6 +225,15 @@ export default { return index; }, + async handleUpdate(selectedShopIndex = null) { + this.resetAnswers(); + if (selectedShopIndex >= 3) { + await this.getNextShopsFromList(selectedShopIndex + 1); + } else { + await this.getNextShopsFromList(); + await nextTick(); + } + }, }, watch: { selectedAppointmentType: { @@ -233,27 +242,16 @@ export default { // nothing to do with this component. We could mitigate this by showing / hiding this component with v-if but that messes // up the component initialization on page load. async handler() { - await nextTick(); - this.resetAnswers(); - this.getNextShopsFromList(); + this.handleUpdate(); }, }, shopProviders: { async handler(newValue) { - this.resetAnswers(); - - await nextTick(); const selectedShopIndex = this.getSelectedProviderIndex( newValue, this.selectedProviderNumber ); - - if (selectedShopIndex >= 3) { - await this.getNextShopsFromList(selectedShopIndex + 1); - } else { - await this.getNextShopsFromList(); - await nextTick(); - } + this.handleUpdate(selectedShopIndex); }, }, }, diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index b1df7156c..27ebb3048 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -313,15 +313,7 @@ export default { } // Cash Quote or Cash Price Sub Total - if (isPricingAvailable) { - const subtotal = baseMixin.methods - .getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false) - .toFixed(2); - - payload.cashPriceSubTotal = parseFloat(subtotal); - } else { - payload.cashPriceSubTotal = ""; - } + payload.cashPriceSubTotal = store.getters.order?.cashPriceSubTotal ?? ""; //unverified (in scenarios we don’t display the price) if (