working on US ton stuff

This commit is contained in:
csawatzky 2026-03-04 12:51:10 -06:00
parent 3401cc7c15
commit 29d9e7377c
18 changed files with 474 additions and 117 deletions

View file

@ -88,6 +88,7 @@ export default function FieldSettings(props: Props) {
settings.grainSubtype = grainSubtype;
settings.landLocation = landLocation;
settings.acres = acres;
settings.bushelsPerTonne = isNaN(parseFloat(bushelsPerTonne)) ? 1 : parseFloat(bushelsPerTonne);
fieldAPI
.updateField(selectedField.key(), settings, undefined, as)
@ -121,6 +122,7 @@ export default function FieldSettings(props: Props) {
geo.shapes = borders;
}
settings.fieldGeoData = geo;
settings.bushelsPerTonne = isNaN(parseFloat(bushelsPerTonne)) ? 1 : parseFloat(bushelsPerTonne);
fieldAPI
.addField(settings, as)
.then(resp => {
@ -226,6 +228,7 @@ export default function FieldSettings(props: Props) {
if (option) {
let grainType = pond.Grain[option.value as keyof typeof pond.Grain];
setCropType(grainType);
console.log("set bpt here")
setBushelsPerTonne(GrainDescriber(grainType).bushelsPerTonne.toString());
}
}}