Skip to content

Commit ae3f33a

Browse files
hfeketeseverinbeauvaisSeverin Beauvaisbobdev-94bobby
authored
Feature solr merged (#860)
* 30381 cleaned up some env keys and fixed breadcrumbs (#843) * - deleted obsolete key VUE_APP_BUSINESSES_URL - app = 5.5.46 - fixed Business Registry URL in Affiliation Error Modal - fixed Staff Dashboard breadcrumb * - updated browserslist --------- Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca> * 30656 Updated LaunchDarkly module to support orgs (#844) * - app version = 5.6.0 - imported latest LD JS client SDK v3.9.0 - updated UpdateUserMixin to create contexts - updated featureFlags module to use contexts * - renamed updateUser -> updateLaunchDarkly - used getter instead of computing KC roles again - combined updateUser + updateLaunchDarkly - renamed featureFlags.ts -> launchDarkly.ts - misc cleanup --------- Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca> * 30554 DBA NR magic link (#846) Co-authored-by: bobby <bobbyjin935@gmail.com> * 29274 Upgraded to Vite (#845) * - misc cleanup - updated babel config file - moved index.html from /public to / - updated index.html - deleted obsolete jest config file - app version = 5.7.0 - updated scripts in package file - deleted obsolete dependencies - added necessary dependencies - recreated pnpm lock file - updated patch to use import.meta - deleted obsolete postcss config file - added robots file - replaced process.env -> import.meta.env - replaced JEST_WORKER_ID -> VITEST - added woff2 fonts - updated font sources in CSS - replaced getBaseUrl with direct sessionstorage.getItem() - fixed some image sources - deleted obsolete payment-utils.ts - changed getConfig to non-async - added vuetify css import - changed v-img to img - deleted unused isJestRunning computed - replaced appBaseURL -> namexApiUrl - added check for valid user/org before callling UpdateLdUser - added BASE_URL to session storage - added NAMEX_API_URL to session storage - updated Vuetify import - deleted appBaseURL export - deleted commented-out console.log - commented out unneeded console.log (for now) - updated unit tests - updated types in tsconfig file - added vite config file - updated vue config file * - fixed v-icon size and color --------- Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca> * Modify README for pnpm version and commands Update pnpm installation and development commands * 30987 Upgraded to Pinia (#847) * - app version = 5.8.0 - installed Pinia dependencies - updated Getter and Action decorators - misc cleanup - created Filing Types enum - created Error interface - created Payment models - removed unneeded await for store actions - converted Vuex Modules to separate stores - created getStores plugin - cleaned up error store - cleaned up payment store - delete env config - deleted obsolete properties from main store state - deleted unneeded stateModel property - refactored actions and mutations into "sub store" - refactored getters into "sub store" - refactored state into "sub store" - created new Pinia main store from sub stores - now call mutations as functions instead of "commit" - misc cleanup / type fixes - moved getXXX in main.ts - attached Vuex store to Vue instance - mocked Vuex store for unit tests - updated misc comments - final commit with store as 3 sub-stores * - changed actions back to exported functions - changed getters back to exported functions - changed state back to exported const - updated store definition - misc fixes and cleanup - updated Reg Search API URL in example env * - changed getNrState to return NrState - cleaned up some typings - changed getNrId to return number * - attached Vuetify to Vue - use current Vuetify instance to get breakpoint * - small vault comment fixes - approve building "vue-demi" to solve "missing export" issue * - fixed "cannot read null key properties" * - updated lockfile - updated pnpm lock file - lock file with pnpm v9 * - added exclude in Vite config --------- Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca> * 31112 define disabled wait time and change priority wait time to Days (#851) * define disabled wait time and change priority wait time to Days * update * lint error * Update * linting * update * 30032 - NR Payments - Renewal Payments do not have option to add Folio Number (#853) * bugfix: Add folio number to RENEW payment when the first payment already had it - bump version to 5.8.3 * chore: Update folio number assignment logic to use PaymentAction.CREATE filter * cleanup * 29381 - xpro name allowed length increased from 40 to 60 (#852) * Update `MRAS_MAX_LENGTH` constant to 60 in new-request constants * version bump * chore: bump version to 5.8.3 * Add new FF for priority wait time tooltip (#855) * 2551 update priority tooltips (#856) * update priority tooltips * Remove unnecessary newline in stats.vue * 29381 - rules and validation updates in name field (#857) * fix: name input rules logic and add xpro validation - add validation/disable button in sub search modal * fix: correct defaultRules return order in name input component * fix: update search button logic and add xpro name validation - Update `isSearchBtnDisabled` logic for button disablement - Add `isValidXproName` getter for XPRO name length validation * chore: bump version to 5.8.6 and remove unused import in search component * fix: adjust max length validation for XPRO name flow - Use dynamic max length based on `isXproFlow` condition. * 31568 - remove Release Notes link from the footer (#858) * Update `MRAS_MAX_LENGTH` constant to 60 in new-request constants * version bump * chore: bump version to 5.8.3 * fix: remove "Release Notes" link from footer and update sbc-common-components patch * build lock with pnpm 9 --------- Co-authored-by: Séverin Beauvais <severinbeauvais@users.noreply.github.com> Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca> Co-authored-by: bobdev-94 <jinbobby677@gmail.com> Co-authored-by: bobby <bobbyjin935@gmail.com> Co-authored-by: eve-git <54647458+eve-git@users.noreply.github.com>
1 parent 55b7065 commit ae3f33a

147 files changed

Lines changed: 6233 additions & 13266 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
## Project setup
66
```
7-
npm install -g pnpm
7+
npm install -g pnpm@9
88
pnpm install
99
```
1010

1111
### Compiles and hot-reloads for development
1212
```
13-
pnpm run serve
13+
pnpm run dev
1414
```
1515

1616
### Compiles and minifies for production

app/.env.example

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ VUE_APP_PATH="/"
33
#vaults web-url
44
VUE_APP_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/"
55
VUE_APP_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/"
6-
VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/"
76
VUE_APP_CORPORATE_ONLINE_URL="https://www.corporateonline.gov.bc.ca"
87
VUE_APP_BUSINESS_DASH_URL="https://dev.business-dashboard.bcregistry.gov.bc.ca/"
98
VUE_APP_BUSINESS_REGISTRY_URL="https://dev.business-registry-dashboard.bcregistry.gov.bc.ca/"
@@ -27,7 +26,7 @@ VUE_APP_NAMEX_API_VERSION="/api/v1"
2726
VUE_APP_NAMEX_API_KEY=
2827
VUE_APP_STATUS_API_URL="https://status-api-dev.apps.gold.devops.gov.bc.ca"
2928
VUE_APP_STATUS_API_VERSION="/api/v1"
30-
VUE_APP_REGISTRIES_SEARCH_API_URL="https://bcregistry-dev.apigee.net/registry-search"
29+
VUE_APP_REGISTRIES_SEARCH_API_URL="https://test.api.connect.gov.bc.ca/registry-search-dev"
3130
VUE_APP_REGISTRIES_SEARCH_API_VERSION_2="/api/v2"
3231
VUE_APP_REGISTRIES_SEARCH_API_KEY=
3332

@@ -40,9 +39,9 @@ VUE_APP_KEYCLOAK_REALM="bcregistry"
4039
VUE_APP_KEYCLOAK_CLIENTID="name-requests-web"
4140
VUE_APP_AUTH_TOKEN_URL="https://dev.loginproxy.gov.bc.ca/auth/realms/bcregistry/protocol/openid-connect/token"
4241

43-
#vaults webchat
42+
#vaults name-request
4443
VUE_APP_HOTJAR_ID=""
45-
VUE_APP_QUICK_SEARCH_PUBLIC_ID=""
44+
VUE_APP_QUICK_SEARCH_PUBLIC_ID="namex-solr-service-account"
4645
VUE_APP_QUICK_SEARCH_PUBLIC_SECRET=""
4746

4847
#vaults webchat

app/.eslintrc.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ module.exports = {
4747
files: [
4848
'**/__tests__/*.{j,t}s?(x)',
4949
'**/tests/unit/**/*.spec.{j,t}s?(x)'
50-
],
51-
env: {
52-
jest: true
53-
}
50+
]
5451
}
5552
]
5653
}

app/babel.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
module.exports = {
2-
presets: [
3-
'@vue/cli-plugin-babel/preset'
4-
],
52
plugins: ['@babel/plugin-proposal-private-methods']
63
}

app/devops/vaults.env

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ VUE_APP_PATH=/
44
#vaults web-url
55
VUE_APP_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL"
66
VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL"
7-
VUE_APP_BUSINESSES_URL="op://web-url/$APP_ENV/business/BUSINESSES_URL"
87
VUE_APP_CORPORATE_ONLINE_URL="op://web-url/$APP_ENV/bcregistry/COLIN_URL"
98
VUE_APP_BUSINESS_DASH_URL="op://web-url/$APP_ENV/business-dash/BUSINESS_DASH_URL"
109
VUE_APP_BUSINESS_REGISTRY_URL="op://web-url/$APP_ENV/business-registry-ui/BUSINESS_REGISTRY_URL"
@@ -41,7 +40,7 @@ VUE_APP_KEYCLOAK_REALM="op://keycloak/$APP_ENV/base/KEYCLOAK_REALMNAME"
4140
VUE_APP_KEYCLOAK_CLIENTID="op://keycloak/$APP_ENV/name-requests-web/UI_KEYCLOAK_RESOURCE_NAME"
4241
VUE_APP_AUTH_TOKEN_URL="op://keycloak/$APP_ENV/base/KEYCLOAK_AUTH_TOKEN_URL"
4342

44-
#vaults webchat
43+
#vaults name-request
4544
VUE_APP_HOTJAR_ID="op://name-request/$APP_ENV/ui/HOTJAR_ID"
4645
VUE_APP_QUICK_SEARCH_PUBLIC_ID="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_ID"
4746
VUE_APP_QUICK_SEARCH_PUBLIC_SECRET="op://name-request/$APP_ENV/ui/QUICK_SEARCH_PUBLIC_SECRET"
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.png">
8-
<!-- Set document.baseURI -->
9-
<base href="<%= BASE_URL %>" target="_self">
7+
<link rel="icon" href="/favicon.png">
108
<title>Name Request</title>
119
</head>
1210
<body>
@@ -17,6 +15,6 @@
1715
</strong>
1816
</noscript>
1917
<div id="app"></div>
20-
<!-- built files will be auto injected -->
18+
<script type="module" src="/src/main.ts"></script>
2119
</body>
2220
</html>

app/jest.config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/package.json

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"name": "name-request",
3-
"version": "5.5.45",
3+
"version": "5.8.7",
44
"private": true,
55
"appName": "Name Request UI",
66
"sbcName": "SBC Common Components",
77
"scripts": {
8-
"serve": "vue-cli-service serve",
9-
"build": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build",
10-
"test": "vue-cli-service test:unit --verbose --coverage",
11-
"test:unit": "vue-cli-service test:unit --testPathPattern --coverage",
12-
"lint": "vue-cli-service lint",
13-
"lint:nofix": "vue-cli-service lint --no-fix",
14-
"build-check": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build"
8+
"dev": "vite",
9+
"build": "vite build",
10+
"build-check": "vite build",
11+
"preview": "vite preview --port 8080",
12+
"lint": "eslint . --ext js,ts,vue --no-fix",
13+
"test": "vitest run",
14+
"test:unit": "vitest run",
15+
"test:watch": "vitest watch",
16+
"test:coverage": "vitest run --coverage"
1517
},
1618
"dependencies": {
1719
"@babel/compat-data": "^7.24.4",
@@ -25,18 +27,18 @@
2527
"@bcrs-shared-components/web-chat": "2.0.0",
2628
"@mdi/font": "^4.9.95",
2729
"axios": "^0.27.2",
28-
"babel-plugin-transform-decorators": "^6.24.1",
2930
"core-js": "^3.37.0",
3031
"http-status-codes": "^1.4.0",
31-
"launchdarkly-js-client-sdk": "^2.24.2",
32+
"launchdarkly-js-client-sdk": "^3.9.0",
3233
"lodash": "^4.17.21",
34+
"pinia": "^2.0.35",
35+
"pinia-class": "^0.0.3",
3336
"qs": "^6.12.1",
3437
"quill": "^2.0.0",
3538
"remove-accents": "^0.4.4",
3639
"sbc-common-components": "3.0.15-c",
37-
"style-loader": "^1.3.0",
38-
"tslib": "^2.6.2",
39-
"vue": "2.7.10",
40+
"tslib": "^2.8.1",
41+
"vue": "2.7.16",
4042
"vue-contenteditable": "^1.0.2",
4143
"vue-hotjar": "^1.4.0",
4244
"vue-quill-editor": "^3.0.6",
@@ -46,49 +48,42 @@
4648
},
4749
"devDependencies": {
4850
"@babel/plugin-proposal-private-methods": "^7.18.6",
49-
"@types/jest": "^27.5.2",
50-
"@types/lodash": "^4.17.0",
51-
"@types/node": "^20.12.7",
51+
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
52+
"@pinia/testing": "^0.0.16",
53+
"@types/lodash": "^4.17.7",
54+
"@types/node": "^20.19.18",
5255
"@types/sinon": "^10.0.20",
5356
"@typescript-eslint/eslint-plugin": "^5.62.0",
5457
"@typescript-eslint/parser": "^5.62.0",
55-
"@volar-plugins/vetur": "latest",
56-
"@vue/cli-plugin-babel": "^5.0.8",
57-
"@vue/cli-plugin-eslint": "^5.0.8",
58-
"@vue/cli-plugin-router": "^5.0.8",
59-
"@vue/cli-plugin-typescript": "^5.0.8",
60-
"@vue/cli-plugin-unit-jest": "^5.0.8",
61-
"@vue/cli-plugin-vuex": "^5.0.8",
62-
"@vue/cli-service": "^5.0.8",
58+
"@vitejs/plugin-vue2": "^2.2.0",
6359
"@vue/eslint-config-standard": "^4.0.0",
6460
"@vue/eslint-config-typescript": "^9.1.0",
6561
"@vue/test-utils": "^1.3.6",
66-
"@vue/vue2-jest": "^27.0.0",
6762
"cross-env": "^7.0.3",
6863
"eslint": "~7.32.0",
6964
"eslint-plugin-vue": "^8.7.1",
7065
"eslint-plugin-vuetify": "^1.1.0",
66+
"jsdom": "^22.1.0",
7167
"json-server": "^0.15.1",
72-
"postcss-loader": "^8.1.1",
73-
"sass": "~1.32.13",
74-
"sass-loader": "^10.5.2",
68+
"sass": "~1.59.3",
7569
"sinon": "^14.0.2",
76-
"ts-jest": "^27.1.5",
7770
"typescript": "4.5.5",
78-
"vue-class-component": "^7.2.6",
79-
"vue-cli-plugin-vuetify": "^2.5.8",
71+
"vite": "4.5.2",
72+
"vite-plugin-environment": "^1.1.3",
73+
"vitest": "0.33.0",
74+
"volar-service-vetur": "^0.0.62",
8075
"vue-debounce-decorator": "^1.0.1",
8176
"vue-property-decorator": "^9.1.2",
82-
"vue-template-compiler": "2.7.10",
83-
"vuetify-loader": "^1.9.2",
77+
"vue-test-utils-helpers": "git+https://github.com/bcgov/vue-test-utils-helpers.git",
8478
"vuex-class": "^0.3.2",
85-
"vuex-module-decorators": "^1.2.0",
86-
"webpack": "~5.78.0",
87-
"webpack-bundle-analyzer": "^3.9.0"
79+
"vuex-module-decorators": "^1.2.0"
8880
},
8981
"pnpm": {
9082
"patchedDependencies": {
9183
"sbc-common-components@3.0.15-c": "patches/sbc-common-components@3.0.15-c.patch"
92-
}
84+
},
85+
"onlyBuiltDependencies": [
86+
"vue-demi"
87+
]
9388
}
9489
}

app/patches/sbc-common-components@3.0.15-c.patch

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
diff --git a/src/components/SbcFooter.vue b/src/components/SbcFooter.vue
2+
index 6fa4d2304bce52930cb6ed1007c108ba2dee30b2..15cacbeec27ff058eabaa3feb006416829ebc1d1 100644
3+
--- a/src/components/SbcFooter.vue
4+
+++ b/src/components/SbcFooter.vue
5+
@@ -4,7 +4,6 @@
6+
<nav>
7+
<ul>
8+
<li><a href="/">Home</a></li>
9+
- <li><a href="https://www.release-notes.bcregistry.gov.bc.ca" target="_blank">Release Notes</a></li>
10+
<li><a href="https://www2.gov.bc.ca/gov/content/home/disclaimer" target="_blank">Disclaimer</a></li>
11+
<li><a href="https://www2.gov.bc.ca/gov/content/home/privacy" target="_blank">Privacy</a></li>
12+
<li><a href="https://www2.gov.bc.ca/gov/content/home/accessibility" target="_blank">Accessibility</a></li>
113
diff --git a/src/util/interceptors.ts b/src/util/interceptors.ts
2-
index 4db4ab9c6bc08453cd7448fb0027f8e3e5963ffc..0ceb22186ca02407914a2049df4c1aba72b87102 100644
3-
--- a/src/util/interceptors.ts
14+
index 4db4ab9c6bc08453cd7448fb0027f8e3e5963ffc..8c4b038ac42c0d3d16015c4e0258eae182b89bf0 100644
15+
--- a/src/util/interceptors.ts
416
+++ b/src/util/interceptors.ts
5-
@@ -5,6 +5,11 @@ import { SessionStorageKeys } from './constants'
17+
@@ -4,6 +4,10 @@ import { SessionStorageKeys } from './constants'
18+
619
export function addAxiosInterceptors (axiosInstance: AxiosInstance): AxiosInstance {
720
axiosInstance.interceptors.request.use(config => {
8-
const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)
9-
+ const authGatewayApiKey = process.env.VUE_APP_AUTH_API_KEY
10-
+
21+
+ const authGatewayApiKey = import.meta.env.VUE_APP_AUTH_API_KEY
1122
+ if (authGatewayApiKey && config.url.includes(ConfigHelper.getAuthAPIUrl())) {
1223
+ config.headers['x-apikey'] = authGatewayApiKey
1324
+ }
25+
const token = ConfigHelper.getFromSession(SessionStorageKeys.KeyCloakToken)
1426
if (token) {
1527
config.headers.Authorization = `Bearer ${token}`
16-
}

0 commit comments

Comments
 (0)