-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
24920 - Redirect to new BRD based on FF and Query Param #3192
Changes from 2 commits
c66b9cd
f79ae0e
e146b53
d42c8c5
bbda843
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ import { | |
StaffBusinessRegistryBreadcrumb, | ||
StaffDashboardBreadcrumb | ||
} from '@/resources/BreadcrumbResources' | ||
import { Pages, Role, SessionStorageKeys } from '@/util/constants' | ||
import { LDFlags, Pages, Role, SessionStorageKeys } from '@/util/constants' | ||
|
||
import AcceptInviteLandingView from '@/views/auth/AcceptInviteLandingView.vue' | ||
import AcceptInviteView from '@/views/auth/AcceptInviteView.vue' | ||
|
@@ -46,6 +46,7 @@ import HomeView from '@/views/auth/home/HomeView.vue' | |
import IncorpOrRegisterView from '@/views/auth/home/IncorpOrRegisterView.vue' | ||
import InvoluntaryDissolution from '@/views/auth/staff/InvoluntaryDissolution.vue' | ||
import KeyCloakService from 'sbc-common-components/src/services/keycloak.services' | ||
import LaunchDarklyService from 'sbc-common-components/src/services/launchdarkly.services' | ||
import LeaveTeamLandingView from '@/views/auth/LeaveTeamLandingView.vue' | ||
import LoginView from '@/views/auth/LoginView.vue' | ||
import MaintainBusinessView from '@/views/auth/home/MaintainBusinessView.vue' | ||
|
@@ -229,6 +230,13 @@ export function getRoutes (): RouteConfig[] { | |
{ | ||
path: '/account/:orgId', | ||
name: 'account', | ||
beforeEnter: (to, from, next) => { | ||
if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && to.query.newbrd === 'true') { | ||
severinbeauvais marked this conversation as resolved.
Show resolved
Hide resolved
|
||
window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if this should return a new route (instead of hard-overwriting the URL like this)? That way, it could maybe retain the URL query parameters (eg, account id)...? Ref: https://router.vuejs.org/guide/advanced/navigation-guards.html#Per-Route-Guard There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's the plan 👍 |
||
} else { | ||
next() | ||
} | ||
}, | ||
component: DashboardView, | ||
meta: { requiresAuth: true, requiresProfile: true }, | ||
redirect: '/account/:orgId/business', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WOOHOO!