Skip to content

Commit

Permalink
Merge pull request bcgov#783 from meawong/24332-Display-Change-Name-N…
Browse files Browse the repository at this point in the history
…ow-for-Name-Change-NR

24332 - Display Change Name Now Button for Name Change NR
  • Loading branch information
meawong authored Dec 4, 2024
2 parents 4612e40 + 3652e90 commit 3fe8843
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "name-request",
"version": "5.5.11",
"version": "5.5.12",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
38 changes: 38 additions & 0 deletions app/src/components/existing-request/nr-approved-gray-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,34 @@
</div>
</div>

<div
v-else-if="showNameChangeButton"
class="d-flex justify-center my-1"
>
<v-btn
v-if="showOpenExternalIcon"
class="change-name-now-external-btn mt-30"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToCorpOnline')"
>
<strong>Change Name Now</strong>
&nbsp;
<v-icon small>
mdi-open-in-new
</v-icon>
</v-btn>
<v-btn
v-else
class="change-name-now-btn mt-30"
min-width="20rem"
:disabled="disabled"
@click="$emit('goToEntityDashboard')"
>
<strong>Change Name Now</strong>
</v-btn>
</div>

<p
v-else
class="mt-30"
Expand Down Expand Up @@ -219,6 +247,10 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
return (this.getNr.request_action_cd === NrRequestActionCodes.CONVERSION)
}
get isNameChange (): boolean {
return (this.getNr.request_action_cd === NrRequestActionCodes.CHANGE_NAME)
}
get isNewBusiness (): boolean {
return (this.getNr.request_action_cd === NrRequestActionCodes.NEW_BUSINESS)
}
Expand Down Expand Up @@ -257,6 +289,11 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
return (this.isContinuationIn && this.isApprovedOrConsentUnRequired)
}
/** True if the Change Name Now button should be shown. */
get showNameChangeButton (): boolean {
return (this.isNameChange && this.isApprovedOrConsentUnRequired)
}
get isAllowAlterOnline (): boolean {
return this.isAlterOnline(this.getNr.requestTypeCd)
}
Expand All @@ -265,6 +302,7 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
if (this.showAmalgamateNowButton && !this.isSupportedAmalgamation(this.getNr.entity_type_cd)) return true
if (this.showAlterNowButton && !this.isSupportedAlteration(this.getNr.requestTypeCd)) return true
if (this.showBeginContinuationButton && !this.isSupportedContinuationIn(this.getNr.entity_type_cd)) return true
if (this.showNameChangeButton && !this.isSupportedChangeName(this.getNr.entity_type_cd)) return true
return false
}
Expand Down

0 comments on commit 3fe8843

Please sign in to comment.