Skip to content

Commit

Permalink
chore: remove cib from total funding, check ised date
Browse files Browse the repository at this point in the history
  • Loading branch information
rafasdc committed Aug 26, 2024
1 parent 8ba8bc5 commit 978170d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions app/lib/helpers/ccbcSummaryGenerateFormData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ const handleOtherFundingSourcesApplication = (otherFundingSources) => {
otherFundingSources?.otherFundingSourcesArray?.forEach((source) => {
otherFundingSourcesTotal += source.totalRequestedFundingPartner;
});
if (otherFundingSources?.totalInfrastructureBankFunding) {
otherFundingSourcesTotal +=
otherFundingSources.totalInfrastructureBankFunding;
}
// Not adding CIB funding to other funding at this time
// if (otherFundingSources?.totalInfrastructureBankFunding) {
// otherFundingSourcesTotal +=
// otherFundingSources.totalInfrastructureBankFunding;
// }
return otherFundingSourcesTotal;
};

Expand Down Expand Up @@ -63,8 +64,18 @@ const getConditionalApprovalDate = (conditionalApprovalData) => {
return isedDate;
}
// otherwise return null as none of them are approved
return null;
}
// otherwise ised date is greater than provincial date
// if ised date is approved
if (conditionalApprovalData?.isedDecisionObj?.isedDecision === 'Approved') {
return isedDate;
}
// otherwise check if provincial date is approved
if (conditionalApprovalData?.decision?.ministerDecision === 'Approved') {
return provincialDate;
}
// otherwise return null as none of them are approved
return null;
};

Expand Down

0 comments on commit 978170d

Please sign in to comment.