Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

25294 - Submit NoW for Bootstrap Filing #712

Merged
merged 9 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-filings-ui",
"version": "7.4.13",
"version": "7.4.14",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
17 changes: 15 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ import {
import { BreadcrumbIF } from '@bcrs-shared-components/interfaces'
import { FilingStatus, NameRequestStates, NigsMessage, Routes } from '@/enums'
import { FilingTypes } from '@bcrs-shared-components/enums'
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module'
import { CorpTypeCd, GetCorpFullDescription, GetCorpNumberedDescription }
from '@bcrs-shared-components/corp-type-module'
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { useBusinessStore, useConfigurationStore, useFilingHistoryListStore, useRootStore } from './stores'

Expand Down Expand Up @@ -371,6 +372,7 @@ export default class App extends Mixins(
@Action(useBusinessStore) setLegalName!: (x: string) => Promise<void>
@Action(useBusinessStore) setLegalType!: (x: CorpTypeCd) => Promise<void>
@Action(useBusinessStore) setIdentifier!: (x: string) => Promise<void>
@Action(useBusinessStore) setFoundingDate!: (x: string) => Promise<void>

@Action(useFilingHistoryListStore) loadFilings!: (x: string) => Promise<void>
@Action(useFilingHistoryListStore) setFilings!: (x: ApiFilingIF[]) => void
Expand Down Expand Up @@ -624,6 +626,12 @@ export default class App extends Mixins(
const filing = response?.filing
const filingName = filing.header?.name as FilingTypes
const status = filing.header.status as FilingStatus
const foundingDate = filing.header?.effectiveDate // use the FE date as the founding date
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the FE date as the founding date

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great comment, thanks!

const email =
filing?.incorporationApplication?.contactPoint?.email ||
filing?.amalgamationApplication?.contactPoint?.email ||
filing?.continuationIn?.contactPoint?.email ||
filing?.registration?.contactPoint?.email

severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
if (!filing || !filing.business || !filing.header || !filingName || !status) {
throw new Error(`Invalid boostrap filing - missing required property = ${filing}`)
Expand Down Expand Up @@ -656,12 +664,17 @@ export default class App extends Mixins(
this.setIdentifier(this.tempRegNumber)
this.setLegalType(legalType)
this.setGoodStanding(true) // draft apps are always in good standing
this.setFoundingDate(foundingDate)
this.setBusinessEmail(email)

// save local NR Number if present
if (nameRequest.nrNumber) this.localNrNumber = nameRequest.nrNumber

// store Legal Name if present
if (nameRequest.legalName) this.setLegalName(nameRequest.legalName)
// special case to identify numbered amalgamations
if (filingName === FilingTypes.AMALGAMATION_APPLICATION) {
this.setLegalName(nameRequest.legalName || 'Numbered Amalgamated Company')
} else { this.setLegalName(nameRequest.legalName || GetCorpNumberedDescription(this.getLegalType)) }

ArwenQin marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator Author

@ArwenQin ArwenQin Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Special case for numbered amalgamations, same as current set up in businessStore.ts:
image

other bootstraps, set legal name to numbered description, instead of null

Amalgamation (same as current display)
image

// store the bootstrap item in the right list
if (this.isBootstrapTodo) this.storeBootstrapTodo(response)
Expand Down
18 changes: 9 additions & 9 deletions tests/unit/App.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2319,7 +2319,7 @@ describe('App as a draft numbered regular amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationTodo).toBe(true)
expect(rootStore.isBootstrapTodo).toBe(true)

Expand Down Expand Up @@ -2533,7 +2533,7 @@ describe('App as a completed regular amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationFiling).toBe(true)
expect(rootStore.isBootstrapFiling).toBe(true)

Expand Down Expand Up @@ -2632,7 +2632,7 @@ describe('App as a draft horizontal amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationTodo).toBe(true)
expect(rootStore.isBootstrapTodo).toBe(true)

Expand Down Expand Up @@ -2736,7 +2736,7 @@ describe('App as a completed horizontal amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationFiling).toBe(true)
expect(rootStore.isBootstrapFiling).toBe(true)

Expand Down Expand Up @@ -2835,7 +2835,7 @@ describe('App as a draft vertical amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationTodo).toBe(true)
expect(rootStore.isBootstrapTodo).toBe(true)

Expand Down Expand Up @@ -2939,7 +2939,7 @@ describe('App as a completed vertical amalgamation application', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityBcCompany).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Amalgamated Company')
expect(rootStore.isAmalgamationFiling).toBe(true)
expect(rootStore.isBootstrapFiling).toBe(true)

Expand Down Expand Up @@ -3033,7 +3033,7 @@ describe('App as a draft numbered continuation in', () => {
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityContinueIn).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Limited Company')
expect(rootStore.isContinuationInTodo).toBe(true)
expect(rootStore.isBootstrapTodo).toBe(true)

Expand Down Expand Up @@ -3130,13 +3130,13 @@ describe('App as a completed continuation in', () => {
wrapper.destroy()
})

it('fetches continuation in filing properly', () => {
it('fetches continuation in filing properly', () => {
expect(rootStore.getNameRequest).toBeNull()
expect(rootStore.isContinuationInFiling).toBe(true)
expect(businessStore.getIdentifier).toBe('T123456789')
expect(businessStore.isEntityContinueIn).toBe(true)
expect(businessStore.isGoodStanding).toBe(true)
expect(businessStore.getLegalName).toBeNull()
expect(businessStore.getLegalName).toBe('Numbered Limited Company')
expect(rootStore.isContinuationInFiling).toBe(true)
expect(rootStore.isBootstrapFiling).toBe(true)

Expand Down
Loading