part way through the drawer display on the map

This commit is contained in:
csawatzky 2026-03-04 12:51:41 -06:00
parent 29d9e7377c
commit dd6a842fda

View file

@ -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 = () => { const binUtilizationList = () => {
@ -746,6 +757,8 @@ export default function BinyardDisplay(props: Props) {
cap = cap * 35.239; cap = cap * 35.239;
unit = " L"; unit = " L";
}else{ }else{
amount
cap
unit = grainUnitDisplay(inv) unit = grainUnitDisplay(inv)
} }