diff --git a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs index 1f94020..60415b3 100644 --- a/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs +++ b/DataCenter_Windows/WindowsDataCenter/SQLiteRepository/SQLiteRepository.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Security.Cryptography.X509Certificates; using Interfaces; using SQLite.Net; using SQLite.Net.Platform.Win32; @@ -369,8 +370,7 @@ namespace SQLiteRepository var timeLogList = _connection.Query( SQLiteProcedures.GET_TIMELOGS, userId, calendarWeek, year); - - var ret = timeLogList.Select(x => new TimeLog + var timeLogs = timeLogList.Select(x => new TimeLog { Id = x.Id, CalendarWeek = x.CalendarWeek, @@ -380,6 +380,19 @@ namespace SQLiteRepository UserId = x.UserId_FK, Year = x.Year }).ToList(); + + var dict = new Dictionary>(); + foreach (var log in timeLogs) + { + var dow = log.EventTime.DayOfWeek; + if (!dict.ContainsKey(dow)) + { + dict.Add(dow, new List()); + } + dict[dow].Add(log); + } + + var ret = timeLogs; return ret; } diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/SwipeDataController.cs b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/SwipeDataController.cs index 22872a8..cf7fe12 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/SwipeDataController.cs +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/Controllers/SwipeDataController.cs @@ -23,6 +23,7 @@ namespace WindowsDataCenter if(repo == null) throw new ArgumentNullException(nameof(repo)); _repo = repo; if(logger == null) throw new ArgumentNullException(nameof(logger)); + _logger = logger; } /// diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js index ce38a02..77945f6 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js @@ -35,7 +35,7 @@ } var url = "timelogs" + "/" + userId; if (args) { - url = self.createRequestUrl(url, args, false, true); + url = self.createRequestUrl(url, args, false, false); } location.hash = url; };