From 5824c353f978a5b9ab9696451ee3014c6a614ffc Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 22 Oct 2024 07:46:43 +0100 Subject: Refactors importer to use core stuff --- .../BudgetUpdatesTable/BudgetUpdatesTable.css | 1 + .../BudgetUpdatesTable/BudgetUpdatesTable.tsx | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.css create mode 100644 gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.tsx (limited to 'gui/src/components/BudgetUpdatesTable') diff --git a/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.css b/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.css new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.css @@ -0,0 +1 @@ + diff --git a/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.tsx b/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.tsx new file mode 100644 index 0000000..479d69f --- /dev/null +++ b/gui/src/components/BudgetUpdatesTable/BudgetUpdatesTable.tsx @@ -0,0 +1,36 @@ +import { BudgetUpdate } from '../../types/budgetUpdate'; +import './BudgetUpdatesTable.css'; + +function BudgetUpdatesTable({ budgetUpdates }: Props) { + return ( + + + + + + + + + + + { budgetUpdates.map(Row) } + +
DateQuantityPeriod
+ ); +} + +function Row(budgetUpdate: BudgetUpdate) { + return ( + + {budgetUpdate.date.format("DD Mm YYYY")} + {budgetUpdate.newQuantity.toString()} + {budgetUpdate.newPeriod} + + ) +} + +type Props = { + budgetUpdates: BudgetUpdate[]; +} + +export { BudgetUpdatesTable }; -- cgit v1.2.3