From 727e8c15c2a8b3f6ac377c763005904c0fad0441 Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Tue, 30 Apr 2024 12:39:41 -0700 Subject: [PATCH 1/3] - app version = 5.4.9 - added missing entity type (CS) to enum - added cont in entity type data - added cont in types to list of BC types - updated MVE request action mapping for cont in - updated getters to return alternate entity type data for cont in vs BC --- package.json | 5 +- pnpm-lock.yaml | 10 +- src/enums/entity-types.ts | 1 + src/list-data/entity-type-data.ts | 171 ++++++++++++++++++++++++ src/list-data/request-action-mapping.ts | 46 ++++--- src/store/getters.ts | 35 +++-- 6 files changed, 229 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 520620b97..2d9af32c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.4.8", + "version": "5.4.9", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", @@ -11,7 +11,8 @@ "test:unit": "vue-cli-service test:unit --testPathPattern --coverage", "lint": "vue-cli-service lint", "lint:nofix": "vue-cli-service lint --no-fix", - "build-check": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build"}, + "build-check": "node --max_old_space_size=8000 node_modules/@vue/cli-service/bin/vue-cli-service.js build" + }, "dependencies": { "@babel/compat-data": "^7.21.5", "@bcrs-shared-components/breadcrumb": "2.1.24", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c86d36b2..9adcacb8e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,8 +72,8 @@ importers: specifier: ^0.4.2 version: 0.4.4 sbc-common-components: - specifier: 3.0.8 - version: 3.0.8 + specifier: 3.0.12 + version: 3.0.12 style-loader: specifier: ^1.3.0 version: 1.3.0(webpack@5.78.0) @@ -5453,8 +5453,8 @@ packages: resolution: {integrity: sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==} engines: {node: '>=10'} - sbc-common-components@3.0.8: - resolution: {integrity: sha512-TjZA8xRxtwrynI/EXLbGKr68+NFBlFPXDs1n7Uc+EaGD+zwmi8flSi6FEQNbrfb01YfVmlZ8GNghU7f1YP41rw==} + sbc-common-components@3.0.12: + resolution: {integrity: sha512-xi+zRXCyhnlKQgqbDoPd64Mrs/peB3+TwBv8H3VoEAVkVVr+z6mxfn+ej4WIlGv8KPQkL30LGBQRuZ0TG/JwxQ==} schema-utils@2.7.0: resolution: {integrity: sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==} @@ -12915,7 +12915,7 @@ snapshots: dependencies: xmlchars: 2.2.0 - sbc-common-components@3.0.8: + sbc-common-components@3.0.12: dependencies: '@mdi/font': 4.9.95 axios: 0.21.4 diff --git a/src/enums/entity-types.ts b/src/enums/entity-types.ts index c9a398e44..7dcb87bd9 100644 --- a/src/enums/entity-types.ts +++ b/src/enums/entity-types.ts @@ -11,6 +11,7 @@ export enum EntityTypes { CCC = CorpTypeCd.CCC_CONTINUE_IN, CP = CorpTypeCd.COOP, CR = CorpTypeCd.CORPORATION, + CS = CorpTypeCd.CONT_IN_SOCIETY, CUL = CorpTypeCd.ULC_CONTINUE_IN, DBA = CorpTypeCd.DOING_BUSINESS_AS, FI = CorpTypeCd.FINANCIAL, diff --git a/src/list-data/entity-type-data.ts b/src/list-data/entity-type-data.ts index aeb97e295..1da6b1681 100644 --- a/src/list-data/entity-type-data.ts +++ b/src/list-data/entity-type-data.ts @@ -281,6 +281,177 @@ export const EntityTypesBcData: EntityI[] = [ } ] +/** List of entity types for Continuation In NRs. */ +export const EntityTypesContInData: EntityI[] = [ + { + text: 'Limited Company', + value: EntityTypes.C, + cat: 'Corporations', + blurbs: [ + `A company that may have one or more people who own shares with some personal responsibility for debt and + liabilities.`, + `Has many of the same rights of an individual`, + `Reported separately as Corporate tax`, + `Has name protection in BC` + ], + mveBlurbs: [ + `A company that may have one or more people who own shares with some personal responsibility for + debts and liabilities.`, + 'Has many of the same rights of an individual', + 'Reported separately as Corporate tax', + 'Has name protection in BC' + ], + rehBlurbs: [ + 'Restore a limited company that is no longer active with BC Registries.' + ], + amlBlurbs: [ + 'An amalgamation of two or more corporations to form a new limited company.' + ], + chgBlurbs: [ + 'Change/Correct the name of an existing limited company.' + ], + shortlist: true, + rank: 1 + }, + { + text: 'Unlimited Liability Company', + value: EntityTypes.CUL, + cat: 'Corporations', + blurbs: [ + `A type of corporation that is often used by American corporations as a Canadian subsidiary or to hold Canadian + assets.`, + 'Shareholders liable for debts and liabilities', + 'Reported separately as Canadian Corporate tax', + 'Has name protection in BC' + ], + mveBlurbs: [ + `A type of corporation that is often used by American corporations as a Canadian subsidiary or + to hold Canadian assets.`, + 'Shareholders liable for debts and liabilities', + 'Reported separately as Canadian Corporate tax', + 'Has name protection in BC' + ], + rehBlurbs: [ + 'Restore an unlimited liability company (ULC) that is no longer active with BC Registries.' + ], + amlBlurbs: [ + 'An amalgamation of two or more corporations to form a new unlimited liability company.' + ], + chgBlurbs: [ + 'Change/Correct the name of an existing unlimited liability company.' + ] + }, + { + text: 'Cooperative Association', + value: EntityTypes.CP, // FUTURE: update this? see also request-action-mapping.ts + cat: 'Social Enterprises', + blurbs: [ + 'Membership-based organization, owned and operated by the people who use its services.', + 'Has independent legal status separate from its members', + 'Members take on shares and have limited liability', + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + mveBlurbs: [ + 'Membership-based organization, owned and operated by the people who use its services.', + 'Has independent legal status separate from its members', + 'Members take on shares and have limited liability', + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + rehBlurbs: [ + 'Restore a cooperative association that is no longer active with BC Registries.' + ], + amlBlurbs: [ + `An amalgamation of two or more cooperative associations to form a new cooperative + association.` + ], + chgBlurbs: [ + 'Change/correct the name of an existing cooperative association.' + ] + }, + { + text: 'Benefit Company', + value: EntityTypes.CBEN, + cat: 'Corporations', + blurbs: [ + `A type of corporation with special commitments to conduct business in a responsible and sustainable way.`, + 'Must publish and post an audited annual benefit report', + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + mveBlurbs: [ + 'A type of corporation with special commitments to conduct business in a responsible and sustainable way.', + 'Must publish and post an audited annual benefit report', + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + rehBlurbs: [ + 'Restore a benefit company that is no longer active with BC Registries.' + ], + amlBlurbs: [ + 'An amalgamation of two or more corporations to form a new benefit company.' + ], + chgBlurbs: [ + 'Change/Correct the name of an existing benefit company.' + ] + }, + { + text: 'Community Contribution Company', + value: EntityTypes.CCC, + cat: 'Social Enterprises', + blurbs: [ + `A type of corporation that has a benefit to the community. It is intended to bridge the gap between + for-profit and non-profit companies.`, + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + mveBlurbs: [ + 'A type of corporation that has a benefit to the community. It is intended to bridge the gap between ' + + 'for-profit and non-profit companies.', + 'Reported as Corporate tax', + 'Has name protection in BC' + ], + rehBlurbs: [ + 'Restore a community contribution company (CCC) that is no longer active with BC Registries.' + ], + amlBlurbs: [ + `An amalgamation of two or more corporations to form a new community contribution + company.` + ], + chgBlurbs: [ + 'Change/correct the name of an existing community contribution company.' + ] + }, + { + text: 'Society', + value: EntityTypes.CS, + cat: 'Social Enterprises', + blurbs: [ + `A non-profit organization that is also known as a non-share corporation.`, + 'Any funds or profits must be used only for social or community benefit', + 'When incorporated, has independent legal status separate from its members', + 'Members, staff and directors protected from personal liability', + 'Has name protection in BC', + 'Must use Societies Online to register a name and incorporate' + ], + mveBlurbs: [ + `A non-profit organization that is also known as a non-share corporation.`, + 'Any funds or profits must be used only for social or community benefit', + 'When incorporated, has independent legal status separate from its members', + 'Members, staff and directors protected from personal liability', + 'Has name protection in BC', + 'Must use Societies Online to register a name and incorporate' + ], + amlBlurbs: [ + 'Society amalgamation' + ], + chgBlurbs: [ + 'Societies must use Societies Online to get their name.' + ] + } +] + export const EntityTypesXproData: EntityI[] = [ { text: 'Extraprovincial Limited Company', diff --git a/src/list-data/request-action-mapping.ts b/src/list-data/request-action-mapping.ts index 35c5a0b83..d5dd70bf9 100644 --- a/src/list-data/request-action-mapping.ts +++ b/src/list-data/request-action-mapping.ts @@ -2,25 +2,31 @@ import { EntityTypes, NrRequestActionCodes } from '@/enums' import { RequestActionMappingI } from '@/interfaces' const EntityTypesBC = [ - EntityTypes.FR, - EntityTypes.DBA, + EntityTypes.BC, + EntityTypes.C, + EntityTypes.CBEN, + EntityTypes.CC, + EntityTypes.CCC, + EntityTypes.CP, EntityTypes.CR, - EntityTypes.UL, + EntityTypes.CS, + EntityTypes.CUL, + EntityTypes.DBA, + EntityTypes.FI, + EntityTypes.FR, EntityTypes.GP, - EntityTypes.LP, EntityTypes.LL, - EntityTypes.CP, - EntityTypes.BC, - EntityTypes.CC, - EntityTypes.SO, + EntityTypes.LP, EntityTypes.PA, - EntityTypes.FI, - EntityTypes.PAR + EntityTypes.PAR, + EntityTypes.SO, + EntityTypes.UL ] // maps request_action_cd (key) to array of allowable entities (value) // { [request_action_cd]: entity_type_cd[] } export const BcMapping: RequestActionMappingI = { + // Amalgamate AML: [ EntityTypes.CR, EntityTypes.UL, @@ -29,6 +35,7 @@ export const BcMapping: RequestActionMappingI = { EntityTypes.BC, EntityTypes.SO ], + // Renew REN: [ EntityTypes.CR, EntityTypes.CP, @@ -38,6 +45,7 @@ export const BcMapping: RequestActionMappingI = { EntityTypes.BC, EntityTypes.SO ], + // Restore REH: [ EntityTypes.CR, EntityTypes.CP, @@ -47,17 +55,17 @@ export const BcMapping: RequestActionMappingI = { EntityTypes.BC, EntityTypes.SO ], - // every entity type except Parishes and Private Act + // Change Name + // (every entity type except Parishes and Private Act) CHG: EntityTypesBC.filter(ent => ent !== EntityTypes.PAR && ent !== EntityTypes.PA), - // when a MVE (continuation in) NR is created, the resultant company will have a - // different entity type in LEAR, as per comments below + // MVE = Continuation In MVE: [ - EntityTypes.CR, // will become CorpTypeCd.CONTINUE_IN - EntityTypes.CC, // will become CorpTypeCd.CCC_CONTINUE_IN - EntityTypes.CP, - EntityTypes.UL, // will become CorpTypeCd.ULC_CONTINUE_IN - EntityTypes.SO, - EntityTypes.BC // will become CorpTypeCd.BEN_CONTINUE_IN + EntityTypes.C, + EntityTypes.CCC, + EntityTypes.CP, // FUTURE: update this? see also entity-type-data.ts + EntityTypes.CUL, + EntityTypes.CS, + EntityTypes.CBEN ] } diff --git a/src/store/getters.ts b/src/store/getters.ts index af21d44e9..ace82c7ef 100644 --- a/src/store/getters.ts +++ b/src/store/getters.ts @@ -49,6 +49,7 @@ import { ConversionTypes, Designations, EntityTypesBcData, + EntityTypesContInData, EntityTypesXproData, IntlJurisdictions, Locations, @@ -449,7 +450,7 @@ export const getEntityBlurbs = (state: StateIF): Array ({ ...x, blurbs: x.mveBlurbs })) + return EntityTypesContInData.map(x => ({ ...x, blurbs: x.mveBlurbs })) } } @@ -496,7 +497,13 @@ export const getEntityTypesBC = (state: StateIF): EntityI[] => { const generateEntities = (entities) => { const output = [] for (const entity of entities) { - const obj = EntityTypesBcData.find(ent => ent.value === entity) + let obj = null as EntityI + // continuation in uses a different list than the others + if (isContinuationIn(state) && isLocationBC(state)) { + obj = EntityTypesContInData.find(ent => ent.value === entity) + } else { + obj = EntityTypesBcData.find(ent => ent.value === entity) + } // "CR" type is shortlisted // if CR exists in filtered entity_types, preserve its rank and shortlist keys if (entity === EntityTypes.CR) { @@ -528,10 +535,13 @@ export const getEntityTypesBC = (state: StateIF): EntityI[] => { return generateEntities(mapping[getRequestActionCd(state)]) } - return EntityTypesBcData + // safe fallback + // continuation in uses a different list than the others + if (isContinuationIn(state) && isLocationBC(state)) return EntityTypesContInData + else return EntityTypesBcData } catch (err) { console.error('entityTypesBC() =', err) // eslint-disable-line no-console - return EntityTypesBcData + return [] } } @@ -606,18 +616,17 @@ export const getXproRequestTypeCd = (state: StateIF): XproNameType => { /** Get entity type options (short list only). */ export const getEntityTypeOptions = (state: StateIF): Array => { const bcOptions: SelectOptionsI[] = getEntityTypesBC(state)?.filter(x => { - // Set shortlisted entity types for BC Move and Restoration requests. - if ( - (isContinuationIn(state) || isRestoration(state)) && - isLocationBC(state) - ) { + if (isContinuationIn(state) && isLocationBC(state)) { + // Shortlist order: Limited Company, ULC + if (x.value === EntityTypes.CUL) { + x.shortlist = true + x.rank = 2 + } + } else if (isRestoration(state) && isLocationBC(state)) { // Shortlist order: Limited Company, Cooperative Association if (x.value === EntityTypes.CP) { x.shortlist = true x.rank = 2 - } else if ([EntityTypes.FR, EntityTypes.GP, EntityTypes.UL].includes(x.value)) { - x.shortlist = null - x.rank = null } } else if (isAmalgamation(state)) { // Shortlist order: Limited Company, Unlimited Liability Company @@ -630,7 +639,7 @@ export const getEntityTypeOptions = (state: StateIF): Array => { } } else { // Shortlist order: Limited Company, Sole Proprietorship, DBA, General Partnership - if ([EntityTypes.UL, EntityTypes.CP].includes(x.value)) { + if ([EntityTypes.UL, EntityTypes.CP, EntityTypes.CUL].includes(x.value)) { x.shortlist = null x.rank = null } else if (x.value === EntityTypes.FR) { From 947b6145e4304b1b7aa439de4f361b3c7b937b1d Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Tue, 30 Apr 2024 12:52:49 -0700 Subject: [PATCH 2/3] wip --- src/store/getters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/getters.ts b/src/store/getters.ts index ace82c7ef..7fb6e5b23 100644 --- a/src/store/getters.ts +++ b/src/store/getters.ts @@ -506,7 +506,7 @@ export const getEntityTypesBC = (state: StateIF): EntityI[] => { } // "CR" type is shortlisted // if CR exists in filtered entity_types, preserve its rank and shortlist keys - if (entity === EntityTypes.CR) { + if (entity === EntityTypes.CR || entity === EntityTypes.C) { output.push(obj) continue } From 727d07debd3159332c4f9b0979c16d7fdb8c576f Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Tue, 30 Apr 2024 16:03:54 -0700 Subject: [PATCH 3/3] - added CS to society code checks - added cont in codes to numbered entity types list --- src/components/dialogs/pick-entity-or-conversion.vue | 9 ++++++++- src/components/existing-request/nr-approved-gray-box.vue | 7 ++++++- src/components/new-request/search.vue | 5 ++++- src/list-data/request-action-mapping.ts | 5 ++++- 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/components/dialogs/pick-entity-or-conversion.vue b/src/components/dialogs/pick-entity-or-conversion.vue index e25dc734d..0727b18b2 100644 --- a/src/components/dialogs/pick-entity-or-conversion.vue +++ b/src/components/dialogs/pick-entity-or-conversion.vue @@ -338,7 +338,14 @@ export default class PickEntityOrConversionDialog extends CommonMixin { chooseType (entity: SelectOptionsI) { // special case for Society: if FF is not enabled then show society info panel and don't set the type - if (!this.isSocietyEnabled() && (entity.value === EntityTypes.SO || entity.value === EntityTypes.XSO)) { + if ( + !this.isSocietyEnabled() && + ( + entity.value === EntityTypes.SO || + entity.value === EntityTypes.XSO || + entity.value === EntityTypes.CS + ) + ) { this.showSocietiesInfo = true return } diff --git a/src/components/existing-request/nr-approved-gray-box.vue b/src/components/existing-request/nr-approved-gray-box.vue index 7a5562ed4..91f52f3ec 100644 --- a/src/components/existing-request/nr-approved-gray-box.vue +++ b/src/components/existing-request/nr-approved-gray-box.vue @@ -270,8 +270,13 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) { /** True if the Go To Societies Online button should be shown. */ get showGoToSocietiesButton (): boolean { + const isSociety = ( + this.getNr.entity_type_cd === EntityTypes.SO || + this.getNr.entity_type_cd === EntityTypes.XSO || + this.getNr.entity_type_cd === EntityTypes.CS + ) return ( - this.getNr.entity_type_cd === EntityTypes.SO && + isSociety && this.getNr.request_action_cd === NrRequestActionCodes.NEW_BUSINESS && (NrState.APPROVED === this.getNr.state || this.isConsentUnRequired) ) diff --git a/src/components/new-request/search.vue b/src/components/new-request/search.vue index 401eaacf7..3a0b3284f 100644 --- a/src/components/new-request/search.vue +++ b/src/components/new-request/search.vue @@ -454,7 +454,10 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear get isSocietyDisabled (): boolean { return ( !this.isSocietyEnabled() && - (this.getEntityTypeCd === EntityTypes.SO || this.getEntityTypeCd === EntityTypes.XSO) + ( + this.getEntityTypeCd === EntityTypes.SO || + this.getEntityTypeCd === EntityTypes.XSO || + this.getEntityTypeCd === EntityTypes.CS) ) } diff --git a/src/list-data/request-action-mapping.ts b/src/list-data/request-action-mapping.ts index d5dd70bf9..e26759f95 100644 --- a/src/list-data/request-action-mapping.ts +++ b/src/list-data/request-action-mapping.ts @@ -139,5 +139,8 @@ export const NumberedEntityTypes = [ EntityTypes.CC, EntityTypes.CR, EntityTypes.UL, - EntityTypes.C + EntityTypes.C, + EntityTypes.CBEN, + EntityTypes.CCC, + EntityTypes.CUL ]