fix: correct secret approval query filters column references, correct count query and handle pagination reset on frontend

This commit is contained in:
Scott Wilson
2025-11-04 18:20:43 -08:00
parent 9e70443717
commit b0c8bcf2a3
2 changed files with 21 additions and 14 deletions

View File

@@ -40,7 +40,7 @@ import {
PreferenceKey,
setUserTablePreference
} from "@app/helpers/userTablePreferences";
import { usePagination } from "@app/hooks";
import { usePagination, useResetPageHelper } from "@app/hooks";
import {
useGetSecretApprovalRequestCount,
useGetSecretApprovalRequests,
@@ -99,6 +99,12 @@ export const SecretApprovalRequest = () => {
const totalApprovalCount = data?.totalCount ?? 0;
const secretApprovalRequests = data?.approvals ?? [];
useResetPageHelper({
totalCount: totalApprovalCount,
offset,
setPage
});
const { data: secretApprovalRequestCount, isSuccess: isSecretApprovalReqCountSuccess } =
useGetSecretApprovalRequestCount({ projectId });
const { user: userSession } = useUser();