Skip to content

Commit

Permalink
18202 show both named and numbered option for LTD company (#735)
Browse files Browse the repository at this point in the history
* show both named and numbered option for LTD company

* Go to COLIN

* update version after rebasing

* create getter for COLIN text

* fix the error on Xpro company

* fix the error when no supported FF

* update version

* create a local getter

* add comments with showRestoreNameInput

* fix some small errors

* trailing space
  • Loading branch information
tshyun24 authored Oct 26, 2023
1 parent 5719304 commit d8d9a10
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 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": "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" />
<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 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear
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)
return (
this.isRestorable && isPromptNameInput && !this.isFederal
)
}
get showActionNowButton (): boolean {
// Conditional for Continuation In Flow.
if (
Expand Down Expand Up @@ -563,6 +578,21 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear
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 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear
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

0 comments on commit d8d9a10

Please sign in to comment.