diff --git a/src/layouts/contact-details/contact-details.vue b/src/layouts/contact-details/contact-details.vue new file mode 100644 index 00000000..e5b09827 --- /dev/null +++ b/src/layouts/contact-details/contact-details.vue @@ -0,0 +1,81 @@ + + + + + + + Placeholder for contact details page + + + + + + + + diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue new file mode 100644 index 00000000..e54d28ce --- /dev/null +++ b/src/layouts/schedule-page/schedule-page.vue @@ -0,0 +1,81 @@ + + + + + + + Placeholder for schedule page + + + + + + + + diff --git a/src/router/index.js b/src/router/index.js index bc8579c6..a497a375 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -35,7 +35,7 @@ const routes = [ await runExperiments(to.query.issPage); } - + // Process ISS cookie. updateOrCreateISSCookie(); @@ -74,9 +74,13 @@ const routes = [ const router = createRouter({ history: createWebHistory("/"), routes, + scrollBehavior(to, from, savedPosition) { + // always scroll to top + return { top: 0 } + }, }); -router.afterEach((to, from) => { +router.afterEach((to, from) => { const store = useMainStore(); // Update lastPageVisited in the store @@ -95,12 +99,12 @@ router.afterEach((to, from) => { // Get route information by page name. // This will reach out to the Cms and there is a 1:1 relationship between page names and route names. async function GetRouteInfoFromPageName(pageName) { - + const response = await useMainStore().getRouteInfo(pageName); const jsonFromResponse = JSON.parse(response.data.Result); let routeData = []; - + // Add our route data and return our array. Object.keys(jsonFromResponse).forEach((key) => { routeData.push({ @@ -137,7 +141,7 @@ router.overrideNavigation = ( router.navigate = (scenario, currentRoute, optionalQuery = {}, optionalParams = {}, optionalPageData = {}) => { navigate(scenario, currentRoute, optionalQuery, optionalParams, optionalPageData); - + } // Navigate to the next route, depending on the scenario. @@ -152,11 +156,11 @@ function navigate (scenario, currentRoute, optionalQuery = {}, optionalParams = if (!matchingScenarioMap){ console.error("No matching scenario found. Please review the routing table."); - return; - } + return; + } if (matchingScenarioMap.destinationIssPageValue) { - + // Update page data to the store for next page if provided. Otherwise, keep existing page data or set to empty object const existingPageDataForPage = useMainStore().pageData(matchingScenarioMap.destinationIssPageValue); baseMixin.methods.savePageDataToStore( @@ -183,11 +187,11 @@ function navigate (scenario, currentRoute, optionalQuery = {}, optionalParams = function navigateToUrl(url, optionalQuery = {}) { // possibly show some loading screen in the future here. let externalUrl = new URL(url); - + for (const queryKey in optionalQuery) { externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]); } - + window.location.assign(externalUrl); }; @@ -204,14 +208,14 @@ function getNavigationMap (scenario, currentRoute) { ); let maps = matchedQueryValue ? matchedQueryValue.map((m) => m.maps.filter((map) => map.scenario === scenario))[0] : undefined; - + return maps ? maps.filter(x => x.filter === true || x.filter === undefined)[0] : undefined; } catch (e) { console.error(e); return undefined; } - + }; function GoToStartOn404(next) { @@ -260,4 +264,4 @@ async function runExperiments(nextPage) { }); } -export default router; \ No newline at end of file +export default router; diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index b660f98f..119f19b7 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -19,6 +19,8 @@ export const issPageValues = { COVERAGE_STATEMENT: "coverage-statement", PROVIDER_PREFERENCE: "provider-preference", SERVICE_LOCATION: "service-location", + SCHEDULE_PAGE: "schedule-page", + CONTACT_DETAILS: "contact-details", REVEAL: "reveal", ESTIMATE: "estimate", ADDRESS_VEHICLES: "address-vehicles", diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index ef72bec4..8145eedb 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -450,6 +450,26 @@ const routingTable = function(store) { ], }, + { + issPageValue: issPageValues.SCHEDULE_PAGE, + maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.SERVICE_LOCATION, + }, + + ], + }, + { + issPageValue: issPageValues.CONTACT_DETAILS, + maps: [ + { + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.SCHEDULE_PAGE, + }, + + ], + }, ]; }; diff --git a/src/styles/client-customizations.scss b/src/styles/client-customizations.scss index 87bf3701..5e0db1ec 100644 --- a/src/styles/client-customizations.scss +++ b/src/styles/client-customizations.scss @@ -33,9 +33,7 @@ $limu-button-color: #A9E3E9; color: $limu-button-text-color !important; box-shadow: 0 0 0 3px $white, 0 0 0 5.5px $limu-button-color !important; } - &:focus { - box-shadow: 0 0 0 3px $white, 0 0 0 5.5px $limu-button-color !important; - } + } } diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index eb217eb0..3ff1648d 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -68,10 +68,7 @@ export default { @media (hover: hover) { background: linear-gradient(270deg, $blue 0%, $blue-800 100%); } - &:focus { - box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700; - } - &:focus, // Mouse, touch, stylus focus + // Mouse, touch, stylus focus &:focus-visible { // Keyboard focus for accessibility outline: none; @@ -93,7 +90,7 @@ export default { &.has-loader { color: $white; background: $blue-700; - box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700; + } &.delay { // fixes flicker while transitioning between states diff --git a/src/ux-components/modal-button-main/modal-button-main.vue b/src/ux-components/modal-button-main/modal-button-main.vue index 3cf8f7a2..b8255af7 100644 --- a/src/ux-components/modal-button-main/modal-button-main.vue +++ b/src/ux-components/modal-button-main/modal-button-main.vue @@ -75,10 +75,8 @@ export default { @media (hover: hover) { background: linear-gradient(270deg, $blue 0%, $blue-800 100%); } - &:focus { - box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700; - } - &:focus, // Mouse, touch, stylus focus + + // Mouse, touch, stylus focus &:focus-visible { // Keyboard focus for accessibility outline: none; @@ -99,8 +97,7 @@ export default { } &.has-loader { color: $white; - background: $blue-700; - box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700; + background: $blue-700; pointer-events: none; } &.delay {
Placeholder for contact details page
Placeholder for schedule page