diff --git a/frontend/src/components/BasicInputs.jsx b/frontend/src/components/BasicInputs.jsx index 9daded0..b6e516d 100644 --- a/frontend/src/components/BasicInputs.jsx +++ b/frontend/src/components/BasicInputs.jsx @@ -4,20 +4,35 @@ import PropTypes from "prop-types"; const BasicInputs = (props) => { const { items = [] } = props; + + // Divide the items into chunks of 4 + const chunkedItems = []; + for (let i = 0; i < items.length; i += 4) { + chunkedItems.push(items.slice(i, i + 4)); + } + return (
- {items.map((chunk, index) => ( - - {chunk.map((key) => ( + {chunkedItems.map((chunk, rowIndex) => ( + + {chunk.map((label, colIndex) => ( ))} diff --git a/frontend/src/components/StatBox.jsx b/frontend/src/components/StatBox.jsx new file mode 100644 index 0000000..41a02e0 --- /dev/null +++ b/frontend/src/components/StatBox.jsx @@ -0,0 +1,50 @@ +import PropTypes from "prop-types"; // Import prop-types + +import { Box, Typography, useTheme } from "@mui/material"; +import { colorSettings } from "../theme"; + +const StatBox = ({ title, subtitle, icon, increase }) => { + const theme = useTheme(); + const colors = colorSettings(theme.palette.mode); + + return ( + + + + {icon} + + {title} + + + + + + + {subtitle} + + + {increase} + + + + ); +}; + +// Add prop validation using PropTypes +StatBox.propTypes = { + title: PropTypes.string.isRequired, + subtitle: PropTypes.string.isRequired, + icon: PropTypes.element.isRequired, + progress: PropTypes.number, // Change the type according to your needs + increase: PropTypes.number, // Change the type according to your needs +}; + +export default StatBox; diff --git a/frontend/src/pages/sgsim/index.jsx b/frontend/src/pages/sgsim/index.jsx index 7b8acb7..ed00f21 100644 --- a/frontend/src/pages/sgsim/index.jsx +++ b/frontend/src/pages/sgsim/index.jsx @@ -1,14 +1,29 @@ -import { Box, Button, useTheme } from "@mui/material"; +import { Box, Button, IconButton, Typography, useTheme } from "@mui/material"; import { colorSettings } from "../../theme"; import DownloadOutlinedIcon from "@mui/icons-material/DownloadOutlined"; +// import PointOfSaleIcon from "@mui/icons-material/PointOfSale"; +import PersonAddIcon from "@mui/icons-material/PersonAdd"; +// import TrafficIcon from "@mui/icons-material/Traffic"; +import InputIcon from "@mui/icons-material/Input"; import Header from "../../components/Header"; import Footer from "../../components/Footer"; +import FormBox from "../../components/FormBox"; +// import StatBox from "../../components/StatBox"; + const Dashboard = () => { const theme = useTheme(); const colors = colorSettings(theme.palette.mode); + const forms = [ + "Realizations Number", + "Model Size (X)", + "Kriging Range", + "Kriging Sill", + "Covariance Model", + ]; + const cores = ["Python", "C"]; return ( @@ -29,10 +44,128 @@ const Dashboard = () => { }} > - Download + Download Reports + + {/* GRID & CHARTS */} + + {/* ROW 1 */} + + + } + /> + + + + + + + + } + /> + + + {/* ROW 2 */} + + + + + Results + + + + + + + + + + + + + + Statistic Results + + + +