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

18202 show both named and numbered option for LTD company #735

Merged
merged 13 commits into from
Oct 26, 2023
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": "name-request",
"version": "5.3.2",
"version": "5.3.3",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
39 changes: 34 additions & 5 deletions src/components/new-request/search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@
<!-- Restoration / Reinstatement flow -->
<template v-else-if="isRestoration">
<BusinessLookupFetch />
<CompanyType v-if="getSearchBusiness && isBcRestorable && isSupportedRestoration(getEntityTypeCd)" />
<CompanyType v-if="getSearchBusiness && isBcRestorable && isNumberedEntityType" />
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
<Jurisdiction
v-if="isSelectedXproAndRestorable"
cols="12"
Expand All @@ -250,7 +250,7 @@
<!-- federal sub-flow -->
<XproFederalBullets v-if="isFederal && getSearchBusiness" />

<template v-if="(isRestorable && !isFederal) && (isNamedCompany || !isSupportedRestoration(getEntityTypeCd))">
<template v-if="showRestoreNameInput">
<v-col
cols="12"
:md="(showDesignation || isSelectedXproAndRestorable) ? '8' : '12'"
Expand Down Expand Up @@ -291,7 +291,7 @@
:href="colinLink"
target="_blank"
>
Go to Corporate Online to {{ isConversion ? 'Alter' : 'Register' }}
{{ colinButtonText }}
<v-icon
right
small
Expand Down Expand Up @@ -459,10 +459,25 @@
return (this.getEntityTypeCd === EntityTypes.CP)
}

get isCreditUnion (): boolean {
return (this.getEntityTypeCd === EntityTypes.FI)
}

get isSociety (): boolean {
return (this.isSocietyEnabled() && this.getEntityTypeCd === EntityTypes.SO)
}

/** Whether to show the name input field when trying to restore a historical company. */
get showRestoreNameInput (): boolean {
// We should show the name input field if the named radio button was used,
// or with some special cases that if it is a coop(CP), or a credit union(FI).
// Also, if it is a extrapros company, we should also have name input field when it is not a Canada Federal.
const isPromptNameInput = (this.isNamedCompany || this.isCooperative || this.isCreditUnion || this.isSelectedXproAndRestorable)

Check warning on line 475 in src/components/new-request/search.vue

View workflow job for this annotation

GitHub Actions / linting (20.5.1)

This line has a length of 131. Maximum allowed is 120
return (
this.isRestorable && isPromptNameInput && !this.isFederal
)
severinbeauvais marked this conversation as resolved.
Show resolved Hide resolved
}

get showActionNowButton (): boolean {
// Conditional for Continuation In Flow.
if (
Expand Down Expand Up @@ -563,6 +578,21 @@
return false
}

/** Retrieve text for COLIN button based on selected action/flow */
get colinButtonText (): string {
var colinText = 'use this NR'
if (this.isConversion) {
colinText = 'Alter'
} else if (this.isRestoration) {
colinText = 'Restore'
} else if (this.isChangeName) {
colinText = 'Change Name'
} else {
colinText = 'Register'
}
return 'Go to Corporate Online to ' + colinText
}

/** Retrieve text based on selected action/flow */
get actionNowButtonText (): string {
if (this.isContinuationIn) return 'Continue In Now'
Expand Down Expand Up @@ -622,8 +652,7 @@
if (this.isRestoration) {
if (this.getEntityTypeCd && this.isNamedCompany && !this.isFederal) return true
if (this.getEntityTypeCd && this.isSelectedXproAndRestorable && !this.isFederal) return true
if (this.getSearchBusiness && this.isBcRestorable &&
!this.isSupportedRestoration(this.getEntityTypeCd)) return true
if (this.getSearchBusiness && this.isBcRestorable && (this.isNamedCompany || this.isCooperative || this.isCreditUnion)) return true
}

// Conditional for Continuation In Flow.
Expand Down
Loading