Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
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
Add sort to time record table
  • Loading branch information
kriskbx committed Jan 28, 2018
commit 1439d32daf9b2539bf6db7b0d35da58c1c94ac8b
7 changes: 7 additions & 0 deletions src/output/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,14 @@ class base {
});
});

times.sort((a, b) => {
if (a.date.isSame(b.date)) return 0;

return a.date.isBefore(b.date) ? 1 : -1;
});

this.times = times;

this.users = _.mapObject(users, user => this.config.toHumanReadable(user, 'stats'));
this.projects = _.mapObject(projects, project => this.config.toHumanReadable(project, 'stats'));
this.stats = {
Expand Down