From dd6a842fda50cc2942d4dfd1887e671f7dc941f4 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Wed, 4 Mar 2026 12:51:41 -0600 Subject: [PATCH] part way through the drawer display on the map --- src/bin/BinyardDisplay.tsx | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/bin/BinyardDisplay.tsx b/src/bin/BinyardDisplay.tsx index a29c482..667b558 100644 --- a/src/bin/BinyardDisplay.tsx +++ b/src/bin/BinyardDisplay.tsx @@ -668,8 +668,19 @@ export default function BinyardDisplay(props: Props) { } }; - const grainQuantityDisplay = (custom?: pond.CustomInventory) => { - + const grainQuantityDisplay = (bushels: number, custom?: pond.CustomInventory) => { + if (custom && custom.bushelsPerTonne <= 1) { + return bushels; + } + + switch (getGrainUnit()) { + case pond.GrainUnit.GRAIN_UNIT_TONNE: + return " mT"; + case pond.GrainUnit.GRAIN_UNIT_TON: + return " t"; + default: + return bushels; + } } const binUtilizationList = () => { @@ -746,6 +757,8 @@ export default function BinyardDisplay(props: Props) { cap = cap * 35.239; unit = " L"; }else{ + amount + cap unit = grainUnitDisplay(inv) }