mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 15:11:12 -05:00
Fix: Chain sort orders correctly
This commit is contained in:
@@ -221,8 +221,7 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
status
|
||||
)
|
||||
`,
|
||||
)
|
||||
.order("escalated", { ascending: false });
|
||||
);
|
||||
|
||||
// Map sort fields to correct database columns
|
||||
const sortField =
|
||||
@@ -236,9 +235,10 @@ export function useModerationQueueManager(config: ModerationQueueManagerConfig):
|
||||
ascending: sort.config.direction === 'asc'
|
||||
});
|
||||
|
||||
submissionsQuery = submissionsQuery.order(sortField, {
|
||||
ascending: sort.config.direction === 'asc'
|
||||
});
|
||||
// Apply sorting: escalated first (desc), then user's chosen field
|
||||
submissionsQuery = submissionsQuery
|
||||
.order("escalated", { ascending: false })
|
||||
.order(sortField, { ascending: sort.config.direction === 'asc' });
|
||||
|
||||
// Apply tab-based status filtering
|
||||
const tab = filters.activeTab;
|
||||
|
||||
Reference in New Issue
Block a user