diff --git a/src/bin/BinSettings.tsx b/src/bin/BinSettings.tsx index 8816314..c574c96 100644 --- a/src/bin/BinSettings.tsx +++ b/src/bin/BinSettings.tsx @@ -424,7 +424,6 @@ export default function BinSettings(props: Props) { }; const updateBin = () => { - console.log("bin settings update") // If initial moisture is updated, so does the timestamp if (form.inventory?.initialMoisture !== bin?.settings.inventory?.initialMoisture) { if (form.inventory) form.inventory.initialTimestamp = moment().format(); @@ -451,7 +450,6 @@ export default function BinSettings(props: Props) { form.lowTemp = lowTempC; form.autoGrainNode = autoTopNode; if (form.inventory) form.inventory.inventoryControl = inventoryControl; - console.log("bin api update") binAPI .updateBin(bin.key(), form) .then(response => { @@ -839,7 +837,6 @@ export default function BinSettings(props: Props) { row value={inventoryControl} onChange={(_, value) => { - console.log(value); setInventoryControl(+value); }}> { - console.log("create transaction") let dest = selectedDestination; let source = selectedSource; let bpt = 1; @@ -249,16 +248,13 @@ export default function GrainTransaction(props: Props) { grainTransaction.subtype = obj.subtype(); } } - console.log(newTransaction) transactionAPI.addTransaction(newTransaction, imageIDs).then(resp => { - console.log(resp) newTransaction.key = resp.data.key; closeDialogs(true, newTransaction); }); }; const updateInventory = () => { - console.log("update inventory") //this is the amount to add to the destination let destinationAdd = Math.abs( isNaN(parseFloat(grainChangeVal)) ? 1 : parseFloat(grainChangeVal) diff --git a/src/navigation/SideNavigator.tsx b/src/navigation/SideNavigator.tsx index d1868d2..f4003c8 100644 --- a/src/navigation/SideNavigator.tsx +++ b/src/navigation/SideNavigator.tsx @@ -1,4 +1,4 @@ -import { ChevronRight, People, Person } from "@mui/icons-material"; +import { ChevronRight, People, Person, SyncAlt } from "@mui/icons-material"; import ChevronLeft from "@mui/icons-material/ChevronLeft"; import { darken, @@ -306,7 +306,19 @@ export default function SideNavigator(props: Props) { - {open && } + {open && } + + + + goTo("/transactions")} + classes={getClasses("/transactions")} + > + + + + {open && } diff --git a/src/transactions/transactionViewer.tsx b/src/transactions/transactionViewer.tsx index 2d7fcf1..ef154c7 100644 --- a/src/transactions/transactionViewer.tsx +++ b/src/transactions/transactionViewer.tsx @@ -39,19 +39,23 @@ export default function TransactionViewer(props: Props) { { title: "Date", render: row => { - return {moment(row.transaction.timestamp).format("YYYY-MM-DD")}; + return ( + + {moment(row.transaction.timestamp).format("YYYY-MM-DD")} + + ); } }, { title: "From", render: row => { return ( - + {ObjectDescriber(row.transaction.fromObject).name} {objectNames ? objectNames.get(row.transaction.fromKey) : row.transaction.fromKey} - + ); } }, @@ -59,65 +63,45 @@ export default function TransactionViewer(props: Props) { title: "To", render: row => { return ( - + {ObjectDescriber(row.transaction.toObject).name} {objectNames ? objectNames.get(row.transaction.toKey) : row.transaction.toKey} - + ); } }, { title: "Transaction", render: row => { - return ; + return ( + + + + ); } } ]; + const handleChange = (event: any) => { + setPageSize(event.target.value); + }; + const myTable = () => { return ( + isLoading={loading} + title={"Inventory Transactions"} page={tablePage} + columns={columns} pageSize={pageSize} rows={displayedRows} total={transactions.length} setPage={page => setTablePage(page)} - handleRowsPerPageChange={() => {}} + handleRowsPerPageChange={handleChange} /> ) - // return ( - // ( - // - // - // - // ) - // }} - // title="Inventory Transactions" - // /> - // ); }; return {myTable()};