correction for when there is no data for the graph to use the correct inventory (settings or status)

This commit is contained in:
csawatzky 2025-08-15 15:51:12 -06:00
parent 2bd04acb68
commit 5341c38ce2

View file

@ -110,7 +110,7 @@ export default function BinLevelOverTime(props: Props) {
}
});
if (data.length === 0) {
let bushels = bin.settings.inventory?.grainBushels ?? 0;
let bushels = bin.bushels();
let currentTime = moment().valueOf();
data.push({
value: fertilizerBin
@ -166,7 +166,7 @@ export default function BinLevelOverTime(props: Props) {
});
});
if (autoBarData.length === 0) {
let bushels = bin.settings.inventory?.grainBushels ?? 0;
let bushels = bin.bushels();
let currentTime = moment().valueOf();
autoBarData.push({
value: fertilizerBin