Skip to content

Commit

Permalink
Fix icons, minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sggerard committed Sep 5, 2024
1 parent b5b4f4a commit 91d5912
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 1 addition & 3 deletions app/Server/src/SERVERAPI/Controllers/NutrientsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,11 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
fgvm.totProductVolPerSeason = Math.Round((field.Area * convertedProductRate * fgvm.eventsPerSeason), 2); // convert to int/string? Error messages?

decimal injectionRateConversion = 0;
ConversionFactor _cf = _sd.GetConversionFactor();
switch (fgvm.selInjectionRateUnitOption)
{
//US gallon/min
//1 Imperial gallons per minute to gallon/minute = 1.20095 gallon/minute
case "1":
//injectionRateConversion = _cf.
injectionRateConversion = 1.20095M;
break;

Expand All @@ -731,7 +729,6 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
}

//Fertigation time
//volumePerFertigation / (injectionRate / conversionFactor)
decimal fertTimeVal = Convert.ToDecimal(fgvm.totProductVolPerFert) / (Convert.ToDecimal(fgvm.injectionRate) / injectionRateConversion);
fgvm.fertigationTime = Math.Round(fertTimeVal, 2);

Expand All @@ -758,6 +755,7 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
FertigationUpdate(fgvm);
}

//Still required this year
FertigationStillRequired(ref fgvm);
if (fgvm.id == null)
{
Expand Down
12 changes: 12 additions & 0 deletions app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -227,12 +227,24 @@
</div>
<div class="Row">
<div class="Cell" style="text-align:center">
@if (!string.IsNullOrEmpty(Model.totNIcon))
{
<img src="~/images/@(Model.totNIcon).svg" title="@Model.totNIconText"/>
}
@Model.totN
</div>
<div class="Cell" style="text-align:center">
@if (!string.IsNullOrEmpty(Model.totPIcon))
{
<img src="~/images/@(Model.totPIcon).svg" title="@Model.totPIconText" />
}
@Model.totP2o5
</div>
<div class="Cell" style="text-align:center">
@if (!string.IsNullOrEmpty(Model.totKIcon))
{
<img src="~/images/@(Model.totKIcon).svg" title="@Model.totKIconText" />
}
@Model.totK2o
</div>
</div>
Expand Down

0 comments on commit 91d5912

Please sign in to comment.