Skip to content

Commit

Permalink
19034 Rebasing legal name feature branch (#637)
Browse files Browse the repository at this point in the history
* 18102 (#576)

Signed-off-by: Hongjing Chen <Hongjing.Chen@gov.bc.ca>

* Fixed Dissolution Date bug (#577)

* Fixed dissolution date bug

* Updated in response to Sev's comments + added unit tests

* Fixed unit test

* fixed unit test running locally but not with github ci

* Added test case + fixed test

* Added another test case

* another small fix

* trying something out

* Added a test line

* 17160 Update fetchNr with phone and email validation (#578)

* update fetchNr with phone and email validation

* fix small

* replace fetch NR func

* remove old fetch func

* 18536 Fixed lint warnings before further development (#581)

* - app version = 5.6.0
- fixed a whack of lint warnings

* - imported CorpTypeCd directly from module to avoid type confusion

* 18449 - GP/SP registration modify (#582)

* GP/SP regirstration modify

* package version

* fix linting

* unit tests

* clean up

* fix linting

* unit tests fix

* unit tests fixing 2

* fix linting

* reset back to previous one

* show old UI with registries staff only

* GP/SP regirstration modify

* fix linting

* unit tests

* clean up

* unit tests fix

* unit tests fixing 2

* fix UI and testing

* fix registries contact info messed up issue

* fix lint

* clean up help contact us

* clean up the getter, import etc..

* revert FirmContactInfo back

* remove obsolete component

* - app version = 5.6.2 (#583)

- imported latest shared enums
- imported latest shared interfaces
- imported latest shared mixins
- added route names to enum
- added views to enum
- added filing interface
- added resource interface
- updated state interface
- added amalgamation state interface
- updated filing template mixin
- added initial amalgamation resources
- added amalgamation steps
- added amalgamation routes
- added/updated getters/actions to  store
- updated state model
- added initial amalgamation views

- renamed some methods in App.vue
- added amalgamations to App.vue
- added amalgamations to Actions.vue
- added amalgamations to EntityInfo.vue
- added amalgamations to SaveErrorDialog.vue
- added fallbacks to amalgamations in filing-template-mixin.ts
- added amalgamations to BreadCrumbResource.ts
- added amalgamations to legal-services.ts
- added amalgamations to feature-flag-utils.ts
- misc cleanup

- initial updates to Business Info page
- initial updates to Information page

- added Expandable Help
- added error return links
- added amalg blocks to Summary Define Company
- added misc placeholders for future components

- moved SummaryDefineCompany to common folder
- moved ListShareClass to common folder
- moved ShareStructure to common folder

- updated validity in Stepper

* 18625 Fix validate nr func (#584)

* fix validate nr func

* update version

* 18535 - Add Amalgamating Businesses Part 1 (#585)

* 18535 - Add Amalgamating Businesses Part 1

* Fixed id name

* Cleanup + added fix for new note

* First set of fixes in response to Sev's comments

* fixed lint error

* Part fix in response to Sev's comments

* 18640 Amalgamating business table (initial) (#586)

* - app version = 5.6.5
- added global warning (orange) colour
- removed unnecessary re-export
- added initial BusinessTable component
- added initial validation code
- added Business Status sub-component
- added basic functionality to table
- added Business Statuses enum
- renamed property in amalg filing interface
- updated filing save/restore
- added businesses table to store (plus default initial state for now only)

* wip

* 18640 Amalgamating businesses structure + validations + etc (#587)

* - app version = 5.6.6
- worked on amalgamating businesses data/types
- renamed some enums
- fixed table key
- added more BusinessTable logic (including foreign jurisdiction)
- updated static (test) data
- updated some imports in unit tests

* - misc fixes

* 18640 More amalgamating business table work (#589)

* - app version = 5.6.7

* - changed break to return in App.vue
- always import CorpTypeCd from corp-type-module (never enums)
- added some TING business rules
- removed status from static data

* - more table logic
- more test data cleanup

* wip

* wip

* - deleted unneeded getters, etc
- added Business Table Summary

* wip

* wip

* 18535 Amalgamating Businesses Part 1 Continuation (#588)

* Refactored saveAmalgamatingBusiness + specified what to search for

* Setup AmalgamatingBusinesses validity

* fixed unit tests

* cleanup

* Populate the table using the business lookup

* Fixed in response to Sev's comments

* Small cleanup in response to Sev's comment

* updated package version

* 18535 - Save and Resume Draft Amalgamation (#592)

* Save and resume draft amalgamation

* Properly initialize array if continuing a draft

* updated package version

* 18538 Resulting Business Name and Type component (WIP) (#591)

* PR (TODO fix unit tests)

* Added unit tests for numbered am

* Fixed test case and update from comments

* Added additional test case

* Updated unit test formatting.

* Updated package.json

* Added bullet points for numberd AML

* Fixed test cases

* 18640 Incremental amalgamating businesses validations, etc (#590)

* - app version = 5.6.10
- updated some validity calculations
- moved ting validations to a mixin
- generalized status computation
- updated regular amalgation validity

* - updated to use temp copy of array (instead of local copy)

* wip

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 18640 More amalgamating fetch / validations work (#593)

* - app version = 5.6.11
- imported latest BusinessLookup shared component
- updated fetchBusinessInfo return object
- simplified Amalg Businesses button and panel logic
- added Cancel button to Foreign panel
- added snackbar for save business errors
- deleted debugging template code

* - added fetch for business filings (for more validations)
- renamed AmalgamatingStatuses -> AmlStatuses
- added AmlTypes enum and replaced strings
- added some properties to TING business object (for more validations)
- added LegalServices.fetchFilings()
- misc updates

* - changed all to allSettled so I can get partial fetches
- fall back to lookup properties if some fetches fail (eg, not amalgamated)
- added empty table message
- temporarily start with empty (instead of pre-populated) table

* wip

* wip

* - logic cleanup

* - added proper check for limited restoration
- now fetch only first filing (to check for FED)
- fixed fetchFirstOrOnlyFiling() (for use with array response)

* - fixed unit test

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 18971 Finished some TODOs and incremental work on amalgamating business validations (#596)

* - app version = 5.6.12
- finished stepper validity code
- cleaned up some store code
- misc cleanup
- named and sorted rules

* - added spinner (experimental)

* wip

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 18960 - Re-fetch businesses information when loading draft (#594)

* Refactored the code + centralized fetch calls

* fixed lint errors

* Rebased + fixed rebase issues + fixed some of Sev's comments

* 18722 Add ForeignBusiness component for amalgamating businesses (#595)

* Add ForeignBusiness component

* Fix rebase issues

* Update nested select value

* Fix lint error

* Add spaces between tags

* Move foreign business component code to parent

* Wrap btn text in span

* Use common jurisdiction component

* 18971 Updated TING validations (#597)

* - app version = 5.6.13
- added dotted underline class that works for multiple lines
- cleaned up BusinessStatus and changed tooltip activator
- added tooltip text cases
- added validation rules and getters (still WIP)
- moved static businesses code from state-model to filing-template-mixin

* - on app start, display app name and version

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* Update foreign company error messages (#599)

* 18788 Updated amalgamation -> amalgamationApplication + business name options (WIP) (#598)

* - app version = 5.6.14
- added ResultingBusinessName component
- misc refactor and new code to handle 3 options
- still WIP

* - changed snackbar close text to a white icon

* - added random key to BusinessLookup to reset its state between calls

* - replaced local EntityState with shared EntityStates
- added validation for isHistorical

* - ResultingBusinessName WIP !!!

* - updated imported enums, etc
- updated some enums locally (amalgamation -> amalgamationApplication)
- ResultingBusinessName is still WIP (so don't use it)

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 18546 - add Folio Number to Review and Confirm step (#601)

* 18546-add folio number component

* 18546-validaions for folio number and unit test

* 18546-step validations

* 18546-fix spacing and change getter name

* 18546-update comments

* 18546-remove unused getter

* 18546-update package version

* 18546-premium account, label changes

* 18546-premium account check for validation

* 18847-update certify text for amalgamations (#603)

* 18722 - Update foreign business validation rules (#602)

* Update mras corp number rules

* Add test code

* Fix foreign jurisdiction validations

* Corp Number only required if Mras

* Update validation on jurisdiction change

* Update isForeignBusinessValid

* Fix typo

* Use common Mras list

* Add comments to foreign business validation

* Update != to !==

* Update version to 5.6.17

* 18848 - add court order / POA component on review page (#604)

* 18848-add Court order on review page

* 18848-update package version

* - app version = 5.6.19 (#600)

- imported updated shared correct-name and mixins
- updated some validations
- updated misc whitespace
- added additional options to ResultingBusinessName.vue
- added additional option to NameRequestInfo.vue
- fixed numbered company suffix
- added conditional links to return to proper steps
- updated save/resume name options
- updated more validations
- temporarily skipped some unit tests
- misc cleanup

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 19019 Add extra-pro A TING companies (#605)

* Add extra-pro TING companies

* Updated in response to Sev's comments

* updated package version after rebasing

* Fixed in response to Sev's comments

* fixed name

* removed unneeded comment

* extra empty line

* - app version = 5.6.21 (#606)

- added fallback for drafts created without Correct Name Option

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.22 (#607)

- updated base class to remove border radius (per UI designs)
- added message box to step 5

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.23 (#610)

- fixed amalgamation information title

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.24 (#611)

- reordered sections so amalgamations don't use generic section

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* fix unit test (#612)

Merging without updating app version since it's only a unit test change.

* 18749 - add amalgamation statement to review (#609)

* ui parts

* able to store, valid, and update

* update version

* ui parts

* able to store, valid, and update

* able to save

* still working on adding test file, fix other comments

* package conflict

* add unit text file

* lint and version

* add comments

* JSDoc syntax

* Final Framework Changes/Fixes for Regular Amalgamation (#608)

* Added unit tests for amalgamation views + lots of misc. fixes and cleanup

* Added test line for review and confirm page

* More and more fixes + cleanup

* Added return to step for business summary table

* Fixed in response to Sev's comments

* updated comment

* Fixed Amalgamation Statement test after rebase + updated package version

* 18749 - fix bug in reopen draft amalgamation file (#613)

* update version

* add validation to mounted function

* update version

* - app version = 5.6.28 (#615)

- misc fixes
- added Business Status unit tests
- added Business Table unit tests
- added Business Table Summary unit tests

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 18689 More Amalgamation fixes/updates (#614)

* Fixed Review and Confirm page validation

* Re-fetch business table data on file and pay

* updated package version

* removed debug code

* Fixed re-fetching issue

* add account id header (#616)

* Fixed bug with certify if submitting the amalgamation failed (#617)

* 18641 More unit tests (#618)

* - app version = 5.6.32
- added Amalgamation Mixin unit tests
- updated some status messages (per Yui)
- updated some rules (per Yui)
- added more Business Table unit tests (disabled until future)
- misc updates

* - added missing rule to list

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.33 (#619)

- do not save numbered name
- do not restore numbered name

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.34 (#620)

- fixed check for future effective filing
- added missing filing statuses to enum

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.35 (#621)

- added check for pending dissolution filing
- moved checks as new functions in mixin
- added business status (message) for pending dissolution
- added enum value
- updated state interface
- added new rule in mixin
- misc clean and missing code
- updated unit tests

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 19050 Changed pending dissolution check to pending filing check (#622)

* - app version = 5.6.36
- changed pending dissolution check to pending filing check

* - updated tooltip message

* - another tooltip message update

* - changed companies from title case to lower case

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 19201+19275+19216 More Amalgamation Fixes (#623)

* Lots and lots of amalgamation fixes

* fixed rebase issue + updated package version

* added unit test for frozen rule

* fixed rebase issue

* Fixed in response to Sev's comments

* updated package version after rebase

* Amalgamation stepper fix (#624)

* Amalgamation stepper fix

* Fixed spacing more after discussion with Yui

* fixed icon size

* - app version = 5.6.39 (#625)

- disabled incorporator/organization code for amalgamations

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* 19179 Added Amalgamating Businesses unit tests (#626)

* - app version = 5.6.40
- added element ids
- updated LEAR business duplicate check
- added foreign business duplicate check
- misc cleanup
- added test suite (WIP)

* wip

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.41 (#627)

- added rest of unit tests

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.6.42 (#629)

- added isDraftTask to Amalgamating Business interface
- added business status tooltip for Draft Task error
- added amalgamation enum value
- added new test to amalgamation rules
- added fetch of first task
- added helper function to amalgamation mixin
- updated / added unit tests
- minor cleanup

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* Bump vite from 4.3.9 to 4.5.2 (#631)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.9 to 4.5.2.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.2/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.2/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 19359 - Amalgamating Businesses Table must have more than 1 (#628)

* Fixed amalgamating business length to be more than 1

* Rebased + fixed Sev's comment + added unit tests

* Fixed lint issues

* removed unneeded nextTick in tests

* 19040 Framework for short-form amalgamations (#630)

* - app version = 5.7.0
- updated App header/title
- added short-form amalgamation re-routing
- added short-form amalgamation resource loading
- updated Steppersimplified
- added short-form amalgamation return links, etc
- added short-form amalgamation route names
- delete unneeded data in regular amalgamation resources
- added short-form amalgamation resources and steps
- broke up routes in sub-files
- added short-form amalgamation routes
- updated some store getters
- combined views for regular + short-form
- added conditionals in views for differences
- added some computeds to keep template simple
- updated unit tests
- fixed missing effective date validity check

* - deleted unused incorporation agreement type

* - added option for Primary (vs Holding) Company

* - fixed unit tests

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* - app version = 5.7.1 (#634)

- don't show Add Person for short-form amalgamation
- set initial OfficeAddresses validity
- deleted unneeded data from amalg IF
- finished short amalg Office Addresses layout

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>

* Implemented the Continuation In Framework (#633)

* Implemented the Continuation In Framework

* some fixes related to continuation in interfaces

* Rebased + fix rebase issues + fixed in response to comments

* Small fixes in response to Sev's comments

* Fixed typo

* updated package version

* major upgrade to package.json

---------

Signed-off-by: Hongjing Chen <Hongjing.Chen@gov.bc.ca>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Hongjing <60866283+chenhongjing@users.noreply.github.com>
Co-authored-by: Kevin Zhang <54437031+kzdev420@users.noreply.github.com>
Co-authored-by: Séverin Beauvais <severinbeauvais@users.noreply.github.com>
Co-authored-by: Shaoyun Tong <144159934+tshyun24@users.noreply.github.com>
Co-authored-by: jamespaologarcia <james.paolo.p.garcia@gmail.com>
Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
Co-authored-by: leodube-aot <122323255+leodube-aot@users.noreply.github.com>
Co-authored-by: ketaki-deodhar <116035339+ketaki-deodhar@users.noreply.github.com>
Co-authored-by: Vysakh Menon <vysakh.menon@aot-technologies.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
11 people authored Jan 26, 2024
1 parent 207c90e commit a5248f7
Show file tree
Hide file tree
Showing 190 changed files with 9,955 additions and 1,170 deletions.
824 changes: 439 additions & 385 deletions package-lock.json

Large diffs are not rendered by default.

21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "business-create-ui",
"version": "5.6.0",
"version": "6.0.0",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
"scripts": {
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
"serve": "vite preview --port 8080",
"lint": "eslint . --ext .js,.ts,.vue",
"test:unit": "vitest run",
"test:coverage": "vitest run --coverage"
Expand All @@ -17,23 +17,25 @@
"@bcrs-shared-components/approval-type": "1.0.19",
"@bcrs-shared-components/base-address": "2.0.3",
"@bcrs-shared-components/breadcrumb": "2.1.15",
"@bcrs-shared-components/business-lookup": "1.1.30",
"@bcrs-shared-components/business-lookup": "1.2.5",
"@bcrs-shared-components/certify": "2.1.15",
"@bcrs-shared-components/completing-party": "2.1.30",
"@bcrs-shared-components/confirm-dialog": "1.2.1",
"@bcrs-shared-components/contact-info": "1.2.15",
"@bcrs-shared-components/corp-type-module": "1.0.11",
"@bcrs-shared-components/correct-name": "1.0.9",
"@bcrs-shared-components/corp-type-module": "1.0.15",
"@bcrs-shared-components/correct-name": "1.0.36",
"@bcrs-shared-components/court-order-poa": "3.0.11",
"@bcrs-shared-components/date-picker": "1.2.15",
"@bcrs-shared-components/document-delivery": "1.2.0",
"@bcrs-shared-components/effective-date-time": "1.1.15",
"@bcrs-shared-components/enums": "1.0.46",
"@bcrs-shared-components/enums": "1.1.7",
"@bcrs-shared-components/expandable-help": "1.0.1",
"@bcrs-shared-components/genesys-web-message": "1.0.0",
"@bcrs-shared-components/help-business-number": "1.1.1",
"@bcrs-shared-components/interfaces": "1.0.71",
"@bcrs-shared-components/interfaces": "1.1.5",
"@bcrs-shared-components/jurisdiction": "1.0.1",
"@bcrs-shared-components/limited-restoration-panel": "1.0.5",
"@bcrs-shared-components/mixins": "1.1.21",
"@bcrs-shared-components/mixins": "1.1.34",
"@bcrs-shared-components/nature-of-business": "1.2.14",
"@bcrs-shared-components/relationships-panel": "1.0.9",
"@bcrs-shared-components/staff-comments": "1.3.15",
Expand All @@ -45,6 +47,7 @@
"array-move": "^4.0.0",
"axios": "^0.27.2",
"core-js": "^3.30.1",
"country-list": "^2.2.0",
"http-status-codes": "^2.2.0",
"launchdarkly-js-client-sdk": "^2.24.2",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -89,7 +92,7 @@
"sass": "~1.32.13",
"sinon": "^14.0.2",
"typescript": "^4.5.5",
"vite": "4.3.9",
"vite": "4.5.2",
"vite-plugin-environment": "^1.1.3",
"vitest": "0.33.0",
"vue-class-component": "7.2.6",
Expand Down
117 changes: 91 additions & 26 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,9 @@
lg="9"
>
<header>
<h1>{{ getFilingName }}</h1>
<h1>{{ header }}</h1>
</header>

<p
v-if="isFirmDissolution"
class="mt-4"
Expand Down Expand Up @@ -249,18 +250,20 @@ import * as Views from '@/views'
// Mixins, interfaces, etc
import { CommonMixin, DateMixin, FilingTemplateMixin, NameRequestMixin } from '@/mixins'
import { AccountInformationIF, AddressIF, BreadcrumbIF, BusinessIF, BusinessWarningIF, CompletingPartyIF,
ConfirmDialogType, EmptyFees, FeesIF, FilingDataIF, NameRequestIF, OrgInformationIF, PartyIF, ResourceIF,
import { AccountInformationIF, AddressIF, BreadcrumbIF, BusinessWarningIF, CompletingPartyIF,
ConfirmDialogType, EmptyFees, FeesIF, FilingDataIF, OrgInformationIF, PartyIF, ResourceIF,
StepIF } from '@/interfaces'
import { DissolutionResources, IncorporationResources, RegistrationResources, RestorationResources,
import { AmalgamationRegResources, AmalgamationShortResources, ContinuationInResources,
DissolutionResources, IncorporationResources, RegistrationResources, RestorationResources,
getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb,
getSbcStaffDashboardBreadcrumb, getStaffDashboardBreadcrumb } from '@/resources'
import { AuthServices, LegalServices, PayServices } from '@/services/'
// Enums and Constants
import { EntityState, ErrorTypes, FilingCodes, FilingNames, FilingStatus, FilingTypes, NameRequestStates, RouteNames,
import { EntityStates, ErrorTypes, FilingCodes, FilingNames, FilingStatus, FilingTypes, NameRequestStates, RouteNames,
StaffPaymentOptions } from '@/enums'
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
@Component({
components: {
Expand Down Expand Up @@ -295,6 +298,10 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
@Getter(useStore) getUserLastName!: string
@Getter(useStore) getUserEmail!: string
@Getter(useStore) getUserPhone!: string
// @Getter(useStore) isAmalgamationFilingHorizontal!: boolean
// @Getter(useStore) isAmalgamationFilingRegular!: boolean
// @Getter(useStore) isAmalgamationFilingVertical!: boolean
@Getter(useStore) isContinuationInFiling!: boolean
@Getter(useStore) isDissolutionFiling!: boolean
@Getter(useStore) isIncorporationFiling!: boolean
@Getter(useStore) isMobile!: boolean
Expand All @@ -309,7 +316,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
@Action(useStore) setCurrentDate!: (x: string) => void
@Action(useStore) setCurrentJsDate!: (x: Date) => void
@Action(useStore) setCurrentStep!: (x: number) => void
@Action(useStore) setEntityState!: (x: EntityState) => void
@Action(useStore) setEntityState!: (x: EntityStates) => void
@Action(useStore) setFeePrices!: (x: Array<FeesIF>) => void
@Action(useStore) setFilingType!: (x: FilingTypes) => void
@Action(useStore) setGoodStanding!: (x: boolean) => void
Expand All @@ -319,7 +326,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
@Action(useStore) setLastAddressChangeDate!: (x: string) => void
@Action(useStore) setLastAnnualReportDate!: (x: string) => void
@Action(useStore) setLastDirectorChangeDate!: (x: string) => void
@Action(useStore) setNameRequest!: (x: NameRequestIF) => void
// @Action(useStore) setNameRequest!: (x: NameRequestIF) => void
@Action(useStore) setOperatingName!: (x: string) => void
@Action(useStore) setParties!: (x: Array<PartyIF>) => void
@Action(useStore) setResources!: (x: ResourceIF) => void
Expand Down Expand Up @@ -389,6 +396,19 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
return crumbs
}
/** The page header (title). */
get header (): string {
if (this.isAmalgamationFilingRegular) {
return `${this.getFilingName} (Regular)`
} else if (this.isAmalgamationFilingHorizontal) {
return `${this.getFilingName} (Horizontal Short-form)`
} else if (this.isAmalgamationFilingVertical) {
return `${this.getFilingName} (Vertical Short-form)`
} else {
return this.getFilingName
}
}
/** Data for fee summary component. */
get feeFilingData (): Array<FilingDataIF> {
let filingData = [] as Array<FilingDataIF>
Expand Down Expand Up @@ -455,7 +475,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
/** The About text. */
get aboutText (): string {
return import.meta.env.ABOUT_TEXT
const aboutApp = import.meta.env.ABOUT_APP
const aboutSbc = import.meta.env.ABOUT_SBC
return `${aboutApp}<br>${aboutSbc}`
}
/** Whether to use stepper view. */
Expand Down Expand Up @@ -675,14 +697,10 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
if (!this.getBusinessId && !this.getTempId) throw new Error('Neither business id nor temp id exist')
if (this.getBusinessId) {
// this should be a Dissolution or Restoration filing
// (only dissolutions/restorations have a business id)
await this.handleDissolutionOrRestoration(this.getBusinessId)
await this.handleDraftWithBusinessId(this.getBusinessId)
}
if (this.getTempId) {
// this should be an Incorporation or Registration filing
// (only incorporations/registrations have a temp id)
await this.handleIaOrRegistration(this.getTempId)
await this.handleDraftWithTempId(this.getTempId)
}
} catch (error) {
// Log exception to Sentry due to incomplete business data.
Expand Down Expand Up @@ -734,6 +752,18 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// then try to re-route them
if (this.$route.meta.filingType !== this.getFilingType) {
switch (this.getFilingType) {
case FilingTypes.AMALGAMATION_APPLICATION:
if (this.isAmalgamationFilingRegular) {
this.$router.push(RouteNames.AMALG_REG_INFORMATION).catch(() => {})
} else if (this.isAmalgamationFilingHorizontal || this.isAmalgamationFilingVertical) {
this.$router.push(RouteNames.AMALG_SHORT_INFORMATION).catch(() => {})
} else {
throw new Error('invalid amalgamation filing type')
}
return
case FilingTypes.CONTINUATION_IN:
this.$router.push(RouteNames.CONTINUATION_IN_BUSINESS_HOME).catch(() => {})
return
case FilingTypes.DISSOLUTION:
if (this.isTypeFirm) {
this.$router.push(RouteNames.DISSOLUTION_FIRM).catch(() => {})
Expand Down Expand Up @@ -777,7 +807,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
this.setCertifyState(
{
valid: this.getCertifyState.valid,
certifiedBy: userInfo.firstName
certifiedBy: userInfo.firstname
? `${userInfo.firstname} ${userInfo.lastname}`
: `${userInfo.lastname}`
}
Expand All @@ -795,8 +825,11 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
}
/** Fetches draft Dissolution or Restoration and sets the resources. */
private async handleDissolutionOrRestoration (businessId: string): Promise<void> {
/**
* Fetches draft Dissolution / Restoration and sets the resources.
* (Only dissolutions/restorations have a Business ID.)
*/
private async handleDraftWithBusinessId (businessId: string): Promise<void> {
// ensure user is authorized to use this business
await this.checkAuth(businessId).catch(error => {
console.log('Auth error =', error) // eslint-disable-line no-console
Expand Down Expand Up @@ -837,7 +870,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
resources = RestorationResources.find(x => x.entityType === this.getEntityType) as ResourceIF
break
default:
throw new Error(`handleDissolutionOrRestoration(): invalid filing type = ${this.getFilingType}`)
throw new Error(`handleDraftWithBusinessId(): invalid filing type = ${this.getFilingType}`)
}
// set the resources
Expand All @@ -854,8 +887,11 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
}
/** Fetches draft IA or Registration and sets the resources. */
private async handleIaOrRegistration (tempId: string): Promise<void> {
/**
* Fetches draft Amalgamation / IA / Registration and sets the resources.
* (Only amalgamations/incorporations/registrations have a Temp ID.)
*/
private async handleDraftWithTempId (tempId: string): Promise<void> {
// ensure user is authorized to use this IA
await this.checkAuth(tempId).catch(error => {
console.log('Auth error =', error) // eslint-disable-line no-console
Expand All @@ -876,6 +912,28 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// parse draft filing into the store and get the resources
let resources: ResourceIF
switch (this.getFilingType) {
case FilingTypes.AMALGAMATION_APPLICATION:
draftFiling = {
...this.buildAmalgamationFiling(),
...draftFiling
}
this.parseAmalgamationDraft(draftFiling)
if (this.isAmalgamationFilingRegular) {
resources = AmalgamationRegResources.find(x => x.entityType === this.getEntityType) as ResourceIF
} else if (this.isAmalgamationFilingHorizontal || this.isAmalgamationFilingVertical) {
resources = AmalgamationShortResources.find(x => x.entityType === this.getEntityType) as ResourceIF
} else {
throw new Error('invalid amalgamation filing type')
}
break
case FilingTypes.CONTINUATION_IN:
draftFiling = {
...this.buildContinuationInFiling(),
...draftFiling
}
this.parseContinuationInDraft(draftFiling)
resources = ContinuationInResources.find(x => x.entityType === this.getEntityType) as ResourceIF
break
case FilingTypes.INCORPORATION_APPLICATION:
draftFiling = {
...this.buildIncorporationFiling(),
Expand All @@ -893,7 +951,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
resources = RegistrationResources.find(x => x.entityType === this.getEntityType) as ResourceIF
break
default:
throw new Error(`handleIaOrRegistration(): invalid filing type = ${this.getFilingType}`)
throw new Error(`handleDraftWithTempId(): invalid filing type = ${this.getFilingType}`)
}
// set the resources
Expand Down Expand Up @@ -925,11 +983,17 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
const nrNumber = filing[filing.header?.name].nameRequest.nrNumber
// fetch NR data
const nrResponse = await LegalServices.fetchNameRequest(nrNumber).catch(error => {
const nrResponse = await LegalServices.fetchValidContactNr(nrNumber).catch(error => {
console.log('NR error =', error) // eslint-disable-line no-console
this.nameRequestInvalidErrorDialog = true
})
//
// The NR checks below are sort-of a duplicate of code in BusinessName.vue and
// ResultingBusinessName.vue, but we assume the other checks passed if the user
// was able to add the NR to this filing, so these checks should be sufficient.
//
// ensure NR was found
if (!nrResponse) {
this.nameRequestInvalidType = NameRequestStates.NOT_FOUND
Expand All @@ -947,7 +1011,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
}
// ensure types match
if (nrResponse.legalType !== this.getEntityType) {
if ((nrResponse.legalType as unknown as CorpTypeCd) !== this.getEntityType) {
console.log('NR legal type doesn\'t match entity type') // eslint-disable-line no-console
this.nameRequestInvalidType = NameRequestStates.INVALID
this.nameRequestInvalidErrorDialog = true
Expand Down Expand Up @@ -1145,9 +1209,7 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
/** Fetches and stores business info. */
private async loadBusinessInfo (businessId: string): Promise<void> {
const response = await LegalServices.fetchBusinessInfo(businessId)
const business = response?.data?.business as BusinessIF
const business = await LegalServices.fetchBusinessInfo(businessId).catch(() => {})
if (!business) {
throw new Error('Invalid business info')
Expand Down Expand Up @@ -1237,6 +1299,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// enable validation when review pages are shown
if (
this.isRouteName(RouteNames.AMALG_REG_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.AMALG_SHORT_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.CONTINUATION_IN_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.DISSOLUTION_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.INCORPORATION_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.REGISTRATION_REVIEW_CONFIRM) ||
Expand Down
7 changes: 6 additions & 1 deletion src/assets/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ p {
.message-box {
background-color: $BCgovGold0 !important;
border-color: $BCgovGold5 !important;
border-radius: 0;
border-radius: 0 !important;

p {
margin: 1.25rem;
Expand All @@ -299,6 +299,11 @@ p {
border-bottom: 1px dotted;
}

.text-decoration-dotted-underline {
text-decoration-style: dotted;
text-decoration-line: underline;
}

.section-container {
font-size: $px-16;
color: $gray7;
Expand Down
1 change: 1 addition & 0 deletions src/assets/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ $app-red: #d3272c; // same as the Vuetify theme error
$app-lt-blue: #e4edf7;
$app-dk-blue: #38598a; // same as the Vuetify theme appDkBlue
$app-lt-gray: rgba(0, 0, 0, 0.54); // used for overriding Vuetify red validation color for checkboxes
$app-orange: #f8661a; // same as the Vuetify theme warning

// Sizes for Fonts
$px-11: 0.6875rem;
Expand Down
Loading

0 comments on commit a5248f7

Please sign in to comment.