diff --git a/src/Routes/Logs/Logs.tsx b/src/Routes/Logs/Logs.tsx index 51d73fc..72df12a 100644 --- a/src/Routes/Logs/Logs.tsx +++ b/src/Routes/Logs/Logs.tsx @@ -1,14 +1,78 @@ import * as React from "react"; import LogsIcon from "../../Components/Icons/LogsIcon/LogsIcon"; import styles from "../../styles"; +import { + Table, + TableBody, + TableCell, + TableContainer, + TableHead, + TableRow, +} from "@mui/material"; + +function createData( + id: number, + p_id: number, + p_name: string, + amount_changed: number, + timestamp: string +) { + return { id, p_id, p_name, amount_changed, timestamp }; +} + +const sample_data = [ + createData(1, 1, "Zidanes Water", -5, "2/24/2023 10:05AM"), + createData(2, 1, "Zidanes Water", +10, "2/24/2023 1:05PM"), + createData(3, 2, "Dans Beefed Corn", +25, "2/25/2023 4:05PM"), + createData(4, 2, "Dans Beefed Corn", -15, "2/26/2023 3:35PM"), +]; export default function Logs() { + function change_color(amount: number) { + if (amount > 0) { + return {amount}; + } else { + return {amount}; + } + } return (

Logs

+ + + + + Log ID + Product ID + Product + Amount Change + Timestamp + + + + {sample_data.map((row) => ( + + {row.id} + {row.p_id} + {row.p_name} + {change_color(row.amount_changed)} + {row.timestamp} + + ))} + +
+
); } diff --git a/src/styles.tsx b/src/styles.tsx index 55978d1..2702ab8 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -37,6 +37,16 @@ const styles: { [key: string]: React.CSSProperties } = { color: "white", fontWeight: "bold", }, + text_red: { + fontSize: "1.3vw", + color: "#a44141", + fontWeight: "bold", + }, + text_green: { + fontSize: "1.3vw", + color: "#80b28a", + fontWeight: "bold", + }, logo_title: { color: "#80b38b", fontSize: 26,