Parameter on navigate

This commit is contained in:
FrankRua 2022-03-09 14:03:36 -05:00
parent c02e1c3c62
commit 2f12273f57
2 changed files with 6 additions and 3 deletions

View file

@ -1,10 +1,11 @@
// Supporting files // Supporting files
import { createWebHistory, createRouter } from "vue-router"; import { createWebHistory, createRouter } from "vue-router";
import { storeActions } from "@/constants/store-actions"; import { storeActions } from "@/constants/store-actions";
import baseMixin from "@/mixins/base-mixin";
import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js"; import { lazyLoadComponent } from "@/router/dynamic-routing/component-loader.js";
import { routingTable } from "@/router/router-constants/routing-table.js"; import { routingTable } from "@/router/router-constants/routing-table.js";
import { globalEvents, globalEventTypes } from "@/constants/events"; import { globalEvents, globalEventTypes } from "@/constants/events";
import { routerParameterKeys } from '@/router/router-constants/router-parameter-keys'
import baseMixin from "@/mixins/base-mixin";
import eventBus from "@/helpers/event-bus/event-bus"; import eventBus from "@/helpers/event-bus/event-bus";
import store from "@/store"; import store from "@/store";
@ -153,7 +154,7 @@ function navigate(scenario, currentRoute, invalidateOnSave, optionalQuery = {},
query: Object.assign(optionalQuery, { query: Object.assign(optionalQuery, {
fmgPage: matchingScenarioMap.destinationFmgPageValue, fmgPage: matchingScenarioMap.destinationFmgPageValue,
}), }),
params: optionalParams, params: Object.assign(optionalParams, {[routerParameterKeys.FROM_ROUTER_NAVIGATE]: true})
}); });
} else if (matchingScenarioMap.destinationUrl !== undefined) { } else if (matchingScenarioMap.destinationUrl !== undefined) {
navigateToUrl(matchingScenarioMap.destinationUrl); navigateToUrl(matchingScenarioMap.destinationUrl);

View file

@ -1,3 +1,5 @@
const routerParameterKeys = { }; const routerParameterKeys = {
FROM_ROUTER_NAVIGATE: 'fromRouterNavigate',
};
export { routerParameterKeys }; export { routerParameterKeys };