feat(timesheet): sort months ascending so newest is at bottom
This commit is contained in:
parent
070a47e241
commit
7bee32886f
1 changed files with 2 additions and 2 deletions
|
|
@ -235,11 +235,11 @@ pub fn generate_report(
|
|||
}
|
||||
}
|
||||
|
||||
// Sort months in descending order (most recent first)
|
||||
// Sort months in ascending order (oldest first, newest at bottom)
|
||||
month_reports.sort_by(|a, b| {
|
||||
let a_date = (a.year, a.month);
|
||||
let b_date = (b.year, b.month);
|
||||
b_date.cmp(&a_date)
|
||||
a_date.cmp(&b_date)
|
||||
});
|
||||
|
||||
Ok(TimesheetReport::new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue