Added Hold Report to the production reports.

This commit is contained in:
Daniel Wathen
2023-01-16 12:28:48 -07:00
parent bbd396c25e
commit 9525355b55
8 changed files with 124 additions and 6 deletions

View File

@ -15,7 +15,7 @@ public class ProductionReportController : Controller
public ProductionReportController(ILogger<ProductionReportController> logger)
{
_logger = logger;
_baseDBUrl = "http://localhost:50201/api/";
_baseDBUrl = "http://localhost:50201/api/ScrapeDB/";
_logger.LogInformation("Base Database Address: {baseUrl}", _baseDBUrl);
}
@ -24,11 +24,9 @@ public class ProductionReportController : Controller
public IActionResult DailyReport()
{
string baseScrapeDbUrl = _baseDBUrl + "ScrapeDB/";
try
{
DailyReport dailyReport = DailyReportHelper.SetUpDailyReport(_logger, baseScrapeDbUrl);
DailyReport dailyReport = DailyReportHelper.SetUpDailyReport(_logger, _baseDBUrl);
Dictionary<string, List<string>> toolStateOwners = JsonFileHandler.LoadJSONFile<Dictionary<string, List<string>>>(_toolStateOwnerFilePath);
dailyReport.ToolStatesByOwner = toolStateOwners;
@ -58,4 +56,11 @@ public class ProductionReportController : Controller
return RedirectToAction("DailyReport");
}
public IActionResult HoldLotReport()
{
List<HoldLot> holdLots = ApiCaller.GetApi<List<HoldLot>>(_baseDBUrl + "GetCurrentHoldLots").Result;
return View(holdLots);
}
}