Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0e65cb0
feat: Types for pathway structure
anth-volk Nov 14, 2025
7704f59
feat: First implementation of one portion of report creation flow
anth-volk Nov 14, 2025
53efb63
feat: First implementation of sub-report views
anth-volk Nov 14, 2025
5187e2a
feat: Continued implementation
anth-volk Nov 17, 2025
0f50597
fix: Migrate value setter components to non-Redux format
anth-volk Nov 17, 2025
42e4f57
feat: Implement existing population view
anth-volk Nov 17, 2025
6c3b44f
feat: Implement existing policy selection
anth-volk Nov 17, 2025
34da95b
fix: Fix routing error
anth-volk Nov 17, 2025
6fdc3ce
feat: Create specific layout for pathways
anth-volk Nov 17, 2025
49bd9c6
feat: Implement existing simulation view for report pathway
anth-volk Nov 17, 2025
5713707
fix: Relabel report view modes
anth-volk Nov 17, 2025
b3e0ae7
feat: Refactored utility functions for pathways
anth-volk Nov 17, 2025
96ff0b6
fix: Add report funcs as callbacks and fix typing issues
anth-volk Nov 17, 2025
01b7825
fix: Remove now-uneeded isCreated key from ingredients
anth-volk Nov 17, 2025
e75db50
fix: Properly convert types when setting up report
anth-volk Nov 17, 2025
2c2d934
fix: Safer handling of household data
anth-volk Nov 17, 2025
64a9a2f
feat: Pathway mode for better component reuse
anth-volk Nov 17, 2025
18a2c43
feat: Simulation pathway wrapper
anth-volk Nov 17, 2025
7e18ad5
fix: Fix various bugs
anth-volk Nov 18, 2025
e275416
fix: Remove bug causing duplicate creation of user associations for sims
anth-volk Nov 18, 2025
b53b70e
fix: Fix household display bug
anth-volk Nov 18, 2025
193552d
fix: Move simulation pathway to proper layout
anth-volk Nov 18, 2025
33e1ace
feat: Populations pathway
anth-volk Nov 18, 2025
ff392ac
feat: Policy pathway
anth-volk Nov 18, 2025
125bee9
feat: Cancel and back buttons
anth-volk Nov 18, 2025
ec864ec
feat: Better back handling
anth-volk Nov 18, 2025
c5a290c
feat: Don't show select existing/new screen when an ingredient doesn'…
anth-volk Nov 19, 2025
ebd6930
fix: Move pagination controls to button bar
anth-volk Nov 19, 2025
24f7a37
fix: Improve button bar, remove card disabling
anth-volk Nov 19, 2025
4ed2c67
feat: Select default simulation button
anth-volk Nov 20, 2025
9c9738c
feat: Remove old flows
anth-volk Nov 20, 2025
581876c
chore: Remove test buttons
anth-volk Nov 20, 2025
64fd342
fix: Migrate naming
anth-volk Nov 20, 2025
a0c993a
test: First round of tests
anth-volk Nov 20, 2025
7dec3f2
test: Add more tests
anth-volk Nov 20, 2025
85cab58
test: Add tests
anth-volk Nov 20, 2025
7d14ec2
test: Fix existing tests
anth-volk Nov 20, 2025
46a07e2
chore: Lint
anth-volk Nov 20, 2025
31bd4b4
chore: Fix typing
anth-volk Nov 20, 2025
94332e7
fix: Typing
anth-volk Nov 20, 2025
406f3c8
fix: Fix spacing
anth-volk Nov 21, 2025
e3acbc6
fix: Fix tests
anth-volk Nov 21, 2025
77bafdb
fix: Lint
anth-volk Nov 21, 2025
d79aacf
fix: Clean up and use shared callbacks
anth-volk Nov 24, 2025
8da17ca
fix: Fix naming to make clear difference between view modes
anth-volk Nov 24, 2025
487897d
chore: Lint
anth-volk Nov 24, 2025
95c40d1
fix: Fix display of country default simulation
anth-volk Nov 25, 2025
c93c1c3
fix: Fix display of default baseline selection
anth-volk Nov 25, 2025
2095c61
chore: Lint
anth-volk Nov 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 38 additions & 33 deletions app/src/Router.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom';
import FlowRouter from './components/FlowRouter';
import Layout from './components/Layout';
import { createBrowserRouter, Navigate, Outlet, RouterProvider } from 'react-router-dom';
import PathwayLayout from './components/PathwayLayout';
import StandardLayout from './components/StandardLayout';
import StaticLayout from './components/StaticLayout';
import { PolicyCreationFlow } from './flows/policyCreationFlow';
import { PopulationCreationFlow } from './flows/populationCreationFlow';
import { ReportCreationFlow } from './flows/reportCreationFlow';
import { SimulationCreationFlow } from './flows/simulationCreationFlow';
import AppPage from './pages/AppPage';
import BlogPage from './pages/Blog.page';
import DashboardPage from './pages/Dashboard.page';
Expand All @@ -21,6 +17,10 @@ import SimulationsPage from './pages/Simulations.page';
import SupportersPage from './pages/Supporters.page';
import TeamPage from './pages/Team.page';
import TermsPage from './pages/Terms.page';
import PolicyPathwayWrapper from './pathways/policy/PolicyPathwayWrapper';
import PopulationPathwayWrapper from './pathways/population/PopulationPathwayWrapper';
import ReportPathwayWrapper from './pathways/report/ReportPathwayWrapper';
import SimulationPathwayWrapper from './pathways/simulation/SimulationPathwayWrapper';
import { CountryAppGuard } from './routing/guards/CountryAppGuard';
import { CountryGuard } from './routing/guards/CountryGuard';
import { MetadataGuard } from './routing/guards/MetadataGuard';
Expand All @@ -43,7 +43,11 @@ const router = createBrowserRouter(
element: <MetadataGuard />,
children: [
{
element: <Layout />,
element: (
<StandardLayout>
<Outlet />
</StandardLayout>
),
children: [
{
path: 'report-output/:reportId/:subpage?/:view?',
Expand All @@ -57,8 +61,13 @@ const router = createBrowserRouter(
{
element: <MetadataLazyLoader />,
children: [
// Regular routes with standard layout
{
element: <Layout />,
element: (
<StandardLayout>
<Outlet />
</StandardLayout>
),
children: [
{
path: 'dashboard',
Expand All @@ -69,49 +78,45 @@ const router = createBrowserRouter(
path: 'reports',
element: <ReportsPage />,
},
{
path: 'reports/create',
element: <FlowRouter flow={ReportCreationFlow} returnPath="reports" />,
},
{
path: 'simulations',
element: <SimulationsPage />,
},
{
path: 'simulations/create',
element: <FlowRouter flow={SimulationCreationFlow} returnPath="simulations" />,
},
{
path: 'households',
element: <PopulationsPage />,
},
{
path: 'households/create',
element: <FlowRouter flow={PopulationCreationFlow} returnPath="households" />,
},
{
path: 'policies',
element: <PoliciesPage />,
},
{
path: 'policies/create',
element: <FlowRouter flow={PolicyCreationFlow} returnPath="policies" />,
},
{
path: 'account',
element: <div>Account settings page</div>,
},
],
},
],
},
// Routes that don't need metadata at all (no guard)
{
element: <Layout />,
children: [
// Pathway routes that manage their own layouts
{
path: 'configurations',
element: <div>Configurations page</div>,
element: <PathwayLayout />,
children: [
{
path: 'reports/create',
element: <ReportPathwayWrapper />,
},
{
path: 'simulations/create',
element: <SimulationPathwayWrapper />,
},
{
path: 'households/create',
element: <PopulationPathwayWrapper />,
},
{
path: 'policies/create',
element: <PolicyPathwayWrapper />,
},
],
},
],
},
Expand Down
11 changes: 2 additions & 9 deletions app/src/api/geographicAssociation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,8 @@ export class LocalStorageGeographicStore implements UserGeographicStore {

const populations = this.getStoredPopulations();

// Check for duplicates
const exists = populations.some(
(p) => p.userId === population.userId && p.geographyId === population.geographyId
);

if (exists) {
throw new Error('Geographic population already exists');
}

// Allow duplicates - users can create multiple entries for the same geography
// Each entry has a unique ID from the caller
const updatedPopulations = [...populations, newPopulation];
this.setStoredPopulations(updatedPopulations);

Expand Down
128 changes: 0 additions & 128 deletions app/src/components/FlowContainer.tsx

This file was deleted.

51 changes: 0 additions & 51 deletions app/src/components/FlowRouter.tsx

This file was deleted.

Loading
Loading