Working on the time tracker

This commit is contained in:
Hillel Coren 2017-10-01 21:32:05 +03:00
parent 482b5ed0e3
commit 77cde922f7

View File

@ -548,7 +548,7 @@
self.client = ko.observable();
self.project = ko.observable();
self.isHovered = ko.observable(false);
self.created_at = ko.observable(moment().format('YYYY-MM-DD HH:mm:ss'));
self.created_at = ko.observable(moment.utc().format('YYYY-MM-DD HH:mm:ss'));
self.mapping = {
'client': {
@ -963,11 +963,8 @@
}
self.age = ko.computed(function() {
if (! self.time_log().length) {
return '';
}
var time = self.firstTime();
return time.age();
model.clock(); // bind to the clock
return moment.utc(self.created_at()).fromNow();
});
self.seconds = function(total) {