From 4e0a299fc5d0104241bebdad3029b7d9e5b0fe0d Mon Sep 17 00:00:00 2001 From: "chris.watts90@outlook.com" Date: Thu, 2 Mar 2017 20:26:06 +0000 Subject: [PATCH] changed convertToHours to split hours and decimal minutes into two parts. calculating the minutes of the hour for display e.g.: 6.5 hours would be 6 hrs 30 mins. #58 --- .../WindowsDataCenter/WindowsDataCenter/www/spa.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js index 69f8de8..37bed76 100644 --- a/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js +++ b/DataCenter_Windows/WindowsDataCenter/WindowsDataCenter/www/spa.js @@ -136,7 +136,9 @@ if (hrs < 1) { return value + " mins"; } - return self.round(hrs, 2)+" hrs"; + var h = Math.floor(hrs); + var m = Math.floor((hrs % 1) * 60); + return h + " hrs " + m + " minutes"; }; self.convertToDisplayTime = function (dateValue) { var date = new Date(dateValue); @@ -316,7 +318,7 @@ var query = this.params.query; var pageSize = this.params.pageSize; var pageNumber = this.params.pageNumber; - self.chosenMenuItemId("Users"); + self.chosenMenuItemId("Home"); self.chosenUserDetails(null); self.userList(null); self.userTimeLogData(null);