From 91d5912daaaee7dd5d814de74cb4f8187eec8deb Mon Sep 17 00:00:00 2001 From: sggerard Date: Thu, 5 Sep 2024 10:12:54 -0700 Subject: [PATCH] Fix icons, minor cleanup --- .../src/SERVERAPI/Controllers/NutrientsController.cs | 4 +--- .../Views/Nutrients/FertigationDetails.cshtml | 12 ++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs index 7244f624..68e5c8e2 100644 --- a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs +++ b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs @@ -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; @@ -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); @@ -758,6 +755,7 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm) FertigationUpdate(fgvm); } + //Still required this year FertigationStillRequired(ref fgvm); if (fgvm.id == null) { diff --git a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml index 590a6919..bc9ea642 100644 --- a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml +++ b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml @@ -227,12 +227,24 @@
+ @if (!string.IsNullOrEmpty(Model.totNIcon)) + { + + } @Model.totN
+ @if (!string.IsNullOrEmpty(Model.totPIcon)) + { + + } @Model.totP2o5
+ @if (!string.IsNullOrEmpty(Model.totKIcon)) + { + + } @Model.totK2o