Implement continue for each file type

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-03 19:37:20 +04:00
parent c4b06ddc7d
commit ebfec30a14
7 changed files with 174 additions and 220 deletions

View File

@@ -1,5 +1,6 @@
import { downloadFile, formatError } from "@probo/helpers"; import { downloadFile, formatError } from "@probo/helpers";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { UnAuthenticatedError } from "@probo/relay";
import { import {
Breadcrumb, Breadcrumb,
Button, Button,
@@ -13,13 +14,13 @@ import {
Table, Table,
useToast, useToast,
} from "@probo/ui"; } from "@probo/ui";
import { type PropsWithChildren, use, useState } from "react"; import { type PropsWithChildren, useState } from "react";
import { useFragment, useMutation } from "react-relay"; import { useFragment, useMutation } from "react-relay";
import { useLocation } from "react-router"; import { useLocation, useNavigate, useSearchParams } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "#/hooks/useMutationWithToast"; import { useMutationWithToasts } from "#/hooks/useMutationWithToast";
import { Viewer } from "#/providers/Viewer"; import { getPathPrefix } from "#/utils/pathPrefix";
import type { AuditRow_requestAccessMutation } from "./__generated__/AuditRow_requestAccessMutation.graphql"; import type { AuditRow_requestAccessMutation } from "./__generated__/AuditRow_requestAccessMutation.graphql";
import type { AuditRowDownloadMutation } from "./__generated__/AuditRowDownloadMutation.graphql"; import type { AuditRowDownloadMutation } from "./__generated__/AuditRowDownloadMutation.graphql";
@@ -63,8 +64,10 @@ const auditRowFragment = graphql`
export function AuditRow(props: { audit: AuditRowFragment$key }) { export function AuditRow(props: { audit: AuditRowFragment$key }) {
const { __ } = useTranslate(); const { __ } = useTranslate();
const viewer = use(Viewer);
const { toast } = useToast(); const { toast } = useToast();
const [searchParams] = useSearchParams();
const location = useLocation();
const navigate = useNavigate();
const audit = useFragment(auditRowFragment, props.audit); const audit = useFragment(auditRowFragment, props.audit);
const [hasRequested, setHasRequested] = useState( const [hasRequested, setHasRequested] = useState(
@@ -100,6 +103,18 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
}); });
}, },
onError: (error) => { onError: (error) => {
if (error instanceof UnAuthenticatedError) {
const pathPrefix = getPathPrefix();
searchParams.set("request-report-id", audit.report?.id ?? "");
const urlSearchParams = new URLSearchParams([[
"continue",
window.location.origin + pathPrefix + location.pathname + "?" + searchParams.toString(),
]]);
void navigate(`/connect?${urlSearchParams.toString()}`);
return;
}
toast({ toast({
title: __("Error"), title: __("Error"),
description: error.message ?? __("Cannot request access"), description: error.message ?? __("Cannot request access"),
@@ -143,8 +158,7 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
{downloading ? __("Downloading") : __("Download")} {downloading ? __("Downloading") : __("Download")}
</Button> </Button>
) )
: viewer : (
? (
<Button <Button
disabled={hasRequested || isRequestingAccess} disabled={hasRequested || isRequestingAccess}
className="w-full md:w-max" className="w-full md:w-max"
@@ -154,16 +168,6 @@ export function AuditRow(props: { audit: AuditRowFragment$key }) {
> >
{hasRequested ? __("Access requested") : __("Request access")} {hasRequested ? __("Access requested") : __("Request access")}
</Button> </Button>
)
: (
<Button
className="w-full md:w-max"
variant="secondary"
icon={IconLock}
to="/connect"
>
{hasRequested ? __("Access requested") : __("Request access")}
</Button>
)} )}
</div> </div>
); );

View File

@@ -1,6 +1,7 @@
import { formatError } from "@probo/helpers"; import { formatError } from "@probo/helpers";
import { useSystemTheme } from "@probo/hooks"; import { useSystemTheme } from "@probo/hooks";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { UnAuthenticatedError } from "@probo/relay";
import { import {
Button, Button,
Card, Card,
@@ -9,12 +10,13 @@ import {
IconMedal, IconMedal,
useToast, useToast,
} from "@probo/ui"; } from "@probo/ui";
import { type PropsWithChildren, use } from "react"; import { type PropsWithChildren } from "react";
import { useMutation } from "react-relay"; import { useMutation } from "react-relay";
import { useNavigate, useSearchParams } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { Viewer } from "#/providers/Viewer";
import type { TrustGraphCurrentQuery$data } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql"; import type { TrustGraphCurrentQuery$data } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql";
import { getPathPrefix } from "#/utils/pathPrefix";
import type { OrganizationSidebar_requestAllAccessesMutation } from "./__generated__/OrganizationSidebar_requestAllAccessesMutation.graphql"; import type { OrganizationSidebar_requestAllAccessesMutation } from "./__generated__/OrganizationSidebar_requestAllAccessesMutation.graphql";
import { AuditRowAvatar } from "./AuditRow"; import { AuditRowAvatar } from "./AuditRow";
@@ -35,9 +37,10 @@ export function OrganizationSidebar({
trustCenter: TrustGraphCurrentQuery$data["currentTrustCenter"]; trustCenter: TrustGraphCurrentQuery$data["currentTrustCenter"];
}) { }) {
const { __ } = useTranslate(); const { __ } = useTranslate();
const isAuthenticated = !!use(Viewer);
const { toast } = useToast(); const { toast } = useToast();
const theme = useSystemTheme(); const theme = useSystemTheme();
const [searchParams] = useSearchParams();
const navigate = useNavigate();
const logoFileUrl = theme === "dark" ? (trustCenter?.darkLogoFileUrl ?? trustCenter?.logoFileUrl) : trustCenter?.logoFileUrl; const logoFileUrl = theme === "dark" ? (trustCenter?.darkLogoFileUrl ?? trustCenter?.logoFileUrl) : trustCenter?.logoFileUrl;
@@ -65,6 +68,18 @@ export function OrganizationSidebar({
}); });
}, },
onError: (error) => { onError: (error) => {
if (error instanceof UnAuthenticatedError) {
const pathPrefix = getPathPrefix();
searchParams.set("request-all", "true");
const urlSearchParams = new URLSearchParams([[
"continue",
window.location.origin + pathPrefix + location.pathname + "?" + searchParams.toString(),
]]);
void navigate(`/connect?${urlSearchParams.toString()}`);
return;
}
toast({ toast({
title: __("Error"), title: __("Error"),
description: error.message ?? __("Cannot request access"), description: error.message ?? __("Cannot request access"),
@@ -159,9 +174,6 @@ export function OrganizationSidebar({
</> </>
)} )}
{/* Actions */}
{isAuthenticated
? (
<Button <Button
disabled={isRequestingAccess} disabled={isRequestingAccess}
variant="primary" variant="primary"
@@ -171,17 +183,6 @@ export function OrganizationSidebar({
> >
{__("Request access")} {__("Request access")}
</Button> </Button>
)
: (
<Button
variant="primary"
icon={IconLock}
className="w-full h-10"
to="/connect"
>
{__("Request access")}
</Button>
)}
</div> </div>
</Card> </Card>
); );

View File

@@ -1,5 +1,6 @@
import { downloadFile, formatError } from "@probo/helpers"; import { downloadFile, formatError } from "@probo/helpers";
import { useTranslate } from "@probo/i18n"; import { useTranslate } from "@probo/i18n";
import { UnAuthenticatedError } from "@probo/relay";
import { import {
Button, Button,
IconArrowInbox, IconArrowInbox,
@@ -8,12 +9,13 @@ import {
Spinner, Spinner,
useToast, useToast,
} from "@probo/ui"; } from "@probo/ui";
import { use, useState } from "react"; import { useState } from "react";
import { useFragment, useMutation } from "react-relay"; import { useFragment, useMutation } from "react-relay";
import { useLocation, useNavigate, useSearchParams } from "react-router";
import { graphql } from "relay-runtime"; import { graphql } from "relay-runtime";
import { useMutationWithToasts } from "#/hooks/useMutationWithToast"; import { useMutationWithToasts } from "#/hooks/useMutationWithToast";
import { Viewer } from "#/providers/Viewer"; import { getPathPrefix } from "#/utils/pathPrefix";
import type { TrustCenterFileRow_requestAccessMutation } from "./__generated__/TrustCenterFileRow_requestAccessMutation.graphql"; import type { TrustCenterFileRow_requestAccessMutation } from "./__generated__/TrustCenterFileRow_requestAccessMutation.graphql";
import type { TrustCenterFileRowDownloadMutation } from "./__generated__/TrustCenterFileRowDownloadMutation.graphql"; import type { TrustCenterFileRowDownloadMutation } from "./__generated__/TrustCenterFileRowDownloadMutation.graphql";
@@ -54,8 +56,10 @@ export function TrustCenterFileRow(props: {
file: TrustCenterFileRowFragment$key; file: TrustCenterFileRowFragment$key;
}) { }) {
const { __ } = useTranslate(); const { __ } = useTranslate();
const viewer = use(Viewer);
const { toast } = useToast(); const { toast } = useToast();
const location = useLocation();
const [searchParams] = useSearchParams();
const navigate = useNavigate();
const file = useFragment(trustCenterFileRowFragment, props.file); const file = useFragment(trustCenterFileRowFragment, props.file);
const [hasRequested, setHasRequested] = useState(file.hasUserRequestedAccess); const [hasRequested, setHasRequested] = useState(file.hasUserRequestedAccess);
@@ -91,6 +95,18 @@ export function TrustCenterFileRow(props: {
}); });
}, },
onError: (error) => { onError: (error) => {
if (error instanceof UnAuthenticatedError) {
const pathPrefix = getPathPrefix();
searchParams.set("request-file-id", file.id);
const urlSearchParams = new URLSearchParams([[
"continue",
window.location.origin + pathPrefix + location.pathname + "?" + searchParams.toString(),
]]);
void navigate(`/connect?${urlSearchParams.toString()}`);
return;
}
toast({ toast({
title: __("Error"), title: __("Error"),
description: error.message ?? __("Cannot request access"), description: error.message ?? __("Cannot request access"),
@@ -131,8 +147,7 @@ export function TrustCenterFileRow(props: {
{downloading ? __("Downloading") : __("Download")} {downloading ? __("Downloading") : __("Download")}
</Button> </Button>
) )
: viewer : (
? (
<Button <Button
disabled={hasRequested || isRequestingAccess} disabled={hasRequested || isRequestingAccess}
className="w-full md:w-max" className="w-full md:w-max"
@@ -142,16 +157,6 @@ export function TrustCenterFileRow(props: {
> >
{hasRequested ? __("Access requested") : __("Request access")} {hasRequested ? __("Access requested") : __("Request access")}
</Button> </Button>
)
: (
<Button
className="w-full md:w-max"
variant="secondary"
icon={IconLock}
to="/connect"
>
{hasRequested ? __("Access requested") : __("Request access")}
</Button>
)} )}
</div> </div>
); );

View File

@@ -7,7 +7,6 @@ import { Outlet } from "react-router";
import { OrganizationSidebar } from "#/components/OrganizationSidebar"; import { OrganizationSidebar } from "#/components/OrganizationSidebar";
import { useRequestAccessCallback } from "#/hooks/useRequestAccessCallback"; import { useRequestAccessCallback } from "#/hooks/useRequestAccessCallback";
import { TrustCenterProvider } from "#/providers/TrustCenterProvider"; import { TrustCenterProvider } from "#/providers/TrustCenterProvider";
import { Viewer } from "#/providers/Viewer";
import type { TrustGraphCurrentQuery } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql"; import type { TrustGraphCurrentQuery } from "#/queries/__generated__/TrustGraphCurrentQuery.graphql";
import { currentTrustGraphQuery } from "#/queries/TrustGraph"; import { currentTrustGraphQuery } from "#/queries/TrustGraph";
@@ -30,7 +29,6 @@ export function MainLayout(props: Props) {
useRequestAccessCallback(); useRequestAccessCallback();
return ( return (
<Viewer value={data.viewer}>
<TrustCenterProvider trustCenter={trustCenter}> <TrustCenterProvider trustCenter={trustCenter}>
<div className="grid grid-cols-1 max-w-[1280px] mx-4 pt-6 gap-4 lg:mx-auto lg:gap-10 lg:pt-20 lg:grid-cols-[400px_1fr] lg:items-start "> <div className="grid grid-cols-1 max-w-[1280px] mx-4 pt-6 gap-4 lg:mx-auto lg:gap-10 lg:pt-20 lg:grid-cols-[400px_1fr] lg:items-start ">
<OrganizationSidebar trustCenter={trustCenter} /> <OrganizationSidebar trustCenter={trustCenter} />
@@ -54,6 +52,5 @@ export function MainLayout(props: Props) {
<Logo withPicto className="h-6" /> <Logo withPicto className="h-6" />
</a> </a>
</TrustCenterProvider> </TrustCenterProvider>
</Viewer>
); );
} }

View File

@@ -1,11 +0,0 @@
import { createContext } from "react";
interface ViewerContextValue {
fullName: string;
email: string;
}
export const Viewer = createContext<ViewerContextValue | undefined | null>({
email: "",
fullName: "",
});

View File

@@ -3,10 +3,6 @@ import { graphql } from "relay-runtime";
// Queries for custom domain (subdomain) approach // Queries for custom domain (subdomain) approach
export const currentTrustGraphQuery = graphql` export const currentTrustGraphQuery = graphql`
query TrustGraphCurrentQuery { query TrustGraphCurrentQuery {
viewer {
email
fullName
}
currentTrustCenter @required(action: THROW) { currentTrustCenter @required(action: THROW) {
id id
slug slug

View File

@@ -1,5 +1,5 @@
/** /**
* @generated SignedSource<<700a3b76b18e7182c5a08c98b5d7fa2a>> * @generated SignedSource<<69ddf57f16792925ca8a136115747014>>
* @lightSyntaxTransform * @lightSyntaxTransform
* @nogrep * @nogrep
*/ */
@@ -46,10 +46,6 @@ export type TrustGraphCurrentQuery$data = {
}; };
readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">; readonly " $fragmentSpreads": FragmentRefs<"OverviewPageFragment">;
}; };
readonly viewer: {
readonly email: any;
readonly fullName: string;
} | null | undefined;
}; };
export type TrustGraphCurrentQuery = { export type TrustGraphCurrentQuery = {
response: TrustGraphCurrentQuery$data; response: TrustGraphCurrentQuery$data;
@@ -61,101 +57,94 @@ var v0 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "email", "name": "id",
"storageKey": null "storageKey": null
}, },
v1 = { v1 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "fullName", "name": "slug",
"storageKey": null "storageKey": null
}, },
v2 = { v2 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "id", "name": "isViewerMember",
"storageKey": null "storageKey": null
}, },
v3 = { v3 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "slug", "name": "logoFileUrl",
"storageKey": null "storageKey": null
}, },
v4 = { v4 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "isViewerMember", "name": "darkLogoFileUrl",
"storageKey": null "storageKey": null
}, },
v5 = { v5 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "logoFileUrl", "name": "fileName",
"storageKey": null "storageKey": null
}, },
v6 = { v6 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "darkLogoFileUrl", "name": "fileUrl",
"storageKey": null "storageKey": null
}, },
v7 = { v7 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "fileName", "name": "status",
"storageKey": null "storageKey": null
}, },
v8 = { v8 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "fileUrl", "name": "name",
"storageKey": null "storageKey": null
}, },
v9 = { v9 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "status", "name": "description",
"storageKey": null "storageKey": null
}, },
v10 = { v10 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "name", "name": "websiteUrl",
"storageKey": null "storageKey": null
}, },
v11 = { v11 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "description", "name": "email",
"storageKey": null "storageKey": null
}, },
v12 = { v12 = {
"alias": null,
"args": null,
"kind": "ScalarField",
"name": "websiteUrl",
"storageKey": null
},
v13 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "headquarterAddress", "name": "headquarterAddress",
"storageKey": null "storageKey": null
}, },
v14 = { v13 = {
"alias": "vendorInfo", "alias": "vendorInfo",
"args": [ "args": [
{ {
@@ -179,28 +168,28 @@ v14 = {
], ],
"storageKey": "vendors(first:0)" "storageKey": "vendors(first:0)"
}, },
v15 = [ v14 = [
{ {
"kind": "Literal", "kind": "Literal",
"name": "first", "name": "first",
"value": 50 "value": 50
} }
], ],
v16 = [ v15 = [
{ {
"kind": "Literal", "kind": "Literal",
"name": "first", "name": "first",
"value": 5 "value": 5
} }
], ],
v17 = { v16 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
"name": "isUserAuthorized", "name": "isUserAuthorized",
"storageKey": null "storageKey": null
}, },
v18 = { v17 = {
"alias": null, "alias": null,
"args": null, "args": null,
"kind": "ScalarField", "kind": "ScalarField",
@@ -214,19 +203,6 @@ return {
"metadata": null, "metadata": null,
"name": "TrustGraphCurrentQuery", "name": "TrustGraphCurrentQuery",
"selections": [ "selections": [
{
"alias": null,
"args": null,
"concreteType": "Identity",
"kind": "LinkedField",
"name": "viewer",
"plural": false,
"selections": [
(v0/*: any*/),
(v1/*: any*/)
],
"storageKey": null
},
{ {
"kind": "RequiredField", "kind": "RequiredField",
"field": { "field": {
@@ -237,11 +213,11 @@ return {
"name": "currentTrustCenter", "name": "currentTrustCenter",
"plural": false, "plural": false,
"selections": [ "selections": [
(v0/*: any*/),
(v1/*: any*/),
(v2/*: any*/), (v2/*: any*/),
(v3/*: any*/), (v3/*: any*/),
(v4/*: any*/), (v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -250,8 +226,8 @@ return {
"name": "nonDisclosureAgreement", "name": "nonDisclosureAgreement",
"plural": false, "plural": false,
"selections": [ "selections": [
(v7/*: any*/), (v5/*: any*/),
(v8/*: any*/), (v6/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -260,7 +236,7 @@ return {
"name": "viewerSignature", "name": "viewerSignature",
"plural": false, "plural": false,
"selections": [ "selections": [
(v9/*: any*/) (v7/*: any*/)
], ],
"storageKey": null "storageKey": null
} }
@@ -275,11 +251,11 @@ return {
"name": "organization", "name": "organization",
"plural": false, "plural": false,
"selections": [ "selections": [
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/), (v10/*: any*/),
(v11/*: any*/), (v11/*: any*/),
(v12/*: any*/), (v12/*: any*/)
(v0/*: any*/),
(v13/*: any*/)
], ],
"storageKey": null "storageKey": null
}, },
@@ -288,10 +264,10 @@ return {
"kind": "FragmentSpread", "kind": "FragmentSpread",
"name": "OverviewPageFragment" "name": "OverviewPageFragment"
}, },
(v14/*: any*/), (v13/*: any*/),
{ {
"alias": null, "alias": null,
"args": (v15/*: any*/), "args": (v14/*: any*/),
"concreteType": "AuditConnection", "concreteType": "AuditConnection",
"kind": "LinkedField", "kind": "LinkedField",
"name": "audits", "name": "audits",
@@ -313,7 +289,7 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
{ {
"args": null, "args": null,
"kind": "FragmentSpread", "kind": "FragmentSpread",
@@ -343,20 +319,6 @@ return {
"kind": "Operation", "kind": "Operation",
"name": "TrustGraphCurrentQuery", "name": "TrustGraphCurrentQuery",
"selections": [ "selections": [
{
"alias": null,
"args": null,
"concreteType": "Identity",
"kind": "LinkedField",
"name": "viewer",
"plural": false,
"selections": [
(v0/*: any*/),
(v1/*: any*/),
(v2/*: any*/)
],
"storageKey": null
},
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -365,11 +327,11 @@ return {
"name": "currentTrustCenter", "name": "currentTrustCenter",
"plural": false, "plural": false,
"selections": [ "selections": [
(v0/*: any*/),
(v1/*: any*/),
(v2/*: any*/), (v2/*: any*/),
(v3/*: any*/), (v3/*: any*/),
(v4/*: any*/), (v4/*: any*/),
(v5/*: any*/),
(v6/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -378,8 +340,8 @@ return {
"name": "nonDisclosureAgreement", "name": "nonDisclosureAgreement",
"plural": false, "plural": false,
"selections": [ "selections": [
(v7/*: any*/), (v5/*: any*/),
(v8/*: any*/), (v6/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -388,8 +350,8 @@ return {
"name": "viewerSignature", "name": "viewerSignature",
"plural": false, "plural": false,
"selections": [ "selections": [
(v9/*: any*/), (v7/*: any*/),
(v2/*: any*/) (v0/*: any*/)
], ],
"storageKey": null "storageKey": null
} }
@@ -404,12 +366,12 @@ return {
"name": "organization", "name": "organization",
"plural": false, "plural": false,
"selections": [ "selections": [
(v8/*: any*/),
(v9/*: any*/),
(v10/*: any*/), (v10/*: any*/),
(v11/*: any*/), (v11/*: any*/),
(v12/*: any*/), (v12/*: any*/),
(v0/*: any*/), (v0/*: any*/)
(v13/*: any*/),
(v2/*: any*/)
], ],
"storageKey": null "storageKey": null
}, },
@@ -443,8 +405,8 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
(v10/*: any*/), (v8/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -452,7 +414,7 @@ return {
"name": "logoUrl", "name": "logoUrl",
"storageKey": null "storageKey": null
}, },
(v12/*: any*/) (v10/*: any*/)
], ],
"storageKey": null "storageKey": null
} }
@@ -492,7 +454,7 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -500,9 +462,9 @@ return {
"name": "countries", "name": "countries",
"storageKey": null "storageKey": null
}, },
(v10/*: any*/), (v8/*: any*/),
(v11/*: any*/), (v9/*: any*/),
(v12/*: any*/) (v10/*: any*/)
], ],
"storageKey": null "storageKey": null
} }
@@ -514,7 +476,7 @@ return {
}, },
{ {
"alias": null, "alias": null,
"args": (v16/*: any*/), "args": (v15/*: any*/),
"concreteType": "DocumentConnection", "concreteType": "DocumentConnection",
"kind": "LinkedField", "kind": "LinkedField",
"name": "documents", "name": "documents",
@@ -536,7 +498,7 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -544,8 +506,8 @@ return {
"name": "title", "name": "title",
"storageKey": null "storageKey": null
}, },
(v16/*: any*/),
(v17/*: any*/), (v17/*: any*/),
(v18/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -564,7 +526,7 @@ return {
}, },
{ {
"alias": null, "alias": null,
"args": (v16/*: any*/), "args": (v15/*: any*/),
"concreteType": "TrustCenterFileConnection", "concreteType": "TrustCenterFileConnection",
"kind": "LinkedField", "kind": "LinkedField",
"name": "trustCenterFiles", "name": "trustCenterFiles",
@@ -586,7 +548,7 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -594,9 +556,9 @@ return {
"name": "category", "name": "category",
"storageKey": null "storageKey": null
}, },
(v10/*: any*/), (v8/*: any*/),
(v17/*: any*/), (v16/*: any*/),
(v18/*: any*/) (v17/*: any*/)
], ],
"storageKey": null "storageKey": null
} }
@@ -606,10 +568,10 @@ return {
], ],
"storageKey": "trustCenterFiles(first:5)" "storageKey": "trustCenterFiles(first:5)"
}, },
(v14/*: any*/), (v13/*: any*/),
{ {
"alias": null, "alias": null,
"args": (v15/*: any*/), "args": (v14/*: any*/),
"concreteType": "AuditConnection", "concreteType": "AuditConnection",
"kind": "LinkedField", "kind": "LinkedField",
"name": "audits", "name": "audits",
@@ -631,8 +593,8 @@ return {
"name": "node", "name": "node",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
(v10/*: any*/), (v8/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -641,7 +603,7 @@ return {
"name": "report", "name": "report",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -649,8 +611,8 @@ return {
"name": "filename", "name": "filename",
"storageKey": null "storageKey": null
}, },
(v17/*: any*/), (v16/*: any*/),
(v18/*: any*/) (v17/*: any*/)
], ],
"storageKey": null "storageKey": null
}, },
@@ -662,8 +624,8 @@ return {
"name": "framework", "name": "framework",
"plural": false, "plural": false,
"selections": [ "selections": [
(v2/*: any*/), (v0/*: any*/),
(v10/*: any*/), (v8/*: any*/),
{ {
"alias": null, "alias": null,
"args": null, "args": null,
@@ -696,16 +658,16 @@ return {
] ]
}, },
"params": { "params": {
"cacheID": "fab59d135402a3b935f277a385d33b93", "cacheID": "fe1336b3897ba719a7e2210af673c378",
"id": null, "id": null,
"metadata": {}, "metadata": {},
"name": "TrustGraphCurrentQuery", "name": "TrustGraphCurrentQuery",
"operationKind": "query", "operationKind": "query",
"text": "query TrustGraphCurrentQuery {\n viewer {\n email\n fullName\n id\n }\n currentTrustCenter {\n id\n slug\n isViewerMember\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n name\n description\n websiteUrl\n countries\n}\n" "text": "query TrustGraphCurrentQuery {\n currentTrustCenter {\n id\n slug\n isViewerMember\n logoFileUrl\n darkLogoFileUrl\n nonDisclosureAgreement {\n fileName\n fileUrl\n viewerSignature {\n status\n id\n }\n }\n organization {\n name\n description\n websiteUrl\n email\n headquarterAddress\n id\n }\n ...OverviewPageFragment\n vendorInfo: vendors(first: 0) {\n totalCount\n }\n audits(first: 50) {\n edges {\n node {\n id\n ...AuditRowFragment\n }\n }\n }\n }\n}\n\nfragment AuditRowFragment on Audit {\n name\n report {\n id\n filename\n isUserAuthorized\n hasUserRequestedAccess\n }\n framework {\n id\n name\n lightLogoURL\n darkLogoURL\n }\n}\n\nfragment DocumentRowFragment on Document {\n id\n title\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment OverviewPageFragment on TrustCenter {\n references(first: 14) {\n edges {\n node {\n id\n name\n logoUrl\n websiteUrl\n }\n }\n }\n vendors(first: 3) {\n edges {\n node {\n id\n countries\n ...VendorRowFragment\n }\n }\n }\n documents(first: 5) {\n edges {\n node {\n id\n ...DocumentRowFragment\n documentType\n }\n }\n }\n trustCenterFiles(first: 5) {\n edges {\n node {\n id\n category\n ...TrustCenterFileRowFragment\n }\n }\n }\n}\n\nfragment TrustCenterFileRowFragment on TrustCenterFile {\n id\n name\n isUserAuthorized\n hasUserRequestedAccess\n}\n\nfragment VendorRowFragment on Vendor {\n name\n description\n websiteUrl\n countries\n}\n"
} }
}; };
})(); })();
(node as any).hash = "64b166174da80cd3082ab4becf716b1c"; (node as any).hash = "48f3ca2547e97d2378ccb0375ae9fae8";
export default node; export default node;