1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-06 12:02:45 +03:00

Sorting: Fixes during testing of sort rules

- Fixed name numeric sorting not working as expected due to bad
  comparison.
- Added name numeric desc operation option.
- Added test to ensure each operating has a comparison function.
This commit is contained in:
Dan Brown
2025-02-24 16:58:59 +00:00
parent d7ccb3ce6a
commit dca14feaaa
3 changed files with 20 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ enum SortRuleOperation: string
case NameAsc = 'name_asc';
case NameDesc = 'name_desc';
case NameNumericAsc = 'name_numeric_asc';
case NameNumericDesc = 'name_numeric_desc';
case CreatedDateAsc = 'created_date_asc';
case CreatedDateDesc = 'created_date_desc';
case UpdateDateAsc = 'updated_date_asc';