Reports frontend — spec-driven generate form, sliceable viewer, dimension bars #16

Merged
aetos merged 15 commits from cached-reporting into main 2026-08-21 14:16:36 +00:00
Showing only changes of commit f865f7dec2 - Show all commits

View File

@@ -165,31 +165,36 @@ export function TransactionList({ items, fields, granularity = "monthly", showMe
px: 2, px: 2,
py: 1, py: 1,
"& .MuiAccordionSummary-content": { "& .MuiAccordionSummary-content": {
alignItems: "center", flexDirection: "column",
gap: 1.5, alignItems: "stretch",
gap: 0.75,
minWidth: 0, minWidth: 0,
}, },
}} }}
> >
<Typography variant="h6" fontWeight={700} sx={{ letterSpacing: "-0.01em" }}> <Box sx={{ display: "flex", alignItems: "center", gap: 1.5, minWidth: 0 }}>
{group.label} <Typography variant="h6" fontWeight={700} sx={{ letterSpacing: "-0.01em" }}>
</Typography> {group.label}
<Typography variant="caption" color="text.secondary"> </Typography>
{group.items.length} transaction{group.items.length === 1 ? "" : "s"} <Typography variant="caption" color="text.secondary">
</Typography> {group.items.length} transaction{group.items.length === 1 ? "" : "s"}
<Box sx={{ flex: 1 }} /> </Typography>
<Typography variant="body2" fontWeight={700} color="error.main"> <Box sx={{ flex: 1 }} />
{formatCurrency(group.spent, group.currency)} <Typography variant="body2" fontWeight={700} color="error.main">
</Typography> {formatCurrency(group.spent, group.currency)}
<Typography variant="body2" color="text.disabled"> </Typography>
/ <Typography variant="body2" color="text.disabled">
</Typography> /
<Typography variant="body2" fontWeight={700} color="success.main"> </Typography>
{formatCurrency(group.income, group.currency)} <Typography variant="body2" fontWeight={700} color="success.main">
</Typography> {formatCurrency(group.income, group.currency)}
</Typography>
</Box>
<Box sx={{ display: "flex", alignItems: "stretch", gap: 1.5, minWidth: 0 }}>
{showMetrics && <GroupMetrics items={group.items} currency={group.currency} />}
</Box>
</AccordionSummary> </AccordionSummary>
<AccordionDetails sx={{ p: 1.5, pt: 1 }}> <AccordionDetails sx={{ p: 1.5, pt: 1 }}>
{showMetrics && <GroupMetrics items={group.items} currency={group.currency} />}
<Box sx={{ display: "flex", flexDirection: "column", gap: 1 }}> <Box sx={{ display: "flex", flexDirection: "column", gap: 1 }}>
{groupByDate(group.items).map((dateGroup) => ( {groupByDate(group.items).map((dateGroup) => (
<Box <Box