From b313147e0f3e580000e21cfb0c74676265262f73 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 4 Feb 2026 11:48:51 -0500 Subject: [PATCH] Page Title updates take two? I mustve deleted them or the stash --- src/router/index.js | 3 ++ src/router/router-constants/router-titles.js | 43 ++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 src/router/router-constants/router-titles.js diff --git a/src/router/index.js b/src/router/index.js index c0cb576b..a8d2a6ec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -2,6 +2,7 @@ import { createWebHistory, createRouter } from 'vue-router'; import lazyLoadComponent from '@/router/dynamic-routing/component-loader'; import issPageValues from '@/router/router-constants/issPage-values'; +import routerTitles from '@/router/router-constants/router-titles'; import routingTable from '@/router/router-constants/routing-table'; import { useMainStore } from '@/store'; import eventBus from '@/helpers/event-bus/event-bus'; @@ -182,6 +183,8 @@ router.afterEach(async (to, from) => { } if (to.query.issPage !== issPageValues.ENTRY_PAGE) { + document.title = routerTitles[to.query.issPage] || 'Safelite Solutions®'; + // Push page view to GA analyticsMixin.methods.pushPageViewToGA(); diff --git a/src/router/router-constants/router-titles.js b/src/router/router-constants/router-titles.js new file mode 100644 index 00000000..e6b8d0a6 --- /dev/null +++ b/src/router/router-constants/router-titles.js @@ -0,0 +1,43 @@ +import issPageValues from '@/router/router-constants/issPage-values'; + +const titleSuffix = '- Safelite Solutions®'; + +const routerTitles = Object.freeze({ + [issPageValues.ACCESS_DENIED]: `Access Denied ${titleSuffix}`, + [issPageValues.ENTRY_PAGE]: `Entry Page ${titleSuffix}`, + [issPageValues.WELCOME_PAGE]: `Welcome ${titleSuffix}`, + + [issPageValues.ADDRESS_LOOKUP]: `Address Lookup ${titleSuffix}`, + [issPageValues.ADDRESS_VEHICLES]: `Address Vehicles ${titleSuffix}`, + [issPageValues.BAILOUT_PAGE]: `Bailout Page ${titleSuffix}`, + [issPageValues.CAPABILITY_QUESTIONS]: `Capability Questions ${titleSuffix}`, + [issPageValues.CONTACT_CONFIRMATION]: `Contact Confirmation ${titleSuffix}`, + [issPageValues.CONTACT_DETAILS]: `Contact Details ${titleSuffix}`, + [issPageValues.COVERAGE_STATEMENT]: `Coverage Statement ${titleSuffix}`, + [issPageValues.DUPLICATE_CHECK]: `Duplicate Check ${titleSuffix}`, + [issPageValues.ESTIMATE]: `Estimate ${titleSuffix}`, + [issPageValues.LICENSE_PLATE_LOOKUP]: `License Plate Lookup ${titleSuffix}`, + [issPageValues.MOLDING_QUESTIONS]: `Molding Questions ${titleSuffix}`, + [issPageValues.ORDER_CONFIRMATION]: `Order Confirmation ${titleSuffix}`, + [issPageValues.PART_QUESTIONS]: `Part Questions ${titleSuffix}`, + [issPageValues.PAYMENT_METHOD]: `Order Summary ${titleSuffix}`, + [issPageValues.PAYMENT_PAGE]: `Payment Page ${titleSuffix}`, + [issPageValues.PAYMENT_RETURN]: `Payment Return ${titleSuffix}`, + [issPageValues.POLICY_ENDORSEMENTS]: `Policy Endorsements ${titleSuffix}`, + [issPageValues.POLICY_HOLDER_DETAILS]: `Primary Policyholder Details ${titleSuffix}`, + [issPageValues.POLICY_VEHICLES]: `Policy Vehicles ${titleSuffix}`, + [issPageValues.PROVIDER_PREFERENCE]: `Provider Preference ${titleSuffix}`, + [issPageValues.REVEAL]: `Reveal ${titleSuffix}`, + [issPageValues.SCHEDULE_PAGE]: `Appointment Selection ${titleSuffix}`, + [issPageValues.SERVICE_PACKAGES]: `Service Packages ${titleSuffix}`, + [issPageValues.TPA_CONFIRMATION]: `TPA Confirmation ${titleSuffix}`, + [issPageValues.TPA_SEARCH]: `Tpa Search ${titleSuffix}`, + [issPageValues.TPA_SUBMIT]: `Tpa Submit ${titleSuffix}`, + [issPageValues.VEHICLE_DAMAGE]: `Vehicle Damage ${titleSuffix}`, + [issPageValues.VEHICLE_LOOKUP]: `Vehicle Lookup ${titleSuffix}`, + [issPageValues.VEHICLE_PARTS]: `Vehicle Parts ${titleSuffix}`, + [issPageValues.VEHICLE_SELECTION]: `Vehicle Selection ${titleSuffix}`, + [issPageValues.VIN_LOOKUP]: `Vin Lookup ${titleSuffix}` +}); + +export default routerTitles;