Skip to content

Commit

Permalink
Merge pull request #356 from bcgov/ofmcc-5412-ee-updates
Browse files Browse the repository at this point in the history
Ofmcc 5412 ee updates
  • Loading branch information
jenbeckett authored Sep 12, 2024
2 parents 9187c10 + f7b4904 commit 2675e78
Show file tree
Hide file tree
Showing 16 changed files with 144 additions and 43 deletions.
2 changes: 1 addition & 1 deletion backend/src/components/applications.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function mapSupplementaryApplicationObjectForFront(data) {
async function getApplications(req, res) {
try {
const applications = []
const operation = `ofm_applications?$select=ofm_application,ofm_summary_ministry_last_updated,ofm_summary_provider_last_updated,ofm_summary_submittedon,statuscode,statecode,_ofm_facility_value&$filter=(${buildFilterQuery(
const operation = `ofm_applications?$select=ofm_application,ofm_summary_ministry_last_updated,ofm_summary_provider_last_updated,ofm_summary_submittedon,statuscode,statecode,ofm_unionized,_ofm_facility_value&$filter=(${buildFilterQuery(
req?.query,
ApplicationMappings,
)})`
Expand Down
2 changes: 2 additions & 0 deletions backend/src/util/mapping/Mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const UserProfileFacilityMappings = [
{ back: 'ofm_program_start_date', front: 'programStartDate' },
{ back: 'statecode', front: 'facilityStateCode' },
{ back: 'statuscode', front: 'facilityStatusCode' },
{ back: 'ofm_unionized', front: 'isUnionized' },
]

const RequestCategoryMappings = [
Expand Down Expand Up @@ -261,6 +262,7 @@ const FacilityMappings = [
{ back: 'ofm_ypp_designation', front: 'yppDesignation' },
{ back: 'ofm_ypp_enrolled', front: 'yppEnrolled' },
{ back: 'ofm_personal_residence', front: 'personalResidence' },
{ back: 'ofm_unionized', front: 'isUnionized' },
]

const ContactMappings = [
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/components/messages/NewRequestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ import { mapState, mapActions } from 'pinia'
import { useAuthStore } from '@/stores/auth'
import { useAppStore } from '@/stores/app'
import { useMessagesStore } from '@/stores/messages'
import { useOrgStore } from '@/stores/org'
import AppButton from '@/components/ui/AppButton.vue'
import AppDialog from '@/components/ui/AppDialog.vue'
import AppLabel from '@/components/ui/AppLabel.vue'
Expand All @@ -324,7 +325,7 @@ import MessageService from '@/services/messageService'
import OrganizationService from '@/services/organizationService'
import FundingAgreementService from '@/services/fundingAgreementService'
import { ASSISTANCE_REQUEST_STATUS_CODES, CRM_STATE_CODES, OFM_PROGRAM_CODES, PREVENT_CHANGE_REQUEST_TYPES } from '@/utils/constants'
import { REQUEST_CATEGORY_NAMES, REQUEST_SUB_CATEGORY_NAMES, PHONE_FORMAT, EMAIL_FORMAT, VIRUS_SCAN_ERROR_MESSAGE, FUNDING_AGREEMENT_STATUS_CODES } from '@/utils/constants'
import { REQUEST_CATEGORY_NAMES, REQUEST_SUB_CATEGORY_NAMES, PHONE_FORMAT, EMAIL_FORMAT, VIRUS_SCAN_ERROR_MESSAGE, FUNDING_AGREEMENT_STATUS_CODES, PROVIDER_TYPE_CODES } from '@/utils/constants'
export default {
name: 'NewRequestDialog',
Expand Down Expand Up @@ -396,6 +397,7 @@ export default {
computed: {
...mapState(useAppStore, ['requestCategories', 'requestSubCategories', 'getRequestCategoryIdByName', 'getRequestSubCategoryIdByName']),
...mapState(useAuthStore, ['currentFacility', 'userInfo']),
...mapState(useOrgStore, ['currentOrg']),
permittedRequestCategories() {
let categories = [...this.requestCategories]
Expand Down Expand Up @@ -502,7 +504,11 @@ export default {
},
filteredFacilties() {
if (this.isIrregularExpenseRequest) {
return this.facilities.filter((fac) => this.fundingAgreements.some((app) => app?.facilityId === fac?.facilityId))
//family org can never apply for irregular expense
if (this.currentOrg?.providerType === PROVIDER_TYPE_CODES.FAMILY) {
return []
}
return this.facilities.filter((fac) => this.fundingAgreements.some((app) => app?.facilityId === fac?.facilityId) && fac?.isUnionized === 0)
}
return this.facilities
},
Expand Down Expand Up @@ -550,6 +556,9 @@ export default {
if (this.isIrregularExpenseRequest && !this.fundingAgreements) {
this.isLoading = true
await this.getFundingAgreements()
if (!this.currentOrg) {
await this.getOrganizationInfo(this.userInfo?.organizationId)
}
this.isLoading = false
}
this.resetModelData(this.isAccountMaintenanceRequest)
Expand Down Expand Up @@ -587,6 +596,7 @@ export default {
},
methods: {
...mapActions(useMessagesStore, ['addNewAssistanceRequestToStore', 'updateAssistanceRequestInStore']),
...mapActions(useOrgStore, ['getOrganizationInfo']),
//this function runs to check if the selected facility is able to submit certain kinds of assitance requests.
//it is only available to Account Managers and should only be called if the correct checkbox(es) are selected
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<AppAlertBanner v-if="isWarningDisplayed" type="info">You have already received the Indigenous Programming Allowance for the current term.</AppAlertBanner>
<AppAlertBanner v-if="isWarningDisplayed" type="info">You have already received the Indigenous Programming Allowance for the current year.</AppAlertBanner>
<v-row no-gutters class="mr-2 my-4">
<v-col cols="12">
<AppLabel>Purpose of the fund:</AppLabel>
Expand All @@ -11,7 +11,7 @@
<v-row no-gutters class="mr-2 my-2">
<v-col cols="12">
<AppLabel>Eligible expenses:</AppLabel>
To reduce barriers to accessing these funds, all expenses are eligible except for staffing enhancements for the purpose of reducing ratio.
Eligible expenses: Expenses to enhance the participant's delivery of Indigenous curriculum in collaboration with Indigenous Peoples in their communities.
</v-col>
</v-row>
<br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<AppAlertBanner v-if="isWarningDisplayed && hasInclusionPolicy" type="info">You have already received the Support Needs Allowance for the current term.</AppAlertBanner>

<AppAlertBanner v-if="isWarningDisplayed && hasInclusionPolicy" type="info">You have already received the Support Needs Allowance for the current year.</AppAlertBanner>
<v-row no-gutters class="mr-2 my-2">
<v-col cols="12">
<AppAlertBanner v-if="!hasInclusionPolicy" type="info">
Expand All @@ -12,19 +11,27 @@
meaningfully alongside other children.
<br />
<br />
Providers are encouraged to use this funding with their local
<AppLabel>Eligible expenses:</AppLabel>
Equipment, program resources, or minor Facility modifications to enhance inclusion for all children in the participant's programming.
<br />
<br />
<AppLabel>Ineligible expenses include:</AppLabel>
Staffing enhancements including support workers; individualized, therapeutic, or medical equipment.
<br />
<br />
Providers can contact their local
<a href="https://www2.gov.bc.ca/gov/content/health/managing-your-health/child-behaviour-development/early-childhood-intervention" target="_blank">
Supported Child Development or Aboriginal Supported Child Development
</a>
programs.
programs for suggestions on how to use this funding.
</v-col>
</v-row>
<br />
<v-row no-gutters class="mr-2 my-2">
<v-col cols="12">
<strong>An Inclusion Policy is a requirement to apply for Support Needs Allowance.</strong>
Providers participating in the OFM Test must have an Inclusion Policy to receive this funding. You can upload your policy in
<router-link to="/account-mgmt/manage-organization">Account Management.</router-link>
You can upload your policy in
<router-link :to="{ name: 'manage-organization' }">Account Management.</router-link>
</v-col>
</v-row>
<br />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<template>
<v-row no-gutters class="mr-2 my-2">
<v-col cols="12">
<AppLabel>Eligibility:</AppLabel>
<AppLabel>Purpose of the fund:</AppLabel>
Participants are eligible if using a designated vehicle to safely transport children:

<v-row no-gutters>
<v-col cols="12" class="mr-2 my-2">
Between school and their offsite child care location;
Expand Down Expand Up @@ -33,7 +32,7 @@
</v-col>
</v-row>

<AppAlertBanner v-if="isWarningDisplayed" type="info">You have already received the Transportation Allowance for the current term. You may add another vehicle(s).</AppAlertBanner>
<AppAlertBanner v-if="isWarningDisplayed" type="info">You have already received the Transportation Allowance for the current year. You may add another vehicle(s).</AppAlertBanner>

<v-divider class="my-5"></v-divider>

Expand Down
18 changes: 18 additions & 0 deletions frontend/src/services/applicationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ export default {
}
},

async getRedirectedApplications(facilities) {
try {
let applications = []
await Promise.all(
facilities?.map(async (facility) => {
const response = await ApiService.apiAxios.get(
`${ApiRoutes.APPLICATIONS}?facilityId=${facility?.facilityId}&stateCode=${CRM_STATE_CODES.INACTIVE}&statusCode=${APPLICATION_STATUS_CODES.REDIRECTED}`,
)
applications = applications?.concat(response?.data)
}),
)
return applications
} catch (error) {
console.log(`Failed to get the list of applications by facility id - ${error}`)
throw error
}
},

async getActiveApplications() {
try {
const authStore = useAuthStore()
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const APPLICATION_STATUS_CODES = Object.freeze({
CANCELLED_BY_SP: 8, // INACTIVE state
EXPIRED: 9, // INACTIVE state
VERIFIED: 10,
REDIRECTED: 11, // INACTIVE state
})

export const FUNDING_AGREEMENT_STATUS_CODES = Object.freeze({
Expand Down Expand Up @@ -332,3 +333,13 @@ export const BUSINESS_TYPE_CODES = Object.freeze({
LOCAL_GOVERNMENT: 4,
SOLE_PROPRIETOR: 5,
})

export const PROVIDER_TYPE_CODES = Object.freeze({
GROUP: 1,
FAMILY: 2,
})

export const UNION_TYPE_CODES = Object.freeze({
NO: 0,
YES: 1,
})
2 changes: 1 addition & 1 deletion frontend/src/utils/constants/suppConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const INDIG_CHECKBOX_LABELS = Object.freeze([
{ label: 'Materials for a cultural program (beads, wood, food, etc.)', value: '3' },
{ label: 'Books, music, videos, and arts and crafts materials', value: '4' },
{ label: 'Culturally relevant toys and games', value: '5' },
{ label: 'Facility décor enhancement-pictures, including artwork, outdoor play, and natural materials', value: '6' },
{ label: 'Facility decor enhancement (pictures, including artwork, photos, outdoor structures, and natural materials)', value: '6' },
{ label: 'Field trips and outings', value: '7' },
{ label: 'Land-based play support', value: '8' },
{ label: 'Other', value: '9' },
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/views/applications/ApplicationConfirmationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</v-col>
</v-row>

<v-card elevation="2" class="supp-applications-card">
<v-card v-if="hasNonUnionFacilityGroupOrg" elevation="2" class="supp-applications-card">
<v-card-text class="px-8" py-6>
<v-row no-gutters class="align-center">
<v-col cols="12" md="8">
Expand Down Expand Up @@ -55,7 +55,7 @@ import AppButton from '@/components/ui/AppButton.vue'
import AppBackButton from '@/components/ui/AppBackButton.vue'
import AppAlertBanner from '../../components/ui/AppAlertBanner.vue'
import alertMixin from '@/mixins/alertMixin'
import { APPLICATION_STATUS_CODES, GOOD_STANDING_STATUS_CODES, NOT_IN_GOOD_STANDING_WARNING_MESSAGE } from '@/utils/constants'
import { APPLICATION_STATUS_CODES, GOOD_STANDING_STATUS_CODES, NOT_IN_GOOD_STANDING_WARNING_MESSAGE, PROVIDER_TYPE_CODES, UNION_TYPE_CODES } from '@/utils/constants'
import { useOrgStore } from '@/stores/org'
import { useAuthStore } from '@/stores/auth'
import { useApplicationsStore } from '@/stores/applications'
Expand All @@ -68,6 +68,7 @@ export default {
data() {
return {
loading: false,
facility: undefined,
}
},
computed: {
Expand All @@ -77,6 +78,12 @@ export default {
hasGoodStanding() {
return this.currentOrg?.goodStandingStatusCode === this.GOOD_STANDING_STATUS_CODES.GOOD
},
hasNonUnionFacilityGroupOrg() {
if (this.currentOrg?.providerType === PROVIDER_TYPE_CODES.FAMILY) {
return false
}
return this.currentApplication?.isUnionized === UNION_TYPE_CODES.NO
},
},
async created() {
try {
Expand Down
Loading

0 comments on commit 2675e78

Please sign in to comment.