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

19040 Framework for short-form amalgamations #630

Merged
merged 4 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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-create-ui",
"version": "5.6.43",
"version": "5.7.0",
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Jan 19, 2024

Choose a reason for hiding this comment

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

This is the start of a new feature, but not an Earth-shattering change to this UI, so I think increasing the minor release is appropriate.

Ref: https://semver.org/

"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
48 changes: 39 additions & 9 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 @@ -250,17 +251,18 @@ import * as Views from '@/views'
// Mixins, interfaces, etc
import { CommonMixin, DateMixin, FilingTemplateMixin, NameRequestMixin } from '@/mixins'
import { AccountInformationIF, AddressIF, BreadcrumbIF, BusinessWarningIF, CompletingPartyIF,
ConfirmDialogType, EmptyFees, FeesIF, FilingDataIF, NameRequestIF, OrgInformationIF, PartyIF, ResourceIF,
ConfirmDialogType, EmptyFees, FeesIF, FilingDataIF, OrgInformationIF, PartyIF, ResourceIF,
StepIF } from '@/interfaces'
import { AmalgamationRegResources, DissolutionResources, IncorporationResources, RegistrationResources,
RestorationResources, getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb,
import { AmalgamationRegResources, AmalgamationShortResources, DissolutionResources, IncorporationResources,
RegistrationResources, RestorationResources, getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb,
getRegistryDashboardBreadcrumb, getSbcStaffDashboardBreadcrumb, getStaffDashboardBreadcrumb } from '@/resources'
import { AuthServices, LegalServices, PayServices } from '@/services/'

// Enums and Constants
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,7 +297,9 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
@Getter(useStore) getUserLastName!: string
@Getter(useStore) getUserEmail!: string
@Getter(useStore) getUserPhone!: string
@Getter(useStore) isAmalgamationFiling!: boolean
// @Getter(useStore) isAmalgamationFilingHorizontal!: boolean
// @Getter(useStore) isAmalgamationFilingRegular!: boolean
// @Getter(useStore) isAmalgamationFilingVertical!: boolean
Copy link
Collaborator Author

@severinbeauvais severinbeauvais Jan 23, 2024

Choose a reason for hiding this comment

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

Already imported via a mixin, but this shows a future developer that it would otherwise need to be declared here (instead of omitting this altogether and a developer wouldn't know where the declaration came from).

@Getter(useStore) isDissolutionFiling!: boolean
@Getter(useStore) isIncorporationFiling!: boolean
@Getter(useStore) isMobile!: boolean
Expand All @@ -320,7 +324,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) setParties!: (x: Array<PartyIF>) => void
@Action(useStore) setResources!: (x: ResourceIF) => void
@Action(useStore) setUserAddress!: (x: AddressIF) => void
Expand Down Expand Up @@ -389,6 +393,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
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This text is specific to the app title so I didn't move it into the store.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be a good idea to those names to the FilingNames shared enum Sev?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This exact text is only used here, so I don't think there's a good reason to move it there.


/** Data for fee summary component. */
get feeFilingData (): Array<FilingDataIF> {
let filingData = [] as Array<FilingDataIF>
Expand Down Expand Up @@ -733,7 +750,13 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
if (this.$route.meta.filingType !== this.getFilingType) {
switch (this.getFilingType) {
case FilingTypes.AMALGAMATION_APPLICATION:
this.$router.push(RouteNames.AMALG_REG_INFORMATION).catch(() => {})
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.DISSOLUTION:
if (this.isTypeFirm) {
Expand Down Expand Up @@ -889,7 +912,13 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
...draftFiling
}
this.parseAmalgamationDraft(draftFiling)
resources = AmalgamationRegResources.find(x => x.entityType === this.getEntityType) as ResourceIF
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.INCORPORATION_APPLICATION:
draftFiling = {
Expand Down Expand Up @@ -968,7 +997,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) {
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -1252,6 +1281,7 @@ 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.DISSOLUTION_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.INCORPORATION_REVIEW_CONFIRM) ||
this.isRouteName(RouteNames.REGISTRATION_REVIEW_CONFIRM) ||
Expand Down
5 changes: 4 additions & 1 deletion src/components/Amalgamation/BusinessTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export default class BusinessTable extends Mixins(AmalgamationMixin) {
readonly GetCorpFullDescription = GetCorpFullDescription

@Getter(useStore) getNameRequestApprovedName!: string
// @Getter(useStore) isAmalgamationFilingHorizontal!: boolean
// @Getter(useStore) isAmalgamationFilingVertical!: boolean

@Action(useStore) spliceAmalgamatingBusiness!: (x: number) => void

Expand Down Expand Up @@ -162,7 +164,8 @@ export default class BusinessTable extends Mixins(AmalgamationMixin) {

role (item: AmalgamatingBusinessIF): string {
if (item.role === AmlRoles.AMALGAMATING) return 'Amalgamating Business'
if (item.role === AmlRoles.HOLDING) return 'Holding Company'
if (item.role === AmlRoles.HOLDING && this.isAmalgamationFilingHorizontal) return 'Primary Company'
if (item.role === AmlRoles.HOLDING && this.isAmalgamationFilingVertical) return 'Holding Company'
return '(Unknown)' // should never happen
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/Amalgamation/BusinessTableSummary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export default class BusinessTableSummary extends Vue {
readonly AmlTypes = AmlTypes

@Getter(useStore) getAmalgamatingBusinesses!: AmalgamatingBusinessIF[]
@Getter(useStore) isAmalgamationFilingHorizontal!: boolean
@Getter(useStore) isAmalgamationFilingVertical!: boolean

key (item: AmalgamatingBusinessIF): string {
if (item?.type === AmlTypes.LEAR) return item.identifier
Expand Down Expand Up @@ -102,7 +104,8 @@ export default class BusinessTableSummary extends Vue {

role (item: AmalgamatingBusinessIF): string {
if (item.role === AmlRoles.AMALGAMATING) return 'Amalgamating Business'
if (item.role === AmlRoles.HOLDING) return 'Holding Company'
if (item.role === AmlRoles.HOLDING && this.isAmalgamationFilingHorizontal) return 'Primary Company'
if (item.role === AmlRoles.HOLDING && this.isAmalgamationFilingVertical) return 'Holding Company'
return '(Unknown)' // should never happen
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/common/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export default class Actions extends Mixins(AmalgamationMixin, CommonMixin,
get isSummaryStep (): boolean {
return (
this.$route.name === RouteNames.AMALG_REG_REVIEW_CONFIRM ||
this.$route.name === RouteNames.AMALG_SHORT_REVIEW_CONFIRM ||
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
this.$route.name === RouteNames.DISSOLUTION_REVIEW_CONFIRM ||
this.$route.name === RouteNames.INCORPORATION_REVIEW_CONFIRM ||
this.$route.name === RouteNames.REGISTRATION_REVIEW_CONFIRM ||
Expand Down
17 changes: 13 additions & 4 deletions src/components/common/CardHeader.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<template>
<header class="v-card-header rounded-t">
<v-icon color="appDkBlue">
<v-icon
v-if="icon"
color="appDkBlue"
>
{{ icon }}
</v-icon>
<label class="v-card-label pl-2">{{ label }}</label>
<label
v-if="label"
class="v-card-label"
:class="{ 'pl-2': !!icon }"
>
{{ label }}
</label>
</header>
</template>

Expand All @@ -12,8 +21,8 @@ import { Component, Prop, Vue } from 'vue-property-decorator'

@Component({})
export default class CardHeader extends Vue {
@Prop({ required: true }) readonly icon!: string
@Prop({ required: true }) readonly label!: string
@Prop({ default: null }) readonly icon!: string
@Prop({ default: null }) readonly label!: string
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I updated this component to have optional icon (or label) so I could use it for this:

image

}
</script>

Expand Down
16 changes: 14 additions & 2 deletions src/components/common/ListPeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,31 @@
<span>
<v-icon color="error">mdi-information-outline</v-icon>
<span class="error-text mx-1">This step is unfinished.</span>

<router-link
v-if="isAmalgamationFiling"
v-if="isAmalgamationFilingRegular"
id="router-link"
:to="{ path: `/${RouteNames.AMALG_REG_PEOPLE_ROLES}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isAmalgamationFilingHorizontal || isAmalgamationFilingVertical"
id="router-link"
:to="{ path: `/${RouteNames.AMALG_SHORT_PEOPLE_ROLES}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isIncorporationFiling"
id="router-link"
:to="{ path: `/${RouteNames.INCORPORATION_PEOPLE_ROLES}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isRegistrationFiling"
id="router-link"
:to="{ path: `/${RouteNames.REGISTRATION_PEOPLE_ROLES}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isFullRestorationFiling || isLimitedRestorationFiling"
id="router-link"
Expand Down Expand Up @@ -233,7 +243,9 @@ export default class ListPeopleAndRoles extends Mixins(CommonMixin) {

@Getter(useStore) getAddPeopleAndRoleStep!: PeopleAndRoleIF
@Getter(useStore) getShowErrors!: boolean
@Getter(useStore) isAmalgamationFiling!: boolean
@Getter(useStore) isAmalgamationFilingHorizontal!: boolean
@Getter(useStore) isAmalgamationFilingRegular!: boolean
@Getter(useStore) isAmalgamationFilingVertical!: boolean
@Getter(useStore) isFullRestorationFiling!: boolean
@Getter(useStore) isIncorporationFiling!: boolean
@Getter(useStore) isLimitedRestorationFiling!: boolean
Expand Down
6 changes: 6 additions & 0 deletions src/components/common/ListShareClass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@
<span>
<v-icon color="error">mdi-information-outline</v-icon>
<span class="error-text mx-1">This step is unfinished.</span>

<!--
This return link is only for regular amalgamations, since short-form amalgamations adopt
their shares from the holding/primary company and therefore can't be in error nor edited.
-->
<router-link
v-if="isAmalgamationFiling"
id="router-link"
:to="{ path: `/${RouteNames.AMALG_REG_SHARE_STRUCTURE}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isIncorporationFiling"
id="router-link"
Expand Down
1 change: 1 addition & 0 deletions src/components/common/PeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
<span>Add the Completing Party</span>
</v-btn>

<!-- *** FUTURE: don't show Add a Person for short-form amalgamation -->
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll keep working on some of the FUTURE things in this ticket/PR, or maybe a future PR if we need this code merged soon.

<v-btn
id="btn-add-person"
outlined
Expand Down
9 changes: 7 additions & 2 deletions src/components/common/Stepper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ import { RegistrationStateIF } from '@/interfaces'

@Component({})
export default class Stepper extends Vue {
@Getter(useStore) isAmalgamationInformationRegValid!: boolean
@Getter(useStore) getRegistration!: RegistrationStateIF
@Getter(useStore) getShowErrors!: boolean
@Getter(useStore) getSteps!: Array<any>
@Getter(useStore) getValidateSteps!: boolean
@Getter(useStore) isAddPeopleAndRolesValid!: boolean
@Getter(useStore) isAffidavitValid!: boolean
@Getter(useStore) isAmalgamationInformationValid!: boolean
@Getter(useStore) isBusySaving!: boolean
@Getter(useStore) isCreateShareStructureValid!: boolean
@Getter(useStore) isDefineCompanyValid!: boolean
Expand All @@ -91,12 +91,17 @@ export default class Stepper extends Vue {
/** Returns true if the step route is valid. */
isValid (route: RouteNames): boolean {
switch (route) {
case RouteNames.AMALG_REG_INFORMATION: return this.isAmalgamationInformationRegValid
case RouteNames.AMALG_REG_INFORMATION: return this.isAmalgamationInformationValid
case RouteNames.AMALG_REG_BUSINESS_INFO: return this.isDefineCompanyValid
case RouteNames.AMALG_REG_PEOPLE_ROLES: return this.isAddPeopleAndRolesValid
case RouteNames.AMALG_REG_SHARE_STRUCTURE: return this.isCreateShareStructureValid
case RouteNames.AMALG_REG_REVIEW_CONFIRM: return this.isFilingValid

case RouteNames.AMALG_SHORT_INFORMATION: return this.isAmalgamationInformationValid
case RouteNames.AMALG_SHORT_BUSINESS_INFO: return this.isDefineCompanyValid
case RouteNames.AMALG_SHORT_PEOPLE_ROLES: return this.isAddPeopleAndRolesValid
case RouteNames.AMALG_SHORT_REVIEW_CONFIRM: return this.isFilingValid

case RouteNames.DISSOLUTION_AFFIDAVIT: return this.isAffidavitValid
case RouteNames.DISSOLUTION_DEFINE_DISSOLUTION: return this.isDissolutionDefineDissolutionValid
case RouteNames.DISSOLUTION_RESOLUTION: return this.isResolutionValid
Expand Down
Loading
Loading