-
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.
Merge pull request #404 from bcgov/ofmcc-6328-funding-env-moves
OFMCC-6328 - Funding envelope change request tables
- Loading branch information
Showing
9 changed files
with
175 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
82 changes: 82 additions & 0 deletions
82
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,82 @@ | ||
<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" | ||
density="compact" | ||
:mobile="null" | ||
mobile-breakpoint="md" | ||
class="soft-outline"> | ||
<template #no-data>The selected facility has not submitted a funding re-allocation request.</template> | ||
<template #[`item.date`]="{ item }"> | ||
{{ format.formatDate(item?.date) }} | ||
</template> | ||
<template #[`item.amount`]="{ item }">$ {{ format.formatDecimalNumber(item?.amount) }}</template> | ||
<template #[`item.statusCode`]="{ item }"> | ||
<div class="min-width-column"> | ||
<span :class="getStatusClass(item?.statusCode)">{{ item?.statusName }}</span> | ||
</div> | ||
</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> | ||
<style scoped> | ||
.min-width-column { | ||
min-width: 105px; | ||
} | ||
</style> |
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