Skip to content

Commit

Permalink
feat: api integration for CANFundingInfoCard (#3182)
Browse files Browse the repository at this point in the history
* feat: api integration for CANFundingInfoCard

* fix: correct funding_received

---------

Co-authored-by: maiyerlee <[email protected]>
  • Loading branch information
fpigeonjr and maiyerlee authored Dec 6, 2024
1 parent f9f4b6e commit 1328a7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion backend/ops_api/ops/schemas/cans.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class CreateUpdateFundingDetailsSchema(Schema):
class FundingDetailsSchema(Schema):
active_period = fields.Integer(allow_none=True)
funding_method = fields.String(allow_none=True)
funding_frequency = fields.String(allow_none=True)
funding_received = fields.String(allow_none=True)
funding_type = fields.String(allow_none=True)
allotment = fields.String(allow_none=True)
allowance = fields.String(allow_none=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ const CANFundingInfoCard = ({ funding, fiscalYear }) => {
</div>
<div className="grid-col">
<dl>
{/* TODO: ask where this comes from */}
<TermTag
term="Funding Received*"
description="Coming Soon"
term="Funding Received"
description={funding.funding_received ?? NO_DATA}
/>
{/* TODO: ask where this comes from */}
<TermTag
term="Funding Source"
description={funding.funding_source ?? NO_DATA}
Expand All @@ -93,8 +91,8 @@ const CANFundingInfoCard = ({ funding, fiscalYear }) => {
<div className="grid-col">
<dl>
<TermTag
term="Funding Method*"
description="Coming Soon"
term="Funding Method"
description={funding.funding_method ?? NO_DATA}
/>
<TermTag
term="Partner"
Expand All @@ -104,10 +102,9 @@ const CANFundingInfoCard = ({ funding, fiscalYear }) => {
</div>
<div className="grid-col">
<dl>
{/* TODO: ask where this comes from */}
<TermTag
term="Funding Type*"
description="Coming Soon"
term="Funding Type"
description={funding.funding_type ?? NO_DATA}
/>
<TermTag
term="Method of Transfer"
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/components/CANs/CANTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export type FundingDetails = {
fund_code: string;
funding_partner?: string;
funding_source?: "OPRE" | "ACF" | "HHS";
funding_method?: "Direct" | "Reimbursable";
funding_received?: "Quarterly" | "FY Start";
funding_type?: "Discretionary" | "Mandatory";
id: number;
method_of_transfer?: keyof typeof CAN_TRANSFER;
obligate_by?: number;
Expand Down

0 comments on commit 1328a7b

Please sign in to comment.