Skip to content

Commit

Permalink
- app version = 5.8.7
Browse files Browse the repository at this point in the history
- deleted useless isViteRunning getter (was only used in 1 place)
- changed re-routing code to not push the wrong route to history
- update misc comments
- fixed amalgamation statement validation (was undefined on draft restore)
- updated certify statements (for regular and short-form amalgamations)
- updated isAmalgamationInformationValid()
- refactored Business Info test suite to handle regular vs horiz vs vert
- misc cleanup
  • Loading branch information
Severin Beauvais committed Feb 5, 2024
1 parent ce759b3 commit 1c47366
Show file tree
Hide file tree
Showing 24 changed files with 226 additions and 113 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.8.6",
"version": "5.8.7",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand Down
20 changes: 10 additions & 10 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
// reset errors in case this method is invoked more than once (ie, retry)
this.resetFlags()
// don't check FF during Vitest tests
if (!this.isVitestRunning) {
// only check FF when not in Vitest tests
if (import.meta.env.VITEST === undefined) {
// check that current route matches a supported filing type
const supportedFilings = await GetFeatureFlag('supported-filings')
if (!supportedFilings?.includes(this.$route.meta.filingType)) {
Expand Down Expand Up @@ -753,31 +753,31 @@ export default class App extends Mixins(CommonMixin, DateMixin, FilingTemplateMi
switch (this.getFilingType) {
case FilingTypes.AMALGAMATION_APPLICATION:
if (this.isAmalgamationFilingRegular) {
this.$router.push(RouteNames.AMALG_REG_INFORMATION).catch(() => {})
this.$router.replace(RouteNames.AMALG_REG_INFORMATION).catch(() => {})
} else if (this.isAmalgamationFilingHorizontal || this.isAmalgamationFilingVertical) {
this.$router.push(RouteNames.AMALG_SHORT_INFORMATION).catch(() => {})
this.$router.replace(RouteNames.AMALG_SHORT_INFORMATION).catch(() => {})
} else {
throw new Error('invalid amalgamation filing type')
}
return
case FilingTypes.CONTINUATION_IN:
this.$router.push(RouteNames.CONTINUATION_IN_BUSINESS_HOME).catch(() => {})
this.$router.replace(RouteNames.CONTINUATION_IN_BUSINESS_HOME).catch(() => {})
return
case FilingTypes.DISSOLUTION:
if (this.isTypeFirm) {
this.$router.push(RouteNames.DISSOLUTION_FIRM).catch(() => {})
this.$router.replace(RouteNames.DISSOLUTION_FIRM).catch(() => {})
} else {
this.$router.push(RouteNames.DISSOLUTION_DEFINE_DISSOLUTION).catch(() => {})
this.$router.replace(RouteNames.DISSOLUTION_DEFINE_DISSOLUTION).catch(() => {})
}
return
case FilingTypes.INCORPORATION_APPLICATION:
this.$router.push(RouteNames.INCORPORATION_DEFINE_COMPANY).catch(() => {})
this.$router.replace(RouteNames.INCORPORATION_DEFINE_COMPANY).catch(() => {})
return
case FilingTypes.REGISTRATION:
this.$router.push(RouteNames.REGISTRATION_DEFINE_BUSINESS).catch(() => {})
this.$router.replace(RouteNames.REGISTRATION_DEFINE_BUSINESS).catch(() => {})
return
case FilingTypes.RESTORATION:
this.$router.push(RouteNames.RESTORATION_BUSINESS_NAME).catch(() => {})
this.$router.replace(RouteNames.RESTORATION_BUSINESS_NAME).catch(() => {})
return
default:
this.invalidRouteDialog = true
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 @@ -303,7 +303,7 @@ export default class Actions extends Mixins(AmalgamationMixin, CommonMixin,
this.setIsFilingPaying(false)
}
} else {
// don't call window.scrollTo during Vitest tests because jsdom doesn't implement it
// otherwise, smooth-scroll to the top of the page
window.scrollTo({ top: 0, behavior: 'smooth' })
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/common/SummaryDefineCompany.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ export default class SummaryDefineCompany extends Vue {
/** Whether this section is invalid. */
get invalidSection (): boolean {
if (this.isAmalgamationFiling) {
// *** FUTURE: update this for short-form amalgamation (needs to be valid)
return (!this.isAmalgamationInformationValid || !this.isDefineCompanyValid)
}
return !this.isDefineCompanyValid
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async function start () {
await KeycloakService.setKeycloakConfigUrl(keycloakConfig)

// initialize token service which will do a check-sso to initiate session
// don't start during Vitest tests as it messes up the test JWT
// only do when not in Vitest tests as it messes up the test JWT
if (import.meta.env.VITEST === undefined) {
console.info('Starting token refresh service...') // eslint-disable-line no-console
await KeycloakService.initializeToken()
Expand Down
5 changes: 0 additions & 5 deletions src/mixins/common-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ import { getName } from 'country-list'
*/
@Component({})
export default class CommonMixin extends Vue {
/** Is True if Vitest is running the code. */
get isVitestRunning (): boolean {
return (import.meta.env.VITEST !== undefined)
}

/**
* Compares two objects while omitting specified properties from the comparison.
* @param objA the first object to compare
Expand Down
5 changes: 4 additions & 1 deletion src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,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) {
if (
draftFiling.amalgamationApplication.courtApproval === true ||
draftFiling.amalgamationApplication.courtApproval === false
) {
this.setAmalgamationCourtApproval(draftFiling.amalgamationApplication.courtApproval)
}

Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationRegular/BC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const AmalgamationRegResourceBc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationRegular/BEN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const AmalgamationRegResourceBen: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationRegular/CC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const AmalgamationRegResourceCc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationRegular/ULC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export const AmalgamationRegResourceUlc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationShort/BC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const AmalgamationShortResourceBc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationShort/BEN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const AmalgamationShortResourceBen: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationShort/CC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const AmalgamationShortResourceCc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
5 changes: 4 additions & 1 deletion src/resources/AmalgamationShort/ULC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ export const AmalgamationShortResourceUlc: AmalgamationResourceIF = {
},
reviewAndConfirm: {
completingPartyStatement: {
certifyStatements: [],
certifyStatements: [
'I have relevant knowledge of the business and that I am authorized to make this filing.',
'I understand that this amalgamation cannot be reversed without a court order.'
],
certifyClause: `Note: It is an offence to make a false or misleading statement in respect
of a material fact in a record submitted to the Corporate Registry for filing.
See section 427 of the Business Corporations Act.`,
Expand Down
6 changes: 3 additions & 3 deletions src/store/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,10 @@ 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
)
}
},
Expand Down
8 changes: 4 additions & 4 deletions src/views/Amalgamation/BusinessInfo.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="amalgamation-business-info">
<!-- Registered Office Addresses -->
<!-- Office Addresses -->
<section
v-show="isEntityType"
class="mt-10"
Expand All @@ -14,9 +14,9 @@
</p>

<p v-if="isAmalgamationFilingHorizontal || isAmalgamationFilingVertical">
The resulting business will adopt the following Registered Office and Records Office Mailing
and Delivery Addresses of the {{ isAmalgamationFilingHorizontal ? 'primary' : 'holding' }}
business in this amalgamation.
The resulting business will adopt the following Registered Office and Records Office Mailing and
Delivery Addresses of the {{ isAmalgamationFilingHorizontal ? 'primary' : 'holding' }} business
in this amalgamation.
</p>
</header>

Expand Down
4 changes: 2 additions & 2 deletions src/views/Amalgamation/ReviewConfirm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,12 @@ export default class AmalgamationReviewConfirm extends Vue {
/** Is true when the Folio Number is not valid */
get isFolioInvalid (): boolean {
return this.getValidateSteps && !(this.getFolioNumberValid)
return (this.getValidateSteps && !this.getFolioNumberValid)
}
/** Is true when the amalgamation statement is not valid */
get isAmalgamationStatementInvalid (): boolean {
return this.getValidateSteps && !(this.getAmalgamationCourtApprovalValid)
return (this.getValidateSteps && !this.getAmalgamationCourtApprovalValid)
}
}
</script>
Expand Down
Loading

0 comments on commit 1c47366

Please sign in to comment.