Skip to content

Commit

Permalink
fixed scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schüler committed Mar 1, 2024
1 parent b1706f6 commit 5dfb48c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion new/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ function App() {
title={"Mein Titel"}
description={"Meine Description"}
reportName={guaranteedStateReport.name}
scenarios={guaranteedStateReport.scenarios}
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion new/src/components/Scenarios/Scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function Scenario(props: ScenarioProps) {
scenario={props.scenario}
expanded={expanded}
setExpanded={onExpansionChanged}
summary={"Summary"}
summary={props.scenario.classTitle}
className={"className"}
/>

Expand Down
7 changes: 4 additions & 3 deletions new/src/components/Scenarios/ScenarioOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useState } from "react";
import { Grid } from "@mui/material";
import { filterByStatus } from "../../ReportFilter";
import { useFilters } from "../../hooks/useFilters";
import {repository} from "../../repository";

export enum ExpansionState {
COLLAPSED,
Expand All @@ -15,10 +16,10 @@ export function ScenarioOverview(props: {
reportName: string;
title: string;
description: string;
scenarios: ScenarioModel[];
}) {
const [allExpanded, setAllExpanded] = useState<ExpansionState>(ExpansionState.COLLAPSED);
const [filters] = useFilters();
const scenarios = repository.getAllScenarios();

return (
<>
Expand All @@ -39,7 +40,7 @@ export function ScenarioOverview(props: {
aboveHeader: props.description,
header: props.title
}}
statistic={createStatistics(props.scenarios)}
statistic={createStatistics(scenarios)}
onCollapseButtonClick={() => {
setAllExpanded(ExpansionState.COLLAPSED);
}}
Expand All @@ -58,7 +59,7 @@ export function ScenarioOverview(props: {
</Grid>
<Grid item xs={12}>
<div style={{ height: "40em" }}>
{filterByStatus(filters.status).flatMap(scenario => (
{filterByStatus(filters.status).map(scenario => (
<Scenario
reportName={props.reportName}
scenario={scenario}
Expand Down

0 comments on commit 5dfb48c

Please sign in to comment.