Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
MedhaMahanta committed Aug 20, 2023
1 parent 547509b commit b3af057
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 30 deletions.
76 changes: 47 additions & 29 deletions client/src/components/Advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ import {
Paper,
TextField,
Typography,
styled, Table, TableBody, TableCell, TableContainer, TableHead, TableRow
styled,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
} from "@mui/material";
import axios from "axios";
import { useState } from "react";
Expand All @@ -26,8 +32,8 @@ const Item = styled(Paper)(({ theme }) => ({
let RTU_key = 0;

const createTableData = (number, name, value) => {
return {number, name, value};
}
return { number, name, value };
};

export default function Advanced() {
let navigate = useNavigate(); // navigate to diff pages
Expand Down Expand Up @@ -150,7 +156,11 @@ export default function Advanced() {
createTableData("1", "Enthalpy Coast", graphData[0]),
createTableData("2", "Chiller Direct Reduction", graphData[1]),
createTableData("3", "Reduced kW from CFM Reduction", graphData[2]),
createTableData("4", "Reduced kW from Static Pressure Reset", graphData[3]),
createTableData(
"4",
"Reduced kW from Static Pressure Reset",
graphData[3]
),
createTableData("5", "Total Load Reduction", graphData[4]),
]);
};
Expand Down Expand Up @@ -479,31 +489,39 @@ export default function Advanced() {
Reduction Results
</Typography>

<TableContainer component={Paper} style={{width: "80%"}}>
<Table aria-label="simple table">
<TableHead>
<TableRow >
<TableCell> </TableCell>
<TableCell align="center" style={{fontWeight: "bold", color: "#303030"}}>Shed Category</TableCell>
<TableCell align="center" style={{fontWeight: "bold"}}> Shed Result (kW)</TableCell>
</TableRow>
</TableHead>
<TableBody>
{tableRows.map((row) => (
<TableRow
key={row.number}
sx={{ '&:last-child td, &:last-child th': { border: 0 } }}
>
<TableCell align="center" component="th" scope="row">
{row.number}
</TableCell>
<TableCell align="center">{row.name}</TableCell>
<TableCell align="center">{(row.value).toFixed(2)}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>
<TableContainer component={Paper} style={{ width: "80%" }}>
<Table aria-label="simple table">
<TableHead>
<TableRow>
<TableCell> </TableCell>
<TableCell
align="center"
style={{ fontWeight: "bold", color: "#303030" }}
>
Shed Category
</TableCell>
<TableCell align="center" style={{ fontWeight: "bold" }}>
{" "}
Shed Result (kW)
</TableCell>
</TableRow>
</TableHead>
<TableBody>
{tableRows.map((row) => (
<TableRow
key={row.number}
sx={{ "&:last-child td, &:last-child th": { border: 0 } }}
>
<TableCell align="center" component="th" scope="row">
{row.number}
</TableCell>
<TableCell align="center">{row.name}</TableCell>
<TableCell align="center">{row.value.toFixed(2)}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</TableContainer>

{/* <Grid justifyContent="left" style={{ marginTop: "10px" }}>
{Object.keys(calculationOutput).map((keyName, i) => (
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ export default function Home() {
<Typography
variant="h4"
color="white.main"
sx={{ fontWeight: "bold", marginTop: 10, textShadow: "2px 2px #000" }}
sx={{
fontWeight: "bold",
marginTop: 10,
textShadow: "2px 2px #000",
}}
>
Demand Flexibility Assessment Tool
</Typography>
Expand Down

0 comments on commit b3af057

Please sign in to comment.