Refactor compliance page audits page

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-01-28 16:17:45 +04:00
parent 07ea130536
commit 3e3c3a8ebb
16 changed files with 693 additions and 450 deletions

View File

@@ -1,29 +0,0 @@
import { useTranslate } from "@probo/i18n";
import { graphql } from "relay-runtime";
import type { TrustCenterAuditGraphUpdateMutation } from "#/__generated__/core/TrustCenterAuditGraphUpdateMutation.graphql";
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
export const trustCenterAuditUpdateMutation = graphql`
mutation TrustCenterAuditGraphUpdateMutation($input: UpdateAuditInput!) {
updateAudit(input: $input) {
audit {
id
trustCenterVisibility
...TrustCenterAuditsCardFragment
}
}
}
`;
export function useTrustCenterAuditUpdate() {
const { __ } = useTranslate();
return useMutationWithToasts<TrustCenterAuditGraphUpdateMutation>(
trustCenterAuditUpdateMutation,
{
successMessage: __("Audit visibility updated successfully."),
errorMessage: __("Failed to update audit visibility"),
},
);
}

View File

@@ -40,14 +40,6 @@ export const trustCenterQuery = graphql`
}
}
}
audits(first: 100) {
edges {
node {
id
...TrustCenterAuditsCardFragment
}
}
}
vendors(first: 100) {
edges {
node {