adding logs about rows to try to find the undefined one in the table

This commit is contained in:
csawatzky 2025-04-10 11:25:18 -06:00
parent 0837b4fc7b
commit 9d3cd41d5f
7 changed files with 15 additions and 1 deletions

View file

@ -173,6 +173,7 @@ export default function CableEstimator() {
setRowCount(clone.length) setRowCount(clone.length)
//split out the first x amount for the page //split out the first x amount for the page
let rows = clone.splice(tablePage * pageSize, pageSize) let rows = clone.splice(tablePage * pageSize, pageSize)
console.log("cableEstimator: " + rows)
setDisplayedRows(rows) setDisplayedRows(rows)
setLoading(false) setLoading(false)
},[binOptions, tablePage, pageSize, tableSearch]) },[binOptions, tablePage, pageSize, tableSearch])

View file

@ -4,6 +4,7 @@ import ResponsiveTable, { Column } from "common/ResponsiveTable";
//import { getTableIcons } from "common/ResponsiveTable"; //import { getTableIcons } from "common/ResponsiveTable";
//import MaterialTable from "material-table"; //import MaterialTable from "material-table";
import { pond } from "protobuf-ts/pond"; import { pond } from "protobuf-ts/pond";
import { useEffect } from "react";
import { distanceConversion, getDistanceUnit } from "utils"; import { distanceConversion, getDistanceUnit } from "utils";
interface Props { interface Props {
@ -55,6 +56,10 @@ export default function CableMounting(props: Props) {
} }
] ]
useEffect(()=>{
console.log("cableMounting: " + bin.CableSums)
},[bin])
return ( return (
<ResponsiveTable<CableSum> <ResponsiveTable<CableSum>
title={<Typography style={{ fontSize: 20, fontWeight: 650 }}>Install Guide</Typography>} title={<Typography style={{ fontSize: 20, fontWeight: 650 }}>Install Guide</Typography>}

View file

@ -24,6 +24,7 @@ export default function CableTable(props: Props) {
convertedCables.forEach(cable => { convertedCables.forEach(cable => {
cable.Length = Math.round(distanceConversion(cable.Length) * 100) / 100; cable.Length = Math.round(distanceConversion(cable.Length) * 100) / 100;
}); });
console.log("cableTable: " + cableData)
setCableData(convertedCables); setCableData(convertedCables);
}, [bin]); }, [bin]);

View file

@ -141,6 +141,10 @@ export default function ResponsiveTable<T extends Object>(props: Props<T>) {
return saved ? JSON.parse(saved) : []; return saved ? JSON.parse(saved) : [];
}); });
useEffect(()=>{
console.log("ResponsiveTable rows: " + rows.toString())
},[rows])
useEffect(() => { useEffect(() => {
localStorage.setItem(filterKey, JSON.stringify(filterList)); localStorage.setItem(filterKey, JSON.stringify(filterList));
}, [filterList]) }, [filterList])

View file

@ -97,6 +97,7 @@ export default function Heaters() {
} }
const desktopTable = () => { const desktopTable = () => {
console.log("Heater: " + heaters)
return ( return (
<ResponsiveTable<pond.ObjectHeaterData> <ResponsiveTable<pond.ObjectHeaterData>
title={"Heaters"} title={"Heaters"}

View file

@ -176,6 +176,7 @@ export default function Sites() {
}; };
const desktopView = () => { const desktopView = () => {
console.log("Sites: " + sites)
return ( return (
<ResponsiveTable<SiteWithData> <ResponsiveTable<SiteWithData>
title={"Jobsites"} title={"Jobsites"}

View file

@ -81,7 +81,8 @@ export default function TransactionViewer(props: Props) {
}; };
const myTable = () => { const myTable = () => {
console.log(transactions) console.log("transactionViewer: " + displayedRows)
//console.log(transactions)
return ( return (
<ResponsiveTable<Transaction> <ResponsiveTable<Transaction>
isLoading={loading} isLoading={loading}