From c7b4c659db060ef192680f74d937030579e8624a Mon Sep 17 00:00:00 2001 From: stevenc987 Date: Tue, 29 Sep 2026 16:17:19 +0000 Subject: [PATCH 1/6] 35053-Investigate and Fix: Name Request UI - Estimated review date Incorrect Signed-off-by: stevenc987 --- app/package.json | 2 +- app/src/store/getters.ts | 17 ++++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/package.json b/app/package.json index a94310a33..a309bb90d 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.10.5", + "version": "5.10.6", "private": true, "engines": { "node": ">=24" diff --git a/app/src/store/getters.ts b/app/src/store/getters.ts index 56eeff3cb..630a16cb6 100644 --- a/app/src/store/getters.ts +++ b/app/src/store/getters.ts @@ -116,6 +116,10 @@ export const getNrState = (state: StateIF): NrState => { return state.newRequestModel.nr.state } +export const getNrSubmittedDate = (state: StateIF): Date => { + return state.newRequestModel.nr.submittedDate +} + export const getLocation = (state: StateIF): Location => { return state.newRequestModel.location } @@ -1337,11 +1341,10 @@ export const getRegularWaitTime = (state: StateIF): string | number => { return '-' } -function formatDate (statVal: number): string { - const today = new Date() - const result = new Date(today) +function formatDate(statVal: number, submittedDate: Date): string { + const result = new Date(submittedDate) - result.setDate(today.getDate() + statVal) + result.setDate(result.getDate() + statVal) const formatted = result.toLocaleDateString('en-CA', { year: 'numeric', month: 'long', @@ -1356,10 +1359,10 @@ function formatDate (statVal: number): string { export const getRegularEstimateReviewDate = (state: StateIF): string => { const flagVal = GetFeatureFlag('hardcoded_regular_wait_time') - if (flagVal > 0) return formatDate(flagVal) + if (flagVal > 0) return formatDate(flagVal, getNrSubmittedDate(state)) if (flagVal < 0) return '-' const statVal = getStats(state)?.regular_wait_time - if (statVal > 0) return formatDate(statVal) + if (statVal > 0) return formatDate(statVal, getNrSubmittedDate(state)) return '-' -} +} \ No newline at end of file From b6d7e9d92f98f8b5e8de0b1c9f79d926e0281a83 Mon Sep 17 00:00:00 2001 From: Oluwapizzy Date: Mon, 28 Sep 2026 17:58:40 -0400 Subject: [PATCH 2/6] fix: Authenticated can users pay by credit card as a guest even with an incomplete account setup --- app/src/App.vue | 37 ++++ .../components/dialogs/payment-complete.vue | 165 ++++++++++++------ app/src/mixins/payment-mixin.ts | 6 +- app/src/plugins/authHelper.ts | 15 ++ app/src/services/auth-services.ts | 5 +- app/tests/unit/auth-helper.spec.ts | 36 ++++ 6 files changed, 210 insertions(+), 54 deletions(-) create mode 100644 app/tests/unit/auth-helper.spec.ts diff --git a/app/src/App.vue b/app/src/App.vue index 4e7813ee6..142d62247 100644 --- a/app/src/App.vue +++ b/app/src/App.vue @@ -140,6 +140,7 @@ import SbcHeader from 'sbc-common-components/src/components/SbcHeader.vue' import SbcFooter from 'sbc-common-components/src/components/SbcFooter.vue' import { ActionBindingIF } from '@/interfaces/store-interfaces' import NamexServices from './services/namex-services' +import AuthServices from '@/services/auth-services' import { PAYMENT_REQUIRED } from 'http-status-codes' import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module' @@ -319,6 +320,42 @@ export default class App extends Mixins( // clear NR data for next time sessionStorage.removeItem('NR_DATA') } + + this.affiliateNrAfterAccountCreation() + } + + /** + * After a guest payment, the user may leave to create a Registries account. + * When they return with an account, attach the submitted NR to it. + * newBusiness stays false so it doesn't start incorporation. + */ + private async affiliateNrAfterAccountCreation (): Promise { + const raw = sessionStorage.getItem('PENDING_NR_AFFILIATION') + if (!raw) return + + let accountId = 0 + try { + accountId = +JSON.parse(sessionStorage.getItem('CURRENT_ACCOUNT') || '{}')?.id || 0 + } catch { + accountId = 0 + } + if (!accountId) return + + let nr + try { + nr = JSON.parse(raw) + } catch (error) { + sessionStorage.removeItem('PENDING_NR_AFFILIATION') + console.error('affiliateNrAfterAccountCreation =', error) // eslint-disable-line no-console + return + } + + sessionStorage.removeItem('PENDING_NR_AFFILIATION') + try { + await AuthServices.createNrAffiliation(accountId, nr, false) + } catch (error) { + console.error('affiliateNrAfterAccountCreation =', error) // eslint-disable-line no-console + } } /** Fetches and stores the current JS date. */ diff --git a/app/src/components/dialogs/payment-complete.vue b/app/src/components/dialogs/payment-complete.vue index a7d3033b2..fdaa8a5f4 100644 --- a/app/src/components/dialogs/payment-complete.vue +++ b/app/src/components/dialogs/payment-complete.vue @@ -1,52 +1,84 @@