From 163f3fc65900991ee4c637697ca529b1d404fc99 Mon Sep 17 00:00:00 2001 From: eve-git Date: Tue, 25 Nov 2025 10:44:15 -0800 Subject: [PATCH 1/2] update priority tooltips --- app/package.json | 2 +- .../components/common/applicant-info-2.vue | 3 +- .../components/common/applicant-info-3.vue | 3 +- app/src/components/dialogs/upgrade.vue | 4 +- app/src/components/new-request/stats.vue | 46 ++++--------------- app/src/store/getters.ts | 21 +++++++++ 6 files changed, 38 insertions(+), 41 deletions(-) diff --git a/app/package.json b/app/package.json index cddc4a7d7..f6ca427f5 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.8.3", + "version": "5.8.5", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", diff --git a/app/src/components/common/applicant-info-2.vue b/app/src/components/common/applicant-info-2.vue index 048a66ba0..da9aec47b 100644 --- a/app/src/components/common/applicant-info-2.vue +++ b/app/src/components/common/applicant-info-2.vue @@ -259,7 +259,7 @@ - Priority name requests are typically reviewed within 1-2 business days. + Priority name requests are typically reviewed within {{ getPriorityWaitTime }} business days. Due to the on-going labour dispute between the government and its employees, @@ -295,6 +295,7 @@ export default class ApplicantInfo2 extends Vue { @Getter(useStore) getNrData!: any @Getter(useStore) getNrState!: NrState @Getter(useStore) getPriorityRequest!: boolean + @Getter(useStore) getPriorityWaitTime!: string | number @Getter(useStore) getShowPriorityRequest!: boolean @Getter(useStore) isMobile!: boolean diff --git a/app/src/components/common/applicant-info-3.vue b/app/src/components/common/applicant-info-3.vue index fcb703be8..f05b66760 100644 --- a/app/src/components/common/applicant-info-3.vue +++ b/app/src/components/common/applicant-info-3.vue @@ -331,7 +331,7 @@ - Priority name requests are typically reviewed within 1-2 business days. + Priority name requests are typically reviewed within {{ getPriorityWaitTime }} business days. Due to the on-going labour dispute between the government and its employees, @@ -369,6 +369,7 @@ export default class ApplicantInfo3 extends Vue { @Getter(useStore) getNrData!: any @Getter(useStore) getNrState!: NrState @Getter(useStore) getPriorityRequest!: boolean + @Getter(useStore) getPriorityWaitTime!: string | number @Getter(useStore) getShowPriorityRequest!: boolean @Getter(useStore) isRoleStaff!: boolean @Getter(useStore) isMobile!: boolean diff --git a/app/src/components/dialogs/upgrade.vue b/app/src/components/dialogs/upgrade.vue index ea1cd8ac7..f91bb8b08 100644 --- a/app/src/components/dialogs/upgrade.vue +++ b/app/src/components/dialogs/upgrade.vue @@ -70,7 +70,7 @@ class="mb-8" > If you need your name reviewed as quickly as possible, upgrade to a Priority - request. Priority name requests are usually reviewed within 1 to 2 business days. + request. Priority name requests are usually reviewed within {{ getPriorityWaitTime }} business days.

- {{ priorityWaitTime }} + {{ getPriorityWaitTime }}
Days @@ -45,9 +45,9 @@
- If you need your name reviewed as quickly as possible, Priority requests - are available for a fee ($100.00). Priority name requests are usually - reviewed within 1 to 2 business days. + If you need your name reviewed as quickly as possible, + Priority requests are available for a fee ($100.00). + Priority name requests are usually reviewed within {{ getPriorityWaitTime }} business days. @@ -71,7 +71,7 @@ >
- {{ regularWaitTime }} + {{ getRegularWaitTime }}
Days @@ -106,6 +106,8 @@ import NamexServices from '@/services/namex-services' export default class Stats extends Vue { @Getter(useStore) getStats!: StatsI @Getter(useStore) isMobile!: boolean + @Getter(useStore) getRegularWaitTime!: string | number + @Getter(useStore) getPriorityWaitTime!: string | number @Action(useStore) setStats!: ActionBindingIF @@ -134,43 +136,13 @@ export default class Stats extends Vue { return (this.getStats?.auto_approved_count ?? '-') } - /** The regular wait time, in days. */ - get regularWaitTime (): string | number { - const flagVal = GetFeatureFlag('hardcoded_regular_wait_time') - - if (flagVal > 0) return flagVal - if (flagVal < 0) return '-' - - const statVal = this.getStats?.regular_wait_time - if (statVal > 0) { - return statVal - } - - return '-' - } - - /** The priority wait time, in days. */ - get priorityWaitTime (): string | number { - const flagVal = GetFeatureFlag('hardcoded_priority_wait_time') - - if (flagVal > 0) return flagVal - if (flagVal < 0) return '-' - - const statVal = this.getStats?.priority_wait_time - if (statVal > 0) { - return statVal - } - - return '-' - } - get showRegularTooltip (): boolean { - const val = Number(this.regularWaitTime) + const val = Number(this.getRegularWaitTime) return Number.isFinite(val) && val > 0 } get showPriorityTooltip (): boolean { - const val = Number(this.priorityWaitTime) + const val = Number(this.getPriorityWaitTime) return Number.isFinite(val) && val > 0 } } diff --git a/app/src/store/getters.ts b/app/src/store/getters.ts index 0d631b929..b1c3eb325 100644 --- a/app/src/store/getters.ts +++ b/app/src/store/getters.ts @@ -58,6 +58,7 @@ import { RequestActions, XproMapping } from '@/list-data' +import { GetFeatureFlag } from '@/plugins/launchDarkly' export const isMobile = (state: StateIF): boolean => { // fall back to base window width if no window size changes have occurred @@ -1318,3 +1319,23 @@ export const getSearchRequest = (state: StateIF): RequestActionsI => { export const getBusinessAccountId = (state: StateIF): string => { return state.newRequestModel.businessAccountId } + +export const getPriorityWaitTime = (state: StateIF): string | number => { + const flagVal = GetFeatureFlag('hardcoded_priority_wait_time') + if (flagVal > 0) return flagVal + if (flagVal < 0) return '-' + + const statVal = getStats(state)?.priority_wait_time + if (statVal > 0) return statVal + return '-' +} + +export const getRegularWaitTime = (state: StateIF): string | number => { + const flagVal = GetFeatureFlag('hardcoded_regular_wait_time') + if (flagVal > 0) return flagVal + if (flagVal < 0) return '-' + + const statVal = getStats(state)?.regular_wait_time + if (statVal > 0) return statVal + return '-' +} From 67dc3226e56ec3d8010b7a3a6e0b6f6ba87a3a01 Mon Sep 17 00:00:00 2001 From: eve-git <54647458+eve-git@users.noreply.github.com> Date: Tue, 25 Nov 2025 11:09:34 -0800 Subject: [PATCH 2/2] Remove unnecessary newline in stats.vue --- app/src/components/new-request/stats.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/components/new-request/stats.vue b/app/src/components/new-request/stats.vue index 1e4dd9c7e..90092cffb 100644 --- a/app/src/components/new-request/stats.vue +++ b/app/src/components/new-request/stats.vue @@ -145,7 +145,6 @@ export default class Stats extends Vue { const val = Number(this.getPriorityWaitTime) return Number.isFinite(val) && val > 0 } - }