Files

98 lines
3.8 KiB
C#

using System;
using System.Collections.Generic;
namespace Disco.Plugins.ServiceTracker.Models
{
public class DashboardViewModel
{
public List<DashboardTile> Tiles { get; set; }
public List<DashboardTile> ReadyForReturn { get; set; }
public DashboardStats Stats { get; set; }
public ServiceTrackerConfig Config { get; set; }
public string CurrentFilter { get; set; }
public string SortBy { get; set; }
public string GoogleSheetError { get; set; }
public DashboardViewModel()
{
Tiles = new List<DashboardTile>();
ReadyForReturn = new List<DashboardTile>();
Stats = new DashboardStats();
}
}
public class DashboardTile
{
public int JobId { get; set; }
public string Source { get; set; }
public string DisplayId { get; set; }
public string JobTypeDescription { get; set; }
public string DeviceSerialNumber { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceComputerName { get; set; }
public string UserId { get; set; }
public string UserDisplayName { get; set; }
public string OpenedByTechId { get; set; }
public string OpenedByTechName { get; set; }
public DateTime OpenedDate { get; set; }
public DateTime? ExpectedClosedDate { get; set; }
public string DiscoStatus { get; set; }
public string PriorityId { get; set; }
public string PriorityName { get; set; }
public string PriorityColor { get; set; }
public int PrioritySortOrder { get; set; }
public string LocationId { get; set; }
public string LocationName { get; set; }
public string LocationIcon { get; set; }
public string LocationColor { get; set; }
public string AssignedTechId { get; set; }
public string AssignedTechName { get; set; }
public DateTime? EstimatedCompletion { get; set; }
public DateTime? SlaDeadline { get; set; }
public string StatusOverride { get; set; }
public string Summary { get; set; }
public int NoteCount { get; set; }
public string LatestNote { get; set; }
public DateTime LastModifiedDate { get; set; }
public bool IsSlaBreached { get; set; }
public bool IsSlaWarning { get; set; }
public string AgeBadge { get; set; }
public int AgeDays { get; set; }
public string EtaDisplay { get; set; }
public DateTime SortDate { get; set; }
public DashboardTile() { Source = "disco"; }
}
public class DashboardStats
{
public int TotalOpen { get; set; }
public int Critical { get; set; }
public int High { get; set; }
public int Medium { get; set; }
public int Low { get; set; }
public int Scheduled { get; set; }
public int SlaBreached { get; set; }
public int SlaWarning { get; set; }
public int AtRepairer { get; set; }
public int InItOffice { get; set; }
public int WithUser { get; set; }
public int AwaitingParts { get; set; }
public int FromGoogleSheet { get; set; }
public double AvgAgeDays { get; set; }
public int OldestJobDays { get; set; }
public Dictionary<string, int> ByPriority { get; set; }
public Dictionary<string, int> ByLocation { get; set; }
public Dictionary<string, int> ByStatus { get; set; }
public Dictionary<string, int> ByTech { get; set; }
public DashboardStats()
{
ByPriority = new Dictionary<string, int>();
ByLocation = new Dictionary<string, int>();
ByStatus = new Dictionary<string, int>();
ByTech = new Dictionary<string, int>();
}
}
}