added place to set the actual yield for harvest plans at their completion
This commit is contained in:
parent
e41670be8f
commit
b5f6139bc0
1 changed files with 12 additions and 0 deletions
|
|
@ -178,6 +178,7 @@ export default function HarvestSettings(props: Props) {
|
||||||
const [variety, setVariety] = useState("");
|
const [variety, setVariety] = useState("");
|
||||||
const [harvestYear, setHarvestYear] = useState(new Date().getFullYear());
|
const [harvestYear, setHarvestYear] = useState(new Date().getFullYear());
|
||||||
const [targetYield, setTargetYield] = useState(0);
|
const [targetYield, setTargetYield] = useState(0);
|
||||||
|
const [actualYield, setActualYield] = useState(0);
|
||||||
const [price, setPrice] = useState("");
|
const [price, setPrice] = useState("");
|
||||||
const [newTaskDialog, setNewTaskDialog] = useState(false);
|
const [newTaskDialog, setNewTaskDialog] = useState(false);
|
||||||
const [type, setType] = useState("");
|
const [type, setType] = useState("");
|
||||||
|
|
@ -365,6 +366,7 @@ export default function HarvestSettings(props: Props) {
|
||||||
tempPlan.settings.grainType = variety;
|
tempPlan.settings.grainType = variety;
|
||||||
tempPlan.settings.harvestYear = harvestYear;
|
tempPlan.settings.harvestYear = harvestYear;
|
||||||
tempPlan.settings.yieldTarget = targetYield;
|
tempPlan.settings.yieldTarget = targetYield;
|
||||||
|
tempPlan.settings.actualYield =
|
||||||
tempPlan.settings.bushelPrice = !isNaN(parseFloat(price))
|
tempPlan.settings.bushelPrice = !isNaN(parseFloat(price))
|
||||||
? Math.round(parseFloat(price) * 100) / 100
|
? Math.round(parseFloat(price) * 100) / 100
|
||||||
: 0;
|
: 0;
|
||||||
|
|
@ -501,6 +503,16 @@ export default function HarvestSettings(props: Props) {
|
||||||
!isNaN(+e.target.value) && setTargetYield(+e.target.value);
|
!isNaN(+e.target.value) && setTargetYield(+e.target.value);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<TextField
|
||||||
|
fullWidth
|
||||||
|
margin="normal"
|
||||||
|
type="number"
|
||||||
|
label="Actual Yield per acre"
|
||||||
|
value={actualYield}
|
||||||
|
onChange={e => {
|
||||||
|
!isNaN(+e.target.value) && setActualYield(+e.target.value);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
margin="dense"
|
margin="dense"
|
||||||
id="bushPrice"
|
id="bushPrice"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue