diff --git a/src/ui/routes/SummaryRoute.tsx b/src/ui/routes/SummaryRoute.tsx index 4204051..d4a9991 100644 --- a/src/ui/routes/SummaryRoute.tsx +++ b/src/ui/routes/SummaryRoute.tsx @@ -1,3 +1,115 @@ +import { useState } from "react"; +import { Link } from "react-router"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Button } from "@/components/ui/button"; +import { useDataset } from "../hooks/useDataset.ts"; +import { datasetMonthSpan, summaryView } from "../../domain/views.ts"; +import { formatAmount, formatMoney } from "../format.ts"; + export function SummaryRoute() { - return
| {groupBy === "post" ? "Post" : "Month"} | +Spent | +Share | +
|---|---|---|
| {entry.post.name} | +{formatAmount(entry.charges)} | ++ {view.totalCharges === 0 + ? "—" + : `${((entry.charges / view.totalCharges) * 100).toFixed(1)}%`} + | +
| + + {entry.monthId} + + | +{formatAmount(entry.charges)} | ++ {view.totalCharges === 0 + ? "—" + : `${((entry.charges / view.totalCharges) * 100).toFixed(1)}%`} + | +