-
Notifications
You must be signed in to change notification settings - Fork 49
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
19041 Finished validations + updated certify statements + updated unit tests #646
Changes from all 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 |
---|---|---|
|
@@ -163,7 +163,7 @@ export default class EffectiveDateTime extends Mixins(DateMixin) { | |
dateTimeForm: FormIF | ||
} | ||
|
||
@Prop({ default: null }) readonly effectiveDateTime!: EffectiveDateTimeIF | ||
@Prop({ required: true }) readonly effectiveDateTime!: EffectiveDateTimeIF | ||
|
||
@Prop({ default: 'Incorporation Date and Time' }) readonly label!: string | ||
|
||
|
@@ -238,7 +238,7 @@ export default class EffectiveDateTime extends Mixins(DateMixin) { | |
|
||
/** Construct the Date Object for storage */ | ||
private constructDate (): void { | ||
if (this.isFutureEffective) { | ||
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 failed when dateText was empty string (eg, when changing from immediate to future-effective) -- dateToValidate on line 243 became null and either line 250 or line 257 caused an exception. |
||
if (this.isFutureEffective && this.dateText) { | ||
// Format the selected date string and create Date | ||
const dateToValidate = this.yyyyMmDdToDate(this.dateText) | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,7 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM | |
@Getter(useStore) getDissolutionType!: DissolutionTypes | ||
@Getter(useStore) getDocumentDelivery!: DocumentDeliveryIF | ||
@Getter(useStore) getEffectiveDateTime!: EffectiveDateTimeIF | ||
@Getter(useStore) getEntityType!: CorpTypeCd | ||
// @Getter(useStore) getEntityType!: CorpTypeCd | ||
@Getter(useStore) getFilingId!: number | ||
@Getter(useStore) getFolioNumber!: string | ||
@Getter(useStore) getIncorporationAgreementStep!: IncorporationAgreementIF | ||
|
@@ -302,7 +302,10 @@ export default class FilingTemplateMixin extends Mixins(AmalgamationMixin, DateM | |
} | ||
|
||
// restore the Amalgamation Court Approval if it's True or False | ||
if (draftFiling.amalgamationApplication.courtApproval !== null) { | ||
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 code failed if courtApproval did not exist on the amalgamationApplication object (eg, initial draft). Because courtApproval was undefined (not null), line 304 was run, which saved "undefined" in the store. Then, in AmalgamationStatement.vue, this code set the validity to True (which is incorrect), and the overall filing validation did not catch that the amalgamation statement had not been selected. Now, it all works correctly. |
||
if ( | ||
draftFiling.amalgamationApplication.courtApproval === true || | ||
jamespaologarcia marked this conversation as resolved.
Show resolved
Hide resolved
|
||
draftFiling.amalgamationApplication.courtApproval === false | ||
) { | ||
this.setAmalgamationCourtApproval(draftFiling.amalgamationApplication.courtApproval) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -601,16 +601,21 @@ export const useStore = defineStore('store', { | |
) | ||
} else { | ||
return ( | ||
// *** FUTURE: update this when Resulting Company Name is implemented | ||
this.getAmalgamatingBusinessesValid && | ||
!!this.getCorrectNameOption && | ||
this.getNameTranslationsValid | ||
// NB - this is the only valid Correct Name Option for short-form amalgamations: | ||
(this.getCorrectNameOption === CorrectNameOptions.CORRECT_AML_ADOPT) | ||
// NB - there are no name translations for short-form amalgamations | ||
) | ||
} | ||
}, | ||
|
||
/** Whether all the amalgamation steps are valid. */ | ||
isAmalgamationValid (): boolean { | ||
const isCreateShareStructureValid = ( | ||
this.isAmalgamationFilingHorizontal || | ||
this.isAmalgamationFilingVertical || | ||
this.isCreateShareStructureValid | ||
) | ||
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. Basically, don't check the share structure valid flag (because the share structure page was not displayed), but we can assume they are correct because we got them from the holding/primary company. |
||
const isFolioNumberValid = !this.isPremiumAccount || this.getFolioNumberValid | ||
const isCourtOrderValid = this.isRoleStaff ? this.getCourtOrderStep.valid : true | ||
const isCertifyValid = this.getCertifyState.valid && !!this.getCertifyState.certifiedBy | ||
|
@@ -620,7 +625,7 @@ export const useStore = defineStore('store', { | |
this.isAmalgamationInformationValid && | ||
this.isDefineCompanyValid && | ||
this.isAddPeopleAndRolesValid && | ||
this.isCreateShareStructureValid && | ||
isCreateShareStructureValid && | ||
this.getEffectiveDateTime.valid && | ||
isFolioNumberValid && | ||
this.getAmalgamationCourtApprovalValid && | ||
|
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 so that the new route replaces the old one, without pushing the old one (which was invalid for the current filing type) to the browser history. It's a small optimization. It means that, if the user clicks the Back button, they won't navigate to the invalid route.