From f56dec3653292890bb4da2cb54cfabf950b4f864 Mon Sep 17 00:00:00 2001 From: Severin Beauvais Date: Mon, 4 Nov 2024 12:52:55 -0800 Subject: [PATCH 1/5] - app version = 5.5.11 - imported latest shared enums - updated conversion enum keys - updated BEN conversion logic (WIP) - sorted Conversion Types list data - added BEN -> CCC conversion - updated online alteration logic --- app/package.json | 4 +- app/pnpm-lock.yaml | 16 ++--- .../business-lookup-fetch.vue | 4 +- app/src/list-data/conversion-types.ts | 65 +++++++++++-------- app/src/mixins/common-mixin.ts | 7 +- 5 files changed, 55 insertions(+), 41 deletions(-) diff --git a/app/package.json b/app/package.json index 785ee978e..c3b4f799c 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "name-request", - "version": "5.5.10", + "version": "5.5.11", "private": true, "appName": "Name Request UI", "sbcName": "SBC Common Components", @@ -17,7 +17,7 @@ "@babel/compat-data": "^7.24.4", "@bcrs-shared-components/breadcrumb": "2.1.24", "@bcrs-shared-components/corp-type-module": "1.0.15", - "@bcrs-shared-components/enums": "1.1.13", + "@bcrs-shared-components/enums": "1.1.15", "@bcrs-shared-components/folio-number-input": "^1.1.44", "@bcrs-shared-components/genesys-web-message": "1.0.0", "@bcrs-shared-components/interfaces": "1.0.67", diff --git a/app/pnpm-lock.yaml b/app/pnpm-lock.yaml index 6ac7ec07d..c670721d4 100644 --- a/app/pnpm-lock.yaml +++ b/app/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 1.0.15 version: 1.0.15 '@bcrs-shared-components/enums': - specifier: 1.1.13 - version: 1.1.13 + specifier: 1.1.15 + version: 1.1.15 '@bcrs-shared-components/folio-number-input': specifier: ^1.1.44 version: 1.1.44 @@ -928,8 +928,8 @@ packages: '@bcrs-shared-components/corp-type-module@1.0.16': resolution: {integrity: sha512-3MumJZ/0Urfnp1AGJpnUifk5DMrLcjDD+8YiGXy1WXjvpVLwA0S4bNPuvFUf0w4My+0HyXWZ/XsZWiQydVGYHw==} - '@bcrs-shared-components/enums@1.1.13': - resolution: {integrity: sha512-3kAFt9BvdSs1O8b0MIp4ysqt/QK1BzvkYEyju+0aI/fKeywFYOst8MOfmM47M3z4LKExOrmayj6M/S+5F+KkGw==} + '@bcrs-shared-components/enums@1.1.15': + resolution: {integrity: sha512-K86ctY66OPPlil+fRTiCeHxNjhSk5PwSn+hNnfdLNsauhzYrWC4MNHuQHcbilOxje6l56JTZtm446TlbPzPK2w==} '@bcrs-shared-components/folio-number-input@1.1.44': resolution: {integrity: sha512-CWQmST9C5DplVu+ArHPeetRruZhAyHZ5wfR49XFZCi4y2AnQ+9LjTvTXmiK66OK6aRyn0bQ5DU8wSXV9W4dcaA==} @@ -7543,7 +7543,7 @@ snapshots: '@bcrs-shared-components/corp-type-module@1.0.16': {} - '@bcrs-shared-components/enums@1.1.13': + '@bcrs-shared-components/enums@1.1.15': dependencies: '@bcrs-shared-components/corp-type-module': 1.0.16 @@ -7561,18 +7561,18 @@ snapshots: '@bcrs-shared-components/interfaces@1.0.67': dependencies: - '@bcrs-shared-components/enums': 1.1.13 + '@bcrs-shared-components/enums': 1.1.15 vue: 2.7.16 '@bcrs-shared-components/interfaces@1.1.10': dependencies: '@bcrs-shared-components/corp-type-module': 1.0.15 - '@bcrs-shared-components/enums': 1.1.13 + '@bcrs-shared-components/enums': 1.1.15 vue: 2.7.16 '@bcrs-shared-components/staff-payment@1.0.29(vue@2.7.10)': dependencies: - '@bcrs-shared-components/enums': 1.1.13 + '@bcrs-shared-components/enums': 1.1.15 '@bcrs-shared-components/folio-number-input': 1.1.44 '@bcrs-shared-components/interfaces': 1.0.67 vue-property-decorator: 8.5.1(vue@2.7.10) diff --git a/app/src/components/new-request/search-components/business-lookup-fetch.vue b/app/src/components/new-request/search-components/business-lookup-fetch.vue index dec7f946c..2f30b70b9 100644 --- a/app/src/components/new-request/search-components/business-lookup-fetch.vue +++ b/app/src/components/new-request/search-components/business-lookup-fetch.vue @@ -118,10 +118,12 @@ export default class BusinessLookupFetch extends Mixins(CommonMixin, SearchMixin if (this.getSearchBusiness) { // set the from business for alteration (conversion) this.setOriginEntityTypeCd(this.getSearchBusiness.legalType) + // *** TODO: the comment below is no longer true + // BENs can now convert to BC or CCC // special case if the from business is BEN // set conversionType and entityTypeCd because there's only one alteration type for it if (this.isBenBusiness) { - this.setConversionType(NrRequestTypeCodes.CONVERT_CORP) + this.setConversionType(NrRequestTypeCodes.CONVERT_BEN_TO_BC) this.setEntityTypeCd(EntityTypes.CR) } } else { diff --git a/app/src/list-data/conversion-types.ts b/app/src/list-data/conversion-types.ts index 129109fab..5b86971cd 100644 --- a/app/src/list-data/conversion-types.ts +++ b/app/src/list-data/conversion-types.ts @@ -3,71 +3,82 @@ import { ConversionTypesI } from '@/interfaces/models' export const ConversionTypes: ConversionTypesI[] = [ { - desc: 'Limited Company to an Unlimited Liability Company', - text: 'Limited Company to an Unlimited Liability Company', - entity_type_cd: EntityTypes.UL, - origin_entity_type_cd: EntityTypes.BC, + desc: 'Limited Company to a Benefit Company', + text: 'Limited Company to a Benefit Company', + entity_type_cd: EntityTypes.BC, // Benefit Company (namex) + origin_entity_type_cd: EntityTypes.BC, // BC Limited (lear) blurbs: [ - 'Alter business type from a limited company to an unlimited liability company.' + 'Alter business type from a limited company to a benefit company.' ], - value: NrRequestTypeCodes.CONVERT_ULC, - rank: 1, - shortlist: true + value: NrRequestTypeCodes.CONVERT_BC_TO_BEN, + shortlist: false }, { desc: 'Limited Company to a Community Contribution Company', text: 'Limited Company to a Community Contribution Company', - entity_type_cd: EntityTypes.CC, - origin_entity_type_cd: EntityTypes.BC, + entity_type_cd: EntityTypes.CC, // CCC (namex) + origin_entity_type_cd: EntityTypes.BC, // BC Limited (lear) blurbs: [ 'Alter business type from a limited company to a community contribution company.' ], - value: NrRequestTypeCodes.CONVERT_CCC, + value: NrRequestTypeCodes.CONVERT_BC_TO_CCC, rank: 2, shortlist: true }, { - desc: 'Limited Company to a Benefit Company', - text: 'Limited Company to a Benefit Company', - entity_type_cd: EntityTypes.BC, - origin_entity_type_cd: EntityTypes.BC, + desc: 'Limited Company to an Unlimited Liability Company', + text: 'Limited Company to an Unlimited Liability Company', + entity_type_cd: EntityTypes.UL, // ULC (namex) + origin_entity_type_cd: EntityTypes.BC, // BC Limited (lear) blurbs: [ - 'Alter business type from a limited company to a benefit company.' + 'Alter business type from a limited company to an unlimited liability company.' ], - value: NrRequestTypeCodes.CONVERT_BEN, - shortlist: false + value: NrRequestTypeCodes.CONVERT_BC_TO_ULC, + rank: 1, + shortlist: true }, { desc: 'Benefit Company to a Limited Company', text: 'Benefit Company to a Limited Company', - entity_type_cd: EntityTypes.CR, - origin_entity_type_cd: EntityTypes.BEN, + entity_type_cd: EntityTypes.CR, // BC Limited (namex) + origin_entity_type_cd: EntityTypes.BEN, // Benefit Company (lear) blurbs: [ 'Alter business type from a benefit company to a limited company.' ], - value: NrRequestTypeCodes.CONVERT_CORP, + value: NrRequestTypeCodes.CONVERT_BEN_TO_BC, + shortlist: false + }, + { + desc: 'Benefit Company to a Community Contribution Company', + text: 'Benefit Company to a Community Contribution Company', + entity_type_cd: EntityTypes.CC, // CCC (namex) + origin_entity_type_cd: EntityTypes.BEN, // Benefit Company (lear) + blurbs: [ + 'Alter business type from a benefit company to a community contribution company.' + ], + value: NrRequestTypeCodes.CONVERT_BEN_TO_CCC, shortlist: false }, { desc: 'Unlimited Liability Company to a Limited Company', text: 'Unlimited Liability Company to a Limited Company', - entity_type_cd: EntityTypes.CR, - origin_entity_type_cd: EntityTypes.ULC, + entity_type_cd: EntityTypes.CR, // BC Limited (namex) + origin_entity_type_cd: EntityTypes.ULC, // ULC (lear) blurbs: [ 'Alter business type from an unlimited liability company to a limited company.' ], - value: NrRequestTypeCodes.CONVERT_ULCB, + value: NrRequestTypeCodes.CONVERT_ULC_TO_BC, shortlist: false }, { desc: 'Unlimited Liability Company to a Benefit Company', text: 'Unlimited Liability Company to a Benefit Company', - entity_type_cd: EntityTypes.BC, - origin_entity_type_cd: EntityTypes.ULC, + entity_type_cd: EntityTypes.BC, // Benefit Company (namex) + origin_entity_type_cd: EntityTypes.ULC, // ULC (lear) blurbs: [ 'Alter business type from an unlimited liability company to a benefit company.' ], - value: NrRequestTypeCodes.CONVERT_ULBE, + value: NrRequestTypeCodes.CONVERT_ULC_TO_BEN, shortlist: false } ] diff --git a/app/src/mixins/common-mixin.ts b/app/src/mixins/common-mixin.ts index d13a28aca..4d5df7e05 100644 --- a/app/src/mixins/common-mixin.ts +++ b/app/src/mixins/common-mixin.ts @@ -162,9 +162,10 @@ export class CommonMixin extends Vue { /** Returns true if the specified alteration NR is allowed to be done online. */ isAlterOnline (type: NrRequestTypeCodes): boolean { return !( - type === NrRequestTypeCodes.CONVERT_BEN || - type === NrRequestTypeCodes.CONVERT_CORP || - type === NrRequestTypeCodes.CONVERT_ULBE + type === NrRequestTypeCodes.CONVERT_BC_TO_BEN || + type === NrRequestTypeCodes.CONVERT_BEN_TO_BC || + type === NrRequestTypeCodes.CONVERT_BEN_TO_CCC || + type === NrRequestTypeCodes.CONVERT_ULC_TO_BEN ) } From ee66086bc150399a1ba85b8c2a491008c7e7825c Mon Sep 17 00:00:00 2001 From: meganwong Date: Thu, 7 Nov 2024 15:06:29 -0800 Subject: [PATCH 2/5] remove conditional logic for BEN alteration --- .../search-components/business-lookup-fetch.vue | 10 +--------- .../new-request/search-components/entity-type.vue | 9 --------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/app/src/components/new-request/search-components/business-lookup-fetch.vue b/app/src/components/new-request/search-components/business-lookup-fetch.vue index 2f30b70b9..a135c04c0 100644 --- a/app/src/components/new-request/search-components/business-lookup-fetch.vue +++ b/app/src/components/new-request/search-components/business-lookup-fetch.vue @@ -41,7 +41,7 @@ import BusinessFetch from '@/components/new-request/business-fetch.vue' import BusinessLookup from '@/components/new-request/business-lookup.vue' import SocietiesInfo from '@/components/dialogs/societies-info-dialog.vue' import { BusinessSearchIF, FormType } from '@/interfaces' -import { CorpTypeCd, CompanyTypes, EntityStates, EntityTypes, Location, NrRequestTypeCodes } from '@/enums' +import { CorpTypeCd, CompanyTypes, EntityStates, Location } from '@/enums' import { CommonMixin, SearchMixin } from '@/mixins' @Component({ @@ -118,14 +118,6 @@ export default class BusinessLookupFetch extends Mixins(CommonMixin, SearchMixin if (this.getSearchBusiness) { // set the from business for alteration (conversion) this.setOriginEntityTypeCd(this.getSearchBusiness.legalType) - // *** TODO: the comment below is no longer true - // BENs can now convert to BC or CCC - // special case if the from business is BEN - // set conversionType and entityTypeCd because there's only one alteration type for it - if (this.isBenBusiness) { - this.setConversionType(NrRequestTypeCodes.CONVERT_BEN_TO_BC) - this.setEntityTypeCd(EntityTypes.CR) - } } else { // clear all related fields when clearing business search/fetch for alter this.setConversionType(null) diff --git a/app/src/components/new-request/search-components/entity-type.vue b/app/src/components/new-request/search-components/entity-type.vue index b1b9e2bfc..bf160d0af 100644 --- a/app/src/components/new-request/search-components/entity-type.vue +++ b/app/src/components/new-request/search-components/entity-type.vue @@ -4,16 +4,7 @@ :cols="cols" :md="md" > - - Date: Thu, 7 Nov 2024 15:22:28 -0800 Subject: [PATCH 3/5] add conversion types/allow alerations for continued businesses --- app/src/list-data/conversion-types.ts | 82 +++++++++++++++++++++++++++ app/src/mixins/search-mixin.ts | 5 +- 2 files changed, 86 insertions(+), 1 deletion(-) diff --git a/app/src/list-data/conversion-types.ts b/app/src/list-data/conversion-types.ts index 5b86971cd..8e532cb50 100644 --- a/app/src/list-data/conversion-types.ts +++ b/app/src/list-data/conversion-types.ts @@ -2,6 +2,7 @@ import { EntityTypes, NrRequestTypeCodes } from '@/enums' import { ConversionTypesI } from '@/interfaces/models' export const ConversionTypes: ConversionTypesI[] = [ + // Regular Businesses { desc: 'Limited Company to a Benefit Company', text: 'Limited Company to a Benefit Company', @@ -80,5 +81,86 @@ export const ConversionTypes: ConversionTypesI[] = [ ], value: NrRequestTypeCodes.CONVERT_ULC_TO_BEN, shortlist: false + }, + + // Continued-in Businesses + { + desc: 'Limited Company to a Benefit Company', + text: 'Limited Company to a Benefit Company', + entity_type_cd: EntityTypes.CBEN, + origin_entity_type_cd: EntityTypes.C, + blurbs: [ + 'Alter business type from a limited company to a benefit company.' + ], + value: NrRequestTypeCodes.CONVERT_BC_TO_BEN, + shortlist: false + }, + { + desc: 'Limited Company to a Community Contribution Company', + text: 'Limited Company to a Community Contribution Company', + entity_type_cd: EntityTypes.CCC, + origin_entity_type_cd: EntityTypes.C, + blurbs: [ + 'Alter business type from a limited company to a community contribution company.' + ], + value: NrRequestTypeCodes.CONVERT_BC_TO_CCC, + rank: 2, + shortlist: true + }, + { + desc: 'Limited Company to an Unlimited Liability Company', + text: 'Limited Company to an Unlimited Liability Company', + entity_type_cd: EntityTypes.CUL, + origin_entity_type_cd: EntityTypes.C, + blurbs: [ + 'Alter business type from a limited company to an unlimited liability company.' + ], + value: NrRequestTypeCodes.CONVERT_BC_TO_ULC, + rank: 1, + shortlist: true + }, + { + desc: 'Benefit Company to a Limited Company', + text: 'Benefit Company to a Limited Company', + entity_type_cd: EntityTypes.C, + origin_entity_type_cd: EntityTypes.CBEN, + blurbs: [ + 'Alter business type from a benefit company to a limited company.' + ], + value: NrRequestTypeCodes.CONVERT_BEN_TO_BC, + shortlist: false + }, + { + desc: 'Benefit Company to a Community Contribution Company', + text: 'Benefit Company to a Community Contribution Company', + entity_type_cd: EntityTypes.CCC, + origin_entity_type_cd: EntityTypes.CBEN, + blurbs: [ + 'Alter business type from a benefit company to a community contribution company.' + ], + value: NrRequestTypeCodes.CONVERT_BEN_TO_CCC, + shortlist: false + }, + { + desc: 'Unlimited Liability Company to a Limited Company', + text: 'Unlimited Liability Company to a Limited Company', + entity_type_cd: EntityTypes.C, + origin_entity_type_cd: EntityTypes.CUL, + blurbs: [ + 'Alter business type from an unlimited liability company to a limited company.' + ], + value: NrRequestTypeCodes.CONVERT_ULC_TO_BC, + shortlist: false + }, + { + desc: 'Unlimited Liability Company to a Benefit Company', + text: 'Unlimited Liability Company to a Benefit Company', + entity_type_cd: EntityTypes.CBEN, + origin_entity_type_cd: EntityTypes.CUL, + blurbs: [ + 'Alter business type from an unlimited liability company to a benefit company.' + ], + value: NrRequestTypeCodes.CONVERT_ULC_TO_BEN, + shortlist: false } ] diff --git a/app/src/mixins/search-mixin.ts b/app/src/mixins/search-mixin.ts index bf38bb08c..77eba1ccd 100644 --- a/app/src/mixins/search-mixin.ts +++ b/app/src/mixins/search-mixin.ts @@ -105,7 +105,10 @@ export class SearchMixin extends Mixins(CommonMixin) { return ( corpType === CorpTypeCd.BC_COMPANY || corpType === CorpTypeCd.BENEFIT_COMPANY || - corpType === CorpTypeCd.BC_ULC_COMPANY + corpType === CorpTypeCd.BC_ULC_COMPANY || + corpType === CorpTypeCd.CONTINUE_IN || + corpType === CorpTypeCd.BEN_CONTINUE_IN || + corpType === CorpTypeCd.ULC_CONTINUE_IN ) } From a828b7bb2ed150d0efae679199c39afcc8dff495 Mon Sep 17 00:00:00 2001 From: meganwong Date: Tue, 12 Nov 2024 11:53:14 -0800 Subject: [PATCH 4/5] Add logic to handle new ConversionTypes --- app/src/mixins/search-mixin.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/mixins/search-mixin.ts b/app/src/mixins/search-mixin.ts index 77eba1ccd..783e0aa2e 100644 --- a/app/src/mixins/search-mixin.ts +++ b/app/src/mixins/search-mixin.ts @@ -112,6 +112,10 @@ export class SearchMixin extends Mixins(CommonMixin) { ) } + get origin_entity_type_cd (): EntityTypes { + return this.getOriginEntityTypeCd + } + get entity_type_cd (): EntityTypes { return this.getEntityTypeCd } @@ -140,7 +144,10 @@ export class SearchMixin extends Mixins(CommonMixin) { // special case for conversion if (this.getEntityTypeCd && this.isConversion && type) { const nrRequestType = type as unknown as NrRequestTypeCodes - const entityType = ConversionTypes.find(conv => conv.value === nrRequestType)?.entity_type_cd || null + const entityType = ConversionTypes.find(conv => + conv.value === nrRequestType && conv.origin_entity_type_cd === this.origin_entity_type_cd + )?.entity_type_cd || null + this.setEntityTypeCd(entityType) this.setConversionType(type) return From 5213e2143085a8d125e52525c760031e1be6d7b6 Mon Sep 17 00:00:00 2001 From: meganwong Date: Tue, 12 Nov 2024 11:55:18 -0800 Subject: [PATCH 5/5] Fix comment formatting --- app/src/list-data/conversion-types.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/list-data/conversion-types.ts b/app/src/list-data/conversion-types.ts index 8e532cb50..5a348cfb1 100644 --- a/app/src/list-data/conversion-types.ts +++ b/app/src/list-data/conversion-types.ts @@ -2,7 +2,9 @@ import { EntityTypes, NrRequestTypeCodes } from '@/enums' import { ConversionTypesI } from '@/interfaces/models' export const ConversionTypes: ConversionTypesI[] = [ + // // Regular Businesses + // { desc: 'Limited Company to a Benefit Company', text: 'Limited Company to a Benefit Company', @@ -82,8 +84,9 @@ export const ConversionTypes: ConversionTypesI[] = [ value: NrRequestTypeCodes.CONVERT_ULC_TO_BEN, shortlist: false }, - + // // Continued-in Businesses + // { desc: 'Limited Company to a Benefit Company', text: 'Limited Company to a Benefit Company',