Skip to content

Commit 85ff453

Browse files
authored
24920 - Redirect to new BRD based on FF and Query Param (#3192)
1 parent ad1b303 commit 85ff453

File tree

7 files changed

+20
-5
lines changed

7 files changed

+20
-5
lines changed

auth-web/.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ VUE_APP_CORPORATE_ONLINE_URL="https://www.corporateonline.gov.bc.ca"
3434
VUE_APP_NRO_URL="https://dev.bcregistrynames.gov.bc.ca/nro/"
3535
VUE_APP_REGISTRY_SEARCH_URL="https://dev.search.business.bcregistry.gov.bc.ca/"
3636
VUE_APP_NAMEX_WEB_URL="https://dev.namex.bcregistry.gov.bc.ca/"
37+
VUE_APP_BUSINESS_REGISTRY_URL="https://business-registry-dev.web.app/"
3738

3839
#vaults API
3940
VUE_APP_AUTH_API_URL="https://auth-api-dev.apps.silver.devops.gov.bc.ca"
@@ -46,7 +47,7 @@ VUE_APP_NAMEX_API_VERSION="/api/v1"
4647
VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-search"
4748
VUE_APP_REGISTRIES_SEARCH_API_VERSION="/api/v1"
4849
VUE_APP_REGISTRIES_SEARCH_API_KEY=
49-
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.silver.devops.gov.bc.ca"
50+
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
5051
VUE_APP_STATUS_API_VERSION="/api/v1"
5152
VUE_APP_PAY_API_URL="https://pay-api-dev.apps.silver.devops.gov.bc.ca"
5253
VUE_APP_PAY_API_VERSION="/api/v1"

auth-web/devops/vaults.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ VUE_APP_LLP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/LLP_FORMS_URL"
3434
VUE_APP_LP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/LP_FORMS_URL"
3535
VUE_APP_XLP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/XLP_FORMS_URL"
3636
VUE_APP_NAMEX_WEB_URL="op://web-url/$APP_ENV/auth-web/NAMEX_WEB_URL"
37+
VUE_APP_BUSINESS_REGISTRY_URL="op://web-url/$APP_ENV/business-registry-ui/BUSINESS_REGISTRY_URL"
3738

3839
#vaults API
3940
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"

auth-web/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

auth-web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auth-web",
3-
"version": "2.6.128",
3+
"version": "2.7.0",
44
"appName": "Auth Web",
55
"sbcName": "SBC Common Components",
66
"private": true,

auth-web/src/routes/router.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
StaffBusinessRegistryBreadcrumb,
99
StaffDashboardBreadcrumb
1010
} from '@/resources/BreadcrumbResources'
11-
import { Pages, Role, SessionStorageKeys } from '@/util/constants'
11+
import { LDFlags, Pages, Role, SessionStorageKeys } from '@/util/constants'
1212

1313
import AcceptInviteLandingView from '@/views/auth/AcceptInviteLandingView.vue'
1414
import AcceptInviteView from '@/views/auth/AcceptInviteView.vue'
@@ -46,6 +46,7 @@ import HomeView from '@/views/auth/home/HomeView.vue'
4646
import IncorpOrRegisterView from '@/views/auth/home/IncorpOrRegisterView.vue'
4747
import InvoluntaryDissolution from '@/views/auth/staff/InvoluntaryDissolution.vue'
4848
import KeyCloakService from 'sbc-common-components/src/services/keycloak.services'
49+
import LaunchDarklyService from 'sbc-common-components/src/services/launchdarkly.services'
4950
import LeaveTeamLandingView from '@/views/auth/LeaveTeamLandingView.vue'
5051
import LoginView from '@/views/auth/LoginView.vue'
5152
import MaintainBusinessView from '@/views/auth/home/MaintainBusinessView.vue'
@@ -229,6 +230,13 @@ export function getRoutes (): RouteConfig[] {
229230
{
230231
path: '/account/:orgId',
231232
name: 'account',
233+
beforeEnter: (to, from, next) => {
234+
if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && !to.query.noRedirect) {
235+
window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl()
236+
} else {
237+
next()
238+
}
239+
},
232240
component: DashboardView,
233241
meta: { requiresAuth: true, requiresProfile: true },
234242
redirect: '/account/:orgId/business',

auth-web/src/util/config-helper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ export default class ConfigHelper {
8282
return `${import.meta.env.VUE_APP_NAMEX_WEB_URL}`
8383
}
8484

85+
static getNewBusinessRegistryDashboardUrl () {
86+
return `${import.meta.env.VUE_APP_BUSINESS_REGISTRY_URL}`
87+
}
88+
8589
static getBceIdOsdLink () {
8690
return `${import.meta.env.VUE_APP_BCEID_OSD_LINK}`
8791
}

auth-web/src/util/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ export enum LDFlags {
465465
BusSearchLink = 'bus-search-staff-link',
466466
EnableBcCccUlc = 'enable-bc-ccc-ulc',
467467
EnableBusinessNrSearch = 'enable-business-nr-search',
468+
EnableBusinessRegistryDashboard = 'enable-business-registry-dashboard',
468469
EnableDetailsFilter = 'enable-transactions-detail-filter',
469470
EnableEFTPaymentMethod = 'enable-eft-payment-method',
470471
EnablePaymentChangeFromEFT = 'enable-payment-change-from-eft',

0 commit comments

Comments
 (0)