From bea56c5a824d9f240175eebabfc0bc6888b1f877 Mon Sep 17 00:00:00 2001 From: Jane Kamata Date: Mon, 23 Mar 2026 23:31:27 -0400 Subject: [PATCH 1/4] Connecting cost to backend --- .../src/main-page/cash-flow/CashFlowPage.tsx | 1 - .../cash-flow/components/CashAddCosts.tsx | 8 +- .../cash-flow/components/CashAddRevenue.tsx | 8 +- .../components/CashCategoryDropdown.tsx | 13 ++- .../cash-flow/components/CashEditCost.tsx | 84 +++++++++++++++++++ .../cash-flow/components/CashEditLineItem.tsx | 35 ++++++-- .../cash-flow/components/CashSourceList.tsx | 65 +++++++++++--- .../cash-flow/processCashflowData.ts | 2 +- .../cash-flow/processCashflowDataEditSave.ts | 14 ++-- 9 files changed, 193 insertions(+), 37 deletions(-) create mode 100644 frontend/src/main-page/cash-flow/components/CashEditCost.tsx diff --git a/frontend/src/main-page/cash-flow/CashFlowPage.tsx b/frontend/src/main-page/cash-flow/CashFlowPage.tsx index 4cd441d..cd8b90a 100644 --- a/frontend/src/main-page/cash-flow/CashFlowPage.tsx +++ b/frontend/src/main-page/cash-flow/CashFlowPage.tsx @@ -14,7 +14,6 @@ import { ProcessCashflowData } from "./processCashflowData"; import CashCreateLineItem from "./components/CashCreateLineItem"; const CashFlowPage = observer(() => { - const { costs, revenues } = ProcessCashflowData(); return ( diff --git a/frontend/src/main-page/cash-flow/components/CashAddCosts.tsx b/frontend/src/main-page/cash-flow/components/CashAddCosts.tsx index 90a155b..413ee30 100644 --- a/frontend/src/main-page/cash-flow/components/CashAddCosts.tsx +++ b/frontend/src/main-page/cash-flow/components/CashAddCosts.tsx @@ -9,9 +9,13 @@ export default function CashAddCosts() {
{"Add Cost Source"}
-
+
- {}} /> + alert(value)} + value={CostType.Benefits} + />
{"Add Revenue Source"}
-
+
- {}} /> + alert(value)} + value={RevenueType.Fundraising} + /> void; + onChange: (e: React.ChangeEvent) => void; + value: RevenueType | CostType; }; export default function CashCategoryDropdown({ type, onChange, + value, }: CashCategoryDropdown) { return (
-