-
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
Final Framework Changes/Fixes for Regular Amalgamation #608
Changes from all commits
a0171ac
7a2d299
9615151
95309f8
fc70595
d8552be
2ded246
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 |
---|---|---|
|
@@ -33,7 +33,7 @@ export default class AmalgamationMixin extends Vue { | |
this.cccMismatch, | ||
this.foreignUnlimited2, | ||
this.xproUlcCcc, | ||
// this.needBcCompany, | ||
this.needBcCompany, | ||
this.foreignHorizontal | ||
] | ||
|
||
|
@@ -119,7 +119,7 @@ export default class AmalgamationMixin extends Vue { | |
xproUlcCcc (business: AmalgamatingBusinessIF): AmlStatuses { | ||
if ( | ||
business.type === AmlTypes.FOREIGN && | ||
(!this.isTypeBcUlcCompany || !this.isTypeBcCcc) | ||
(this.isTypeBcUlcCompany || this.isTypeBcCcc) | ||
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 believe the logic here is incorrect. I've been playing around with this and noticed it's incorrect. We want to show this rule when the type is ULC or CCC not the other way around. I've been getting this rule when I was on a Limited company amalgamation with Foreign companies. Please correct me if I'm wrong. 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 think you are correct (as per the comment on line 118) 👍 Thanks for playing around and verifying stuff :) |
||
) { | ||
return AmlStatuses.ERROR_XPRO_ULC_CCC | ||
} | ||
|
@@ -138,17 +138,13 @@ export default class AmalgamationMixin extends Vue { | |
return null | ||
} | ||
|
||
// NOT CURRENTLY USED | ||
// /** | ||
// * Disallow only foreign businesses (including EPs). | ||
// * (An amalgamation where all TINGs are foreign will be Phase 2.) | ||
// */ | ||
// needBcCompany (): AmlStatuses { | ||
// if (this.isAllForeignOrEp) { | ||
// return AmlStatuses.ERROR_NEED_BC_COMPANY | ||
// } | ||
// return null | ||
// } | ||
/** Disallow if there are no BC Companies. */ | ||
needBcCompany (): AmlStatuses { | ||
if (!this.isAnyBcCompany) { | ||
return AmlStatuses.ERROR_NEED_BC_COMPANY | ||
} | ||
return null | ||
} | ||
|
||
/** Disallow if foreign in a short-form horizontal amalgamation. */ | ||
foreignHorizontal (business: AmalgamatingBusinessIF): AmlStatuses { | ||
|
@@ -205,9 +201,8 @@ export default class AmalgamationMixin extends Vue { | |
async refetchAmalgamatingBusinessesInfo (): Promise<void> { | ||
const fetchTingInfo = async (item: any): Promise<AmalgamatingBusinessIF> => { | ||
const tingBusiness = await this.fetchAmalgamatingBusinessInfo(item) | ||
// *** TODO: need to improve this | ||
// (no auth info means not affiliated, which may or may not be foreign) | ||
if (!tingBusiness.authInfo) { | ||
// no auth info and business info means foreign, otherwise LEAR (affiliated or non-affiliated) | ||
if (!tingBusiness.authInfo && !tingBusiness.businessInfo) { | ||
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. So I've tested this extensively. We have two cases now. If the tingBusiness does not have both authInfo and businessInfo, then it's a Foreign. If it does, then it's LEAR. However, please see next comment. |
||
return { | ||
type: AmlTypes.FOREIGN, | ||
role: AmlRoles.AMALGAMATING, | ||
|
@@ -221,9 +216,9 @@ export default class AmalgamationMixin extends Vue { | |
role: AmlRoles.AMALGAMATING, | ||
identifier: tingBusiness.businessInfo.identifier, | ||
name: tingBusiness.businessInfo.legalName, | ||
email: tingBusiness.authInfo.contacts[0].email, | ||
email: tingBusiness.authInfo?.contacts[0].email || null, | ||
legalType: tingBusiness.businessInfo.legalType, | ||
address: tingBusiness.addresses.registeredOffice.mailingAddress, | ||
address: tingBusiness.addresses?.registeredOffice.mailingAddress || null, | ||
isNotInGoodStanding: (tingBusiness.businessInfo.goodStanding === false), | ||
isFutureEffective: (tingBusiness.firstFiling.isFutureEffective === true), | ||
isLimitedRestoration: await this.isLimitedRestoration(tingBusiness) | ||
|
@@ -241,11 +236,6 @@ export default class AmalgamationMixin extends Vue { | |
// (not all are used atm) | ||
// | ||
|
||
/** True if all companies in the table are foreign. */ | ||
get isAllForeign (): boolean { | ||
return this.getAmalgamatingBusinesses.every(business => (business.type === AmlTypes.FOREIGN)) | ||
} | ||
|
||
/** True if there a foreign company in the table. */ | ||
get isAnyForeign (): boolean { | ||
return this.getAmalgamatingBusinesses.some(business => (business.type === AmlTypes.FOREIGN)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,21 +241,6 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM | |
// restore the amalgamating businesses array | ||
if (draftFiling.amalgamationApplication.amalgamatingBusinesses) { | ||
this.setAmalgamatingBusinesses([ | ||
// *** TODO: remove static items when they are no longer needed for testing | ||
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. Obsolete. |
||
// { | ||
// type: AmlTypes.FOREIGN, | ||
// corpNumber: 'XYZ789', | ||
// legalName: 'Ice Cream Sandwich Canada', | ||
// foreignJurisdiction: { region: 'FEDERAL', country: 'CA' }, | ||
// role: AmlRoles.AMALGAMATING | ||
// }, | ||
// { | ||
// type: AmlTypes.FOREIGN, | ||
// corpNumber: 'ABC123', | ||
// legalName: 'Gingerbread USA', | ||
// foreignJurisdiction: { country: 'US' }, | ||
// role: AmlRoles.AMALGAMATING | ||
// }, | ||
...draftFiling.amalgamationApplication.amalgamatingBusinesses | ||
]) | ||
this.refetchAmalgamatingBusinessesInfo() | ||
|
@@ -267,8 +252,6 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM | |
} | ||
|
||
// restore Office Addresses | ||
// *** TODO: verify whether we need to assign fallback | ||
// *** also fix IAs and registrations the same way? | ||
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've looked into this, and I don't see the benefit of assigning a fallback. Please correct me if I'm wrong. 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. What I was thinking here is that, if the draft filing doesn't contain office addresses, we'd assign a safe fallback value (eg, empty object?). Similarly to what we do if don't have parties or shareClasses to restore. However, theoretically the store has safe initial values for offices / parties / shareClasses, so the correct code is "set the value in the store only if the draft contains the value", which is what lines 272-273 already do. But I'm not certain that our code is consistently doing the right thing everywhere. For example: You'd think the fallback to an empty array wouldn't be needed, but in fact parties is initialized to null in the store. It should probably be initialized to an empty array, but I don't know if that will break other filings. So, to move forward with this, either we try to fix the code now and test well, or we ignore this for now and test well (this is safe but won't resolve the code issues). 🤷♂️ 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. Makes a lot of sense. Sev, I'll be tackling and looking into this more in next commit. |
||
if (draftFiling.amalgamationApplication.offices) { | ||
this.setOfficeAddresses(draftFiling.amalgamationApplication.offices) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
<h2>1. Create Your Authorized Share Structure</h2> | ||
</header> | ||
|
||
<p id="incorporation-share-structure"> | ||
<p id="amalgamation-regular-share-structure"> | ||
Add at least one class of shares. A share class consists of the name of the class, the | ||
maximum number of shares in the class (including any associated Series), a par value for | ||
the class, and the currency the shares are valued in. | ||
|
@@ -35,7 +35,7 @@ | |
</header> | ||
|
||
<p> | ||
An incorporated business must issue shares. These shares represent ownership interest in | ||
An amalgamated business must issue shares. These shares represent ownership interest in | ||
the company and give the shareholder a say in how the company is being run. For most | ||
small companies starting out, a simple share structure with just one class of shares (and | ||
no series) is typical. | ||
|
@@ -66,11 +66,11 @@ | |
The staff at the Corporate Registry cannot provide advice on how to set up your company's | ||
share structure. If you do not understand what an authorized share structure is or what | ||
its purpose is or believe you need a more complex share structure, you should seek | ||
professional advice or purchase an incorporation guide for detailed information and | ||
professional advice or purchase an amalgamation guide for detailed information and | ||
infrastructure on establishing an authorized share structure. | ||
</p> | ||
<p> | ||
Refer to this <a :href="helpLink">link</a> to obtain more information on incorporating a company. | ||
Refer to this <a :href="helpLink">link</a> to obtain more information on amalgamating a company. | ||
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. Spoke to Janis about the wording and link here. She says it's OK here. |
||
</p> | ||
<u | ||
class="help-btn" | ||
|
@@ -192,7 +192,7 @@ export default class AmalgamationRegularShareStructure extends Mixins(CommonMixi | |
}] | ||
|
||
readonly helpLink = 'https://www2.gov.bc.ca/gov/content/employment-business/business/' + | ||
'managing-a-business/permits-licences/businesses-incorporated-companies' | ||
'managing-a-business/permits-licences/businesses-incorporated-companies/incorporated-companies#amalgamate' | ||
|
||
showShareStructureForm = false | ||
currentShareStructure = null as ShareClassIF | ||
|
@@ -316,14 +316,14 @@ export default class AmalgamationRegularShareStructure extends Mixins(CommonMixi | |
|
||
@Watch('$route') | ||
private async scrollToInvalidComponent (): Promise<void> { | ||
if (this.getShowErrors && this.$route.name === RouteNames.INCORPORATION_SHARE_STRUCTURE) { | ||
if (this.getShowErrors && this.$route.name === RouteNames.AMALG_REG_SHARE_STRUCTURE) { | ||
// scroll to invalid components | ||
await this.$nextTick() | ||
await this.validateAndScroll( | ||
{ | ||
shareStructure: this.getCreateShareStructureStep.valid | ||
}, | ||
['incorporation-share-structure'] | ||
['amalgamation-regular-share-structure'] | ||
) | ||
} | ||
} | ||
|
@@ -349,7 +349,7 @@ li { | |
padding-top: 0.25rem; | ||
} | ||
|
||
p{ | ||
p { | ||
padding-top: 0.5rem; | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Vue from 'vue' | ||
import { wrapperFactory } from '../jest-wrapper-factory' | ||
import { wrapperFactory } from '../vitest-wrapper-factory' | ||
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. Changed the name here as that's been done in other UIs. |
||
import AgreementType from '@/components/common/AgreementType.vue' | ||
import { CorpTypeCd, GetCorpFullDescription } from '@bcrs-shared-components/corp-type-module' | ||
|
||
|
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.
Spoke to Mihai about this. We indeed need as it is in the legacy system:
I've tested it, it works:
Please note the changes too in the other files accompanying this.