public virtual ActionResult AllOpen() { var m = new Models.Job.ListModel() { Title = "All Open Jobs" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult Queue(int id) { var queueToken = JobQueueService.GetQueue(id); if (queueToken == null) throw new ArgumentException("Invalid Job Queue Id", "id"); var m = new Models.Job.ListModel() { Title = string.Format("Queue: {0}", queueToken.JobQueue.Name) }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.ActiveJobQueues.Any(jqj => jqj.QueueId == queueToken.JobQueue.Id))); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult DevicesReadyForReturn() { var m = new Models.Job.ListModel() { Title = "Jobs with Devices Ready for Return" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => !j.WaitingForUserAction.HasValue && j.DeviceHeld != null && j.DeviceReturnedDate == null && j.DeviceReadyForReturn != null && ((!j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue) || j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue)) .OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingTechnicianAction() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Technician Action" }; m.JobTable = ManagedJobList.OpenJobsTable(ManagedJobList.AwaitingTechnicianActionFilter); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult Stale() { var m = new Models.Job.ListModel() { Title = "Stale Jobs" }; var staleThreshold = DateTime.Today.AddMinutes(Database.DiscoConfiguration.JobPreferences.StaleJobMinutesThreshold * -1); m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.LastActivityDate < staleThreshold).OrderBy(j => j.LastActivityDate)); m.JobTable.ShowLastActivityDate = true; m.JobTable.ShowDates = false; // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult Locations() { var m = new Models.Job.ListModel() { Title = "Held Device Locations" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.DeviceHeld.HasValue && !j.DeviceReturnedDate.HasValue).OrderBy(j => j.DeviceHeldLocation)); m.JobTable.ShowLocation = true; m.JobTable.ShowTechnician = false; m.JobTable.ShowType = false; // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult LongRunning() { var m = new Models.Job.ListModel() { Title = "Long Running Jobs" }; var longRunningThreshold = DateTime.Today.AddDays(Database.DiscoConfiguration.JobPreferences.LongRunningJobDaysThreshold * -1); m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.OpenedDate < longRunningThreshold).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingUserAction() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting User Action" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.WaitingForUserAction.HasValue || (j.JobMetaNonWarranty_AccountingChargeAddedDate != null && j.JobMetaNonWarranty_AccountingChargePaidDate == null) || (j.JobMetaNonWarranty_AccountingChargeRequiredDate != null && j.JobMetaNonWarranty_AccountingChargePaidDate == null) ).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult RecentlyClosed() { var m = new Models.Job.ListModel() { Title = "Recently Closed Jobs" }; m.JobTable = new JobTableModel() { ShowStatus = true }; var dateTimeNow = DateTime.Now; var closedThreshold = dateTimeNow.AddDays(-2); if (dateTimeNow.DayOfWeek == DayOfWeek.Monday) closedThreshold = closedThreshold.AddDays(-2); if (dateTimeNow.DayOfWeek == DayOfWeek.Tuesday) closedThreshold = closedThreshold.AddDays(-1); m.JobTable.Fill(Database, Disco.Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.ClosedDate > closedThreshold).OrderBy(j => j.Id), true); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingFinanceAgreementBreach() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Agreement Breach" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.JobTypeId == JobType.JobTypeIds.UMgmt && Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & Job.UserManagementFlags.Infringement_BreachFinancialAgreement) ).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingFinanceInsuranceProcessing() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Insurance Processing" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_IsInsuranceClaim.Value && !j.JobMetaInsurance_ClaimFormSentDate.HasValue) ).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingFinancePayment() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance - Accounting Payment" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => j.JobTypeId == JobType.JobTypeIds.HNWar && ((j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue) ).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult AwaitingFinance() { var m = new Models.Job.ListModel() { Title = "Jobs Awaiting Finance" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_IsInsuranceClaim.Value && !j.JobMetaInsurance_ClaimFormSentDate.HasValue)) || (j.JobTypeId == JobType.JobTypeIds.HNWar && (j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue && !j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue)) || (j.JobTypeId == JobType.JobTypeIds.HNWar && ((j.JobMetaNonWarranty_AccountingChargeRequiredDate.HasValue || j.JobMetaNonWarranty_AccountingChargeAddedDate.HasValue) && !j.JobMetaNonWarranty_AccountingChargePaidDate.HasValue)) || (j.JobTypeId == JobType.JobTypeIds.UMgmt && Job.UserManagementFlags.Infringement_BreachFinancialAgreement == (j.Flags & Job.UserManagementFlags.Infringement_BreachFinancialAgreement)) )); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }
public virtual ActionResult DevicesAwaitingRepair() { var m = new Models.Job.ListModel() { Title = "Jobs with Devices Awaiting Repair" }; m.JobTable = ManagedJobList.OpenJobsTable(q => q.Where(j => (j.JobMetaNonWarranty_RepairerLoggedDate != null && j.JobMetaNonWarranty_RepairerCompletedDate == null) || (j.JobMetaWarranty_ExternalLoggedDate != null && j.JobMetaWarranty_ExternalCompletedDate == null) ).OrderBy(j => j.JobId)); // UI Extensions UIExtensions.ExecuteExtensions<JobListModel>(this.ControllerContext, m); return View(Views.List, m); }