adding measures button

This commit is contained in:
Khalim Conn-Kowlessar 2025-12-16 05:28:11 +00:00
parent 727728d40c
commit 58834324e1

View file

@ -145,12 +145,42 @@ export function ReportingClientArea({
return (
<>
<ScenarioSelectorWrapper
scenarios={scenarios}
portfolioId={portfolioId}
selectedScenarioId={selectedScenarioId}
setSelectedScenarioId={setSelectedScenarioId}
/>
<div className="flex items-center justify-between gap-4">
{/* LEFT: Scenario selector */}
<ScenarioSelectorWrapper
scenarios={scenarios}
portfolioId={portfolioId}
selectedScenarioId={selectedScenarioId}
setSelectedScenarioId={setSelectedScenarioId}
/>
{/* RIGHT: Actions (only when scenario selected) */}
{selectedScenarioId && (
<div className="flex items-center gap-2">
<button
onClick={() => {
// placeholder wire this up to your measures UI
console.log("Show measures for scenario", selectedScenarioId);
}}
className="rounded-md border px-3 py-2 text-sm font-medium hover:bg-hoverblue bg-brandblue text-gray-100"
>
Show measures
</button>
<button
onClick={() => {
window.open(
`/portfolio/${portfolioId}/reporting/pdf?scenarioId=${selectedScenarioId}`,
"_blank"
);
}}
className="rounded-md border px-3 py-2 text-sm font-medium hover:bg-gray-50"
>
Download PDF
</button>
</div>
)}
</div>
{/* LOADING + ERROR STATES */}
{isLoading && selectedScenarioId && (
@ -161,17 +191,6 @@ export function ReportingClientArea({
Could not load scenario data.
</div>
)}
<button
onClick={() => {
window.open(
`/portfolio/${portfolioId}/reporting/pdf?scenarioId=${selectedScenarioId}`,
"_blank"
);
}}
className="rounded-md border px-3 py-2 text-sm font-medium hover:bg-gray-50"
>
Download PDF
</button>
{/* --- RETROFIT SECTION --- */}
<SectionDivider