Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24190 Fix BEN to CCC Alteration and Enable Continued-In Alterations #782

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand Down
16 changes: 8 additions & 8 deletions app/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
:hint="hint"
@click:append="onBusiness(null)"
@keyup.delete="onBusiness(null)"
@keydown.enter.native.prevent

Check warning on line 32 in app/src/components/new-request/search-components/business-lookup-fetch.vue

View workflow job for this annotation

GitHub Actions / namerequest-ci / linting-pnpm (21, 9)

'.native' modifier on 'v-on' directive is deprecated

Check warning on line 32 in app/src/components/new-request/search-components/business-lookup-fetch.vue

View workflow job for this annotation

GitHub Actions / namerequest-ci / verify-build (21, 9)

'.native' modifier on 'v-on' directive is deprecated
/>
</v-form>
</v-col>
Expand All @@ -41,7 +41,7 @@
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({
Expand Down Expand Up @@ -118,12 +118,6 @@
if (this.getSearchBusiness) {
// set the from business for alteration (conversion)
this.setOriginEntityTypeCd(this.getSearchBusiness.legalType)
// 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.setEntityTypeCd(EntityTypes.CR)
}
} else {
// clear all related fields when clearing business search/fetch for alter
this.setConversionType(null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,7 @@
:cols="cols"
:md="md"
>
<v-text-field
v-if="isConversion && isBenBusiness"
filled
disabled
hide-details
label="Benefit Company to Limited Company"
/>

<v-tooltip
v-else
top
content-class="top-tooltip"
:disabled="!isConversion || !entityConversionText || isMobile"
Expand Down
140 changes: 118 additions & 22 deletions app/src/list-data/conversion-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,168 @@ import { EntityTypes, NrRequestTypeCodes } from '@/enums'
import { ConversionTypesI } from '@/interfaces/models'

export const ConversionTypes: ConversionTypesI[] = [
//
// Regular Businesses
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
//
{
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 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.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_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.UL,
origin_entity_type_cd: EntityTypes.BC,
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 an unlimited liability company.'
],
value: NrRequestTypeCodes.CONVERT_ULC,
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, // 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_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, // 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_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, // 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_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.CC,
origin_entity_type_cd: EntityTypes.BC,
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_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.CUL,
origin_entity_type_cd: EntityTypes.C,
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.C,
origin_entity_type_cd: EntityTypes.CBEN,
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.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.CR,
origin_entity_type_cd: EntityTypes.ULC,
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_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.CBEN,
origin_entity_type_cd: EntityTypes.CUL,
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
}
]
7 changes: 4 additions & 3 deletions app/src/mixins/common-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}

Expand Down
14 changes: 12 additions & 2 deletions app/src/mixins/search-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,17 @@ 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
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
)
}

get origin_entity_type_cd (): EntityTypes {
return this.getOriginEntityTypeCd
}

get entity_type_cd (): EntityTypes {
return this.getEntityTypeCd
}
Expand Down Expand Up @@ -137,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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this logic to also check for the originEntityType since more than one ConversionType now maps back to the same NrRequestTypeCode (with the added entries for Continued-In business).

this.setEntityTypeCd(entityType)
this.setConversionType(type)
return
Expand Down
Loading