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
This commit is contained in:
chris.watts90@outlook.com 2017-03-02 20:26:06 +00:00
parent 4ca281d826
commit 4e0a299fc5

View File

@ -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);