Merge pull request #3295 from Safelite/feature/CASH-2883

Update estimated service time text
This commit is contained in:
scottkiener-at-safelite 2026-07-30 11:33:10 -04:00 committed by GitHub
commit 4c4ecb8032
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,12 +5,10 @@
<div class="container page-container-grouped-styles">
<div class="row">
<div class="col-12 col-md-10 col-lg-8 col-xl-7">
<h5 class="fw-normal mb-0 dark-header" :class="headerColor">
<span>
{{ serviceLocationText }}
</span>
</h5>
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" alignLeft />
<funnelSubHeader
cmsWidgetName="FunnelSubHeaderWidget"
:overrideHeaderSubText="estimatedTimeText"
alignLeft />
<datePicker
class="mt-5"
v-model="selectedDate"
@ -98,6 +96,7 @@ import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from "@/constants/sched
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
import { settleAllPromises } from "@/helpers/layout-helper";
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
import { getDisplayTextForDurationLength } from "@/helpers/duration-length-helper";
import {
flushPagePrereqsLogs,
hasServiceZipInfo,
@ -298,6 +297,17 @@ export default {
includeMobile: Boolean(mobileProviderNumber),
pageNameToLog: to.name,
});
if (timeSlotsResultMap.inshopTimeSlots) {
vm.estimatedServiceMinutesMinimum =
timeSlotsResultMap.inshopTimeSlots.estimatedServiceMinutesMinimum;
vm.estimatedServiceMinutesMaximum =
timeSlotsResultMap.inshopTimeSlots.estimatedServiceMinutesMaximum;
} else if (timeSlotsResultMap.mobileTimeSlots) {
vm.estimatedServiceMinutesMinimum =
timeSlotsResultMap.mobileTimeSlots.estimatedServiceMinutesMinimum;
vm.estimatedServiceMinutesMaximum =
timeSlotsResultMap.mobileTimeSlots.estimatedServiceMinutesMaximum;
}
assignInshopTimeSlotsFromV2Response(
vm.inshopProvidersAndTimeSlots,
timeSlotsResultMap.inshopTimeSlots
@ -325,6 +335,19 @@ export default {
viewMoreShopsText() {
return this.getCmsContent("ViewMoreShopsWidget", "Text");
},
estimatedTimeText() {
if (!this.estimatedServiceMinutesMinimum || !this.estimatedServiceMinutesMaximum) {
return " ";
}
const durationText = getDisplayTextForDurationLength(
this.estimatedServiceMinutesMinimum,
this.estimatedServiceMinutesMaximum
);
return this.getCmsContent("FunnelSubHeaderWidget", "HeaderSubText").replace(
"{custom:DURATION}",
durationText
);
},
serviceZipCode() {
return store.getters.order.serviceLocation.zipCode;
},
@ -376,6 +399,8 @@ export default {
datesLoaded: false,
datePickerStartDate: toDateString(0),
datePickerEndDate: toDateString(SCHEDULE_FETCH_DAYS - 1),
estimatedServiceMinutesMinimum: null,
estimatedServiceMinutesMaximum: null,
inshopProvidersAndTimeSlots: [],
allShopProviders: [],
mobileProviderAndTimeSlot: null,