-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ofmcc-6328 - add Funding Reallocation Requests table
- Loading branch information
1 parent
1467e23
commit 1ee3123
Showing
9 changed files
with
168 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -346,6 +346,19 @@ const FundingAgreementMappings = [ | |
{ back: 'ofm_envelope_facility', front: 'envelopeFacility' }, | ||
] | ||
|
||
const FundingReallocationRequestMappings = [ | ||
{ back: 'ofm_funding_envelope_changeid', front: 'fundingEnvelopeId' }, | ||
{ back: '_ofm_funding_value', front: 'fundingId' }, | ||
{ back: 'ofm_funding_envelope_from', front: 'envelopeCodeFrom' }, | ||
{ back: 'ofm_funding_envelope_from@OData.Community.Display.V1.FormattedValue', front: 'envelopeNameFrom' }, | ||
{ back: 'ofm_funding_envelope_to', front: 'envelopeCodeTo' }, | ||
{ back: 'ofm_funding_envelope_to@OData.Community.Display.V1.FormattedValue', front: 'envelopeNameTo' }, | ||
{ back: 'ofm_amount_base', front: 'amount' }, | ||
{ back: 'createdon', front: 'date' }, | ||
{ back: 'statuscode', front: 'statusCode' }, | ||
{ back: '[email protected]', front: 'statusName' }, | ||
] | ||
|
||
const PaymentMappings = [ | ||
{ back: 'ofm_paymentid', front: 'paymentId' }, | ||
{ back: 'ofm_name', front: 'paymentNumber' }, | ||
|
@@ -493,6 +506,7 @@ module.exports = { | |
FacilityIntakeMappings, | ||
FacilityMappings, | ||
FundingAgreementMappings, | ||
FundingReallocationRequestMappings, | ||
LicenceMappings, | ||
LicenceDetailsMappings, | ||
NotificationMappings, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
frontend/src/components/funding/FundingReallocationRequestsTable.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<v-container fluid class="px-2"> | ||
<h3>Funding Re-allocation Requests</h3> | ||
<div class="pt-2 pb-4">The funding re-allocation requests shown include all fiscal years of the selected facility.</div> | ||
<v-skeleton-loader :loading="loading" type="table-tbody"> | ||
<v-data-table | ||
id="funding-requests-table" | ||
:headers="fundingRequestsHeaders" | ||
:items="fundingReallocationRequests" | ||
item-key="fundingEnvelopeId" | ||
:items-per-page="10" | ||
density="compact" | ||
:mobile="null" | ||
mobile-breakpoint="md" | ||
class="soft-outline"> | ||
<template #no-data>Your selected facility have no submitted requests.</template> | ||
<template #[`item.date`]="{ item }"> | ||
{{ format.formatDate(item?.date) }} | ||
</template> | ||
<template #[`item.amount`]="{ item }">$ {{ format.formatDecimalNumber(item?.amount) }}</template> | ||
<template #[`item.statusCode`]="{ item }"> | ||
<span :class="getStatusClass(item?.statusCode)">{{ item?.statusName }}</span> | ||
</template> | ||
</v-data-table> | ||
</v-skeleton-loader> | ||
</v-container> | ||
</template> | ||
|
||
<script> | ||
import { FUNDING_REALLOCATION_REQUEST_STATUS_CODES } from '@/utils/constants' | ||
import format from '@/utils/format' | ||
export default { | ||
name: 'FundingReallocationRequestsTable', | ||
props: { | ||
loading: { | ||
type: Boolean, | ||
default: true, | ||
}, | ||
fundingReallocationRequests: { | ||
type: Array, | ||
default: () => [], | ||
}, | ||
}, | ||
data() { | ||
return { | ||
fundingRequestsHeaders: [ | ||
{ title: 'Date', key: 'date' }, | ||
{ title: 'From', key: 'envelopeNameFrom' }, | ||
{ title: 'To', key: 'envelopeNameTo' }, | ||
{ title: 'Amount', key: 'amount' }, | ||
{ title: 'Status', key: 'statusCode' }, | ||
], | ||
} | ||
}, | ||
created() { | ||
this.format = format | ||
}, | ||
methods: { | ||
getStatusClass(statusCode) { | ||
switch (statusCode) { | ||
case FUNDING_REALLOCATION_REQUEST_STATUS_CODES.IN_PROGRESS: | ||
return 'status-blue' | ||
case FUNDING_REALLOCATION_REQUEST_STATUS_CODES.APPROVED: | ||
return 'status-green' | ||
case FUNDING_REALLOCATION_REQUEST_STATUS_CODES.CANCELLED: | ||
return 'status-gray' | ||
case FUNDING_REALLOCATION_REQUEST_STATUS_CODES.INELIGIBLE: | ||
return 'status-red' | ||
default: | ||
return '' | ||
} | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters