diff --git a/client/src/sections/Cash.tsx b/client/src/sections/Cash.tsx index c10d8e0..091a077 100644 --- a/client/src/sections/Cash.tsx +++ b/client/src/sections/Cash.tsx @@ -1,8 +1,8 @@ import { useMemo } from 'react'; import type { Dataset } from '../types'; -import { AmountCard, MetricCard, Panel, SectionHeader, DataTable, Change, Empty } from '../components/ui'; +import { AmountCard, MetricCard, Panel, SectionHeader, DataTable, Empty } from '../components/ui'; import { RankBars } from '../components/charts'; -import { amount, dateLabel, money, percent, ratio, signedAmount, weekLabel } from '../lib/format'; +import { amount, dateLabel, money, percent, signedAmount, weekLabel } from '../lib/format'; import { groupSum, sortedEntries, uniqueSorted } from '../lib/aggregate'; export function Cash({ dataset }: { dataset: Dataset }) { @@ -26,8 +26,6 @@ export function Cash({ dataset }: { dataset: Dataset }) { ); const lastWeekRows = dataset.cashWeekly.filter((row) => row.date === lastDate); - const previousWeekRows = dataset.cashWeekly.filter((row) => row.date === previousDate); - const previousByCompany = new Map(previousWeekRows.map((row) => [row.company, row.closeBalance ?? 0])); const bankDates = useMemo(() => uniqueSorted(dataset.cashBanks.map((row) => row.date)), [dataset.cashBanks]); const banksLastDate = bankDates[bankDates.length - 1] ?? ''; @@ -112,7 +110,6 @@ export function Cash({ dataset }: { dataset: Dataset }) { { key: 'out', label: 'Расход за неделю' }, { key: 'saldo', label: 'Сальдо' }, { key: 'close', label: 'Остаток на конец' }, - { key: 'change', label: 'К прошлой неделе' }, ]} rows={lastWeekRows .slice() @@ -128,7 +125,6 @@ export function Cash({ dataset }: { dataset: Dataset }) { {signedAmount(row.saldo ?? 0)} , {amount(row.closeBalance ?? 0)}, - , ], }))} footer={[ @@ -138,7 +134,6 @@ export function Cash({ dataset }: { dataset: Dataset }) { amount(outflow), signedAmount(inflow - outflow), amount(total), - '', ]} />