mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
fixing type errors
This commit is contained in:
parent
36385f0013
commit
9b902d27df
1 changed files with 34 additions and 4 deletions
|
|
@ -1,14 +1,44 @@
|
|||
import {
|
||||
loadBaselineMetrics,
|
||||
getCountByPropertyType,
|
||||
} from "@/app/portfolio/[slug]/(portfolio)/reporting/loadBaselineMetrics";
|
||||
import { DashboardSummaryCards } from "@/app/portfolio/[slug]/(portfolio)/reporting/DashboardSummaryCards";
|
||||
import { BreakdownChart } from "@/app/portfolio/[slug]/(portfolio)/reporting/BreakdownChart";
|
||||
|
||||
export default async function ReportingPage(props: {
|
||||
params: Promise<{ slug: string }>;
|
||||
}) {
|
||||
const params = await props.params;
|
||||
const portfolioId = params.slug;
|
||||
|
||||
const [baseline, propertyTypes] = await Promise.all([
|
||||
loadBaselineMetrics(Number(portfolioId)),
|
||||
getCountByPropertyType(Number(portfolioId)),
|
||||
]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="flex justify-center">
|
||||
<div>Reporting Page for portfolio: {portfolioId}</div>
|
||||
<div className="max-w-8xl mx-auto px-6 pb-10 space-y-4 pt-4">
|
||||
<div className="mb-6">
|
||||
<header className="text-3xl font-semibold text-brandblue">
|
||||
Portfolio Overview
|
||||
</header>
|
||||
<div className="h-px bg-gray-200 mt-2" />
|
||||
</div>
|
||||
</>
|
||||
|
||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-6 p-6">
|
||||
{/* LEFT SIDE: Portfolio Metrics */}
|
||||
<DashboardSummaryCards
|
||||
total={baseline.total}
|
||||
averages={baseline.averages}
|
||||
/>
|
||||
|
||||
{/* RIGHT SIDE: Chart */}
|
||||
<BreakdownChart
|
||||
epcBands={baseline.epcBands}
|
||||
ageBands={baseline.ageBands}
|
||||
propertyTypes={propertyTypes}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue