Skip to content

Commit 0e3b5b9

Browse files
authored
Restrict Supplemental Allowances (#532)
* feat: remove undesired call to action from confirmation page * feat: add funding agreement status to validator * chore: remove unused vars
1 parent aa416eb commit 0e3b5b9

File tree

2 files changed

+3
-40
lines changed

2 files changed

+3
-40
lines changed

frontend/src/services/applicationService.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { isEmpty } from 'lodash'
33
import ApiService from '@/common/apiService'
44
import { useApplicationsStore } from '@/stores/applications'
55
import { useAuthStore } from '@/stores/auth'
6-
import { APPLICATION_RENEWAL_TYPES, APPLICATION_STATUS_CODES, ApiRoutes, CRM_STATE_CODES } from '@/utils/constants'
6+
import { APPLICATION_RENEWAL_TYPES, APPLICATION_STATUS_CODES, FUNDING_AGREEMENT_STATUS_CODES, ApiRoutes, CRM_STATE_CODES } from '@/utils/constants'
77

88
function sortApplications(applications) {
99
applications?.sort((app1, app2) => {
@@ -297,7 +297,7 @@ export default {
297297

298298
checkFundingAgreement(fundingAgreement) {
299299
const isUnexpired = new Date() < new Date(fundingAgreement?.endDate)
300-
return fundingAgreement?.stateCode === CRM_STATE_CODES.ACTIVE && isUnexpired
300+
return fundingAgreement?.stateCode === CRM_STATE_CODES.ACTIVE && isUnexpired && fundingAgreement?.statusCode === FUNDING_AGREEMENT_STATUS_CODES.ACTIVE
301301
},
302302

303303
async hasApprovedApplication(facilities = []) {

frontend/src/views/applications/ApplicationConfirmationView.vue

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,37 +17,6 @@
1717
</v-col>
1818
</v-row>
1919

20-
<v-card v-if="hasNonUnionFacilityGroupOrg" elevation="2" class="supp-applications-card">
21-
<v-card-text class="px-8" py-6>
22-
<v-row no-gutters class="align-center">
23-
<v-col cols="12" md="8">
24-
<p>You may be eligible for additional Allowances. Would you like to apply?</p>
25-
<p class="mt-4">Available allowances:</p>
26-
<ul class="pl-6">
27-
<li>Indigenous programming</li>
28-
<li>Support needs programming</li>
29-
<li>Transportation allowance</li>
30-
</ul>
31-
<p class="mt-4">
32-
You may apply for one or more allowances. You can also apply through
33-
<router-link :to="{ name: 'applications-history' }">Applications</router-link>
34-
at any time.
35-
</p>
36-
</v-col>
37-
<v-col cols="12" md="4" align="right" class="my-4">
38-
<AppButton
39-
id="apply-button"
40-
:primary="false"
41-
size="large"
42-
width="100px"
43-
:disabled="!hasGoodStanding"
44-
:to="{ name: 'supp-allowances-form', params: { applicationGuid: $route.params.applicationGuid } }">
45-
Apply
46-
</AppButton>
47-
</v-col>
48-
</v-row>
49-
</v-card-text>
50-
</v-card>
5120
<v-row justify="space-around" no-gutters class="mt-10">
5221
<AppBackButton id="back-home-button" :primary="false" width="250px" :to="{ name: 'home' }" align="center">Home</AppBackButton>
5322
<AppButton id="view-applications-button" size="large" width="250px" :to="{ name: 'applications-history' }" align="center" class="mt-2">View Applications</AppButton>
@@ -61,7 +30,7 @@ import AppButton from '@/components/ui/AppButton.vue'
6130
import AppBackButton from '@/components/ui/AppBackButton.vue'
6231
import AppAlertBanner from '@/components/ui/AppAlertBanner.vue'
6332
import alertMixin from '@/mixins/alertMixin'
64-
import { APPLICATION_STATUS_CODES, GOOD_STANDING_STATUS_CODES, NOT_IN_GOOD_STANDING_WARNING_MESSAGE, PROVIDER_TYPE_CODES, UNION_TYPE_CODES } from '@/utils/constants'
33+
import { APPLICATION_STATUS_CODES, GOOD_STANDING_STATUS_CODES, NOT_IN_GOOD_STANDING_WARNING_MESSAGE } from '@/utils/constants'
6534
import { useOrgStore } from '@/stores/org'
6635
import { useAuthStore } from '@/stores/auth'
6736
import { useApplicationsStore } from '@/stores/applications'
@@ -87,12 +56,6 @@ export default {
8756
hasGoodStanding() {
8857
return this.currentOrg?.goodStandingStatusCode === this.GOOD_STANDING_STATUS_CODES.GOOD
8958
},
90-
hasNonUnionFacilityGroupOrg() {
91-
if (this.currentOrg?.providerType === PROVIDER_TYPE_CODES.FAMILY) {
92-
return false
93-
}
94-
return this.currentApplication?.isUnionized === UNION_TYPE_CODES.NO
95-
},
9659
},
9760
async created() {
9861
try {

0 commit comments

Comments
 (0)