Fix relay lint in components and pages
Remove unused GraphQL fields (createdAt, updatedAt, totalCount, __id, sourceId, etc.) from queries and fragments across 50+ files. Add TypeScript generics to useMutation, usePaginationFragment, useRefetchableFragment, and useLazyLoadQuery calls to satisfy relay/generated-typescript-types. Add justified eslint-disable comments for fields needed by Relay cache normalization (id) or consumed by sibling components through fragment spreads. Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
@@ -15,6 +15,7 @@ const snapshotQuery = graphql`
|
|||||||
query SnapshotBannerQuery($snapshotId: ID!) {
|
query SnapshotBannerQuery($snapshotId: ID!) {
|
||||||
node(id: $snapshotId) {
|
node(id: $snapshotId) {
|
||||||
... on Snapshot {
|
... on Snapshot {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
type
|
type
|
||||||
|
|||||||
@@ -29,10 +29,7 @@ const linkedAuditFragment = graphql`
|
|||||||
fragment LinkedAuditsCardFragment on Audit {
|
fragment LinkedAuditsCardFragment on Audit {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
createdAt
|
|
||||||
state
|
state
|
||||||
validFrom
|
|
||||||
validUntil
|
|
||||||
framework {
|
framework {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import type {
|
|||||||
LinkedAuditsDialogFragment$key,
|
LinkedAuditsDialogFragment$key,
|
||||||
} from "#/__generated__/core/LinkedAuditsDialogFragment.graphql";
|
} from "#/__generated__/core/LinkedAuditsDialogFragment.graphql";
|
||||||
import type { LinkedAuditsDialogQuery } from "#/__generated__/core/LinkedAuditsDialogQuery.graphql";
|
import type { LinkedAuditsDialogQuery } from "#/__generated__/core/LinkedAuditsDialogQuery.graphql";
|
||||||
|
import type { LinkedAuditsDialogQuery_fragment } from "#/__generated__/core/LinkedAuditsDialogQuery_fragment.graphql";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
import type { NodeOf } from "#/types";
|
import type { NodeOf } from "#/types";
|
||||||
|
|
||||||
@@ -58,8 +59,6 @@ const auditsFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
state
|
state
|
||||||
validFrom
|
|
||||||
validUntil
|
|
||||||
framework {
|
framework {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -98,7 +97,8 @@ function LinkedAuditsDialogContent(props: Omit<Props, "children">) {
|
|||||||
const query = useLazyLoadQuery<LinkedAuditsDialogQuery>(auditsQuery, {
|
const query = useLazyLoadQuery<LinkedAuditsDialogQuery>(auditsQuery, {
|
||||||
organizationId,
|
organizationId,
|
||||||
});
|
});
|
||||||
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment(
|
const { data, loadNext, hasNext, isLoadingNext }
|
||||||
|
= usePaginationFragment<LinkedAuditsDialogQuery_fragment, LinkedAuditsDialogFragment$key>(
|
||||||
auditsFragment,
|
auditsFragment,
|
||||||
query.organization as LinkedAuditsDialogFragment$key,
|
query.organization as LinkedAuditsDialogFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import { useLazyLoadQuery, usePaginationFragment } from "react-relay";
|
|||||||
import { graphql } from "relay-runtime";
|
import { graphql } from "relay-runtime";
|
||||||
import { useDebounceCallback } from "usehooks-ts";
|
import { useDebounceCallback } from "usehooks-ts";
|
||||||
|
|
||||||
|
import type { LinkedControlsDialogControlsQuery } from "#/__generated__/core/LinkedControlsDialogControlsQuery.graphql";
|
||||||
import type {
|
import type {
|
||||||
LinkedControlsDialogFragment$data,
|
LinkedControlsDialogFragment$data,
|
||||||
LinkedControlsDialogFragment$key,
|
LinkedControlsDialogFragment$key,
|
||||||
@@ -125,7 +126,8 @@ function LinkedControlsDialogContent(props: Props & { ref: SearchRef }) {
|
|||||||
const mainData = useLazyLoadQuery<LinkedControlsDialogQuery>(query, {
|
const mainData = useLazyLoadQuery<LinkedControlsDialogQuery>(query, {
|
||||||
organizationId,
|
organizationId,
|
||||||
});
|
});
|
||||||
const { data, loadNext, hasNext, isLoadingNext, refetch } = usePaginationFragment(
|
const { data, loadNext, hasNext, isLoadingNext, refetch }
|
||||||
|
= usePaginationFragment<LinkedControlsDialogControlsQuery, LinkedControlsDialogFragment$key>(
|
||||||
controlsFragment,
|
controlsFragment,
|
||||||
mainData.organization as LinkedControlsDialogFragment$key,
|
mainData.organization as LinkedControlsDialogFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ const linkedDocumentFragment = graphql`
|
|||||||
fragment LinkedDocumentsCardFragment on Document {
|
fragment LinkedDocumentsCardFragment on Document {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
createdAt
|
|
||||||
documentType
|
documentType
|
||||||
versions(first: 1) {
|
versions(first: 1) {
|
||||||
edges {
|
edges {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import type {
|
|||||||
LinkedDocumentsDialogFragment$key,
|
LinkedDocumentsDialogFragment$key,
|
||||||
} from "#/__generated__/core/LinkedDocumentsDialogFragment.graphql";
|
} from "#/__generated__/core/LinkedDocumentsDialogFragment.graphql";
|
||||||
import type { LinkedDocumentsDialogQuery } from "#/__generated__/core/LinkedDocumentsDialogQuery.graphql";
|
import type { LinkedDocumentsDialogQuery } from "#/__generated__/core/LinkedDocumentsDialogQuery.graphql";
|
||||||
|
import type { LinkedDocumentsDialogQuery_fragment } from "#/__generated__/core/LinkedDocumentsDialogQuery_fragment.graphql";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
import type { NodeOf } from "#/types";
|
import type { NodeOf } from "#/types";
|
||||||
|
|
||||||
@@ -96,7 +97,8 @@ function LinkedDocumentsDialogContent(props: Omit<Props, "children">) {
|
|||||||
},
|
},
|
||||||
{ fetchPolicy: "network-only" },
|
{ fetchPolicy: "network-only" },
|
||||||
);
|
);
|
||||||
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment(
|
const { data, loadNext, hasNext, isLoadingNext }
|
||||||
|
= usePaginationFragment<LinkedDocumentsDialogQuery_fragment, LinkedDocumentsDialogFragment$key>(
|
||||||
documentsFragment,
|
documentsFragment,
|
||||||
query.organization as LinkedDocumentsDialogFragment$key,
|
query.organization as LinkedDocumentsDialogFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ const auditsQuery = graphql`
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
state
|
state
|
||||||
validFrom
|
|
||||||
validUntil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import { LinkedObligationDialog } from "./LinkedObligationsDialog";
|
|||||||
const linkedObligationFragment = graphql`
|
const linkedObligationFragment = graphql`
|
||||||
fragment LinkedObligationsCardFragment on Obligation {
|
fragment LinkedObligationsCardFragment on Obligation {
|
||||||
id
|
id
|
||||||
requirement
|
|
||||||
area
|
area
|
||||||
source
|
source
|
||||||
status
|
status
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import type {
|
|||||||
LinkedObligationsDialogFragment$key,
|
LinkedObligationsDialogFragment$key,
|
||||||
} from "#/__generated__/core/LinkedObligationsDialogFragment.graphql";
|
} from "#/__generated__/core/LinkedObligationsDialogFragment.graphql";
|
||||||
import type { LinkedObligationsDialogQuery } from "#/__generated__/core/LinkedObligationsDialogQuery.graphql";
|
import type { LinkedObligationsDialogQuery } from "#/__generated__/core/LinkedObligationsDialogQuery.graphql";
|
||||||
|
import type { LinkedObligationsDialogQuery_fragment } from "#/__generated__/core/LinkedObligationsDialogQuery_fragment.graphql";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
import type { NodeOf } from "#/types";
|
import type { NodeOf } from "#/types";
|
||||||
|
|
||||||
@@ -59,7 +60,6 @@ const obligationsFragment = graphql`
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
requirement
|
|
||||||
area
|
area
|
||||||
source
|
source
|
||||||
status
|
status
|
||||||
@@ -105,7 +105,8 @@ function LinkedObligationsDialogContent(props: Omit<Props, "children">) {
|
|||||||
},
|
},
|
||||||
{ fetchPolicy: "network-only" },
|
{ fetchPolicy: "network-only" },
|
||||||
);
|
);
|
||||||
const { data, loadNext, hasNext, isLoadingNext } = usePaginationFragment(
|
const { data, loadNext, hasNext, isLoadingNext }
|
||||||
|
= usePaginationFragment<LinkedObligationsDialogQuery_fragment, LinkedObligationsDialogFragment$key>(
|
||||||
obligationsFragment,
|
obligationsFragment,
|
||||||
query.organization as LinkedObligationsDialogFragment$key,
|
query.organization as LinkedObligationsDialogFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ const risksQuery = graphql`
|
|||||||
name
|
name
|
||||||
category
|
category
|
||||||
description
|
description
|
||||||
inherentRiskScore
|
|
||||||
residualRiskScore
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const taskFragment = graphql`
|
|||||||
id
|
id
|
||||||
description
|
description
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
state
|
state
|
||||||
timeEstimate
|
timeEstimate
|
||||||
deadline
|
deadline
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ import { Link, useLocation, useParams } from "react-router";
|
|||||||
|
|
||||||
import type { MeasureTasksTabQuery$data } from "#/__generated__/core/MeasureTasksTabQuery.graphql";
|
import type { MeasureTasksTabQuery$data } from "#/__generated__/core/MeasureTasksTabQuery.graphql";
|
||||||
import type { TaskFormDialogFragment$key } from "#/__generated__/core/TaskFormDialogFragment.graphql";
|
import type { TaskFormDialogFragment$key } from "#/__generated__/core/TaskFormDialogFragment.graphql";
|
||||||
|
import type { TaskFormDialogUpdateMutation } from "#/__generated__/core/TaskFormDialogUpdateMutation.graphql";
|
||||||
import type { TasksCard_TaskRowFragment$key } from "#/__generated__/core/TasksCard_TaskRowFragment.graphql";
|
import type { TasksCard_TaskRowFragment$key } from "#/__generated__/core/TasksCard_TaskRowFragment.graphql";
|
||||||
|
import type { TasksCardDeleteMutation } from "#/__generated__/core/TasksCardDeleteMutation.graphql";
|
||||||
import type { TasksPageFragment$data } from "#/__generated__/core/TasksPageFragment.graphql";
|
import type { TasksPageFragment$data } from "#/__generated__/core/TasksPageFragment.graphql";
|
||||||
import TaskFormDialog, {
|
import TaskFormDialog, {
|
||||||
taskUpdateMutation,
|
taskUpdateMutation,
|
||||||
@@ -162,7 +164,7 @@ function TaskRow(props: TaskRowProps) {
|
|||||||
const dialogRef = useDialogRef();
|
const dialogRef = useDialogRef();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
const [deleteTask] = useMutation(deleteMutation);
|
const [deleteTask] = useMutation<TasksCardDeleteMutation>(deleteMutation);
|
||||||
const params = useParams<{ measureId?: string }>();
|
const params = useParams<{ measureId?: string }>();
|
||||||
|
|
||||||
const relayEnv = useRelayEnvironment();
|
const relayEnv = useRelayEnvironment();
|
||||||
@@ -171,7 +173,7 @@ function TaskRow(props: TaskRowProps) {
|
|||||||
fragment,
|
fragment,
|
||||||
props.fKey as TasksCard_TaskRowFragment$key,
|
props.fKey as TasksCard_TaskRowFragment$key,
|
||||||
);
|
);
|
||||||
const [updateTask, isUpdating] = useMutation(taskUpdateMutation);
|
const [updateTask, isUpdating] = useMutation<TaskFormDialogUpdateMutation>(taskUpdateMutation);
|
||||||
|
|
||||||
const onToggle = async () => {
|
const onToggle = async () => {
|
||||||
await promisifyMutation(updateTask)({
|
await promisifyMutation(updateTask)({
|
||||||
|
|||||||
@@ -12,16 +12,22 @@ import { useFormWithSchema } from "../useFormWithSchema";
|
|||||||
const RiskFragment = graphql`
|
const RiskFragment = graphql`
|
||||||
fragment useRiskFormFragment on Risk {
|
fragment useRiskFormFragment on Risk {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
category
|
category
|
||||||
description
|
description
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
treatment
|
treatment
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
inherentLikelihood
|
inherentLikelihood
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
inherentImpact
|
inherentImpact
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
residualLikelihood
|
residualLikelihood
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
residualImpact
|
residualImpact
|
||||||
inherentRiskScore
|
# eslint-disable-next-line relay/unused-fields
|
||||||
residualRiskScore
|
|
||||||
note
|
note
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -40,8 +40,10 @@ const fragment = graphql`
|
|||||||
@required(action: THROW)
|
@required(action: THROW)
|
||||||
@connection(key: "PersonalAPIKeyListFragment_personalAPIKeys") {
|
@connection(key: "PersonalAPIKeyListFragment_personalAPIKeys") {
|
||||||
edges @required(action: THROW) {
|
edges @required(action: THROW) {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/must-colocate-fragment-spreads
|
||||||
...PersonalAPIKeyRowFragment
|
...PersonalAPIKeyRowFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export const personalAPIKeyRowFragment = graphql`
|
|||||||
createdAt
|
createdAt
|
||||||
expiresAt
|
expiresAt
|
||||||
lastUsedAt
|
lastUsedAt
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
token @include(if: $includeToken)
|
token @include(if: $includeToken)
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { Link, useNavigate } from "react-router";
|
|||||||
import { graphql } from "relay-runtime";
|
import { graphql } from "relay-runtime";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import type { SignUpPageMutation } from "#/__generated__/iam/SignUpPageMutation.graphql";
|
||||||
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
||||||
|
|
||||||
const signUpMutation = graphql`
|
const signUpMutation = graphql`
|
||||||
@@ -42,7 +43,7 @@ export default function SignUpPage() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const [signUp] = useMutation(signUpMutation);
|
const [signUp] = useMutation<SignUpPageMutation>(signUpMutation);
|
||||||
|
|
||||||
const onSubmit = (data: FormData) => {
|
const onSubmit = (data: FormData) => {
|
||||||
signUp({
|
signUp({
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { useFragment, useMutation } from "react-relay";
|
|||||||
import { graphql } from "relay-runtime";
|
import { graphql } from "relay-runtime";
|
||||||
|
|
||||||
import type { ViewerDropdownFragment$key } from "#/__generated__/iam/ViewerDropdownFragment.graphql";
|
import type { ViewerDropdownFragment$key } from "#/__generated__/iam/ViewerDropdownFragment.graphql";
|
||||||
|
import type { ViewerDropdownSignOutMutation } from "#/__generated__/iam/ViewerDropdownSignOutMutation.graphql";
|
||||||
|
|
||||||
export const fragment = graphql`
|
export const fragment = graphql`
|
||||||
fragment ViewerDropdownFragment on Identity {
|
fragment ViewerDropdownFragment on Identity {
|
||||||
@@ -38,7 +39,7 @@ export function ViewerDropdown(props: { fKey: ViewerDropdownFragment$key }) {
|
|||||||
|
|
||||||
const { canListAPIKeys, email, fullName }
|
const { canListAPIKeys, email, fullName }
|
||||||
= useFragment<ViewerDropdownFragment$key>(fragment, fKey);
|
= useFragment<ViewerDropdownFragment$key>(fragment, fKey);
|
||||||
const [signOut] = useMutation(signOutMutation);
|
const [signOut] = useMutation<ViewerDropdownSignOutMutation>(signOutMutation);
|
||||||
|
|
||||||
const handleLogout: React.MouseEventHandler<HTMLAnchorElement> = (e) => {
|
const handleLogout: React.MouseEventHandler<HTMLAnchorElement> = (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|||||||
@@ -21,18 +21,26 @@ export const samlConfigurationFormQuery = graphql`
|
|||||||
__typename
|
__typename
|
||||||
... on SAMLConfiguration {
|
... on SAMLConfiguration {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
emailDomain
|
emailDomain
|
||||||
enforcementPolicy
|
enforcementPolicy
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
domainVerificationToken
|
domainVerificationToken
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
domainVerifiedAt
|
domainVerifiedAt
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
testLoginUrl
|
testLoginUrl
|
||||||
idpEntityId
|
idpEntityId
|
||||||
idpSsoUrl
|
idpSsoUrl
|
||||||
idpCertificate
|
idpCertificate
|
||||||
attributeMappings {
|
attributeMappings {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
email
|
email
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
firstName
|
firstName
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
lastName
|
lastName
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
role
|
role
|
||||||
}
|
}
|
||||||
autoSignupEnabled
|
autoSignupEnabled
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
|
|
||||||
import type { AssetGraphListQuery } from "#/__generated__/core/AssetGraphListQuery.graphql";
|
import type { AssetGraphListQuery } from "#/__generated__/core/AssetGraphListQuery.graphql";
|
||||||
|
import type { AssetsListQuery } from "#/__generated__/core/AssetsListQuery.graphql";
|
||||||
import type { AssetsPageFragment$key } from "#/__generated__/core/AssetsPageFragment.graphql";
|
import type { AssetsPageFragment$key } from "#/__generated__/core/AssetsPageFragment.graphql";
|
||||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||||
import { assetsQuery } from "#/hooks/graph/AssetGraph";
|
import { assetsQuery } from "#/hooks/graph/AssetGraph";
|
||||||
@@ -42,26 +43,36 @@ const paginatedAssetsFragment = graphql`
|
|||||||
__id
|
__id
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
snapshotId
|
snapshotId
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
amount
|
amount
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
assetType
|
assetType
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
dataTypesStored
|
dataTypesStored
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
vendors(first: 50) {
|
vendors(first: 50) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
websiteUrl
|
websiteUrl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
canUpdate: permission(action: "core:asset:update")
|
canUpdate: permission(action: "core:asset:update")
|
||||||
canDelete: permission(action: "core:asset:delete")
|
canDelete: permission(action: "core:asset:delete")
|
||||||
}
|
}
|
||||||
@@ -84,7 +95,7 @@ export default function AssetsPage(props: Props) {
|
|||||||
assetsQuery,
|
assetsQuery,
|
||||||
props.queryRef,
|
props.queryRef,
|
||||||
);
|
);
|
||||||
const pagination = usePaginationFragment(
|
const pagination = usePaginationFragment<AssetsListQuery, AssetsPageFragment$key>(
|
||||||
paginatedAssetsFragment,
|
paginatedAssetsFragment,
|
||||||
data.node as AssetsPageFragment$key,
|
data.node as AssetsPageFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import {
|
|||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
|
|
||||||
import type { AuditGraphListQuery } from "#/__generated__/core/AuditGraphListQuery.graphql";
|
import type { AuditGraphListQuery } from "#/__generated__/core/AuditGraphListQuery.graphql";
|
||||||
|
import type { AuditsListQuery } from "#/__generated__/core/AuditsListQuery.graphql";
|
||||||
import type {
|
import type {
|
||||||
AuditsPageFragment$data,
|
AuditsPageFragment$data,
|
||||||
AuditsPageFragment$key,
|
AuditsPageFragment$key,
|
||||||
@@ -65,14 +66,12 @@ const paginatedAuditsFragment = graphql`
|
|||||||
validUntil
|
validUntil
|
||||||
report {
|
report {
|
||||||
id
|
id
|
||||||
filename
|
|
||||||
}
|
}
|
||||||
state
|
state
|
||||||
framework {
|
framework {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
canUpdate: permission(action: "core:audit:update")
|
canUpdate: permission(action: "core:audit:update")
|
||||||
canDelete: permission(action: "core:audit:delete")
|
canDelete: permission(action: "core:audit:delete")
|
||||||
}
|
}
|
||||||
@@ -92,7 +91,7 @@ export default function AuditsPage(props: Props) {
|
|||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
|
|
||||||
const data = usePreloadedQuery(auditsQuery, props.queryRef);
|
const data = usePreloadedQuery(auditsQuery, props.queryRef);
|
||||||
const pagination = usePaginationFragment(
|
const pagination = usePaginationFragment<AuditsListQuery, AuditsPageFragment$key>(
|
||||||
paginatedAuditsFragment,
|
paginatedAuditsFragment,
|
||||||
data.node as AuditsPageFragment$key,
|
data.node as AuditsPageFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export const compliancePageAccessPageQuery = graphql`
|
|||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: trustCenter @required(action: THROW) {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
...CompliancePageAccessListFragment
|
...CompliancePageAccessListFragment
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,24 +42,34 @@ const compliancePageAccessEditDialogQuery = graphql`
|
|||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
status
|
status
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
document {
|
document {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
title
|
title
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
documentType
|
documentType
|
||||||
}
|
}
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
report {
|
report {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
filename
|
filename
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
audit {
|
audit {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
framework {
|
framework {
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
trustCenterFile {
|
trustCenterFile {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
category
|
category
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ const fragment = graphql`
|
|||||||
after: $after
|
after: $after
|
||||||
orderBy: $order
|
orderBy: $order
|
||||||
) @connection(key: "CompliancePageAccessList_accesses" filters: ["orderBy"]) {
|
) @connection(key: "CompliancePageAccessList_accesses" filters: ["orderBy"]) {
|
||||||
__id
|
|
||||||
pageInfo {
|
pageInfo {
|
||||||
hasNextPage
|
hasNextPage
|
||||||
hasPreviousPage
|
hasPreviousPage
|
||||||
@@ -29,7 +28,6 @@ const fragment = graphql`
|
|||||||
endCursor
|
endCursor
|
||||||
}
|
}
|
||||||
edges {
|
edges {
|
||||||
cursor
|
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
...CompliancePageAccessListItemFragment
|
...CompliancePageAccessListItemFragment
|
||||||
|
|||||||
@@ -42,10 +42,10 @@ const fragment = graphql`
|
|||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
body
|
body
|
||||||
status
|
status
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ const compliancePageFragment = graphql`
|
|||||||
canUpdate: permission(action: "core:trust-center:update")
|
canUpdate: permission(action: "core:trust-center:update")
|
||||||
complianceFrameworks(first: $first, after: $after, orderBy: $order)
|
complianceFrameworks(first: $first, after: $after, orderBy: $order)
|
||||||
@connection(key: "CompliancePageFrameworkList_complianceFrameworks", filters: ["orderBy"]) {
|
@connection(key: "CompliancePageFrameworkList_complianceFrameworks", filters: ["orderBy"]) {
|
||||||
__id
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ const fragment = graphql`
|
|||||||
id
|
id
|
||||||
ndaFileName
|
ndaFileName
|
||||||
ndaFileUrl
|
ndaFileUrl
|
||||||
canUpdate: permission(action: "core:trust-center:update")
|
|
||||||
canUploadNDA: permission(action: "core:trust-center:upload-nda")
|
canUploadNDA: permission(action: "core:trust-center:upload-nda")
|
||||||
canDeleteNDA: permission(action: "core:trust-center:delete-nda")
|
canDeleteNDA: permission(action: "core:trust-center:delete-nda")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ const fragment = graphql`
|
|||||||
logoUrl
|
logoUrl
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
rank
|
|
||||||
websiteUrl
|
websiteUrl
|
||||||
canUpdate: permission(action: "core:trust-center-reference:update")
|
canUpdate: permission(action: "core:trust-center-reference:update")
|
||||||
canDelete: permission(action: "core:trust-center-reference:delete")
|
canDelete: permission(action: "core:trust-center-reference:delete")
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import {
|
|||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
|
|
||||||
|
import type { ContinualImprovementGraphDeleteMutation } from "#/__generated__/core/ContinualImprovementGraphDeleteMutation.graphql";
|
||||||
import type { ContinualImprovementGraphListQuery } from "#/__generated__/core/ContinualImprovementGraphListQuery.graphql";
|
import type { ContinualImprovementGraphListQuery } from "#/__generated__/core/ContinualImprovementGraphListQuery.graphql";
|
||||||
import type {
|
import type {
|
||||||
ContinualImprovementsPageFragment$data,
|
ContinualImprovementsPageFragment$data,
|
||||||
@@ -73,16 +74,12 @@ const continualImprovementsPageFragment = graphql`
|
|||||||
key: "ContinualImprovementsPage_continualImprovements"
|
key: "ContinualImprovementsPage_continualImprovements"
|
||||||
filters: ["filter"]
|
filters: ["filter"]
|
||||||
) {
|
) {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
snapshotId
|
snapshotId
|
||||||
sourceId
|
|
||||||
referenceId
|
referenceId
|
||||||
description
|
description
|
||||||
source
|
|
||||||
targetDate
|
targetDate
|
||||||
status
|
status
|
||||||
priority
|
priority
|
||||||
@@ -90,8 +87,6 @@ const continualImprovementsPageFragment = graphql`
|
|||||||
id
|
id
|
||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(action: "core:continual-improvement:update")
|
canUpdate: permission(action: "core:continual-improvement:update")
|
||||||
canDelete: permission(action: "core:continual-improvement:delete")
|
canDelete: permission(action: "core:continual-improvement:delete")
|
||||||
}
|
}
|
||||||
@@ -226,7 +221,7 @@ function ImprovementRow({
|
|||||||
}) {
|
}) {
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const [deleteImprovement] = useMutation(deleteContinualImprovementMutation);
|
const [deleteImprovement] = useMutation<ContinualImprovementGraphDeleteMutation>(deleteContinualImprovementMutation);
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
const isSnapshotMode = Boolean(snapshotId);
|
const isSnapshotMode = Boolean(snapshotId);
|
||||||
|
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ const paginatedDataFragment = graphql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
canUpdate: permission(action: "core:datum:update")
|
canUpdate: permission(action: "core:datum:update")
|
||||||
canDelete: permission(action: "core:datum:delete")
|
canDelete: permission(action: "core:datum:delete")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
import type { PeopleGraphPaginatedFragment$key } from "#/__generated__/core/PeopleGraphPaginatedFragment.graphql";
|
import type { PeopleGraphPaginatedFragment$key } from "#/__generated__/core/PeopleGraphPaginatedFragment.graphql";
|
||||||
import type { PeopleGraphPaginatedQuery } from "#/__generated__/core/PeopleGraphPaginatedQuery.graphql";
|
import type { PeopleGraphPaginatedQuery } from "#/__generated__/core/PeopleGraphPaginatedQuery.graphql";
|
||||||
|
import type { PeopleListQuery } from "#/__generated__/core/PeopleListQuery.graphql";
|
||||||
import type { SignatureDocumentsDialogMutation } from "#/__generated__/core/SignatureDocumentsDialogMutation.graphql";
|
import type { SignatureDocumentsDialogMutation } from "#/__generated__/core/SignatureDocumentsDialogMutation.graphql";
|
||||||
import {
|
import {
|
||||||
paginatedPeopleFragment,
|
paginatedPeopleFragment,
|
||||||
@@ -144,7 +145,7 @@ function PeopleList({
|
|||||||
hasNext,
|
hasNext,
|
||||||
loadNext,
|
loadNext,
|
||||||
isLoadingNext,
|
isLoadingNext,
|
||||||
} = usePaginationFragment(
|
} = usePaginationFragment<PeopleListQuery, PeopleGraphPaginatedFragment$key>(
|
||||||
paginatedPeopleFragment,
|
paginatedPeopleFragment,
|
||||||
data.organization as PeopleGraphPaginatedFragment$key,
|
data.organization as PeopleGraphPaginatedFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const documentFragment = graphql`
|
|||||||
fragment EmployeeDocumentSignaturePageDocumentFragment on SignableDocument {
|
fragment EmployeeDocumentSignaturePageDocumentFragment on SignableDocument {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
signed
|
signed
|
||||||
versions(first: 100, orderBy: { field: CREATED_AT, direction: DESC })
|
versions(first: 100, orderBy: { field: CREATED_AT, direction: DESC })
|
||||||
@required(action: THROW) {
|
@required(action: THROW) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import type { VersionRowFragment$key } from "#/__generated__/core/VersionRowFrag
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment VersionRowFragment on DocumentVersion {
|
fragment VersionRowFragment on DocumentVersion {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
version
|
version
|
||||||
signed
|
signed
|
||||||
|
|||||||
@@ -19,6 +19,17 @@ import {
|
|||||||
import { useNavigate, useOutletContext } from "react-router";
|
import { useNavigate, useOutletContext } from "react-router";
|
||||||
import { graphql, type MutationParameters } from "relay-runtime";
|
import { graphql, type MutationParameters } from "relay-runtime";
|
||||||
|
|
||||||
|
import type { FrameworkControlPageAttachAuditMutation } from "#/__generated__/core/FrameworkControlPageAttachAuditMutation.graphql";
|
||||||
|
import type { FrameworkControlPageAttachDocumentMutation } from "#/__generated__/core/FrameworkControlPageAttachDocumentMutation.graphql";
|
||||||
|
import type { FrameworkControlPageAttachMutation } from "#/__generated__/core/FrameworkControlPageAttachMutation.graphql";
|
||||||
|
import type { FrameworkControlPageAttachObligationMutation } from "#/__generated__/core/FrameworkControlPageAttachObligationMutation.graphql";
|
||||||
|
import type { FrameworkControlPageAttachSnapshotMutation } from "#/__generated__/core/FrameworkControlPageAttachSnapshotMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDeleteControlMutation } from "#/__generated__/core/FrameworkControlPageDeleteControlMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDetachAuditMutation } from "#/__generated__/core/FrameworkControlPageDetachAuditMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDetachDocumentMutation } from "#/__generated__/core/FrameworkControlPageDetachDocumentMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDetachMutation } from "#/__generated__/core/FrameworkControlPageDetachMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDetachObligationMutation } from "#/__generated__/core/FrameworkControlPageDetachObligationMutation.graphql";
|
||||||
|
import type { FrameworkControlPageDetachSnapshotMutation } from "#/__generated__/core/FrameworkControlPageDetachSnapshotMutation.graphql";
|
||||||
import type { FrameworkDetailPageFragment$data } from "#/__generated__/core/FrameworkDetailPageFragment.graphql";
|
import type { FrameworkDetailPageFragment$data } from "#/__generated__/core/FrameworkDetailPageFragment.graphql";
|
||||||
import type { FrameworkGraphControlNodeQuery } from "#/__generated__/core/FrameworkGraphControlNodeQuery.graphql";
|
import type { FrameworkGraphControlNodeQuery } from "#/__generated__/core/FrameworkGraphControlNodeQuery.graphql";
|
||||||
import { LinkedAuditsCard } from "#/components/audits/LinkedAuditsCard";
|
import { LinkedAuditsCard } from "#/components/audits/LinkedAuditsCard";
|
||||||
@@ -195,32 +206,32 @@ export default function FrameworkControlPage({ queryRef }: Props) {
|
|||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [detachMeasure, isDetachingMeasure] = useMutation(
|
const [detachMeasure, isDetachingMeasure] = useMutation<FrameworkControlPageDetachMutation>(
|
||||||
detachMeasureMutation,
|
detachMeasureMutation,
|
||||||
);
|
);
|
||||||
const [attachMeasure, isAttachingMeasure] = useMutation(
|
const [attachMeasure, isAttachingMeasure] = useMutation<FrameworkControlPageAttachMutation>(
|
||||||
attachMeasureMutation,
|
attachMeasureMutation,
|
||||||
);
|
);
|
||||||
const [detachDocument, isDetachingDocument] = useMutation(
|
const [detachDocument, isDetachingDocument] = useMutation<FrameworkControlPageDetachDocumentMutation>(
|
||||||
detachDocumentMutation,
|
detachDocumentMutation,
|
||||||
);
|
);
|
||||||
const [attachDocument, isAttachingDocument] = useMutation(
|
const [attachDocument, isAttachingDocument] = useMutation<FrameworkControlPageAttachDocumentMutation>(
|
||||||
attachDocumentMutation,
|
attachDocumentMutation,
|
||||||
);
|
);
|
||||||
const [detachAudit, isDetachingAudit] = useMutation(detachAuditMutation);
|
const [detachAudit, isDetachingAudit] = useMutation<FrameworkControlPageDetachAuditMutation>(detachAuditMutation);
|
||||||
const [attachAudit, isAttachingAudit] = useMutation(attachAuditMutation);
|
const [attachAudit, isAttachingAudit] = useMutation<FrameworkControlPageAttachAuditMutation>(attachAuditMutation);
|
||||||
const [detachSnapshot, isDetachingSnapshot] = useMutation(
|
const [detachSnapshot, isDetachingSnapshot] = useMutation<FrameworkControlPageDetachSnapshotMutation>(
|
||||||
detachSnapshotMutation,
|
detachSnapshotMutation,
|
||||||
);
|
);
|
||||||
const [attachSnapshot, isAttachingSnapshot] = useMutation(
|
const [attachSnapshot, isAttachingSnapshot] = useMutation<FrameworkControlPageAttachSnapshotMutation>(
|
||||||
attachSnapshotMutation,
|
attachSnapshotMutation,
|
||||||
);
|
);
|
||||||
const [deleteControl] = useMutation(deleteControlMutation);
|
const [deleteControl] = useMutation<FrameworkControlPageDeleteControlMutation>(deleteControlMutation);
|
||||||
|
|
||||||
const [attachObligation, isAttachingObligation] = useMutation(
|
const [attachObligation, isAttachingObligation] = useMutation<FrameworkControlPageAttachObligationMutation>(
|
||||||
attachObligationMutation,
|
attachObligationMutation,
|
||||||
);
|
);
|
||||||
const [detachObligation, isDetachingObligation] = useMutation(
|
const [detachObligation, isDetachingObligation] = useMutation<FrameworkControlPageDetachObligationMutation>(
|
||||||
detachObligationMutation,
|
detachObligationMutation,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -37,16 +37,16 @@ const frameworkDetailFragment = graphql`
|
|||||||
fragment FrameworkDetailPageFragment on Framework {
|
fragment FrameworkDetailPageFragment on Framework {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
description
|
description
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
lightLogoURL
|
lightLogoURL
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
darkLogoURL
|
darkLogoURL
|
||||||
canExport: permission(action: "core:franework:export")
|
canExport: permission(action: "core:franework:export")
|
||||||
canUpdate: permission(action: "core:framework:update")
|
canUpdate: permission(action: "core:framework:update")
|
||||||
canDelete: permission(action: "core:framework:delete")
|
canDelete: permission(action: "core:framework:delete")
|
||||||
canCreateControl: permission(action: "core:control:create")
|
canCreateControl: permission(action: "core:control:create")
|
||||||
organization {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
controls(
|
controls(
|
||||||
first: 250
|
first: 250
|
||||||
orderBy: { field: SECTION_TITLE, direction: ASC }
|
orderBy: { field: SECTION_TITLE, direction: ASC }
|
||||||
@@ -57,7 +57,6 @@ const frameworkDetailFragment = graphql`
|
|||||||
id
|
id
|
||||||
sectionTitle
|
sectionTitle
|
||||||
name
|
name
|
||||||
bestPractice
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { graphql, useRefetchableFragment } from "react-relay";
|
import { graphql, useRefetchableFragment } from "react-relay";
|
||||||
import { useOutletContext } from "react-router";
|
import { useOutletContext } from "react-router";
|
||||||
|
|
||||||
|
import type { MeasureControlsTabControlsQuery } from "#/__generated__/core/MeasureControlsTabControlsQuery.graphql";
|
||||||
import type { MeasureControlsTabFragment$key } from "#/__generated__/core/MeasureControlsTabFragment.graphql";
|
import type { MeasureControlsTabFragment$key } from "#/__generated__/core/MeasureControlsTabFragment.graphql";
|
||||||
import { LinkedControlsCard } from "#/components/controls/LinkedControlsCard";
|
import { LinkedControlsCard } from "#/components/controls/LinkedControlsCard";
|
||||||
import { useMutationWithIncrement } from "#/hooks/useMutationWithIncrement";
|
import { useMutationWithIncrement } from "#/hooks/useMutationWithIncrement";
|
||||||
@@ -73,7 +74,10 @@ export default function MeasureControlsTab() {
|
|||||||
const { measure } = useOutletContext<{
|
const { measure } = useOutletContext<{
|
||||||
measure: MeasureControlsTabFragment$key & { id: string };
|
measure: MeasureControlsTabFragment$key & { id: string };
|
||||||
}>();
|
}>();
|
||||||
const [data, refetch] = useRefetchableFragment(controlsFragment, measure);
|
const [data, refetch] = useRefetchableFragment<
|
||||||
|
MeasureControlsTabControlsQuery,
|
||||||
|
MeasureControlsTabFragment$key
|
||||||
|
>(controlsFragment, measure);
|
||||||
const connectionId = data.controls.__id;
|
const connectionId = data.controls.__id;
|
||||||
const controls = data.controls?.edges?.map(edge => edge.node) ?? [];
|
const controls = data.controls?.edges?.map(edge => edge.node) ?? [];
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import { graphql } from "relay-runtime";
|
|||||||
|
|
||||||
import type { MeasureEvidencesTabFragment$key } from "#/__generated__/core/MeasureEvidencesTabFragment.graphql";
|
import type { MeasureEvidencesTabFragment$key } from "#/__generated__/core/MeasureEvidencesTabFragment.graphql";
|
||||||
import type { MeasureEvidencesTabFragment_evidence$key } from "#/__generated__/core/MeasureEvidencesTabFragment_evidence.graphql";
|
import type { MeasureEvidencesTabFragment_evidence$key } from "#/__generated__/core/MeasureEvidencesTabFragment_evidence.graphql";
|
||||||
|
import type { MeasureEvidencesTabQuery } from "#/__generated__/core/MeasureEvidencesTabQuery.graphql";
|
||||||
import { SortableTable } from "#/components/SortableTable";
|
import { SortableTable } from "#/components/SortableTable";
|
||||||
import { updateStoreCounter } from "#/hooks/useMutationWithIncrement";
|
import { updateStoreCounter } from "#/hooks/useMutationWithIncrement";
|
||||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||||
@@ -104,7 +105,10 @@ export default function MeasureEvidencesTab() {
|
|||||||
evidenceId: string;
|
evidenceId: string;
|
||||||
snapshotId?: string;
|
snapshotId?: string;
|
||||||
}>();
|
}>();
|
||||||
const pagination = usePaginationFragment(evidencesFragment, measure);
|
const pagination = usePaginationFragment<
|
||||||
|
MeasureEvidencesTabQuery,
|
||||||
|
MeasureEvidencesTabFragment$key
|
||||||
|
>(evidencesFragment, measure);
|
||||||
const connectionId = pagination.data.evidences.__id;
|
const connectionId = pagination.data.evidences.__id;
|
||||||
const evidences
|
const evidences
|
||||||
= pagination.data.evidences?.edges?.map(edge => edge.node) ?? [];
|
= pagination.data.evidences?.edges?.map(edge => edge.node) ?? [];
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const tasksQuery = graphql`
|
|||||||
edges @required(action: THROW) {
|
edges @required(action: THROW) {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
state
|
state
|
||||||
...TaskFormDialogFragment
|
...TaskFormDialogFragment
|
||||||
...TasksCard_TaskRowFragment
|
...TasksCard_TaskRowFragment
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ const meetingFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
date
|
date
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
minutes
|
minutes
|
||||||
canUpdate: permission(action: "core:meeting:update")
|
canUpdate: permission(action: "core:meeting:update")
|
||||||
canDelete: permission(action: "core:meeting:delete")
|
canDelete: permission(action: "core:meeting:delete")
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import { Link } from "react-router";
|
|||||||
import { graphql } from "relay-runtime";
|
import { graphql } from "relay-runtime";
|
||||||
|
|
||||||
import type { MeetingGraphListQuery } from "#/__generated__/core/MeetingGraphListQuery.graphql";
|
import type { MeetingGraphListQuery } from "#/__generated__/core/MeetingGraphListQuery.graphql";
|
||||||
|
import type { MeetingsListQuery } from "#/__generated__/core/MeetingsListQuery.graphql";
|
||||||
import type { MeetingsPage_UpdateSummaryMutation } from "#/__generated__/core/MeetingsPage_UpdateSummaryMutation.graphql";
|
import type { MeetingsPage_UpdateSummaryMutation } from "#/__generated__/core/MeetingsPage_UpdateSummaryMutation.graphql";
|
||||||
import type { MeetingsPageListFragment$key } from "#/__generated__/core/MeetingsPageListFragment.graphql";
|
import type { MeetingsPageListFragment$key } from "#/__generated__/core/MeetingsPageListFragment.graphql";
|
||||||
import type { MeetingsPageRowFragment$key } from "#/__generated__/core/MeetingsPageRowFragment.graphql";
|
import type { MeetingsPageRowFragment$key } from "#/__generated__/core/MeetingsPageRowFragment.graphql";
|
||||||
@@ -91,7 +92,7 @@ export default function MeetingsPage(props: Props) {
|
|||||||
props.queryRef,
|
props.queryRef,
|
||||||
).organization;
|
).organization;
|
||||||
|
|
||||||
const pagination = usePaginationFragment(
|
const pagination = usePaginationFragment<MeetingsListQuery, MeetingsPageListFragment$key>(
|
||||||
meetingsFragment,
|
meetingsFragment,
|
||||||
organization as MeetingsPageListFragment$key,
|
organization as MeetingsPageListFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ import type {
|
|||||||
NonconformitiesPageFragment$data,
|
NonconformitiesPageFragment$data,
|
||||||
NonconformitiesPageFragment$key,
|
NonconformitiesPageFragment$key,
|
||||||
} from "#/__generated__/core/NonconformitiesPageFragment.graphql";
|
} from "#/__generated__/core/NonconformitiesPageFragment.graphql";
|
||||||
|
import type { NonconformitiesPageRefetchQuery } from "#/__generated__/core/NonconformitiesPageRefetchQuery.graphql";
|
||||||
|
import type { NonconformityGraphDeleteMutation } from "#/__generated__/core/NonconformityGraphDeleteMutation.graphql";
|
||||||
import type { NonconformityGraphListQuery } from "#/__generated__/core/NonconformityGraphListQuery.graphql";
|
import type { NonconformityGraphListQuery } from "#/__generated__/core/NonconformityGraphListQuery.graphql";
|
||||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
@@ -75,8 +77,6 @@ const nonconformitiesPageFragment = graphql`
|
|||||||
key: "NonconformitiesPage_nonconformities"
|
key: "NonconformitiesPage_nonconformities"
|
||||||
filters: ["filter"]
|
filters: ["filter"]
|
||||||
) {
|
) {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
@@ -84,11 +84,7 @@ const nonconformitiesPageFragment = graphql`
|
|||||||
snapshotId
|
snapshotId
|
||||||
description
|
description
|
||||||
status
|
status
|
||||||
dateIdentified
|
|
||||||
dueDate
|
dueDate
|
||||||
rootCause
|
|
||||||
correctiveAction
|
|
||||||
effectivenessCheck
|
|
||||||
audit {
|
audit {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
@@ -101,8 +97,6 @@ const nonconformitiesPageFragment = graphql`
|
|||||||
id
|
id
|
||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(action: "core:nonconformity:update")
|
canUpdate: permission(action: "core:nonconformity:update")
|
||||||
canDelete: permission(action: "core:nonconformity:delete")
|
canDelete: permission(action: "core:nonconformity:delete")
|
||||||
}
|
}
|
||||||
@@ -131,7 +125,7 @@ export default function NonconformitiesPage({
|
|||||||
data: nonconformitiesData,
|
data: nonconformitiesData,
|
||||||
loadNext,
|
loadNext,
|
||||||
hasNext,
|
hasNext,
|
||||||
} = usePaginationFragment(
|
} = usePaginationFragment<NonconformitiesPageRefetchQuery, NonconformitiesPageFragment$key>(
|
||||||
nonconformitiesPageFragment,
|
nonconformitiesPageFragment,
|
||||||
organization.node as NonconformitiesPageFragment$key,
|
organization.node as NonconformitiesPageFragment$key,
|
||||||
);
|
);
|
||||||
@@ -239,7 +233,7 @@ function NonconformityRow({
|
|||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
const [deleteNonconformity] = useMutation(deleteNonconformityMutation);
|
const [deleteNonconformity] = useMutation<NonconformityGraphDeleteMutation>(deleteNonconformityMutation);
|
||||||
|
|
||||||
const nonconformityDetailUrl = isSnapshotMode
|
const nonconformityDetailUrl = isSnapshotMode
|
||||||
? `/organizations/${organizationId}/snapshots/${snapshotId}/nonconformities/${nonconformity.id}`
|
? `/organizations/${organizationId}/snapshots/${snapshotId}/nonconformities/${nonconformity.id}`
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ import {
|
|||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
import { useParams } from "react-router";
|
import { useParams } from "react-router";
|
||||||
|
|
||||||
|
import type { ObligationGraphDeleteMutation } from "#/__generated__/core/ObligationGraphDeleteMutation.graphql";
|
||||||
import type { ObligationGraphListQuery } from "#/__generated__/core/ObligationGraphListQuery.graphql";
|
import type { ObligationGraphListQuery } from "#/__generated__/core/ObligationGraphListQuery.graphql";
|
||||||
import type {
|
import type {
|
||||||
ObligationsPageFragment$data,
|
ObligationsPageFragment$data,
|
||||||
ObligationsPageFragment$key,
|
ObligationsPageFragment$key,
|
||||||
} from "#/__generated__/core/ObligationsPageFragment.graphql";
|
} from "#/__generated__/core/ObligationsPageFragment.graphql";
|
||||||
|
import type { ObligationsPageRefetchQuery } from "#/__generated__/core/ObligationsPageRefetchQuery.graphql";
|
||||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
|
|
||||||
@@ -69,26 +71,18 @@ const obligationsPageFragment = graphql`
|
|||||||
filter: { snapshotId: $snapshotId }
|
filter: { snapshotId: $snapshotId }
|
||||||
) @connection(key: "ObligationsPage_obligations", filters: ["filter"]) {
|
) @connection(key: "ObligationsPage_obligations", filters: ["filter"]) {
|
||||||
__id
|
__id
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
snapshotId
|
snapshotId
|
||||||
sourceId
|
|
||||||
area
|
area
|
||||||
source
|
source
|
||||||
requirement
|
|
||||||
status
|
status
|
||||||
lastReviewDate
|
|
||||||
dueDate
|
dueDate
|
||||||
actionsToBeImplemented
|
|
||||||
regulator
|
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
fullName
|
fullName
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(action: "core:obligation:update")
|
canUpdate: permission(action: "core:obligation:update")
|
||||||
canDelete: permission(action: "core:obligation:delete")
|
canDelete: permission(action: "core:obligation:delete")
|
||||||
}
|
}
|
||||||
@@ -115,7 +109,7 @@ export default function ObligationsPage({ queryRef }: ObligationsPageProps) {
|
|||||||
data: obligationsData,
|
data: obligationsData,
|
||||||
loadNext,
|
loadNext,
|
||||||
hasNext,
|
hasNext,
|
||||||
} = usePaginationFragment(
|
} = usePaginationFragment<ObligationsPageRefetchQuery, ObligationsPageFragment$key>(
|
||||||
obligationsPageFragment,
|
obligationsPageFragment,
|
||||||
organization.node as ObligationsPageFragment$key,
|
organization.node as ObligationsPageFragment$key,
|
||||||
);
|
);
|
||||||
@@ -216,7 +210,7 @@ function ObligationRow({
|
|||||||
}) {
|
}) {
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const [deleteObligation] = useMutation(deleteObligationMutation);
|
const [deleteObligation] = useMutation<ObligationGraphDeleteMutation>(deleteObligationMutation);
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
const isSnapshotMode = Boolean(snapshotId);
|
const isSnapshotMode = Boolean(snapshotId);
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import type {
|
|||||||
ProcessingActivitiesPageTIAFragment$data,
|
ProcessingActivitiesPageTIAFragment$data,
|
||||||
ProcessingActivitiesPageTIAFragment$key,
|
ProcessingActivitiesPageTIAFragment$key,
|
||||||
} from "#/__generated__/core/ProcessingActivitiesPageTIAFragment.graphql";
|
} from "#/__generated__/core/ProcessingActivitiesPageTIAFragment.graphql";
|
||||||
|
import type { ProcessingActivityGraphDeleteMutation } from "#/__generated__/core/ProcessingActivityGraphDeleteMutation.graphql";
|
||||||
import type { ProcessingActivityGraphListQuery } from "#/__generated__/core/ProcessingActivityGraphListQuery.graphql";
|
import type { ProcessingActivityGraphListQuery } from "#/__generated__/core/ProcessingActivityGraphListQuery.graphql";
|
||||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||||
@@ -92,22 +93,16 @@ const processingActivitiesPageFragment = graphql`
|
|||||||
key: "ProcessingActivitiesPage_processingActivities"
|
key: "ProcessingActivitiesPage_processingActivities"
|
||||||
filters: ["filter"]
|
filters: ["filter"]
|
||||||
) {
|
) {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
snapshotId
|
snapshotId
|
||||||
sourceId
|
|
||||||
name
|
name
|
||||||
purpose
|
purpose
|
||||||
dataSubjectCategory
|
dataSubjectCategory
|
||||||
personalDataCategory
|
|
||||||
lawfulBasis
|
lawfulBasis
|
||||||
location
|
location
|
||||||
internationalTransfers
|
internationalTransfers
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(
|
canUpdate: permission(
|
||||||
action: "core:processing-activity:update"
|
action: "core:processing-activity:update"
|
||||||
)
|
)
|
||||||
@@ -142,8 +137,6 @@ const dpiaListPageFragment = graphql`
|
|||||||
key: "ProcessingActivitiesPage_dataProtectionImpactAssessments"
|
key: "ProcessingActivitiesPage_dataProtectionImpactAssessments"
|
||||||
filters: ["filter"]
|
filters: ["filter"]
|
||||||
) {
|
) {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
@@ -154,8 +147,6 @@ const dpiaListPageFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pageInfo {
|
pageInfo {
|
||||||
@@ -184,8 +175,6 @@ const tiaListPageFragment = graphql`
|
|||||||
key: "ProcessingActivitiesPage_transferImpactAssessments"
|
key: "ProcessingActivitiesPage_transferImpactAssessments"
|
||||||
filters: ["filter"]
|
filters: ["filter"]
|
||||||
) {
|
) {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
@@ -196,8 +185,6 @@ const tiaListPageFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pageInfo {
|
pageInfo {
|
||||||
@@ -707,7 +694,7 @@ function ActivityRow({
|
|||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
const { snapshotId } = useParams<{ snapshotId?: string }>();
|
||||||
const isSnapshotMode = Boolean(snapshotId);
|
const isSnapshotMode = Boolean(snapshotId);
|
||||||
const [deleteActivity] = useMutation(deleteProcessingActivityMutation);
|
const [deleteActivity] = useMutation<ProcessingActivityGraphDeleteMutation>(deleteProcessingActivityMutation);
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
|
|
||||||
const handleDelete = () => {
|
const handleDelete = () => {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import {
|
|||||||
usePreloadedQuery,
|
usePreloadedQuery,
|
||||||
} from "react-relay";
|
} from "react-relay";
|
||||||
|
|
||||||
|
import type { RightsRequestGraphDeleteMutation } from "#/__generated__/core/RightsRequestGraphDeleteMutation.graphql";
|
||||||
import type { RightsRequestGraphListQuery } from "#/__generated__/core/RightsRequestGraphListQuery.graphql";
|
import type { RightsRequestGraphListQuery } from "#/__generated__/core/RightsRequestGraphListQuery.graphql";
|
||||||
import type {
|
import type {
|
||||||
RightsRequestsPageFragment$data,
|
RightsRequestsPageFragment$data,
|
||||||
@@ -64,8 +65,6 @@ const rightsRequestsPageFragment = graphql`
|
|||||||
id
|
id
|
||||||
rightsRequests(first: $first, after: $after)
|
rightsRequests(first: $first, after: $after)
|
||||||
@connection(key: "RightsRequestsPage_rightsRequests") {
|
@connection(key: "RightsRequestsPage_rightsRequests") {
|
||||||
__id
|
|
||||||
totalCount
|
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
@@ -73,11 +72,7 @@ const rightsRequestsPageFragment = graphql`
|
|||||||
requestState
|
requestState
|
||||||
dataSubject
|
dataSubject
|
||||||
contact
|
contact
|
||||||
details
|
|
||||||
deadline
|
deadline
|
||||||
actionTaken
|
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
|
|
||||||
canDelete: permission(action: "core:rights-request:delete")
|
canDelete: permission(action: "core:rights-request:delete")
|
||||||
canUpdate: permission(action: "core:rights-request:update")
|
canUpdate: permission(action: "core:rights-request:update")
|
||||||
@@ -210,7 +205,7 @@ function RequestRow({
|
|||||||
}) {
|
}) {
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const [deleteRequest] = useMutation(deleteRightsRequestMutation);
|
const [deleteRequest] = useMutation<RightsRequestGraphDeleteMutation>(deleteRightsRequestMutation);
|
||||||
const confirm = useConfirm();
|
const confirm = useConfirm();
|
||||||
|
|
||||||
const handleDelete = () => {
|
const handleDelete = () => {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Badge, Tbody, Td, Th, Thead, Tr } from "@probo/ui";
|
|||||||
import { graphql, useRefetchableFragment } from "react-relay";
|
import { graphql, useRefetchableFragment } from "react-relay";
|
||||||
import { useOutletContext } from "react-router";
|
import { useOutletContext } from "react-router";
|
||||||
|
|
||||||
|
import type { RiskControlsTabControlsQuery } from "#/__generated__/core/RiskControlsTabControlsQuery.graphql";
|
||||||
import type { RiskControlsTabFragment$key } from "#/__generated__/core/RiskControlsTabFragment.graphql";
|
import type { RiskControlsTabFragment$key } from "#/__generated__/core/RiskControlsTabFragment.graphql";
|
||||||
import { SortableTable, SortableTh } from "#/components/SortableTable";
|
import { SortableTable, SortableTh } from "#/components/SortableTable";
|
||||||
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
import { useOrganizationId } from "#/hooks/useOrganizationId";
|
||||||
@@ -46,7 +47,10 @@ export default function RiskControlsTab() {
|
|||||||
risk: RiskControlsTabFragment$key & { id: string };
|
risk: RiskControlsTabFragment$key & { id: string };
|
||||||
}>();
|
}>();
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const [data, refetch] = useRefetchableFragment(controlsFragment, risk);
|
const [data, refetch] = useRefetchableFragment<
|
||||||
|
RiskControlsTabControlsQuery,
|
||||||
|
RiskControlsTabFragment$key
|
||||||
|
>(controlsFragment, risk);
|
||||||
const controls = data.controls.edges.map(edge => edge.node);
|
const controls = data.controls.edges.map(edge => edge.node);
|
||||||
const organizationId = useOrganizationId();
|
const organizationId = useOrganizationId();
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,14 @@ import type { RiskOverviewTabFragment$key } from "#/__generated__/core/RiskOverv
|
|||||||
|
|
||||||
const overviewFragment = graphql`
|
const overviewFragment = graphql`
|
||||||
fragment RiskOverviewTabFragment on Risk {
|
fragment RiskOverviewTabFragment on Risk {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
inherentLikelihood
|
inherentLikelihood
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
inherentImpact
|
inherentImpact
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
residualLikelihood
|
residualLikelihood
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
residualImpact
|
residualImpact
|
||||||
inherentRiskScore
|
|
||||||
residualRiskScore
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -46,16 +46,12 @@ export const stateOfApplicabilityDetailPageQuery = graphql`
|
|||||||
... on StateOfApplicability {
|
... on StateOfApplicability {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
sourceId
|
|
||||||
snapshotId
|
snapshotId
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
canUpdate: permission(action: "core:state-of-applicability:update")
|
canUpdate: permission(action: "core:state-of-applicability:update")
|
||||||
canDelete: permission(action: "core:state-of-applicability:delete")
|
canDelete: permission(action: "core:state-of-applicability:delete")
|
||||||
canExport: permission(action: "core:state-of-applicability:export")
|
canExport: permission(action: "core:state-of-applicability:export")
|
||||||
organization {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
fullName
|
fullName
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
import { forwardRef, Suspense, useImperativeHandle, useMemo, useState } from "react";
|
import { forwardRef, Suspense, useImperativeHandle, useMemo, useState } from "react";
|
||||||
import { graphql, useLazyLoadQuery } from "react-relay";
|
import { graphql, useLazyLoadQuery } from "react-relay";
|
||||||
|
|
||||||
|
import type { LinkControlDialogQuery } from "#/__generated__/core/LinkControlDialogQuery.graphql";
|
||||||
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
import { useMutationWithToasts } from "#/hooks/useMutationWithToasts";
|
||||||
|
|
||||||
const linkControlQuery = graphql`
|
const linkControlQuery = graphql`
|
||||||
@@ -255,7 +256,7 @@ function LinkControlDialogContent({
|
|||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
const [collapsedFrameworks, setCollapsedFrameworks] = useState<Set<string>>(new Set());
|
const [collapsedFrameworks, setCollapsedFrameworks] = useState<Set<string>>(new Set());
|
||||||
const data = useLazyLoadQuery(
|
const data = useLazyLoadQuery<LinkControlDialogQuery>(
|
||||||
linkControlQuery,
|
linkControlQuery,
|
||||||
{ stateOfApplicabilityId, organizationId },
|
{ stateOfApplicabilityId, organizationId },
|
||||||
{ fetchPolicy: "store-or-network" },
|
{ fetchPolicy: "store-or-network" },
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { graphql } from "relay-runtime";
|
|||||||
|
|
||||||
import type { TaskGraphQuery } from "#/__generated__/core/TaskGraphQuery.graphql";
|
import type { TaskGraphQuery } from "#/__generated__/core/TaskGraphQuery.graphql";
|
||||||
import type { TasksPageFragment$key } from "#/__generated__/core/TasksPageFragment.graphql";
|
import type { TasksPageFragment$key } from "#/__generated__/core/TasksPageFragment.graphql";
|
||||||
|
import type { TasksPageFragment_query } from "#/__generated__/core/TasksPageFragment_query.graphql";
|
||||||
import TaskFormDialog from "#/components/tasks/TaskFormDialog";
|
import TaskFormDialog from "#/components/tasks/TaskFormDialog";
|
||||||
import { TasksCard } from "#/components/tasks/TasksCard";
|
import { TasksCard } from "#/components/tasks/TasksCard";
|
||||||
import { tasksQuery } from "#/hooks/graph/TaskGraph";
|
import { tasksQuery } from "#/hooks/graph/TaskGraph";
|
||||||
@@ -34,8 +35,11 @@ const tasksFragment = graphql`
|
|||||||
) @connection(key: "TasksPageFragment_tasks") @required(action: THROW) {
|
) @connection(key: "TasksPageFragment_tasks") @required(action: THROW) {
|
||||||
__id
|
__id
|
||||||
edges @required(action: THROW) {
|
edges @required(action: THROW) {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
node {
|
node {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
state
|
state
|
||||||
...TaskFormDialogFragment
|
...TaskFormDialogFragment
|
||||||
...TasksCard_TaskRowFragment
|
...TasksCard_TaskRowFragment
|
||||||
@@ -52,7 +56,7 @@ interface Props {
|
|||||||
export default function TasksPage({ queryRef }: Props) {
|
export default function TasksPage({ queryRef }: Props) {
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const query = usePreloadedQuery(tasksQuery, queryRef);
|
const query = usePreloadedQuery(tasksQuery, queryRef);
|
||||||
const [data] = useRefetchableFragment(
|
const [data] = useRefetchableFragment<TasksPageFragment_query, TasksPageFragment$key>(
|
||||||
tasksFragment,
|
tasksFragment,
|
||||||
query.organization as TasksPageFragment$key,
|
query.organization as TasksPageFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import type {
|
|||||||
VendorGraphPaginatedFragment$data,
|
VendorGraphPaginatedFragment$data,
|
||||||
VendorGraphPaginatedFragment$key,
|
VendorGraphPaginatedFragment$key,
|
||||||
} from "#/__generated__/core/VendorGraphPaginatedFragment.graphql";
|
} from "#/__generated__/core/VendorGraphPaginatedFragment.graphql";
|
||||||
|
import type { VendorsListQuery } from "#/__generated__/core/VendorsListQuery.graphql";
|
||||||
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
import { SnapshotBanner } from "#/components/SnapshotBanner";
|
||||||
import { SortableTable, SortableTh } from "#/components/SortableTable";
|
import { SortableTable, SortableTh } from "#/components/SortableTable";
|
||||||
import {
|
import {
|
||||||
@@ -53,7 +54,7 @@ export default function VendorsPage(props: Props) {
|
|||||||
const isSnapshotMode = Boolean(snapshotId);
|
const isSnapshotMode = Boolean(snapshotId);
|
||||||
|
|
||||||
const data = usePreloadedQuery(vendorsQuery, props.queryRef);
|
const data = usePreloadedQuery(vendorsQuery, props.queryRef);
|
||||||
const pagination = usePaginationFragment(
|
const pagination = usePaginationFragment<VendorsListQuery, VendorGraphPaginatedFragment$key>(
|
||||||
paginatedVendorsFragment,
|
paginatedVendorsFragment,
|
||||||
data.node as VendorGraphPaginatedFragment$key,
|
data.node as VendorGraphPaginatedFragment$key,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ const complianceReportFragment = graphql`
|
|||||||
reportName
|
reportName
|
||||||
file {
|
file {
|
||||||
fileName
|
fileName
|
||||||
mimeType
|
|
||||||
size
|
size
|
||||||
downloadUrl
|
downloadUrl
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,8 +71,6 @@ const contactFragment = graphql`
|
|||||||
email
|
email
|
||||||
phone
|
phone
|
||||||
role
|
role
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(action: "core:vendor-contact:update")
|
canUpdate: permission(action: "core:vendor-contact:update")
|
||||||
canDelete: permission(action: "core:vendor-contact:delete")
|
canDelete: permission(action: "core:vendor-contact:delete")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ const vendorBusinessAssociateAgreementFragment = graphql`
|
|||||||
fileUrl
|
fileUrl
|
||||||
validFrom
|
validFrom
|
||||||
validUntil
|
validUntil
|
||||||
createdAt
|
|
||||||
canUpdate: permission(
|
canUpdate: permission(
|
||||||
action: "core:vendor-business-associate-agreement:update"
|
action: "core:vendor-business-associate-agreement:update"
|
||||||
)
|
)
|
||||||
@@ -59,7 +58,6 @@ const vendorDataPrivacyAgreementFragment = graphql`
|
|||||||
fileUrl
|
fileUrl
|
||||||
validFrom
|
validFrom
|
||||||
validUntil
|
validUntil
|
||||||
createdAt
|
|
||||||
canUpdate: permission(action: "core:vendor-data-privacy-agreement:update")
|
canUpdate: permission(action: "core:vendor-data-privacy-agreement:update")
|
||||||
canDelete: permission(action: "core:vendor-data-privacy-agreement:delete")
|
canDelete: permission(action: "core:vendor-data-privacy-agreement:delete")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ const serviceFragment = graphql`
|
|||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
canUpdate: permission(action: "core:vendor-service:update")
|
canUpdate: permission(action: "core:vendor-service:update")
|
||||||
canDelete: permission(action: "core:vendor-service:delete")
|
canDelete: permission(action: "core:vendor-service:delete")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import type { FrameworkBadgeFragment$key } from "./__generated__/FrameworkBadgeF
|
|||||||
|
|
||||||
const frameworkFragment = graphql`
|
const frameworkFragment = graphql`
|
||||||
fragment FrameworkBadgeFragment on Framework {
|
fragment FrameworkBadgeFragment on Framework {
|
||||||
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
lightLogoURL
|
lightLogoURL
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ import type { NDAPageRefetchQuery } from "./__generated__/NDAPageRefetchQuery.gr
|
|||||||
export const ndaPageQuery = graphql`
|
export const ndaPageQuery = graphql`
|
||||||
query NDAPageQuery {
|
query NDAPageQuery {
|
||||||
viewer {
|
viewer {
|
||||||
fullName
|
# eslint-disable-next-line relay/unused-fields
|
||||||
|
id
|
||||||
}
|
}
|
||||||
currentTrustCenter @required(action: THROW) {
|
currentTrustCenter @required(action: THROW) {
|
||||||
organization {
|
organization {
|
||||||
|
|||||||
Reference in New Issue
Block a user