From 793db7af4591feb9709edbabf2ef7a3a396abc6a Mon Sep 17 00:00:00 2001 From: ketaki-deodhar Date: Wed, 11 Dec 2024 15:56:40 -0800 Subject: [PATCH] 24205- update mounted() with async --- .../existing-request/nr-approved-gray-box.vue | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/app/src/components/existing-request/nr-approved-gray-box.vue b/app/src/components/existing-request/nr-approved-gray-box.vue index 7f7ef1455..144c02b69 100644 --- a/app/src/components/existing-request/nr-approved-gray-box.vue +++ b/app/src/components/existing-request/nr-approved-gray-box.vue @@ -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 { @@ -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 } @@ -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 { - await this.checkBusinessInLear(this.getNr?.corpNum) - this.isBusinesCheckDone = true - } }