Skip to content

Commit

Permalink
code format
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Schüler committed Mar 1, 2024
1 parent 7239a85 commit 6157119
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
35 changes: 20 additions & 15 deletions new/src/components/Scenarios/ScenarioOverview.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
import { ReportStatistics, ScenarioModel } from "../../reportModel";
import { MenuBar, ScenarioHead } from "../ScenarioOverview/ScenarioHead";
import { Scenario } from "./Scenario";
import { useState } from "react";
import { Grid } from "@mui/material";
import {ReportStatistics, ScenarioModel} from "../../reportModel";
import {MenuBar, ScenarioHead} from "../ScenarioOverview/ScenarioHead";
import {Scenario} from "./Scenario";
import {useState} from "react";
import {Grid} from "@mui/material";

export function ScenarioOverview(props: { reportName: string, title: string, description: string, scenarios: ScenarioModel[] }) {
export function ScenarioOverview(props: {
reportName: string,
title: string,
description: string,
scenarios: ScenarioModel[]
}) {
const [expanded, setExpanded] = useState(false);
return (
<>
<Grid container>
<Grid item xs={12} md={1}>
<div style={{ height: "100vh" }}>
<MenuBar />
<div style={{height: "100vh"}}>
<MenuBar/>
</div>
</Grid>
<Grid item xs={12} md={11}>
{" "}
{/* Workshop: Extract to new component. */}
<Grid container direction="column">
<Grid item xs={12}>
<div style={{ height: "20em" }}>
<div style={{height: "20em"}}>
<ScenarioHead
headers={{
aboveHeader: props.description,
Expand Down Expand Up @@ -48,9 +53,9 @@ export function ScenarioOverview(props: { reportName: string, title: string, des
</Grid>
<Grid item xs={12}>

<div style={{ height: "40em" }}>
{props.scenarios.map((scenario) => {
return (
<div style={{height: "40em"}}>
{props.scenarios.map((scenario) => {
return (
<Scenario
reportName={props.reportName}
scenario={scenario}
Expand All @@ -59,8 +64,8 @@ export function ScenarioOverview(props: { reportName: string, title: string, des
setExpanded: setExpanded
}}
></Scenario>
);
}) }
);
})}

</div>
</Grid>
Expand All @@ -87,7 +92,7 @@ function createStatistics(scenarios: ScenarioModel[]): ReportStatistics {
// findNumberOfCasesWithStatus(scenario.scenarioCases, "SCENARIO_PENDING")
//),
numSuccessfulScenarios: 1,
//Math.sign(
//Math.sign(
// findNumberOfCasesWithStatus(scenario.scenarioCases, "SUCCESS")
//)
};
Expand Down
5 changes: 0 additions & 5 deletions new/src/components/Scenarios/SingleScenarioView.tsx

This file was deleted.

0 comments on commit 6157119

Please sign in to comment.