N-FIN-15: fix dashboard styling (#16)

Fixes #15
This commit is contained in:
Markus Thielker 2024-03-11 04:51:06 +01:00 committed by GitHub
commit 0275c67365
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 161 additions and 158 deletions

View file

@ -200,6 +200,7 @@ export default async function DashboardPage(props: { searchParams?: { scope: Sco
categoryPercentages={categoryPercentages}
entityExpenses={entityExpensesFormat}
entityPercentages={entityPercentages}
className="flex flex-col justify-center space-y-4 p-10"
/>
);
}

View file

@ -17,6 +17,7 @@ export default function DashboardPageClientContent(
categoryPercentages,
entityExpenses,
entityPercentages,
className,
}: {
scope: string,
scopes: string[],
@ -39,18 +40,18 @@ export default function DashboardPageClientContent(
entity: Entity,
value: string,
}[],
className?: string,
},
) {
const router = useRouter();
return (
<div className="flex flex-col space-y-4 p-8">
<div className={className}>
<div className="flex flex-col space-y-4">
<div className="flex items-center justify-between w-full">
<div className="flex flex-row items-center justify-between">
<h1 className="text-2xl font-semibold leading-6 text-gray-900 dark:text-white">Dashboard</h1>
<p className="text-3xl font-semibold">Dashboard</p>
<Select
onValueChange={(value) => {
@ -208,5 +209,6 @@ export default function DashboardPageClientContent(
</div>
</Card>
</div>
</div>
);
}

View file

@ -170,7 +170,7 @@ export default async function generateSampleData(): Promise<ActionResponse> {
amount: Math.floor(
Math.random() * (maxAmount - minAmount) + minAmount),
date: date,
payorId: 1,
payorId: entities[0].id,
payeeId: Math.floor(
Math.random() * (maxPayee - minPayee) + minPayee),
categoryId: Math.floor(