feat(timesheet): sort months ascending so newest is at bottom

This commit is contained in:
Konstantin Fickel 2026-04-02 17:06:28 +02:00
parent 070a47e241
commit 7bee32886f
Signed by: kfickel
GPG key ID: A793722F9933C1A5

View file

@ -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| { month_reports.sort_by(|a, b| {
let a_date = (a.year, a.month); let a_date = (a.year, a.month);
let b_date = (b.year, b.month); let b_date = (b.year, b.month);
b_date.cmp(&a_date) a_date.cmp(&b_date)
}); });
Ok(TimesheetReport::new() Ok(TimesheetReport::new()