diff --git a/backend/src/util/mapping/Mappings.js b/backend/src/util/mapping/Mappings.js index 66549ddd..ef8c96dd 100644 --- a/backend/src/util/mapping/Mappings.js +++ b/backend/src/util/mapping/Mappings.js @@ -401,6 +401,7 @@ const SupplementaryApplicationMappings = [ { back: 'ofm_renewal_term', front: 'renewalTerm' }, { back: 'ofm_retroactive_date', front: 'retroactiveDate' }, { back: 'ofm_funding_number', front: 'fundingAgreementNumber' }, + { back: 'ofm_pcm_validated', front: 'pcmValidated' }, ] const RoleMappings = [ @@ -494,6 +495,8 @@ const IrregularExpenseMappings = [ { back: 'ofm_expenseid', front: 'irregularExpenseId' }, { back: '_ofm_application_value', front: 'applicationId' }, { back: 'ofm_funding_number', front: 'fundingAgreementNumber' }, + { back: 'ofm_pcm_validated', front: 'pcmValidated' }, + ] module.exports = { diff --git a/frontend/src/components/funding/FundingAgreementsTab.vue b/frontend/src/components/funding/FundingAgreementsTab.vue index 4887dec0..05740ae5 100644 --- a/frontend/src/components/funding/FundingAgreementsTab.vue +++ b/frontend/src/components/funding/FundingAgreementsTab.vue @@ -92,7 +92,7 @@ export default { applications?.map((application) => ApplicationService.getSupplementaryApplicationsByDate( application.applicationId, - `statusCode=${SUPPLEMENTARY_APPLICATION_STATUS_CODES.APPROVED}`, + `statusCode=${SUPPLEMENTARY_APPLICATION_STATUS_CODES.APPROVED}&pcmValidated=true`, searchQueries?.dateFrom, searchQueries?.dateTo, ), @@ -149,7 +149,8 @@ export default { } }, async loadIrregularExpenses(activeFA) { - const expenseApplications = await IrregularExpenseService.getIrregularExpenseApplications(activeFA.applicationId, IRREGULAR_EXPENSE_STATUS_CODES.APPROVED) + const getPCMValidation = true + const expenseApplications = await IrregularExpenseService.getIrregularExpenseApplications(activeFA.applicationId, IRREGULAR_EXPENSE_STATUS_CODES.APPROVED, getPCMValidation) expenseApplications?.forEach((app) => { this.fundingAgreements.push({ startDate: app.startDate, diff --git a/frontend/src/services/irregularExpenseService.js b/frontend/src/services/irregularExpenseService.js index 1dbe2dc1..d34f7fbc 100644 --- a/frontend/src/services/irregularExpenseService.js +++ b/frontend/src/services/irregularExpenseService.js @@ -2,13 +2,16 @@ import ApiService from '@/common/apiService' import { ApiRoutes } from '@/utils/constants' export default { - async getIrregularExpenseApplications(applicationId, statusCode = undefined) { + async getIrregularExpenseApplications(applicationId, statusCode = undefined, pcmValidated = undefined) { try { if (!applicationId) return let url = `${ApiRoutes.IRREGULAR_APPLICATIONS}?applicationId=${applicationId}` if (statusCode) { url += `&statusCode=${statusCode}` } + if (pcmValidated) { + url += '&pcmValidated=true' + } const response = await ApiService.apiAxios.get(url) return response?.data } catch (error) {