|
320 | 320 | <v-btn |
321 | 321 | id="action-now-button" |
322 | 322 | class="px-9" |
| 323 | + :disabled="(isAmalgamation && !isAmalgamationAllowed) || (isContinuationIn && !isContinuationInAllowed)" |
323 | 324 | @click="actionNowClicked()" |
324 | 325 | > |
325 | 326 | {{ actionNowButtonText }} |
@@ -416,7 +417,7 @@ import RequestAction from '@/components/new-request/search-components/request-ac |
416 | 417 | import XproFederalBullets from '@/components/new-request/search-components/xpro-federal-bullets.vue' |
417 | 418 | import SocietiesInfo from '@/components/dialogs/societies-info-dialog.vue' |
418 | 419 |
|
419 | | -import { EntityTypes } from '@/enums' |
| 420 | +import { AuthorizedActions, EntityTypes } from '@/enums' |
420 | 421 | import { CommonMixin, NrAffiliationMixin, SearchMixin } from '@/mixins' |
421 | 422 | import { Designations, XproMapping } from '@/list-data' |
422 | 423 | import { Navigate } from '@/plugins' |
@@ -446,7 +447,8 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear |
446 | 447 | @Action setSocietiesModalVisible!: ActionBindingIF |
447 | 448 |
|
448 | 449 | @Getter getIsLearBusiness!: boolean |
449 | | - @Getter isRoleStaff!: boolean |
| 450 | + // @Getter isRoleStaff!: boolean |
| 451 | + @Getter getAuthorizedActions!: string[] |
450 | 452 |
|
451 | 453 | // Constant |
452 | 454 | readonly colinLink = sessionStorage.getItem('CORPORATE_ONLINE_URL') |
@@ -681,6 +683,16 @@ export default class Search extends Mixins(CommonMixin, NrAffiliationMixin, Sear |
681 | 683 | return null |
682 | 684 | } |
683 | 685 |
|
| 686 | + /** Check if amalgamation is allowed based on user actions */ |
| 687 | + get isAmalgamationAllowed (): boolean { |
| 688 | + return this.getAuthorizedActions.includes(AuthorizedActions.AMALGAMATION_FILING) |
| 689 | + } |
| 690 | +
|
| 691 | + /** Check if continuation in is allowed based on user actions */ |
| 692 | + get isContinuationInAllowed (): boolean { |
| 693 | + return this.getAuthorizedActions.includes(AuthorizedActions.CONTINUATION_IN_FILING) |
| 694 | + } |
| 695 | +
|
684 | 696 | get showCheckNameButton (): boolean { |
685 | 697 | // Conditional for "New BC-based business" Flow. |
686 | 698 | // Show button if we're in "Start a new BC-based business" and non-numbered entity is selected. |
|
0 commit comments