Use trust center from context
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -53,7 +53,7 @@ export function DocumentRow(props: { document: DocumentRowFragment$key }) {
|
||||
document.hasUserRequestedAccess,
|
||||
);
|
||||
return (
|
||||
<div className="text-sm border-1 border-border-solid -mt-[1px] flex gap-3 flex-col md:flex-row md:justify-between px-6 py-3">
|
||||
<div className="text-sm border border-border-solid -mt-px flex gap-3 flex-col md:flex-row md:justify-between px-6 py-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<IconPageTextLine size={16} className=" flex-none text-txt-tertiary" />
|
||||
{document.title}
|
||||
|
||||
@@ -9,8 +9,8 @@ import { graphql } from "relay-runtime";
|
||||
import { useMutationWithToasts } from "/hooks/useMutationWithToast";
|
||||
|
||||
const signMutation = graphql`
|
||||
mutation NDADialogSignMutation($input: AcceptNonDisclosureAgreementInput!) {
|
||||
acceptNonDisclosureAgreement(input: $input) {
|
||||
mutation NDADialogSignMutation {
|
||||
acceptNonDisclosureAgreement {
|
||||
success
|
||||
}
|
||||
}
|
||||
@@ -20,12 +20,10 @@ export function NDADialog({
|
||||
name,
|
||||
url,
|
||||
fileName,
|
||||
trustCenterId,
|
||||
}: {
|
||||
name: string;
|
||||
url?: string | null;
|
||||
fileName?: string | null;
|
||||
trustCenterId: string;
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
useEffect(() => {
|
||||
@@ -43,16 +41,6 @@ export function NDADialog({
|
||||
},
|
||||
});
|
||||
|
||||
const handleSign = () => {
|
||||
commitSigning({
|
||||
variables: {
|
||||
input: {
|
||||
trustCenterId,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed inset-0 bg-level-2 z-100 flex flex-col lg:h-screen">
|
||||
<header className="flex items-center h-12 justify-between border-b border-border-solid px-4 flex-none">
|
||||
@@ -82,7 +70,7 @@ export function NDADialog({
|
||||
</Card>
|
||||
)}
|
||||
<Button
|
||||
onClick={handleSign}
|
||||
onClick={() => commitSigning({ variables: {} })}
|
||||
className="h-10 w-full my-8"
|
||||
disabled={isSigning}
|
||||
icon={isSigning ? Spinner : undefined}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { Viewer } from "/providers/Viewer";
|
||||
export function OrganizationSidebar({
|
||||
trustCenter,
|
||||
}: {
|
||||
trustCenter: TrustGraphQuery$data["trustCenterBySlug"];
|
||||
trustCenter: TrustGraphQuery$data["currentTrustCenter"];
|
||||
}) {
|
||||
const { __ } = useTranslate();
|
||||
const isAuthenticated = !!use(Viewer);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<febdedca828f8b6dc384f0d4f08e02f8>>
|
||||
* @generated SignedSource<<3ef589b34a5cb80406c517d6e5eb938c>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -9,12 +9,7 @@
|
||||
// @ts-nocheck
|
||||
|
||||
import { ConcreteRequest } from 'relay-runtime';
|
||||
export type AcceptNonDisclosureAgreementInput = {
|
||||
trustCenterId: string;
|
||||
};
|
||||
export type NDADialogSignMutation$variables = {
|
||||
input: AcceptNonDisclosureAgreementInput;
|
||||
};
|
||||
export type NDADialogSignMutation$variables = Record<PropertyKey, never>;
|
||||
export type NDADialogSignMutation$data = {
|
||||
readonly acceptNonDisclosureAgreement: {
|
||||
readonly success: boolean;
|
||||
@@ -27,22 +22,9 @@ export type NDADialogSignMutation = {
|
||||
|
||||
const node: ConcreteRequest = (function(){
|
||||
var v0 = [
|
||||
{
|
||||
"defaultValue": null,
|
||||
"kind": "LocalArgument",
|
||||
"name": "input"
|
||||
}
|
||||
],
|
||||
v1 = [
|
||||
{
|
||||
"alias": null,
|
||||
"args": [
|
||||
{
|
||||
"kind": "Variable",
|
||||
"name": "input",
|
||||
"variableName": "input"
|
||||
}
|
||||
],
|
||||
"args": null,
|
||||
"concreteType": "AcceptNonDisclosureAgreementPayload",
|
||||
"kind": "LinkedField",
|
||||
"name": "acceptNonDisclosureAgreement",
|
||||
@@ -61,32 +43,32 @@ v1 = [
|
||||
];
|
||||
return {
|
||||
"fragment": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Fragment",
|
||||
"metadata": null,
|
||||
"name": "NDADialogSignMutation",
|
||||
"selections": (v1/*: any*/),
|
||||
"selections": (v0/*: any*/),
|
||||
"type": "Mutation",
|
||||
"abstractKey": null
|
||||
},
|
||||
"kind": "Request",
|
||||
"operation": {
|
||||
"argumentDefinitions": (v0/*: any*/),
|
||||
"argumentDefinitions": [],
|
||||
"kind": "Operation",
|
||||
"name": "NDADialogSignMutation",
|
||||
"selections": (v1/*: any*/)
|
||||
"selections": (v0/*: any*/)
|
||||
},
|
||||
"params": {
|
||||
"cacheID": "130cfc307dca0525194e0103a0548bd0",
|
||||
"cacheID": "bca0dcb3f227c89d8339b0238aa2e42a",
|
||||
"id": null,
|
||||
"metadata": {},
|
||||
"name": "NDADialogSignMutation",
|
||||
"operationKind": "mutation",
|
||||
"text": "mutation NDADialogSignMutation(\n $input: AcceptNonDisclosureAgreementInput!\n) {\n acceptNonDisclosureAgreement(input: $input) {\n success\n }\n}\n"
|
||||
"text": "mutation NDADialogSignMutation {\n acceptNonDisclosureAgreement {\n success\n }\n}\n"
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
(node as any).hash = "1b9447e5cbb2ec7dce4f3f9c68493555";
|
||||
(node as any).hash = "814a623444a446730f260e6b7bbf0083";
|
||||
|
||||
export default node;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<5113feef2c7f7b13a2d6348202086916>>
|
||||
* @generated SignedSource<<9f01a480ccc5fa00e310296e9aed1020>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,7 +13,6 @@ export type RequestDocumentAccessInput = {
|
||||
documentId: string;
|
||||
email: any;
|
||||
fullName: string;
|
||||
trustCenterId: string;
|
||||
};
|
||||
export type RequestAccessDialogDocumentMutation$variables = {
|
||||
input: RequestDocumentAccessInput;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<294b6a25a178cf3bd9269591ef61381f>>
|
||||
* @generated SignedSource<<0777fa7e6e3d0c75eedfc8380d9965a4>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -12,7 +12,6 @@ import { ConcreteRequest } from 'relay-runtime';
|
||||
export type RequestAllAccessesInput = {
|
||||
email: any;
|
||||
fullName: string;
|
||||
trustCenterId: string;
|
||||
};
|
||||
export type RequestAccessDialogMutation$variables = {
|
||||
input: RequestAllAccessesInput;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<d3209530c326da3c7db6535cef428ded>>
|
||||
* @generated SignedSource<<6fde198cd3eaa998d665639c48f5e630>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,7 +13,6 @@ export type RequestReportAccessInput = {
|
||||
email: any;
|
||||
fullName: string;
|
||||
reportId: string;
|
||||
trustCenterId: string;
|
||||
};
|
||||
export type RequestAccessDialogReportMutation$variables = {
|
||||
input: RequestReportAccessInput;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @generated SignedSource<<1e744bd11b2d5dd4d982bf1ce8b2a721>>
|
||||
* @generated SignedSource<<7c329901bcf9bbf05b1899356016b151>>
|
||||
* @lightSyntaxTransform
|
||||
* @nogrep
|
||||
*/
|
||||
@@ -13,7 +13,6 @@ export type RequestTrustCenterFileAccessInput = {
|
||||
email: any;
|
||||
fullName: string;
|
||||
trustCenterFileId: string;
|
||||
trustCenterId: string;
|
||||
};
|
||||
export type RequestAccessDialogTrustCenterFileMutation$variables = {
|
||||
input: RequestTrustCenterFileAccessInput;
|
||||
|
||||
Reference in New Issue
Block a user