diff --git a/js/app.js b/js/app.js index eae48c3..ea26d65 100644 --- a/js/app.js +++ b/js/app.js @@ -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; + } } }); });