Skip to content

Commit

Permalink
24920 - Redirect to new BRD based on FF and Query Param (#3192)
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim authored Jan 3, 2025
1 parent ad1b303 commit 85ff453
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion auth-web/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ VUE_APP_CORPORATE_ONLINE_URL="https://www.corporateonline.gov.bc.ca"
VUE_APP_NRO_URL="https://dev.bcregistrynames.gov.bc.ca/nro/"
VUE_APP_REGISTRY_SEARCH_URL="https://dev.search.business.bcregistry.gov.bc.ca/"
VUE_APP_NAMEX_WEB_URL="https://dev.namex.bcregistry.gov.bc.ca/"
VUE_APP_BUSINESS_REGISTRY_URL="https://business-registry-dev.web.app/"

#vaults API
VUE_APP_AUTH_API_URL="https://auth-api-dev.apps.silver.devops.gov.bc.ca"
Expand All @@ -46,7 +47,7 @@ VUE_APP_NAMEX_API_VERSION="/api/v1"
VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-search"
VUE_APP_REGISTRIES_SEARCH_API_VERSION="/api/v1"
VUE_APP_REGISTRIES_SEARCH_API_KEY=
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
VUE_APP_STATUS_API_VERSION="/api/v1"
VUE_APP_PAY_API_URL="https://pay-api-dev.apps.silver.devops.gov.bc.ca"
VUE_APP_PAY_API_VERSION="/api/v1"
Expand Down
1 change: 1 addition & 0 deletions auth-web/devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ VUE_APP_LLP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/LLP_FORMS_URL"
VUE_APP_LP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/LP_FORMS_URL"
VUE_APP_XLP_FORMS_URL="op://web-url/$APP_ENV/bcregistry/XLP_FORMS_URL"
VUE_APP_NAMEX_WEB_URL="op://web-url/$APP_ENV/auth-web/NAMEX_WEB_URL"
VUE_APP_BUSINESS_REGISTRY_URL="op://web-url/$APP_ENV/business-registry-ui/BUSINESS_REGISTRY_URL"

#vaults API
VUE_APP_AUTH_API_URL="op://API/$APP_ENV/auth-api/AUTH_API_URL"
Expand Down
4 changes: 2 additions & 2 deletions auth-web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion auth-web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth-web",
"version": "2.6.128",
"version": "2.7.0",
"appName": "Auth Web",
"sbcName": "SBC Common Components",
"private": true,
Expand Down
10 changes: 9 additions & 1 deletion auth-web/src/routes/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -229,6 +230,13 @@ export function getRoutes (): RouteConfig[] {
{
path: '/account/:orgId',
name: 'account',
beforeEnter: (to, from, next) => {
if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && !to.query.noRedirect) {
window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl()
} else {
next()
}
},
component: DashboardView,
meta: { requiresAuth: true, requiresProfile: true },
redirect: '/account/:orgId/business',
Expand Down
4 changes: 4 additions & 0 deletions auth-web/src/util/config-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ export default class ConfigHelper {
return `${import.meta.env.VUE_APP_NAMEX_WEB_URL}`
}

static getNewBusinessRegistryDashboardUrl () {
return `${import.meta.env.VUE_APP_BUSINESS_REGISTRY_URL}`
}

static getBceIdOsdLink () {
return `${import.meta.env.VUE_APP_BCEID_OSD_LINK}`
}
Expand Down
1 change: 1 addition & 0 deletions auth-web/src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ export enum LDFlags {
BusSearchLink = 'bus-search-staff-link',
EnableBcCccUlc = 'enable-bc-ccc-ulc',
EnableBusinessNrSearch = 'enable-business-nr-search',
EnableBusinessRegistryDashboard = 'enable-business-registry-dashboard',
EnableDetailsFilter = 'enable-transactions-detail-filter',
EnableEFTPaymentMethod = 'enable-eft-payment-method',
EnablePaymentChangeFromEFT = 'enable-payment-change-from-eft',
Expand Down

0 comments on commit 85ff453

Please sign in to comment.