got to where it's relying on the store for something. nearly there.
This commit is contained in:
parent
200b4bb141
commit
d262d0ac1d
3 changed files with 13 additions and 9 deletions
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<input type="button" class="nav-button" v-bind:value="text"/>
|
||||
<input type="button" class="nav-button" v-bind:value="text" v-on:click="navTo"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
export default({
|
||||
name: "nav-button",
|
||||
props: {
|
||||
|
|
@ -12,7 +12,12 @@
|
|||
},
|
||||
methods: {
|
||||
navTo(){
|
||||
|
||||
alert(this.$router.navigate(this.scenario, this.$route))
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
return this.$route.query.issPage;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<p>Welcome Page Placeholder</p>
|
||||
<br />
|
||||
<NavButton text="Next"></NavButton>
|
||||
<NavButton text="Next" scenario="CLICKED_FORWARD"></NavButton>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ import { createWebHistory, createRouter } from "vue-router";
|
|||
import { lazyLoadComponent } from "./dynamic-routing/component-loader";
|
||||
import { endpoints } from "../constants/mock-endpoints";
|
||||
import globalMethods from "@/global-methods";
|
||||
|
||||
const issPageValues = require("./router-constants/issPage-values");
|
||||
import {issPageValues} from '@/router/router-constants/issPage-values';
|
||||
|
||||
const routes = [
|
||||
{
|
||||
|
|
@ -16,7 +15,7 @@ const routes = [
|
|||
|
||||
if(issPage === undefined)
|
||||
{
|
||||
issPage = issPageValues.issPageValues.WELCOME_PAGE;
|
||||
issPage = issPageValues.WELCOME_PAGE;
|
||||
}
|
||||
|
||||
if (router.hasRoute(issPage)) {
|
||||
|
|
@ -84,7 +83,7 @@ async function GetRouteInfoFromPageName(pageName) {
|
|||
}
|
||||
|
||||
// Navigate to the next route, depending on the scenario.
|
||||
async function navigate(scenario, currentRoute, optionalQuery = {}, optionalParams = {}) {
|
||||
router.navigate = async function (scenario, currentRoute, optionalQuery = {}, optionalParams = {}) {
|
||||
if (!scenario) {
|
||||
console.error("No scenario provided. Please review the routing table.");
|
||||
return;
|
||||
|
|
@ -124,7 +123,7 @@ function getNavigationMap(scenario, currentRoute) {
|
|||
}
|
||||
|
||||
function GoToStartOn404(next) {
|
||||
const errorPageName = issPageValues.issPageValues.ERROR_404;
|
||||
const errorPageName = issPageValues.ERROR_404;
|
||||
router.addRoute({
|
||||
path: "/",
|
||||
name: errorPageName,
|
||||
|
|
|
|||
Loading…
Reference in a new issue