diff --git a/src/digital-components/textbox-question/textbox-question.vue b/src/digital-components/textbox-question/textbox-question.vue index 0c3ca5bf..e74b1708 100644 --- a/src/digital-components/textbox-question/textbox-question.vue +++ b/src/digital-components/textbox-question/textbox-question.vue @@ -47,7 +47,7 @@ :data-bs-toggle="includeSelectIcon ? 'modal' : ''" :data-bs-target="'#' + cmsWidgetName" @change="handleChange" - @blur="handleChange" + @blur="blurPlus" @focus="$emit('focus', $event.target.value)" @paste="trimOnPaste" @drop="trimOnPaste" /> @@ -92,7 +92,7 @@ export default { buttonMain }, props: { - alwaysEmitFieldErrorOnClick: { + alwaysEmitFieldErrorOnEvent: { type: Boolean, default: false }, @@ -222,6 +222,12 @@ export default { this.$emit('textboxQuestionEvent.inputIdAssigned', this.inputId); }, methods: { + blurPlus() { + this.handleChange(this.value); + if (this.alwaysEmitFieldErrorOnEvent) { + this.$emit('field-has-error', !this.meta.valid); + } + }, trimOnPaste(evt) { evt.stopPropagation(); evt.preventDefault(); @@ -258,7 +264,7 @@ export default { if (result.valid) { this.handleChange(this.value); this.$emit('click-event'); - } else if (this.alwaysEmitFieldErrorOnClick) { + } else if (this.alwaysEmitFieldErrorOnEvent) { this.$emit('field-has-error', true); } } diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index e4065bef..28b73548 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -173,12 +173,12 @@ const getAvailableDates = async ( if (storeAction.storeAction === GET_SHOP_TIME_SLOTS) { if (storeAction.payload.providerNumber) { timeSlotsResponse = await useMainStore().getShopTimeSlots( - storeAction.payload.startDate, - storeAction.payload.endDate, - storeAction.payload.shopAppointmentType, - storeAction.payload.providerNumber + storeAction.payload.startDate, + storeAction.payload.endDate, + storeAction.payload.shopAppointmentType, + storeAction.payload.providerNumber ); - } + } } else if (storeAction.payload?.zipCodeOverride) { timeSlotsResponse = await useMainStore().getMobileTimeSlots( storeAction.payload.startDate, diff --git a/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue b/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue index 5fa30f26..4f401049 100644 --- a/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue +++ b/src/layouts/schedule-page/service-location/service-zip-question/service-zip-question.vue @@ -2,7 +2,7 @@