tohuwabohu-io / librefit

OpenSource calorie tracker using kotlin, quarkus, postgresql, SvelteKit and OpenAPI 3
https://libre.fit/
GNU General Public License v3.0
1 stars 0 forks source link

historic data dates are sorted ascending #80

Closed tohuwabohu-io closed 2 months ago

tohuwabohu-io commented 2 months ago

Describe the bug When navigating to /tracker/calories, sometimes the oldest entry is displayed on top with the newest one on the bottom. Sometimes even the most recent one is at the top, followed by the oldest to the newer ones in ascending order.

To Reproduce Steps to reproduce the behavior:

  1. Log in
  2. On the dashboard 'Average distribution' section, click on 'Show history'
  3. See how the data is ordered

Expected behavior The most recent entry should be on top with the rest in descending order.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Maybe pagination would be useful especially when there's a year worth of data.