diff --git a/frontend/src/pages/board-planning/components/ProjectionChart.tsx b/frontend/src/pages/board-planning/components/ProjectionChart.tsx index d395e99..5fb904f 100644 --- a/frontend/src/pages/board-planning/components/ProjectionChart.tsx +++ b/frontend/src/pages/board-planning/components/ProjectionChart.tsx @@ -89,20 +89,20 @@ export function ProjectionChart({ datapoints, title = 'Financial Projection', su - - + + - - + + - - + + - - + + diff --git a/frontend/src/pages/cash-flow/CashFlowForecastPage.tsx b/frontend/src/pages/cash-flow/CashFlowForecastPage.tsx index 0f2be49..0646a06 100644 --- a/frontend/src/pages/cash-flow/CashFlowForecastPage.tsx +++ b/frontend/src/pages/cash-flow/CashFlowForecastPage.tsx @@ -1,10 +1,9 @@ import { useState, useMemo } from 'react'; import { - Title, Text, Stack, Card, Group, SimpleGrid, ThemeIcon, + Title, Text, Stack, Card, Group, SegmentedControl, Loader, Center, ActionIcon, Tooltip, Badge, } from '@mantine/core'; import { - IconCash, IconBuildingBank, IconChartAreaLine, IconArrowLeft, IconArrowRight, IconCalendar, } from '@tabler/icons-react'; import { useQuery } from '@tanstack/react-query'; @@ -108,30 +107,6 @@ export function CashFlowForecastPage() { return datapoints.slice(viewStartIndex, viewStartIndex + 12); }, [datapoints, viewStartIndex]); - // Compute summary stats for the current view - const summaryStats = useMemo(() => { - if (!viewData.length) return null; - const last = viewData[viewData.length - 1]; - const first = viewData[0]; - - const totalOperating = last.operating_cash + last.operating_investments; - const totalReserve = last.reserve_cash + last.reserve_investments; - const totalAll = totalOperating + totalReserve; - - const firstTotal = first.operating_cash + first.operating_investments + - first.reserve_cash + first.reserve_investments; - const netChange = totalAll - firstTotal; - - return { - totalOperating, - totalReserve, - totalAll, - netChange, - periodStart: first.month, - periodEnd: last.month, - }; - }, [viewData]); - // Determine the first forecast month index within the view const forecastStartLabel = useMemo(() => { const idx = viewData.findIndex((d) => d.is_forecast); @@ -181,65 +156,6 @@ export function CashFlowForecastPage() { /> - {/* Summary Cards */} - {summaryStats && ( - - - - - - - Operating Total - - - {fmt(summaryStats.totalOperating)} - - - - - - - - Reserve Total - - - {fmt(summaryStats.totalReserve)} - - - - - - - - Combined Total - - - {fmt(summaryStats.totalAll)} - - - - - = 0 ? 'green' : 'red'} - size="sm" - > - - - Period Change - - = 0 ? 'green' : 'red'} - > - {fmt(summaryStats.netChange)} - - - - )} - {/* Chart Navigation */} @@ -287,20 +203,20 @@ export function CashFlowForecastPage() { - - + + - - + + - - + + - - + +