public IActionResult ViewCurrentShift(int shiftId, string shift)
        {
            OperatorLogViewModel operatorLogViewModel = new OperatorLogViewModel();
            OperatorShiftLog     shiftLog;

            if (shift == "current")
            {
                shiftLog = _shiftLogRepository.GetOrCreateShiftLog(DateTime.Now);
            }
            else
            {
                shiftLog = _shiftLogRepository.GetShiftLogById(shiftId);
            }

            operatorLogViewModel.CurrentShift           = shiftLog;
            operatorLogViewModel.NeedOperators          = shiftLog.Operators == null || shiftLog.Operators == "";
            operatorLogViewModel.BatchReports           = GetBatchesForShift(shiftLog.OperatorShiftLogId);
            operatorLogViewModel.ToteChanges            = _shiftLogRepository.GetToteChanges(shiftLog.OperatorShiftLogId);
            operatorLogViewModel.TotalReworkToteChanges = _shiftLogRepository.GetTotalReworkCount(shiftLog.OperatorShiftLogId);


            ViewBag.Totes        = _materialDetailsRepository.GetListOfActiveMaterialsForDropDown();
            ViewBag.Recipes      = _batchRepository.GetRecipeNamesForDropDown();
            ViewBag.ShiftColours = _shiftLogRepository.GetShiftColoursForDropDown();

            return(View(operatorLogViewModel));
        }
        public IViewComponentResult Invoke(int shiftId)
        {
            var toteChanges = _shiftLogRepository.GetToteChanges(shiftId);

            return(View(toteChanges));
        }