working on US ton stuff
This commit is contained in:
parent
3401cc7c15
commit
29d9e7377c
18 changed files with 474 additions and 117 deletions
|
|
@ -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());
|
||||
}
|
||||
}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue