-
Notifications
You must be signed in to change notification settings - Fork 48
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -156,8 +156,9 @@ | |
lg="9" | ||
> | ||
<header> | ||
<h1>{{ getFilingName }}</h1> | ||
<h1>{{ header }}</h1> | ||
</header> | ||
|
||
<p | ||
v-if="isFirmDissolution" | ||
class="mt-4" | ||
|
@@ -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: { | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
@@ -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) { | ||
|
@@ -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 = { | ||
|
@@ -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 | ||
|
@@ -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) || | ||
|
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> | ||
|
||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
</script> | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,6 +184,7 @@ | |
<span>Add the Completing Party</span> | ||
</v-btn> | ||
|
||
<!-- *** FUTURE: don't show Add a Person for short-form amalgamation --> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
There was a problem hiding this comment.
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/