Skip to content

Commit

Permalink
18788 Updated amalgamation -> amalgamationApplication + business name…
Browse files Browse the repository at this point in the history
… options (WIP) (bcgov#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>
  • Loading branch information
2 people authored and JazzarKarim committed Jan 26, 2024
1 parent af0bf16 commit 98ba0a3
Show file tree
Hide file tree
Showing 23 changed files with 339 additions and 182 deletions.
84 changes: 35 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.6.13",
"version": "5.6.14",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand All @@ -23,19 +23,19 @@
"@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/correct-name": "1.0.33",
"@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.1.3",
"@bcrs-shared-components/enums": "1.1.5",
"@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.1.1",
"@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.29",
"@bcrs-shared-components/mixins": "1.1.33",
"@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 Down
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ import { AmalgamationRegResources, DissolutionResources, IncorporationResources,
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'
Expand Down Expand Up @@ -310,7 +310,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 Down Expand Up @@ -733,7 +733,7 @@ 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:
case FilingTypes.AMALGAMATION_APPLICATION:
this.$router.push(RouteNames.AMALG_REG_INFORMATION).catch(() => {})
return
case FilingTypes.DISSOLUTION:
Expand Down Expand Up @@ -884,7 +884,7 @@ 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:
case FilingTypes.AMALGAMATION_APPLICATION:
draftFiling = {
...this.buildAmalgamationFiling(),
...draftFiling
Expand Down
20 changes: 11 additions & 9 deletions src/components/Amalgamation/AmalgamatingBusinesses.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@
to add to this application.</span>

<BusinessLookup
:key="Math.random()"
:showErrors="false"
:businessLookup="initialBusinessLookupObject"
:businessLookup="{ ...EmptyBusinessLookup }"
:BusinessLookupServices="BusinessLookupServices"
legalTypes="BC,BEN,CC,ULC,A"
label="Business Name or Incorporation Number"
Expand Down Expand Up @@ -168,13 +169,13 @@

<template #action="{ attrs }">
<v-btn
color="error"
class="font-weight-bold"
text
color="white"
icon
aria-label="Close Notification"
v-bind="attrs"
@click="snackbar = false"
>
Close
<v-icon>mdi-close</v-icon>
</v-btn>
</template>
</v-snackbar>
Expand All @@ -190,7 +191,7 @@ import { BusinessLookupServices } from '@/services'
import { BusinessLookup } from '@bcrs-shared-components/business-lookup'
import { Jurisdiction } from '@bcrs-shared-components/jurisdiction'
import { AmalgamatingBusinessIF, BusinessLookupResultIF, EmptyBusinessLookup } from '@/interfaces'
import { AmlRoles, AmlTypes } from '@/enums'
import { AmlRoles, AmlTypes, EntityStates } from '@/enums'
import { JurisdictionLocation } from '@bcrs-shared-components/enums'
import BusinessTable from '@/components/Amalgamation/BusinessTable.vue'
import { CorpTypeCd } from '@bcrs-shared-components/corp-type-module'
Expand All @@ -209,16 +210,16 @@ export default class AmalgamatingBusinesses extends Mixins(AmalgamationMixin, Co
}
readonly BusinessLookupServices = BusinessLookupServices
readonly EmptyBusinessLookup = EmptyBusinessLookup
@Getter(useStore) getAmalgamatingBusinessesValid!: boolean
@Getter(useStore) getShowErrors!: boolean
@Getter(useStore) isAmalgamationFilingHorizontal!: boolean
// @Getter(useStore) isAmalgamationFilingHorizontal!: boolean
@Action(useStore) pushAmalgamatingBusiness!: (x: AmalgamatingBusinessIF) => void
@Action(useStore) setAmalgamatingBusinessesValid!: (x: boolean) => void
// Local properties
initialBusinessLookupObject = EmptyBusinessLookup
businessTableValid = false
snackbar = false
snackbarText = ''
Expand Down Expand Up @@ -322,7 +323,8 @@ export default class AmalgamatingBusinesses extends Mixins(AmalgamationMixin, Co
address: business.addresses.registeredOffice.mailingAddress,
isNotInGoodStanding: (business.businessInfo.goodStanding === false),
isFutureEffective: (business.firstFiling.isFutureEffective === true),
isLimitedRestoration: await this.isLimitedRestoration(business)
isLimitedRestoration: await this.isLimitedRestoration(business),
isHistorical: (business.businessInfo.state === EntityStates.HISTORICAL)
}
// Add the new business to the amalgamating businesses list.
Expand Down
3 changes: 3 additions & 0 deletions src/components/Amalgamation/BusinessStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ export default class BusinessStatus extends Vue {
return 'This business has a future effective filing. It cannot be part of an amalgamation ' +
'until all future effective filings have come into effect.'
case AmlStatuses.ERROR_HISTORICAL:
return 'This business is historical. It cannot be part of an amalgamation.'
case AmlStatuses.ERROR_LIMITED_RESTORATION:
return 'This business is under limited restoration. It cannot be part of an amalgamation ' +
'unless it is fully restored.'
Expand Down
Loading

0 comments on commit 98ba0a3

Please sign in to comment.