Skip to content

Commit

Permalink
16847 Removed ledger detail in consent continue out / consent amalgam…
Browse files Browse the repository at this point in the history
…ation out filings (#637)

* - app version = 7.1.6
- removed ledger detail for non-staff user
- updated validation logic
- updated saveFiling()
- unit tests???

* - fixed unit tests

* - removed windows event handler  when local filings views are destroyed

* - fixed some filing body margins
- fixed ApiFilingIF.continuationOut object

* - fixed some calls that didn't need parameters
- fixed some typings
- removed order details display from CCO ledge item
- removed ledger detail section from CCO and CAO components + all supporting code
- updated unit tests

* - deleted "details" from CCO and CAO unit tests

---------

Co-authored-by: Severin Beauvais <[email protected]>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Mar 25, 2024
1 parent a9821e1 commit b890d92
Show file tree
Hide file tree
Showing 19 changed files with 103 additions and 230 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-filings-ui",
"version": "7.1.5",
"version": "7.1.6",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<template #body>
<div v-if="isFilingComplete">
<p class="mt-4">
<p class="mt-0">
The {{ agmYear }} AGM must be held by <strong>{{ agmDueDate }}</strong>.
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
<div>
<p
v-if="expiry && !isConsentExpired"
class="mt-4"
class="mt-0"
>
This consent to continue out to {{ foreignJurisdiction }} is valid <strong>until {{ expiry }}</strong>.
</p>

<p
v-if="expiry && isConsentExpired"
class="mt-4"
Expand All @@ -26,17 +27,14 @@
This consent is expired. Please resubmit the continue out application for authorization to become a foreign
corporation.
</p>
<p
v-if="orderDetails"
class="mt-4"
v-html="orderDetails"
/>

<p
v-if="fileNumber"
class="mt-4 mb-0"
>
Court Order Number: {{ fileNumber }}
</p>

<p
v-if="hasEffectOfOrder"
class="mt-0"
Expand Down Expand Up @@ -83,10 +81,6 @@ export default class ConsentContinuationOut extends Mixins(CountriesProvincesMix
return false
}
get orderDetails (): string {
return this.filing.data?.order?.orderDetails?.replaceAll('\n', '<br/>')
}
/** The court order file number. */
get fileNumber (): string {
return this.filing.data?.order?.fileNumber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<template #body>
<div v-if="isFilingComplete">
<h4>Continuation Out Complete</h4>

<p class="mt-4">
The Company {{ legalName }} was successfully
<strong>
Expand All @@ -17,12 +18,14 @@
incorporated company under the Business Corporations Act.
You are required to retain a copy of all the Continuation Out documents in your records books.
</p>

<p
v-if="fileNumber"
class="mt-4 mb-0"
>
Court Order Number: {{ fileNumber }}
</p>

<p
v-if="hasEffectOfOrder"
class="mt-0"
Expand Down
12 changes: 7 additions & 5 deletions src/components/common/ForeignJurisdiction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
placeholder="Jurisdiction Country"
:rules="countryRules"
menu-props="auto"
@input="emitChangedCountry($event)"
@input="emitChangedCountry()"
/>
<v-select
v-if="canadaUsaRegions.length > 0"
Expand All @@ -36,7 +36,7 @@
filled
placeholder="Jurisdiction Region"
:rules="regionRules"
@input="emitChangedRegion($event)"
@input="emitChangedRegion()"
/>
</v-col>
</v-row>
Expand Down Expand Up @@ -82,7 +82,7 @@ export default class ForeignJurisdiction extends Mixins(CountriesProvincesMixin)
/** Get the respective regions of the country selected as an array of objects. */
get canadaUsaRegions (): Array<any> {
if (this.selectedCountryName === 'Canada') {
let regions = this.getCountryRegions('CA')
let regions = this.getCountryRegions('CA') as any[]
regions = regions.filter(province => province.short !== 'BC')
regions.push({ name: 'Federal', short: 'FEDERAL' })
return regions
Expand All @@ -108,15 +108,17 @@ export default class ForeignJurisdiction extends Mixins(CountriesProvincesMixin)
/** Get the selected country's code. */
get selectedCountryCode (): string {
const countryCode = this.getCountries().find(country => country.name === this.selectedCountryName)
const countries = this.getCountries() as any[]
const countryCode = countries.find(country => country.name === this.selectedCountryName)
return countryCode?.code
}
/** Helper function to get a country's name when given the code.
* @example ('CA') -> 'Canada'
*/
private getCountryNameFromCode (code: string): string {
const country = this.getCountries().find(country => country.code === code)
const countries = this.getCountries() as any[]
const country = countries.find(country => country.code === code)
return country?.name
}
Expand Down
10 changes: 4 additions & 6 deletions src/interfaces/api-filing-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,10 @@ export interface ApiFilingIF {
continuationOut?: {
continuationOutDate: IsoDatePacific
courtOrder?: any
details: string
foreignJurisdiction: {
country: string
region?: string
}
country: string
details?: string
legalName: string
region: string // may be null
}

// conversion filings only
Expand All @@ -112,7 +110,7 @@ export interface ApiFilingIF {
effectOfOrder?: EffectOfOrderTypes
fileNumber: string // may be null
orderDate?: string // FUTURE: use date type here
orderDetails: string
orderDetails?: string
}

// dissolution filings only
Expand Down
6 changes: 6 additions & 0 deletions src/views/AgmExtension.vue
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ export default class AgmExtension extends Mixins(CommonMixin, DateMixin,
this.updateFilingData('add', FilingCodes.AGM_EXTENSION, undefined, undefined)
}
/** Called just before this component is destroyed. */
beforeDestroy (): void {
// remove event handler
window.onbeforeunload = null
}
/**
* Called when user clicks File and Pay button
* or when user retries from Save Error dialog.
Expand Down
6 changes: 6 additions & 0 deletions src/views/AgmLocationChg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,12 @@ export default class AgmLocationChg extends Mixins(CommonMixin, DateMixin,
this.updateFilingData('add', FilingCodes.AGM_LOCATION_CHANGE, undefined, undefined)
}
/** Called just before this component is destroyed. */
beforeDestroy (): void {
// remove event handler
window.onbeforeunload = null
}
/**
* Called when user clicks File and Pay button
* or when user retries from Save Error dialog.
Expand Down
8 changes: 7 additions & 1 deletion src/views/AmalgamationOut.vue
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
:certifiedBy.sync="certifiedBy"
:class="{ 'invalid-component': !certifyFormValid && showErrors }"
:entityDisplay="displayName()"
:message="certifyText(FilingCodes.AMALGANATION_OUT)"
:message="certifyText(FilingCodes.AMALGAMATION_OUT)"
@valid="certifyFormValid=$event"
/>
</div>
Expand Down Expand Up @@ -545,6 +545,12 @@ export default class AmalgamationOut extends Mixins(CommonMixin, DateMixin,
this.updateFilingData('add', FilingCodes.AMALGAMATION_OUT, undefined, true)
}
/** Called just before this component is destroyed. */
beforeDestroy (): void {
// remove event handler
window.onbeforeunload = null
}
/** Fetches the draft amalgamation out filing. */
async fetchDraftFiling (): Promise<void> {
const url = `businesses/${this.getIdentifier}/filings/${this.filingId}`
Expand Down
3 changes: 3 additions & 0 deletions src/views/AnnualReport.vue
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,9 @@ export default class AnnualReport extends Mixins(CommonMixin, DateMixin, FilingM
beforeDestroy (): void {
// stop listening for custom events
this.$root.$off('fetch-error-event')
// remove event handler
window.onbeforeunload = null
}
async fetchDraftFiling (): Promise<void> {
Expand Down
Loading

0 comments on commit b890d92

Please sign in to comment.