From 9de058f6dde49651f05031ef0ee1e3a1b16159d2 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Mon, 29 Sep 2025 10:17:01 -0600 Subject: [PATCH] hotfix for bins page where it was using the wrong inventory to determine empty when using auto lidar, also changing the feature for libra cart to have a dash when being added as that is what is being checked for in the router and navigator --- src/models/Bin.ts | 2 +- src/pages/Bins.tsx | 1 + src/pages/Users.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/models/Bin.ts b/src/models/Bin.ts index 603a9ce..b84af8c 100644 --- a/src/models/Bin.ts +++ b/src/models/Bin.ts @@ -96,7 +96,7 @@ export class Bin { } public empty(): boolean { - return this.settings.inventory?.empty || (this.settings.inventory !== undefined && this.settings.inventory !== null && this.settings.inventory.grainBushels < 5); + return this.settings.inventory?.empty || (this.settings.inventory !== undefined && this.settings.inventory !== null && this.bushels() < 5); } public objectType(): pond.ObjectType { diff --git a/src/pages/Bins.tsx b/src/pages/Bins.tsx index 9145a6a..a0e1397 100644 --- a/src/pages/Bins.tsx +++ b/src/pages/Bins.tsx @@ -345,6 +345,7 @@ export default function Bins(props: Props) { let b = resp.data.bins.map(b => Bin.any(b)); b.forEach(bin => { if (bin.empty()) { + console.log(bin.name()) empty.push(bin); } else if (bin.storage() === pond.BinStorage.BIN_STORAGE_FERTILIZER) { fert.push(bin); diff --git a/src/pages/Users.tsx b/src/pages/Users.tsx index 45dd476..c7e155c 100644 --- a/src/pages/Users.tsx +++ b/src/pages/Users.tsx @@ -129,7 +129,7 @@ export default function Users() { "marketplace", "installer", "cnhi", - "libracart" + "libra-cart" ].sort(); const [rows, setRows] = useState([])