Cleaned up references to repositories in the UI that were overlooked

This commit is contained in:
Daniel Wathen
2023-01-04 14:32:13 -07:00
parent 1adb303d99
commit e3b4e68425
4 changed files with 6 additions and 355 deletions

View File

@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using ReportingServices.Shared.Repositories;
using ReportingServices.Shared.HelperClasses;
using ReportingServices.Shared.Models.ProductionReport;
using ReportingServices.Shared.ViewModels.ProductionReport;
@ -8,18 +7,13 @@ namespace ReportingServices.UI.Controllers
{
public class ProductionReportController : Controller
{
private readonly IScrapeDatabaseRepository _scrapeDatabaseRepository;
private readonly IFabTimeReportingRepository _fabTimeReportingRepository;
private readonly ILogger<ProductionReportController> _logger;
private readonly int _reportIndex = (int)DateTime.Now.DayOfWeek;
private readonly string _dailyRptFilePath = "wwwroot/Assets/DailyReportInfo.json";
private readonly string _toolStateOwnerFilePath = "wwwroot/Assets/ToolStates.json";
public ProductionReportController(IScrapeDatabaseRepository scrapeDatabaseRepository,
IFabTimeReportingRepository fabTimeReportingRepository, ILogger<ProductionReportController> logger)
public ProductionReportController(ILogger<ProductionReportController> logger)
{
_scrapeDatabaseRepository = scrapeDatabaseRepository;
_fabTimeReportingRepository = fabTimeReportingRepository;
_logger = logger;
}
@ -33,7 +27,6 @@ namespace ReportingServices.UI.Controllers
{
try
{
DailyReportHelper.SetRepositories(_fabTimeReportingRepository, _scrapeDatabaseRepository);
DailyReport dailyReport = DailyReportHelper.SetUpDailyReport().Result;
Dictionary<string, List<string>> toolStateOwners = JsonFileHandler.LoadJSONFile<Dictionary<string, List<string>>>(_toolStateOwnerFilePath);