Skip to content

Commit

Permalink
24205- update mounted() with async
Browse files Browse the repository at this point in the history
  • Loading branch information
ketaki-deodhar committed Dec 11, 2024
1 parent 3a3484e commit 793db7a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions app/src/components/existing-request/nr-approved-gray-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
isBusinesCheckDone = false
/** Called when component is mounted. */
mounted () {
this.checkBusiness()
async mounted () {
// check if business is in Lear and set store value of isLearBusiness flag
await this.checkBusinessInLear(this.getNr?.corpNum)
}
get isConversion (): boolean {
Expand Down Expand Up @@ -308,9 +309,9 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
get showOpenExternalIcon (): boolean {
if (this.showAmalgamateNowButton && !this.isSupportedAmalgamation(this.getNr.entity_type_cd)) return true
if (this.showAlterNowButton && this.isBusinesCheckDone && !this.getIsLearBusiness) return true
if (this.showAlterNowButton && !this.getIsLearBusiness) return true
if (this.showBeginContinuationButton && !this.isSupportedContinuationIn(this.getNr.entity_type_cd)) return true
if (this.showNameChangeButton && this.isBusinesCheckDone && !this.getIsLearBusiness) return true
if (this.showNameChangeButton && !this.getIsLearBusiness) return true
return false
}
Expand Down Expand Up @@ -342,12 +343,6 @@ export default class NrApprovedGrayBox extends Mixins(CommonMixin) {
this.isApprovedOrConsentUnRequired
)
}
/** check if business is in Lear and set store value of isLearBusiness flag */
async checkBusiness (): Promise<void> {
await this.checkBusinessInLear(this.getNr?.corpNum)
this.isBusinesCheckDone = true
}
}
</script>
Expand Down

0 comments on commit 793db7a

Please sign in to comment.