frontend: scenarios list + detail pages with persisted fan chart
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
/scenarios — table of all scenarios with filter chips (all/cartesian/ user). Cartesian scenarios get a neutral badge; user-defined get an emerald accent. Empty-state nudges the user to run /recompute. /scenarios/:id — params summary + the latest persisted MC projection. Reuses FanChart so chart code is shared with /what-if. 404 on the projection endpoint is treated as "no run yet" (don't retry); other errors surface normally. Nav grew a Scenarios tab. typecheck + 5 tests + build pass. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
bb74bc0add
commit
d2fd765fe0
3 changed files with 286 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ import { NavLink, Route, Routes, Link } from 'react-router-dom';
|
|||
|
||||
import { api } from '@/api/client';
|
||||
import { Dashboard } from '@/pages/Dashboard';
|
||||
import { ScenarioDetail } from '@/pages/ScenarioDetail';
|
||||
import { Scenarios } from '@/pages/Scenarios';
|
||||
import { WhatIf } from '@/pages/WhatIf';
|
||||
|
||||
export function App() {
|
||||
|
|
@ -18,6 +20,7 @@ export function App() {
|
|||
</Link>
|
||||
<nav className="flex gap-4 text-sm">
|
||||
<NavTab to="/">Dashboard</NavTab>
|
||||
<NavTab to="/scenarios">Scenarios</NavTab>
|
||||
<NavTab to="/what-if">What if</NavTab>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
@ -36,6 +39,8 @@ export function App() {
|
|||
<main className="flex-1 max-w-7xl w-full mx-auto px-6 py-8">
|
||||
<Routes>
|
||||
<Route path="/" element={<Dashboard />} />
|
||||
<Route path="/scenarios" element={<Scenarios />} />
|
||||
<Route path="/scenarios/:id" element={<ScenarioDetail />} />
|
||||
<Route path="/what-if" element={<WhatIf />} />
|
||||
</Routes>
|
||||
</main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue