sorting for records in the ui

This commit is contained in:
2026-07-13 21:43:10 +05:30
parent c7cea78f74
commit 3cb086d67b
6 changed files with 134 additions and 15 deletions

View File

@@ -84,9 +84,11 @@ export const activityFeedsService = {
// Dashboard stats scoped to the logged-in user (org-wide for
// ADMIN/MODERATOR): overall workload, today's activity, and the workload
// split into batches of 50 in the same order the audit session walks.
getUserStats: async (isRectificationEnabled: boolean) => {
// sortBy/sortDir keep the batch numbering aligned with the feed/session
// order when a custom sort is active (backend mirrors the same whitelist).
getUserStats: async (isRectificationEnabled: boolean, sortBy?: string, sortDir?: string) => {
const response = await axiosClient.get('/api/audit/anomaly/user-stats', {
params: { isRectificationEnabled }
params: { isRectificationEnabled, sortBy: sortBy || '', sortDir: sortDir || '' }
});
return response as unknown as {
scoped: boolean;