public async Task <ICollection <WeekData> > GetWeeks(string token) { var report = await _repository.GetReports(token); var rows = ParseData(report); if (rows.Count > 0) { rows = FillWithMissingDates(rows); } var weeklydaata = GetDataByWeek(rows); return(weeklydaata); }
/// <summary> /// Reports logic /// </summary> /// <returns></returns> public ActionResult OperatorReport() { var productivityReport = new OperatorReportItems { OperatorProductivity = new List <OperatorReportViewModel>() }; ViewBag.Message = "Operator Productivity Report"; productivityReport.OperatorProductivity = _repository.GetReports(new ReportFilter()).Select(r => new OperatorReportViewModel { ID = r.Id, AverageChatLength = !string.IsNullOrEmpty(r.AverageChatLength) ? $"{r.AverageChatLength}m" : "-", Name = r.Name, ProactiveAnswered = r.ProactiveAnswered, ProactiveResponseRate = r.ProactiveResponseRate, ProactiveSent = r.ProactiveSent, ReactiveAnswered = r.ReactiveAnswered, ReactiveReceived = r.ReactiveReceived, ReactiveResponseRate = r.ReactiveResponseRate, TotalChatLength = _durationParser.Parse(r.TotalChatLength) }).ToList(); return(View(productivityReport)); }
public IEnumerable <OperatorReportViewModel> GetReports(string sw = null, string sd = null, string from = null, string to = null, string sdate = null) { //TODO: roll in ORM like EF or Dapper for Db access var result = _repository.GetReports(_paramsParser.Parse(sw, sd, from, to, sdate)).Select(r => new OperatorReportViewModel { ID = r.Id, AverageChatLength = !string.IsNullOrEmpty(r.AverageChatLength)? $"{r.AverageChatLength}m":"0", Name = r.Name, ProactiveAnswered = r.ProactiveAnswered, ProactiveResponseRate = r.ProactiveResponseRate, ProactiveSent = r.ProactiveSent, ReactiveAnswered = r.ReactiveAnswered, ReactiveReceived = r.ReactiveReceived, ReactiveResponseRate = r.ReactiveResponseRate, TotalChatLength = _durationParser.Parse(r.TotalChatLength) }).ToList(); return(result); }
public IEnumerable <saReport> GetReports(string token) { try { if (AuthHelper.VerifyToken(token)) { return(repository.GetReports()); } else { //not verified return(null); } } catch (Exception) { throw; } }
public List <Infrastructure.Data.Entities.ReportVM> GetReports() { return(_repo.GetReports()); }
public ApiResult <IEnumerable <Report> > Reports() { return(Execute(() => _reportsRepository.GetReports().Select(Mapper.Map <Report>))); }
/// <summary> /// GetReports /// </summary> /// <returns></returns> public IEnumerable <ReportedReviews> GetReports() { var listdisputes = _reportsRepo.GetReports(); return(listdisputes); }