Page Title updates take two?

I mustve deleted them or the stash
This commit is contained in:
Bill Richardson 2026-02-04 11:48:51 -05:00
parent 5efc99d543
commit b313147e0f
2 changed files with 46 additions and 0 deletions

View file

@ -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();

View file

@ -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;