Skip to content

Commit

Permalink
removed commented out logic
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulGarewal committed Sep 20, 2024
1 parent d31e3d4 commit 9b09d47
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions app/Server/src/SERVERAPI/Controllers/NutrientsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,6 @@ private void FertigationDetailSetup_Fertilizer(ref FertigationDetailsViewModel f
fgvm.selFertOption = 0;
}

// if (fgvm.selTypOption == "4") // this is custom liquid fertigation
// {
// fgvm.manualEntry = true;
// fgvm.fertOptions = new List<SelectListItem>() { new SelectListItem() { Id = 1, Value = "Custom" } };
// fgvm.selFertOption = 1;
// }

return;
}

Expand Down Expand Up @@ -660,44 +653,6 @@ public IActionResult FertigationDetails(FertigationDetailsViewModel fgvm)
}
}

// bool isCustomFertigation = fgvm.selTypOption == "4";
// fgvm.manualEntry = isCustomFertigation;

// if (isCustomFertigation)
// {
// // Validate custom nutrient inputs here, may have to be moved and altered
// if (string.IsNullOrEmpty(fgvm.valN))
// {
// ModelState.AddModelError("valN", "Required");
// }
// else if (!decimal.TryParse(fgvm.valN, out decimal customN) || customN < 0 || customN > 100)
// {
// ModelState.AddModelError("valN", "Invalid. Must be between 0 and 100.");
// }

// if (string.IsNullOrEmpty(fgvm.valP2o5))
// {
// ModelState.AddModelError("valP2o5", "Required");
// }
// else if (!decimal.TryParse(fgvm.valP2o5, out decimal customP) || customP < 0 || customP > 100)
// {
// ModelState.AddModelError("valP2o5", "Invalid. Must be between 0 and 100.");
// }

// if (string.IsNullOrEmpty(fgvm.valK2o))
// {
// ModelState.AddModelError("valK2o", "Required");
// }
// else if (!decimal.TryParse(fgvm.valK2o, out decimal customK) || customK < 0 || customK > 100)
// {
// ModelState.AddModelError("valK2o", "Invalid. Must be between 0 and 100.");
// }

// // Set up custom fertilizer options
// fgvm.fertOptions = new List<SelectListItem>() { new SelectListItem() { Id = 1, Value = "Custom" } };
// fgvm.selFertOption = 1;
// }

if (fgvm.buttonPressed == "Calculate" && ModelState.IsValid)
{
ModelState.Clear();
Expand Down

0 comments on commit 9b09d47

Please sign in to comment.