Browse Source

merge minutes for pastDays;

feature/tasks
stingl 4 years ago
parent
commit
b19df6ed10
  1. 7
      js/app.js

7
js/app.js

@ -488,7 +488,12 @@ const TimeTrack = { @@ -488,7 +488,12 @@ const TimeTrack = {
ticket.history.forEach((historyEntry) => {
if (moment(historyEntry.trackingStarted).format("MMM Do YY") === day) {
historyEntry.ticket = ticket.number;
collection.push(historyEntry);
if (collection[ticket.number]) {
collection[ticket.number] += historyEntry.minutes;
} else {
collection[ticket.number] = historyEntry;
}
}
});
});