cybernetisk / internsystem-v2

A NextJS-based website. Used for public information about Cybernetisk Selskab, and necessary tools for volunteers at the bar/café Escape.
https://cyb.no
MIT License
7 stars 9 forks source link

Weird sorting under the registered vouchers #27

Closed Mickkkkkkk closed 2 months ago

Mickkkkkkk commented 2 months ago

Seems to be interpret dates as numbers/floats? 30.08, 29.08, 27.08... is at the top, while 01.09, 02.09, 03.09... is on the bottom.

ubesluttsom commented 2 months ago

I think that it's sorted by date, but ascending, and not descending. You can tap the “usage date” column header to fix this. But it should perhaps have a different default? Either different sorting, or that the last page is shown instead of the first one?

Oh, and this is an issue with the “Use voucher” tab, not the “Register work” one.

Mickkkkkkk commented 2 months ago
1 2a 2

This is how it is sorted under the "Register Work" tab. Talked to Eric about it and he knows how to fix it (something about the default sorting is actually not by date, but some hidden column). Changing the sorting to be ascending just reverses it, still being weird. Switching to another sort then back however fixes the issue.

EricSvebakk commented 2 months ago

The issue was that the wrong default column was selected for table initialization. First column would initially be sorted as strings, not numbers. Issue is fixed.