Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gtt log: show unsynced / incompletely synced times yellow
  • Loading branch information
Andreas Müller committed Nov 22, 2022
commit 694fafaa227d0a41193a5b00fa9d95685774324e
4 changes: 3 additions & 1 deletion src/gtt-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ tasks.log()
frames[date]
.sort((a, b) => a.start.isBefore(b.start) ? -1 : 1)
.forEach(frame => {
let toSync = (Math.ceil(frame.duration) - parseInt(_.reduce(frame.notes, (n, m) => (n + m.time), 0))) != 0;
let durationText = toSync ? toHumanReadable(frame.duration).yellow : toHumanReadable(frame.duration);
let issue = frame.resource.new ? `new ${frame.resource.type + ' "' + frame.resource.id.blue}"` : `${(frame.resource.type + ' #' + frame.resource.id).blue}`;
console.log(` ${frame.id} ${frame.start.clone().format('HH:mm').green} to ${frame.stop.clone().format('HH:mm').green}\t${toHumanReadable(frame.duration)}\t\t${frame.project.magenta}\t\t${issue}`)
console.log(` ${frame.id} ${frame.start.clone().format('HH:mm').green} to ${frame.stop.clone().format('HH:mm').green}\t${durationText}\t\t${frame.project.magenta}\t\t${issue}`)
});
});
}
Expand Down