Skip to content

Commit

Permalink
- app version = 5.7.0
Browse files Browse the repository at this point in the history
- framework for short-form amalgamations
- misc cleanup and updates
- WIP
  • Loading branch information
Severin Beauvais committed Jan 23, 2024
1 parent 7ae92bf commit 67a5e17
Show file tree
Hide file tree
Showing 50 changed files with 880 additions and 589 deletions.
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",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
49 changes: 40 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
@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
}
}
/** 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 @@ -884,12 +907,19 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
let resources: ResourceIF
switch (this.getFilingType) {
case FilingTypes.AMALGAMATION_APPLICATION:
// *** TODO: review/clean up this code
draftFiling = {
...this.buildAmalgamationFiling(),
...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 +998,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 @@ -1252,6 +1282,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
2 changes: 1 addition & 1 deletion src/components/common/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,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.AMALGAMATION_REVIEW_CONFIRM ||
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
}
</script>

Expand Down
6 changes: 5 additions & 1 deletion src/components/common/ListPeopleAndRoles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@
<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"
id="router-link"
:to="{ path: `/${RouteNames.AMALG_REG_PEOPLE_ROLES}` }"
:to="{ path: `/${RouteNames.AMALGAMATION_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
8 changes: 7 additions & 1 deletion 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}` }"
:to="{ path: `/${RouteNames.AMALGAMATION_SHARE_STRUCTURE}` }"
>Return to this step to finish it</router-link>

<router-link
v-if="isIncorporationFiling"
id="router-link"
Expand Down
12 changes: 6 additions & 6 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,11 +91,11 @@ 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_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.AMALGAMATION_INFORMATION: return this.isAmalgamationInformationValid
case RouteNames.AMALGAMATION_BUSINESS_INFO: return this.isDefineCompanyValid
case RouteNames.AMALGAMATION_PEOPLE_ROLES: return this.isAddPeopleAndRolesValid
case RouteNames.AMALGAMATION_SHARE_STRUCTURE: return this.isCreateShareStructureValid
case RouteNames.AMALGAMATION_REVIEW_CONFIRM: return this.isFilingValid
case RouteNames.DISSOLUTION_AFFIDAVIT: return this.isAffidavitValid
case RouteNames.DISSOLUTION_DEFINE_DISSOLUTION: return this.isDissolutionDefineDissolutionValid
Expand Down
33 changes: 25 additions & 8 deletions src/components/common/SummaryDefineCompany.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,29 @@
<v-icon color="error">mdi-information-outline</v-icon>
<span class="error-text mx-1">This step is unfinished.</span>

<template v-if="isAmalgamationFiling">
<template v-if="isAmalgamationFilingRegular">
<router-link
v-if="!isAmalgamationInformationRegValid"
v-if="!isAmalgamationInformationValid"
:to="{ path: `/${RouteNames.AMALG_REG_INFORMATION}` }"
>Return to this step to finish it</router-link>
<!-- *** TODO: isDefineCompanyValid needs to be VALID for short-form amalgamations -->
<router-link
v-else-if="!isDefineCompanyValid"
:to="{ path: `/${RouteNames.AMALG_REG_BUSINESS_INFO}` }"
>Return to this step to finish it</router-link>
</template>

<template v-if="isAmalgamationFilingHorizontal || isAmalgamationFilingVertical">
<router-link
v-if="!isAmalgamationInformationValid"
:to="{ path: `/${RouteNames.AMALG_SHORT_INFORMATION}` }"
>Return to this step to finish it</router-link>
<router-link
v-else-if="!isDefineCompanyValid"
:to="{ path: `/${RouteNames.AMALG_SHORT_BUSINESS_INFO}` }"
>Return to this step to finish it</router-link>
</template>

<router-link
v-if="isIncorporationFiling"
:to="{ path: `/${RouteNames.INCORPORATION_DEFINE_COMPANY}` }"
Expand Down Expand Up @@ -50,10 +62,7 @@
class="pt-4 pt-sm-0"
>
<div id="amalgamation-type">
<span v-if="isAmalgamationFilingRegular">Regular</span>
<span v-else-if="isAmalgamationFilingHorizontal">Horizontal</span>
<span v-else-if="isAmalgamationFilingVertical">Vertical</span>
<span v-else>[Unknown]</span>
{{ amalgamationType || '[Unknown]' }}
</div>
</v-col>
</v-row>
Expand Down Expand Up @@ -205,11 +214,11 @@ export default class SummaryDefineCompany extends Vue {
@Getter(useStore) getFolioNumber!: string
@Getter(useStore) getNameRequestApprovedName!: string
@Getter(useStore) getNameTranslations!: NameTranslationIF[]
@Getter(useStore) isAmalgamationInformationRegValid!: boolean
@Getter(useStore) isAmalgamationFiling!: boolean
@Getter(useStore) isAmalgamationFilingRegular!: boolean
@Getter(useStore) isAmalgamationFilingHorizontal!: boolean
@Getter(useStore) isAmalgamationFilingVertical!: boolean
@Getter(useStore) isAmalgamationInformationValid!: boolean
@Getter(useStore) isDefineCompanyValid!: boolean
@Getter(useStore) isFullRestorationFiling!: boolean
@Getter(useStore) isIncorporationFiling!: boolean
Expand All @@ -222,11 +231,19 @@ export default class SummaryDefineCompany extends Vue {
/** Whether this section is invalid. */
get invalidSection (): boolean {
if (this.isAmalgamationFiling) {
return (!this.isAmalgamationInformationRegValid || !this.isDefineCompanyValid)
// *** TODO: need to update this for short-form amalgamation?
return (!this.isAmalgamationInformationValid || !this.isDefineCompanyValid)
}
return !this.isDefineCompanyValid
}
get amalgamationType (): string {
if (this.isAmalgamationFilingRegular) return 'Regular'
if (this.isAmalgamationFilingHorizontal) return 'Horizontal'
if (this.isAmalgamationFilingVertical) return 'Vertical'
return null
}
/** The company name. */
get companyName (): string {
// check if we have a name from a NR
Expand Down
20 changes: 13 additions & 7 deletions src/enums/routeNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ export enum RouteNames {
SIGN_IN = 'signin',
SIGN_OUT = 'signout',

// Amalgamation (regular) route names
AMALG_REG_BUSINESS_INFO = 'amalg-reg-business-info',
AMALG_REG_INFORMATION = 'amalg-reg-information',
AMALG_REG_PEOPLE_ROLES = 'amalg-reg-people-roles',
AMALG_REG_REVIEW_CONFIRM = 'amalg-reg-review-confirm',
AMALG_REG_SHARE_STRUCTURE = 'amalg-reg-share-structure',

// Amalgamation (horizontal and vertical short-form) route names
AMALG_SHORT_BUSINESS_INFO = 'amalg-short-business-info',
AMALG_SHORT_INFORMATION = 'amalg-short-information',
AMALG_SHORT_PEOPLE_ROLES = 'amalg-short-people-roles',
AMALG_SHORT_REVIEW_CONFIRM = 'amalg-short-review-confirm',

// Dissolution route names
DISSOLUTION_AFFIDAVIT = 'dissolution-affidavit',
DISSOLUTION_DEFINE_DISSOLUTION = 'dissolution-define-dissolution',
Expand Down Expand Up @@ -34,11 +47,4 @@ export enum RouteNames {
RESTORATION_BUSINESS_INFORMATION = 'restoration-business-information',
RESTORATION_BUSINESS_NAME = 'restoration-business-name',
RESTORATION_REVIEW_CONFIRM = 'restoration-review-confirm',

// Amalgamation (regular) route names
AMALG_REG_BUSINESS_INFO = 'amalg-reg-business-info',
AMALG_REG_INFORMATION = 'amalg-reg-information',
AMALG_REG_PEOPLE_ROLES = 'amalg-reg-people-roles',
AMALG_REG_REVIEW_CONFIRM = 'amalg-reg-review-confirm',
AMALG_REG_SHARE_STRUCTURE = 'amalg-reg-share-structure',
}
12 changes: 6 additions & 6 deletions src/enums/views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ export enum Views {
SIGN_IN = 'signin',
SIGN_OUT = 'signout',

// Amalgamation views
AMALGAMATION_REG_BUSINESS_INFO = 'amalg-reg-business-info',
AMALGAMATION_REG_INFORMATION = 'amalg-reg-information',
AMALGAMATION_REG_PEOPLE_ROLES = 'amalg-reg-people-roles',
AMALGAMATION_REG_REVIEW_CONFIRM = 'amalg-reg-review-confirm',
AMALGAMATION_REG_SHARE_STRUCTURE = 'amalg-reg-share-structure',
// Amalgamation (regular and short-form) views
AMALGAMATION_BUSINESS_INFO = 'amalgamation-business-info',
AMALGAMATION_INFORMATION = 'amalgamation-information',
AMALGAMATION_PEOPLE_ROLES = 'amalgamation-people-roles',
AMALGAMATION_REVIEW_CONFIRM = 'amalgamation-review-confirm',
AMALGAMATION_SHARE_STRUCTURE = 'amalgamation-share-structure', // regular only

// Dissolution views
DISSOLUTION_AFFIDAVIT = 'dissolution-affidavit',
Expand Down
Loading

0 comments on commit 67a5e17

Please sign in to comment.