Skip to content

Commit

Permalink
Add the conditions to show Business Register button (#569)
Browse files Browse the repository at this point in the history
* add conditions to show Business Registre button

* correct spelling

* according to code review
  • Loading branch information
eve-git authored Dec 7, 2022
1 parent df3dce2 commit 230ec49
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 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": "3.3.2",
"version": "3.3.3",
"private": true,
"appName": "Name Request UI",
"sbcName": "SBC Common Components",
Expand Down
15 changes: 13 additions & 2 deletions src/components/existing-request/existing-request-display.vue
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ import NamesGrayBox from './names-gray-box.vue'
import CheckStatusGrayBox from './check-status-gray-box.vue'
import NrApprovedGrayBox from './nr-approved-gray-box.vue'
import NrNotApprovedGrayBox from './nr-not-approved-gray-box.vue'
import { NameState, NrAction, NrState, PaymentStatus, SbcPaymentStatus, PaymentAction, Furnished }
import { NameState, NrAction, NrState, PaymentStatus, SbcPaymentStatus, PaymentAction, Furnished, RequestCode }
from '@/enums'
import { sleep, getFeatureFlag, navigate } from '@/plugins'
import NamexServices from '@/services/namex.services'
Expand Down Expand Up @@ -424,7 +424,18 @@ export default class ExistingRequestDisplay extends Mixins(
/** True if the Register button should be shown. */
get showRegisterButton (): boolean {
return this.isFirm(this.nr)
return this.isFirm(this.nr) &&
this.nr.request_action_cd &&
this.nr.request_action_cd === RequestCode.NEW &&
(NrState.APPROVED === this.nr.state ||
this.isConsentUnRequired)
}
get isConsentUnRequired (): boolean {
return NrState.CONDITIONAL === this.nr.state &&
(this.nr.consentFlag === null ||
this.nr.consentFlag === 'R' ||
this.nr.consentFlag === 'N')
}
/** True if the Check Status gray box should be shown. */
Expand Down

0 comments on commit 230ec49

Please sign in to comment.