Refactor compliance page audits page
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -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"),
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -40,14 +40,6 @@ export const trustCenterQuery = graphql`
|
||||
}
|
||||
}
|
||||
}
|
||||
audits(first: 100) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
...TrustCenterAuditsCardFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
vendors(first: 100) {
|
||||
edges {
|
||||
node {
|
||||
|
||||
Reference in New Issue
Block a user