From c66b9cde3f74572d22f8897455a2d53ada109044 Mon Sep 17 00:00:00 2001 From: Karim El Jazzar Date: Thu, 2 Jan 2025 13:21:24 -0500 Subject: [PATCH 1/5] 24920 - Redirect to new BRD based on FF and Query Param --- auth-web/package-lock.json | 4 ++-- auth-web/package.json | 2 +- auth-web/src/routes/router.ts | 10 +++++++++- auth-web/src/util/constants.ts | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index b638d680cb..e54c52eb09 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.6.128", + "version": "2.6.129", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.6.128", + "version": "2.6.129", "dependencies": { "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/bread-crumb": "1.0.8", diff --git a/auth-web/package.json b/auth-web/package.json index 055cbdc517..3b4e607707 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.6.128", + "version": "2.6.129", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, diff --git a/auth-web/src/routes/router.ts b/auth-web/src/routes/router.ts index ff7244ef10..e956f68422 100644 --- a/auth-web/src/routes/router.ts +++ b/auth-web/src/routes/router.ts @@ -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') { + window.location.href = 'https://business-registry-dev.web.app/en-CA/' + } else { + next() + } + }, component: DashboardView, meta: { requiresAuth: true, requiresProfile: true }, redirect: '/account/:orgId/business', diff --git a/auth-web/src/util/constants.ts b/auth-web/src/util/constants.ts index 8bc9b6bd23..9a98d5fdf9 100644 --- a/auth-web/src/util/constants.ts +++ b/auth-web/src/util/constants.ts @@ -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', From f79ae0e032e275e1d70ba2d856b238512af50afd Mon Sep 17 00:00:00 2001 From: Karim El Jazzar Date: Thu, 2 Jan 2025 13:55:14 -0500 Subject: [PATCH 2/5] updated in response to comments --- auth-web/.env.example | 1 + auth-web/devops/vaults.env | 1 + auth-web/package-lock.json | 4 ++-- auth-web/package.json | 2 +- auth-web/src/routes/router.ts | 2 +- auth-web/src/util/config-helper.ts | 4 ++++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/auth-web/.env.example b/auth-web/.env.example index f4bae2a311..b7bd3c972a 100644 --- a/auth-web/.env.example +++ b/auth-web/.env.example @@ -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" diff --git a/auth-web/devops/vaults.env b/auth-web/devops/vaults.env index 743b09d106..10e3a8dcb3 100644 --- a/auth-web/devops/vaults.env +++ b/auth-web/devops/vaults.env @@ -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" diff --git a/auth-web/package-lock.json b/auth-web/package-lock.json index e54c52eb09..2f05aa20f5 100644 --- a/auth-web/package-lock.json +++ b/auth-web/package-lock.json @@ -1,12 +1,12 @@ { "name": "auth-web", - "version": "2.6.129", + "version": "2.7.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "auth-web", - "version": "2.6.129", + "version": "2.7.0", "dependencies": { "@bcrs-shared-components/base-address": "2.0.3", "@bcrs-shared-components/bread-crumb": "1.0.8", diff --git a/auth-web/package.json b/auth-web/package.json index 3b4e607707..7fb6a9b0f4 100644 --- a/auth-web/package.json +++ b/auth-web/package.json @@ -1,6 +1,6 @@ { "name": "auth-web", - "version": "2.6.129", + "version": "2.7.0", "appName": "Auth Web", "sbcName": "SBC Common Components", "private": true, diff --git a/auth-web/src/routes/router.ts b/auth-web/src/routes/router.ts index e956f68422..ebaccd378e 100644 --- a/auth-web/src/routes/router.ts +++ b/auth-web/src/routes/router.ts @@ -232,7 +232,7 @@ export function getRoutes (): RouteConfig[] { name: 'account', beforeEnter: (to, from, next) => { if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && to.query.newbrd === 'true') { - window.location.href = 'https://business-registry-dev.web.app/en-CA/' + window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl() } else { next() } diff --git a/auth-web/src/util/config-helper.ts b/auth-web/src/util/config-helper.ts index 1adc4ebb40..fbcb6acf28 100644 --- a/auth-web/src/util/config-helper.ts +++ b/auth-web/src/util/config-helper.ts @@ -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}` } From e146b53f1708c115a34f0ff5806f52aca681a75b Mon Sep 17 00:00:00 2001 From: Karim El Jazzar Date: Fri, 3 Jan 2025 15:40:17 -0500 Subject: [PATCH 3/5] fixed logic --- auth-web/src/routes/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth-web/src/routes/router.ts b/auth-web/src/routes/router.ts index ebaccd378e..0f96c90203 100644 --- a/auth-web/src/routes/router.ts +++ b/auth-web/src/routes/router.ts @@ -231,7 +231,7 @@ export function getRoutes (): RouteConfig[] { path: '/account/:orgId', name: 'account', beforeEnter: (to, from, next) => { - if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && to.query.newbrd === 'true') { + if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && to.query.noRedirect !== 'true') { window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl() } else { next() From d42c8c52d97c7d3c9972393633c8b349ad40ef66 Mon Sep 17 00:00:00 2001 From: Karim El Jazzar Date: Fri, 3 Jan 2025 17:16:11 -0500 Subject: [PATCH 4/5] updated in response to Sev's comment --- auth-web/src/routes/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth-web/src/routes/router.ts b/auth-web/src/routes/router.ts index 0f96c90203..0ef45ce305 100644 --- a/auth-web/src/routes/router.ts +++ b/auth-web/src/routes/router.ts @@ -231,7 +231,7 @@ export function getRoutes (): RouteConfig[] { path: '/account/:orgId', name: 'account', beforeEnter: (to, from, next) => { - if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && to.query.noRedirect !== 'true') { + if (LaunchDarklyService.getFlag(LDFlags.EnableBusinessRegistryDashboard) && !to.query.noRedirect) { window.location.href = ConfigHelper.getNewBusinessRegistryDashboardUrl() } else { next() From bbda8438df7ea2c23db924bd4969a3f4324f0303 Mon Sep 17 00:00:00 2001 From: Karim El Jazzar Date: Fri, 3 Jan 2025 17:52:25 -0500 Subject: [PATCH 5/5] updated status api url --- auth-web/.env.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth-web/.env.example b/auth-web/.env.example index b7bd3c972a..219e3bb437 100644 --- a/auth-web/.env.example +++ b/auth-web/.env.example @@ -47,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"