public ActionResult FSOPendingReviewPartial() { ViewBag.GridName = "FSOPendingGrid"; ViewBag.GridTitle = "Formal Safety Observations Pending Review"; ViewBag.GridLinkController = "FSO"; ViewBag.GridControllerCallBackAction = "FSOPendingReviewPartial"; var fsoList = RigOapChecklistClient.GetAllByTypeStatusAsync("Formal Safety Observation", "Pending").Result?.Result.Data; var viewModelList = GenerateChecklistViewModelList(fsoList); return(PartialView("ChecklistPendingReviewPartial", viewModelList)); }
public ActionResult LifeSaversPendingReviewPartial() { ViewBag.GridName = "LSPendingGrid"; ViewBag.GridTitle = "Ensco Life Savers Pending Review"; ViewBag.GridLinkController = "LifeSaver"; ViewBag.GridControllerCallBackAction = "LifeSaversPendingReviewPartial"; var lifeSaversList = RigOapChecklistClient.GetAllByTypeStatusAsync("Life Savers", "Pending").Result?.Result.Data; var viewModelList = GenerateChecklistViewModelList(lifeSaversList); return(PartialView("ChecklistPendingReviewPartial", viewModelList)); }
public ActionResult CAVPendingReviewPartial() { ViewBag.GridName = "CAVPendingGrid"; ViewBag.GridTitle = "Critical Area Verifications Pending Review"; ViewBag.GridLinkController = "CriticalAreaVerification"; ViewBag.GridControllerCallBackAction = "CAVPendingReviewPartial"; var cavList = RigOapChecklistClient.GetAllByTypeStatusAsync("Critical Area Verification", "Pending").Result?.Result.Data; var viewModelList = GenerateChecklistViewModelList(cavList); return(PartialView("ChecklistPendingReviewPartial", viewModelList)); }
public ActionResult BACPendingReviewPartial() { ViewBag.GridName = "BACPendingGrid"; ViewBag.GridTitle = "Barrier Authority Checklists Pending Review"; ViewBag.GridLinkController = "BarrierAuthority"; var bacList = RigOapChecklistClient.GetAllByTypeStatusAsync("Barrier Authority Checklist", "Pending").Result?.Result.Data; IList <OIMDashboardBACGridViewModel> viewModelList = new List <OIMDashboardBACGridViewModel>(); foreach (var bacChecklist in bacList) { var leadAssessor = bacChecklist.Assessors.FirstOrDefault(a => a.IsLead); UserModel assessor = null; PositionModel leadAssessorPosition = null; if (leadAssessor != null && leadAssessor.UserId != 0) { assessor = ServiceSystem.GetUser(leadAssessor.UserId); leadAssessorPosition = ServiceSystem.GetUserPosition(leadAssessor.UserId); } OIMDashboardBACGridViewModel viewModel = new OIMDashboardBACGridViewModel() { ChecklistGuid = bacChecklist.Id, Id = bacChecklist.RigChecklistUniqueId, Location = bacChecklist.LocationName, Title = bacChecklist.Title, Assessor = assessor?.DisplayName, Position = leadAssessorPosition?.Name }; foreach (var question in bacChecklist.Questions) { foreach (var answer in question.Answers) { if (answer.Value == "N") { switch (answer.Ordinal) { case 0: viewModel.Day1.ConformityCount++; break; case 1: viewModel.Day2.ConformityCount++; break; case 2: viewModel.Day3.ConformityCount++; break; case 3: viewModel.Day4.ConformityCount++; break; case 4: viewModel.Day5.ConformityCount++; break; case 5: viewModel.Day6.ConformityCount++; break; case 6: viewModel.Day7.ConformityCount++; break; default: break; } } } } viewModelList.Add(viewModel); } return(PartialView("BarrierAuthorityPendingReviewPartial", viewModelList)); }