File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,13 @@ Fs.readDir(config.frameDir).forEach(file => {
3131 times[date] += Math.ceil(frame.duration);
3232});
3333
34- _.each(frames, (frames, date) => {
34+ Object.keys(frames).sort().forEach(date => {
35+ if (!frames.hasOwnProperty(date)) return;
36+
3537 console.log(`${moment(date).format('MMMM Do YYYY')} (${toHumanReadable(times[date])})`.green);
36- frames
38+ frames[date]
3739 .sort((a, b) => moment(a.start).isBefore(moment(b.start)) ? -1 : 1)
3840 .forEach(frame => {
39- console.log(` ${frame.id} ${moment(frame.start).format('HH:mm').green} to ${moment(frame.stop).format('HH:mm').green}\t${toHumanReadable(frame.duration)}\t${frame.project.magenta}\t${(frame.resource.type + ' #' + frame.resource.id).blue}`)
41+ console.log(` ${frame.id} ${moment(frame.start).format('HH:mm').green} to ${moment(frame.stop).format('HH:mm').green}\t${toHumanReadable(frame.duration)}\t\t ${frame.project.magenta}\t \t${(frame.resource.type + ' #' + frame.resource.id).blue}`)
4042 });
4143});
Original file line number Diff line number Diff line change @@ -97,6 +97,9 @@ if ((config.get('report').includes('merge_requests') && !config.get('query').inc
9797if (!Output[config.get('output')]) {
9898 Cli.error(`The output ${config.get('output')} doesn't exist`);
9999}
100+ if (config.get('output') === 'pdf' && !config.get('file')) {
101+ Cli.error(`Cannot output a pdf to stdout`);
102+ }
100103if (!config.get('from').isValid()) {
101104 Cli.error(`FROM is not in a valid ISO date format.`);
102105}
You can’t perform that action at this time.
0 commit comments