@Model.fertigationTime
@@ -481,5 +481,18 @@
$('#applDate').datepicker('setDate', date);
}
}
+
+ //change unit label based on userUnit selection of Application rate units
+ $('#ddlProdRate').on('change', function () {
+ var userUnit = $(this).find("option:selected").text();
+ $('#productVolumeLabel').text('Total Product Volume per Application (' + userUnit + ')');
+ $('#productVolumeGrowingLabel').text('Total Product Volume Growing Season (' + userUnit + ')');
+ });
+ // On page load, initialize the label based on the selected unit
+ $(function () {
+ var initialUnit = $('#ddlProdRate option:selected').text();
+ $('#productVolumeLabel').text('Total Product Volume per Application (' + initialUnit + ')');
+ $('#productVolumeGrowingLabel').text('Total Product Volume for Growing Season (' + initialUnit + ')');
+ });
});
From 4c8b185a6b5e940e5d878a191370f086d65dfa62 Mon Sep 17 00:00:00 2001
From: luna <5862lunamoon@gmail.com>
Date: Wed, 27 Nov 2024 14:36:45 -0800
Subject: [PATCH 2/4] changes to spacing
---
.../Controllers/NutrientsController.cs | 12 ++---
.../Views/Nutrients/FertigationDetails.cshtml | 50 +++++++++----------
2 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs
index ae29e575..9eb23a06 100644
--- a/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs
+++ b/app/Server/src/SERVERAPI/Controllers/NutrientsController.cs
@@ -390,7 +390,7 @@ private void FertigationDetail_Reset(ref FertigationDetailsViewModel fgvm)
fgvm.totPIcon = "";
fgvm.totKIcon = "";
- fgvm.fertigationTime = 0.0M;
+ fgvm.fertigationTime = 0M;
fgvm.totProductVolPerFert = 0.0M;
fgvm.totProductVolPerSeason = 0.0M;
@@ -797,11 +797,11 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
decimal convertedProductRate = Convert.ToDecimal(fgvm.productRate) * _fU.ConversionToImperialGallonsPerAcre;
//Total Product Volume per fertigation
- fgvm.totProductVolPerFert = Math.Round((field.Area * convertedProductRate), 2); // convert to int/string? Error messages?
+ fgvm.totProductVolPerFert = Math.Round((field.Area * convertedProductRate), 1); // convert to int/string? Error messages?
// Total product volume per growing season calc
// Product Rate x Fertigation area x fert per season
- fgvm.totProductVolPerSeason = Math.Round((field.Area * convertedProductRate * fgvm.eventsPerSeason), 2); // convert to int/string? Error messages?
+ fgvm.totProductVolPerSeason = Math.Round((field.Area * convertedProductRate * fgvm.eventsPerSeason), 1); // convert to int/string? Error messages?
decimal injectionRateConversion = 0;
switch (fgvm.selInjectionRateUnitOption)
@@ -826,7 +826,7 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
//Fertigation time
decimal fertTimeVal = Convert.ToDecimal(fgvm.totProductVolPerFert) / (Convert.ToDecimal(fgvm.injectionRate) / injectionRateConversion);
- fgvm.fertigationTime = Math.Round(fertTimeVal, 2);
+ fgvm.fertigationTime = Math.Round(fertTimeVal, 0);
//Applied nutrients per fertigation
fgvm.calcN = Convert.ToInt32(fertilizerNutrients.fertilizer_N).ToString();
@@ -1017,10 +1017,10 @@ private void SolidFertigationCalculation(FertigationDetailsViewModel fgvm){
fgvm.nutrientConcentrationP205 = Convert.ToString(Math.Round(amountToDissolve * Convert.ToDecimal(fgvm.valP2o5) / 100 / tankVolume, 2));
decimal injectionRate = Convert.ToDecimal(fgvm.injectionRate);
- fgvm.fertigationTime = Math.Round(Convert.ToDecimal(fgvm.tankVolume) / injectionRate, 2);
+ fgvm.fertigationTime = Math.Round(Convert.ToDecimal(fgvm.tankVolume) / injectionRate, 0);
if (amountToDissolve <= tankVolume * solInWater){
- fgvm.dryAction = "Good";
+ fgvm.dryAction = "Soluble";
}
else{
fgvm.dryAction = "Reduce the amount to dissolve";
diff --git a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml
index bca0ca9b..137e9905 100644
--- a/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml
+++ b/app/Server/src/SERVERAPI/Views/Nutrients/FertigationDetails.cshtml
@@ -106,13 +106,13 @@