Skip to content

Commit

Permalink
fixed so inclusion policy does not display NFP community letter, upda…
Browse files Browse the repository at this point in the history
…ted wording on NFP file upload error message'
  • Loading branch information
jenbeckett committed Aug 26, 2024
1 parent 3019841 commit 9e788ba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
14 changes: 9 additions & 5 deletions frontend/src/components/organizations/OrganizationInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,17 @@
</v-row>
</v-radio-group>
<template v-if="showDocuments">
<v-col cols="12" lg="10" xl="8" xxl="6" v-if="organizationEdit.hasInclusionPolicy" class="pt-0">
<AppLabel>Inclusion Policy Document:</AppLabel>
<v-col v-if="organizationEdit.hasInclusionPolicy" cols="12" lg="10" xl="8" xxl="6" class="pt-0">
<AppDocumentUpload
id="inclusion-policy-upload"
ref="documentUpload"
:document-type="DOCUMENT_TYPES.INCLUSION_POLICY"
v-model="documentsToUpload"
entityName="accounts"
entity-name="accounts"
:loading="loadingInclusionPolicy"
:readonly="!editMode"
:uploadedDocuments="uploadedDocumentsEdit"
@deleteUploadedDocument="deleteUploadedDocument" />
:uploaded-documents="uploadedDocumentsEdit"
@delete-uploaded-document="deleteUploadedDocument" />
<v-alert v-if="showUploadDocumentsAlert" density="compact" type="error" class="mt-1">
Please upload at least one document. To proceed, invoke 'Add File' button, 'Select a file' to upload. Then 'Save' to complete the process.
</v-alert>
Expand Down Expand Up @@ -202,6 +202,7 @@ import AppLabel from '@/components/ui/AppLabel.vue'
import AppButton from '@/components/ui/AppButton.vue'
import AppDocumentUpload from '@/components/ui/AppDocumentUpload.vue'
import { isEmpty } from 'lodash'
import { DOCUMENT_TYPES } from '@/utils/constants'

export default {
components: { AppButton, AppLabel, AppDocumentUpload },
Expand Down Expand Up @@ -255,6 +256,9 @@ export default {
return this.editMode && this.invalidInclusionPolicy
},
},
created() {
this.DOCUMENT_TYPES = DOCUMENT_TYPES
},

updated() {
this.initializeData()
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export const APPLICATION_ERROR_MESSAGES = Object.freeze({
LICENCE_INFO: 'Licence information required',
LICENCE_CONFIRMATION: 'Confirmation of licence information required',
DOCUMENT_UPLOAD: 'Document upload required',
DOCUMENT_UPLOAD_COMMUNITY_LETTER: 'Document upload required of your Community Support Letter required',
DOCUMENT_UPLOAD_COMMUNITY_LETTER: 'A letter of community support is required to continue',
DOCUMENT_FINANCIAL_UPLOAD: 'Document upload for Income Statement and Balance Sheet required',
DOCUMENT_SUPPORTING_UPLOAD: 'Document upload of your Rent/Lease Agreement under Supporting Documents required',
DOCUMENT_LICENCE_UPLOAD: 'Document upload of your current licence required',
Expand Down Expand Up @@ -245,6 +245,7 @@ export const DOCUMENT_TYPES = Object.freeze({
SUPPORTING_DOCS: 'Supporting Documents',
COMMUNITY_LETTER: 'Community Support Letter',
HEALTH_AUTHORITY_REPORT: 'HA Compliance Rpt',
INCLUSION_POLICY: 'Inclusion Policy Document',
})

export const DOCUMENT_LABELS = Object.freeze({
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/views/account-mgmt/ManageOrganizationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ import alertMixin from '@/mixins/alertMixin'
import permissionsMixin from '@/mixins/permissionsMixin'
import { useAppStore } from '@/stores/app'
import { useAuthStore } from '@/stores/auth'
import { REQUEST_CATEGORY_NAMES, OFM_PROGRAM_CODES, PREVENT_CHANGE_REQUEST_TYPES, VIRUS_SCAN_ERROR_MESSAGE } from '@/utils/constants'
import { REQUEST_CATEGORY_NAMES, OFM_PROGRAM_CODES, PREVENT_CHANGE_REQUEST_TYPES, VIRUS_SCAN_ERROR_MESSAGE, DOCUMENT_TYPES } from '@/utils/constants'
export default {
name: 'ManageOrganizationView',
Expand Down Expand Up @@ -161,7 +161,8 @@ export default {
async getInclusionPolicyDocuments() {
try {
this.uploadedDocuments = await DocumentService.getDocuments(this.userInfo.organizationId)
const docs = await DocumentService.getDocuments(this.userInfo.organizationId)
this.uploadedDocuments = docs?.filter((doc) => doc.documentType === DOCUMENT_TYPES.INCLUSION_POLICY) ?? []
} catch (error) {
this.setFailureAlert("Failed to get organization's Inclusion Policy Document(s)", error)
return
Expand Down

0 comments on commit 9e788ba

Please sign in to comment.