Skip to content

Commit

Permalink
21976 Added cont in legal types to misc logic (#676)
Browse files Browse the repository at this point in the history
* - app version = 7.3.8
- added cont in legal types to isDisableNonBenCorps()
- added cont in legal types to getRegularAmalgamationText()

* - renamed isXXX -> isEntityXXX
- deleted obsolete getter "isEntityCorporation"
- deleted obsolete FF "supported-continuation-in-entities"
- updated unit tests

* - mapped cont in legal types to regular types for amalgamation

---------

Co-authored-by: Severin Beauvais <severin.beauvais@gov.bc.ca>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Jun 27, 2024
1 parent 3bd9f2f commit 405a982
Show file tree
Hide file tree
Showing 55 changed files with 939 additions and 790 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.3.7",
"version": "7.3.8",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,19 @@ export default class App extends Mixins(
CorpTypeCd.SOLE_PROP,
CorpTypeCd.ULC_CONTINUE_IN
]
// store references
// business store references
@Getter(useBusinessStore) getEntityName!: string
// @Getter(useBusinessStore) getLegalType!: CorpTypeCd
// @Getter(useBusinessStore) getIdentifier!: string
@Getter(useBusinessStore) isSoleProp!: boolean
@Getter(useBusinessStore) isEntitySoleProp!: boolean
// configuration store references
@Getter(useConfigurationStore) getAuthApiUrl!: string
@Getter(useConfigurationStore) getBusinessesUrl!: string
@Getter(useConfigurationStore) getCreateUrl!: string
@Getter(useConfigurationStore) getRegHomeUrl!: string
// root store references
@Getter(useRootStore) getKeycloakRoles!: Array<string>
@Getter(useRootStore) isBootstrapFiling!: boolean
@Getter(useRootStore) isBootstrapTask!: boolean
Expand Down Expand Up @@ -695,7 +697,7 @@ export default class App extends Mixins(
const data = filing[header.name]
const description = GetCorpFullDescription(data.nameRequest.legalType)
const dba = this.isSoleProp ? ' / Doing Business As (DBA) ' : ' '
const dba = this.isEntitySoleProp ? ' / Doing Business As (DBA) ' : ' '
const filingName = EnumUtilities.filingTypeToName(header.name, null, data.type)
// save display name for later
Expand Down
4 changes: 2 additions & 2 deletions src/components/AnnualReport/AGMDate.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-card
v-if="isCoop"
v-if="isEntityCoop"
id="agm-date-container"
flat
>
Expand Down Expand Up @@ -174,7 +174,7 @@ export default class AgmDate extends Mixins(DateMixin) {
@Getter(useRootStore) ARFilingYear!: number
@Getter(useRootStore) arMinDate!: string
@Getter(useRootStore) arMaxDate!: string
@Getter(useBusinessStore) isCoop!: boolean
@Getter(useBusinessStore) isEntityCoop!: boolean
@Getter(useRootStore) getCurrentDate!: string
// Local properties.
Expand Down
9 changes: 4 additions & 5 deletions src/components/Dashboard/AddressListSm.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="address-list-sm">
<template v-if="isFirm">
<template v-if="isEntityFirm">
<!-- Business Address -->
<FirmsAddressList
:showCompleteYourFilingMessage="showCompleteYourFilingMessage"
Expand Down Expand Up @@ -160,9 +160,9 @@
</v-expansion-panel-content>
</v-expansion-panel>

<!-- Records Office (BEN/BC/CCC/ULC and CORPs) -->
<!-- Records Office (BEN/BC/CC/ULC and CBEN/C/CCC/CUL) -->
<v-expansion-panel
v-if="isBaseCompany || isCorporation"
v-if="isBaseCompany"
id="records-office-panel"
class="align-items-top"
:class="{
Expand Down Expand Up @@ -328,8 +328,7 @@ export default class AddressListSm extends Mixins(CommonMixin, CountriesProvince
@Getter(useFilingHistoryListStore) getPendingCoa!: ApiFilingIF
@Getter(useBusinessStore) isBaseCompany!: boolean
@Getter(useBusinessStore) isCorporation!: boolean
@Getter(useBusinessStore) isFirm!: boolean
@Getter(useBusinessStore) isEntityFirm!: boolean
@Getter(useBusinessStore) isHistorical!: boolean
@Getter(useRootStore) recordsAddress!: OfficeAddressIF
@Getter(useRootStore) registeredAddress!: OfficeAddressIF
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dashboard/Alerts/FrozenInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ import { useBusinessStore } from '@/stores'
export default class FrozenInformation extends Vue {
@Prop({ required: true }) readonly showPanel!: boolean
@Getter(useBusinessStore) isFirm!: boolean
@Getter(useBusinessStore) isEntityFirm!: boolean
get hidePhoneNumbers (): boolean {
// hide for firms without FF
return (this.isFirm && !GetFeatureFlag('show-alert-phone-numbers-firm'))
return (this.isEntityFirm && !GetFeatureFlag('show-alert-phone-numbers-firm'))
}
@Emit('togglePanel')
Expand Down
4 changes: 2 additions & 2 deletions src/components/Dashboard/Alerts/MissingInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ import { useBusinessStore } from '@/stores'
export default class MissingInformation extends Vue {
@Prop({ required: true }) readonly showPanel!: boolean
@Getter(useBusinessStore) isFirm!: boolean
@Getter(useBusinessStore) isEntityFirm!: boolean
get hidePhoneNumbers (): boolean {
// hide for firms without FF
return (this.isFirm && !GetFeatureFlag('show-alert-phone-numbers-firm'))
return (this.isEntityFirm && !GetFeatureFlag('show-alert-phone-numbers-firm'))
}
@Emit('togglePanel')
Expand Down
14 changes: 3 additions & 11 deletions src/components/Dashboard/FilingHistoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import { Action, Getter } from 'pinia-class'
import { AddCommentDialog, DownloadErrorDialog, FileCorrectionDialog, LoadCorrectionDialog }
from '@/components/dialogs'
import { CorrectionTypes } from '@/enums'
import { ApiFilingIF, CorrectionFilingIF } from '@/interfaces'
import { ApiFilingIF } from '@/interfaces'
import { FilingMixin } from '@/mixins'
import { EnumUtilities, LegalServices } from '@/services/'
import { navigate } from '@/utils'
Expand All @@ -107,9 +107,6 @@ export default class FilingHistoryList extends Mixins(FilingMixin) {
@Getter(useConfigurationStore) getEditUrl!: string
@Getter(useFilingHistoryListStore) getFilings!: Array<ApiFilingIF>
@Getter(useFilingHistoryListStore) getPanel!: number
@Getter(useBusinessStore) isBaseCompany!: boolean
@Getter(useBusinessStore) isCoop!: boolean
@Getter(useBusinessStore) isFirm!: boolean
@Getter(useBusinessStore) hasCourtOrders!: boolean
@Getter(useFilingHistoryListStore) isAddCommentDialog!: boolean
@Getter(useFilingHistoryListStore) isDownloadErrorDialog!: boolean
Expand Down Expand Up @@ -162,20 +159,15 @@ export default class FilingHistoryList extends Mixins(FilingMixin) {
/**
* Creates a draft correction and redirects to Edit UI.
* Called by File Correction Dialog
* Called by File Correction Dialog.
**/
async redirectFiling (correctionType: CorrectionTypes): Promise<void> {
try {
// show spinner since the network calls below can take a few seconds
this.setFetchingDataSpinner(true)
// build correction filing
let correctionFiling: CorrectionFilingIF
if (this.isFirm || this.isBaseCompany || this.isCoop) {
correctionFiling = this.buildCorrectionFiling(this.getCurrentFiling, correctionType)
}
if (!correctionFiling) throw new Error('Invalid filing type')
const correctionFiling = this.buildCorrectionFiling(this.getCurrentFiling, correctionType)
// save draft filing
const draftCorrection = await LegalServices.createFiling(this.getIdentifier, correctionFiling, true)
Expand Down
10 changes: 6 additions & 4 deletions src/components/Dashboard/FilingHistoryList/HeaderActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) {
@Getter(useBusinessStore) isBaseCompany!: boolean
@Getter(useRootStore) isBootstrapFiling!: boolean
@Getter(useBusinessStore) isDisableNonBenCorps!: boolean
// @Getter(useBusinessStore) isEntityCoop!: boolean
// @Getter(useBusinessStore) isEntityFirm!: boolean
// @Getter(useAuthenticationStore) isRoleStaff!: boolean
@Action(useFilingHistoryListStore) showCommentDialog!: (x: ApiFilingIF) => void
Expand Down Expand Up @@ -147,7 +149,7 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) {
case EnumUtilities.isTypeChangeOfName(this.filing): return false
case EnumUtilities.isTypeChangeOfRegistration(this.filing):
// disable if not a firm (safety check for filing compatibility)
if (!this.isFirm) return true
if (!this.isEntityFirm) return true
return false
case EnumUtilities.isTypeConsentAmalgamationOut(this.filing): return true // not supported
case EnumUtilities.isTypeConsentContinuationOut(this.filing): return true // not supported
Expand All @@ -159,19 +161,19 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) {
case EnumUtilities.isTypeConversion(this.filing): return true // not supported
case EnumUtilities.isTypeCorrection(this.filing):
// disable if not a firm, base company, or coop (safety check for filing compatibility)
if (!this.isFirm && !this.isBaseCompany && !this.isCoop) return true
if (!this.isEntityFirm && !this.isBaseCompany && !this.isEntityCoop) return true
return false
case EnumUtilities.isTypeCourtOrder(this.filing): return true // staff filing not allowed
case EnumUtilities.isTypeDissolution(this.filing): return true // not supported
case EnumUtilities.isTypeDissolved(this.filing): return true // not supported
case EnumUtilities.isTypeIncorporationApplication(this.filing):
// disable if not a base company or coop (safety check for filing compatibility)
if (!this.isBaseCompany && !this.isCoop) return true
if (!this.isBaseCompany && !this.isEntityCoop) return true
return false
case EnumUtilities.isTypePutBackOn(this.filing): return true // staff filing not allowed
case EnumUtilities.isTypeRegistration(this.filing):
// disable if not a firm (safety check for filing compatibility)
if (!this.isFirm) return true
if (!this.isEntityFirm) return true
return false
case EnumUtilities.isTypeRegistrarsNotation(this.filing): return true // staff filing not allowed
case EnumUtilities.isTypeRegistrarsOrder(this.filing): return true // staff filing not allowed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
>
<h4>Dissolution Complete</h4>

<p v-if="isFirm">
<p v-if="isEntityFirm">
The statement of dissolution for {{ entityTitle }} {{ getLegalName || '' }}
was successfully submitted on <strong>{{ dissolutionDateSubmitted }}</strong>
with dissolution date of <strong>{{ dissolutionDate }}</strong>.
Expand All @@ -46,7 +46,7 @@
under the {{ actTitle }} Act.
</p>

<p v-if="!isFirm">
<p v-if="!isEntityFirm">
The {{ entityTitle }} {{ getLegalName || '' }} was successfully
<strong>dissolved on {{ dissolutionDateTime }}</strong>.
The {{ entityTitle }} has been struck from the register and dissolved,
Expand Down Expand Up @@ -98,7 +98,7 @@ export default class DissolutionVoluntary extends Vue {
@Getter(useRootStore) getDissolutionConfirmationResource!: DissolutionConfirmationResourceIF
@Getter(useBusinessStore) getLegalName!: string
@Getter(useBusinessStore) isFirm!: boolean
@Getter(useBusinessStore) isEntityFirm!: boolean
/** Whether this filing is in Complete status. */
get isStatusCompleted (): boolean {
Expand Down
8 changes: 4 additions & 4 deletions src/components/Dashboard/ProprietorPartnersListSm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,17 @@ export default class ProprietorPartnersListSm extends Mixins(CommonMixin, Countr
@Prop({ default: false }) readonly showGrayedOut!: boolean
@Getter(useRootStore) getParties!: PartyIF[]
@Getter(useBusinessStore) isSoleProp!: boolean
@Getter(useBusinessStore) isPartnership!: boolean
@Getter(useBusinessStore) isEntityPartnership!: boolean
@Getter(useBusinessStore) isEntitySoleProp!: boolean
/** The proprietor / partners list. */
get proprietorPartners (): PartyIF[] {
if (this.isSoleProp) {
if (this.isEntitySoleProp) {
// return array with the proprietor
if (this.getParties.length === 0) return []
return [ this.getParties.find(party => party.roles.some(role => role.roleType === Roles.PROPRIETOR)) ]
}
if (this.isPartnership) {
if (this.isEntityPartnership) {
// return array with all partners
return this.getParties.filter(party => party.roles.some(role => role.roleType === Roles.PARTNER))
}
Expand Down
12 changes: 7 additions & 5 deletions src/components/Dashboard/StaffNotation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
</v-list-item>

<v-list-item
v-if="isFirm"
v-if="isEntityFirm"
data-type="record-conversion"
:disabled="!isAllowed(AllowableActions.RECORD_CONVERSION)"
@click="goToConversionFiling()"
Expand Down Expand Up @@ -278,6 +278,8 @@ export default class StaffNotation extends Mixins(AllowableActionsMixin, FilingM
@Getter(useBusinessStore) isAdminFrozen!: boolean
@Getter(useBusinessStore) isBaseCompany!: boolean
@Getter(useBusinessStore) isDisableNonBenCorps!: boolean
// @Getter(useBusinessStore) isEntityCoop!: boolean
// @Getter(useBusinessStore) isEntityFirm!: boolean
@Getter(useBusinessStore) isHistorical!: boolean
@Action(useRootStore) setFetchingDataSpinner!: (x: boolean) => void
Expand Down Expand Up @@ -325,28 +327,28 @@ export default class StaffNotation extends Mixins(AllowableActionsMixin, FilingM
get showConsentAmalgamateOut (): boolean {
return (
(this.isBaseCompany || this.isCoop) &&
(this.isBaseCompany || this.isEntityCoop) &&
!!GetFeatureFlag('supported-consent-amalgamation-out-entities').includes(this.getLegalType)
)
}
get showAmalgamateOut (): boolean {
return (
(this.isBaseCompany || this.isCoop) &&
(this.isBaseCompany || this.isEntityCoop) &&
!!GetFeatureFlag('supported-amalgamation-out-entities').includes(this.getLegalType)
)
}
get showConsentContinueOut (): boolean {
return (
(this.isBaseCompany || this.isCoop) &&
(this.isBaseCompany || this.isEntityCoop) &&
!!GetFeatureFlag('supported-consent-continuation-out-entities').includes(this.getLegalType)
)
}
get showContinueOut (): boolean {
return (
(this.isBaseCompany || this.isCoop) &&
(this.isBaseCompany || this.isEntityCoop) &&
!!GetFeatureFlag('supported-continuation-out-entities').includes(this.getLegalType)
)
}
Expand Down
16 changes: 8 additions & 8 deletions src/components/Dashboard/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@

<!-- draft continuation in -->
<div
v-else-if="isStatusDraft(item) && EnumUtilities.isTypeContinuationIn(item)"
v-else-if="isStatusDraft(item) && isTypeContinuationIn(item)"
class="todo-subtitle"
>
<span>{{ item.subtitle }}</span>
Expand Down Expand Up @@ -285,7 +285,7 @@
class="list-item__actions"
>
<div style="width:100%">
<!-- BEN/BC/CCC/ULC AR special case -->
<!-- special case for BEN/BC/CC/ULC and CBEN/C/CCC/CUL annual report -->
<template v-if="isBaseCompany && item.enabled && isTypeAnnualReport(item) && isStatusNew(item)">
<p class="date-subtitle">
Due: {{ item.arDueDate }}
Expand Down Expand Up @@ -753,7 +753,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
return this.todoItems.sort((a, b) => (a.order - b.order))
}
/** Whether to show Name Request Info section */
/** Whether to show Name Request Info section. */
isFilingWithNr (item: TodoItemIF): boolean {
return (
EnumUtilities.isTypeAmalgamationApplication(item) ||
Expand Down Expand Up @@ -968,7 +968,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
status: header.status || FilingStatus.NEW,
enabled: task.enabled && !this.isDisableNonBenCorps,
order: task.order,
nextArDate: this.apiToYyyyMmDd(business.nextAnnualReport), // BEN/BC/CCC/ULC only
nextArDate: this.apiToYyyyMmDd(business.nextAnnualReport), // BEN/BC/CC/ULC and CBEN/C/CCC/CUL only
arDueDate: this.formatYyyyMmDd(header.arMaxDate)
}
this.todoItems.push(item)
Expand Down Expand Up @@ -1233,7 +1233,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
/**
* Loads a DRAFT/PENDING/ERROR/PAID Annual Report filing.
* (Currently used for Coop ARs only, as BEN/BC/CCC/ULC can't save draft ARs.)
* (Currently used for Coop ARs only, as BEN/BC/CC/ULC and CBEN/C/CCC/CUL can't save draft ARs.)
*/
async loadAnnualReport (task: ApiTaskIF): Promise<void> {
const filing = task.task.filing
Expand All @@ -1257,7 +1257,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
status: header.status || FilingStatus.NEW,
enabled: task.enabled,
order: task.order,
nextArDate: annualReport.nextARDate, // BEN/BC/CCC/ULC only
nextArDate: annualReport.nextARDate, // BEN/BC/CC/ULC and CBEN/C/CCC/CUL only
paymentMethod: header.paymentMethod || null,
paymentToken: header.paymentToken || null,
payErrorObj,
Expand Down Expand Up @@ -1860,7 +1860,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
this.setARFilingYear(item.ARFilingYear)
this.setArMinDate(item.arMinDate) // COOP only
this.setArMaxDate(item.arMaxDate) // COOP only
this.setNextARDate(item.nextArDate) // BEN/BC/CCC/ULC only
this.setNextARDate(item.nextArDate) // BEN/BC/CC/ULC and CBEN/C/CCC/CUL only
this.$router.push({ name: Routes.ANNUAL_REPORT, params: { filingId: '0' } }) // 0 means "new AR"
break
case FilingTypes.CONVERSION: {
Expand Down Expand Up @@ -1891,7 +1891,7 @@ export default class TodoList extends Mixins(AllowableActionsMixin, DateMixin, E
this.setARFilingYear(item.ARFilingYear)
this.setArMinDate(item.arMinDate) // COOP only
this.setArMaxDate(item.arMaxDate) // COOP only
this.setNextARDate(item.nextArDate) // BEN/BC/CCC/ULC only
this.setNextARDate(item.nextArDate) // BEN/BC/CC/ULC and CBEN/C/CCC/CUL only
this.$router.push({ name: Routes.ANNUAL_REPORT, params: { filingId: item.filingId.toString() } })
return
Expand Down
Loading

0 comments on commit 405a982

Please sign in to comment.