From 9ee3fc41a49484cd839007bd28fc06ae6c2542cc Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Tue, 6 Aug 2024 11:38:19 -0700 Subject: [PATCH] fix so you cannot submit supp app if you do not have permission --- .../src/views/supp-allowances/SupplementarySubmitView.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/supp-allowances/SupplementarySubmitView.vue b/frontend/src/views/supp-allowances/SupplementarySubmitView.vue index ef82d42d..aca78033 100644 --- a/frontend/src/views/supp-allowances/SupplementarySubmitView.vue +++ b/frontend/src/views/supp-allowances/SupplementarySubmitView.vue @@ -84,6 +84,7 @@ import AppButton from '@/components/ui/AppButton.vue' import AppDialog from '@/components/ui/AppDialog.vue' import ApplicationService from '@/services/applicationService' import alertMixin from '@/mixins/alertMixin' +import permissionsMixin from '@/mixins/permissionsMixin' import DocumentService from '@/services/documentService' import FundingAgreementService from '@/services/fundingAgreementService' import IndigenousProgrammingSummary from '@/components/supp-allowances/IndigenousProgrammingSummary.vue' @@ -98,7 +99,7 @@ import rules from '@/utils/rules' export default { components: { AppDialog, AppButton, IndigenousProgrammingSummary, SupportNeedsSummary, TransportationSummary }, - mixins: [alertMixin], + mixins: [alertMixin, permissionsMixin], props: { back: { type: Boolean, @@ -176,7 +177,7 @@ export default { return this.isIndigenousComplete && this.isSupportComplete && this.isTransportComplete }, readonly() { - return !this.isApplicationComplete || this.processing || this.loading + return !this.isApplicationComplete || this.processing || this.loading || !this.hasPermission(this.PERMISSIONS.APPLY_FOR_FUNDING) }, }, watch: { @@ -309,7 +310,7 @@ export default { } }, setSubmit() { - this.$emit('setSubmit', this.supplementaryDeclaration && this.isApplicationComplete) + this.$emit('setSubmit', this.supplementaryDeclaration && this.isApplicationComplete && this.hasPermission(this.PERMISSIONS.APPLY_FOR_FUNDING)) }, async saveApplication(showAlert = false, isSubmit = false) { try {