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