Update console for compliance portal
Point compliance-page screens and Relay graphs at the renamed Compliance Portal API fields and mutations. Signed-off-by: Bryan Frimin <bryan@probo.com>
This commit is contained in:
@@ -123,7 +123,7 @@ export const CompliancePageReferenceDialog = forwardRef<CompliancePageReferenceD
|
|||||||
await createReference({
|
await createReference({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
description: data.description || null,
|
description: data.description || null,
|
||||||
websiteUrl: data.websiteUrl,
|
websiteUrl: data.websiteUrl,
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ import type { CompliancePageGraphUploadNDAMutation } from "#/__generated__/core/
|
|||||||
import { useMutation } from "#/lib/relay/useMutation";
|
import { useMutation } from "#/lib/relay/useMutation";
|
||||||
|
|
||||||
const updateCompliancePageMutation = graphql`
|
const updateCompliancePageMutation = graphql`
|
||||||
mutation CompliancePageGraphUpdateMutation($input: UpdateTrustCenterInput!) {
|
mutation CompliancePageGraphUpdateMutation($input: UpdateCompliancePortalInput!) {
|
||||||
updateTrustCenter(input: $input) {
|
updateCompliancePortal(input: $input) {
|
||||||
trustCenter {
|
compliancePortal {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
searchEngineIndexing
|
searchEngineIndexing
|
||||||
@@ -55,10 +55,10 @@ export function useUpdateCompliancePageMutation() {
|
|||||||
|
|
||||||
const uploadCompliancePageNDAMutation = graphql`
|
const uploadCompliancePageNDAMutation = graphql`
|
||||||
mutation CompliancePageGraphUploadNDAMutation(
|
mutation CompliancePageGraphUploadNDAMutation(
|
||||||
$input: UploadTrustCenterNDAInput!
|
$input: UploadCompliancePortalNDAInput!
|
||||||
) {
|
) {
|
||||||
uploadTrustCenterNDA(input: $input) {
|
uploadCompliancePortalNDA(input: $input) {
|
||||||
trustCenter {
|
compliancePortal {
|
||||||
id
|
id
|
||||||
nda {
|
nda {
|
||||||
fileName
|
fileName
|
||||||
@@ -79,10 +79,10 @@ export function useUploadCompliancePageNDAMutation() {
|
|||||||
|
|
||||||
const deleteCompliancePageNDAMutation = graphql`
|
const deleteCompliancePageNDAMutation = graphql`
|
||||||
mutation CompliancePageGraphDeleteNDAMutation(
|
mutation CompliancePageGraphDeleteNDAMutation(
|
||||||
$input: DeleteTrustCenterNDAInput!
|
$input: DeleteCompliancePortalNDAInput!
|
||||||
) {
|
) {
|
||||||
deleteTrustCenterNDA(input: $input) {
|
deleteCompliancePortalNDA(input: $input) {
|
||||||
trustCenter {
|
compliancePortal {
|
||||||
id
|
id
|
||||||
nda {
|
nda {
|
||||||
fileName
|
fileName
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ import { graphql } from "react-relay";
|
|||||||
|
|
||||||
/* eslint-disable relay/unused-fields */
|
/* eslint-disable relay/unused-fields */
|
||||||
|
|
||||||
export const trustCenterByIdQuery = graphql`
|
export const compliancePortalByIdQuery = graphql`
|
||||||
query TrustCenterAccessTokenGraphQuery($trustCenterId: ID!) {
|
query CompliancePortalAccessTokenGraphQuery($compliancePortalId: ID!) {
|
||||||
node(id: $trustCenterId) {
|
node(id: $compliancePortalId) {
|
||||||
... on TrustCenter {
|
... on CompliancePortal {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
organization {
|
organization {
|
||||||
@@ -34,7 +34,7 @@ export const compliancePageLayoutQuery = graphql`
|
|||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter {
|
compliancePage: compliancePortal {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
publicUrl
|
publicUrl
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ import { useMutation } from "#/lib/relay/useMutation";
|
|||||||
|
|
||||||
export const createCompliancePageReferenceMutation = graphql`
|
export const createCompliancePageReferenceMutation = graphql`
|
||||||
mutation compliancePageReferenceMutationsCreateMutation(
|
mutation compliancePageReferenceMutationsCreateMutation(
|
||||||
$input: CreateTrustCenterReferenceInput!
|
$input: CreateCompliancePortalReferenceInput!
|
||||||
$connections: [ID!]!
|
$connections: [ID!]!
|
||||||
) {
|
) {
|
||||||
createTrustCenterReference(input: $input) {
|
createCompliancePortalReference(input: $input) {
|
||||||
trustCenterReferenceEdge @appendEdge(connections: $connections) {
|
compliancePortalReferenceEdge @appendEdge(connections: $connections) {
|
||||||
cursor
|
cursor
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
@@ -55,10 +55,10 @@ export const createCompliancePageReferenceMutation = graphql`
|
|||||||
|
|
||||||
export const updateCompliancePageReferenceMutation = graphql`
|
export const updateCompliancePageReferenceMutation = graphql`
|
||||||
mutation compliancePageReferenceMutationsUpdateMutation(
|
mutation compliancePageReferenceMutationsUpdateMutation(
|
||||||
$input: UpdateTrustCenterReferenceInput!
|
$input: UpdateCompliancePortalReferenceInput!
|
||||||
) {
|
) {
|
||||||
updateTrustCenterReference(input: $input) {
|
updateCompliancePortalReference(input: $input) {
|
||||||
trustCenterReference {
|
compliancePortalReference {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
description
|
description
|
||||||
@@ -78,11 +78,11 @@ export const updateCompliancePageReferenceMutation = graphql`
|
|||||||
|
|
||||||
export const deleteCompliancePageReferenceMutation = graphql`
|
export const deleteCompliancePageReferenceMutation = graphql`
|
||||||
mutation compliancePageReferenceMutationsDeleteMutation(
|
mutation compliancePageReferenceMutationsDeleteMutation(
|
||||||
$input: DeleteTrustCenterReferenceInput!
|
$input: DeleteCompliancePortalReferenceInput!
|
||||||
$connections: [ID!]!
|
$connections: [ID!]!
|
||||||
) {
|
) {
|
||||||
deleteTrustCenterReference(input: $input) {
|
deleteCompliancePortalReference(input: $input) {
|
||||||
deletedTrustCenterReferenceId @deleteEdge(connections: $connections)
|
deletedCompliancePortalReferenceId @deleteEdge(connections: $connections)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -109,10 +109,10 @@ export function useUpdateCompliancePageReferenceMutation() {
|
|||||||
|
|
||||||
export const updateCompliancePageReferenceRankMutation = graphql`
|
export const updateCompliancePageReferenceRankMutation = graphql`
|
||||||
mutation compliancePageReferenceMutationsUpdateRankMutation(
|
mutation compliancePageReferenceMutationsUpdateRankMutation(
|
||||||
$input: UpdateTrustCenterReferenceInput!
|
$input: UpdateCompliancePortalReferenceInput!
|
||||||
) {
|
) {
|
||||||
updateTrustCenterReference(input: $input) {
|
updateCompliancePortalReference(input: $input) {
|
||||||
trustCenterReference {
|
compliancePortalReference {
|
||||||
id
|
id
|
||||||
rank
|
rank
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const compliancePageAccessPageQuery = graphql`
|
|||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
# eslint-disable-next-line relay/unused-fields
|
# eslint-disable-next-line relay/unused-fields
|
||||||
id
|
id
|
||||||
...CompliancePageAccessListFragment
|
...CompliancePageAccessListFragment
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
|
|
||||||
import type { TrustCenterDocumentAccessStatus } from "@probo/coredata";
|
import type { CompliancePortalDocumentAccessStatus } from "@probo/coredata";
|
||||||
import type { CompliancePageDocumentAccessInfo } from "@probo/helpers";
|
import type { CompliancePageDocumentAccessInfo } from "@probo/helpers";
|
||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
import {
|
import {
|
||||||
@@ -45,7 +45,7 @@ import { CompliancePageDocumentAccessList } from "#/pages/organizations/complian
|
|||||||
import { ElectronicSignatureSection } from "#/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection";
|
import { ElectronicSignatureSection } from "#/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection";
|
||||||
|
|
||||||
const documentAccessFragment = graphql`
|
const documentAccessFragment = graphql`
|
||||||
fragment CompliancePageAccessEditDialogDocumentAccessFragment on TrustCenterDocumentAccess @inline {
|
fragment CompliancePageAccessEditDialogDocumentAccessFragment on CompliancePortalDocumentAccess @inline {
|
||||||
id
|
id
|
||||||
status
|
status
|
||||||
document {
|
document {
|
||||||
@@ -68,7 +68,7 @@ const documentAccessFragment = graphql`
|
|||||||
name
|
name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trustCenterFile {
|
compliancePortalFile {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
category
|
category
|
||||||
@@ -112,15 +112,15 @@ function toDocumentAccessInfo(
|
|||||||
status: node.status,
|
status: node.status,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (node.trustCenterFile) {
|
if (node.compliancePortalFile) {
|
||||||
return {
|
return {
|
||||||
persisted: node.id !== node.trustCenterFile.id,
|
persisted: node.id !== node.compliancePortalFile.id,
|
||||||
variant: "highlight",
|
variant: "highlight",
|
||||||
name: node.trustCenterFile.name,
|
name: node.compliancePortalFile.name,
|
||||||
type: "file",
|
type: "file",
|
||||||
typeLabel: __("File"),
|
typeLabel: __("File"),
|
||||||
category: node.trustCenterFile.category,
|
category: node.compliancePortalFile.category,
|
||||||
id: node.trustCenterFile.id,
|
id: node.compliancePortalFile.id,
|
||||||
status: node.status,
|
status: node.status,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ function toDocumentAccessInfo(
|
|||||||
const compliancePageAccessEditDialogQuery = graphql`
|
const compliancePageAccessEditDialogQuery = graphql`
|
||||||
query CompliancePageAccessEditDialogQuery($accessId: ID!) {
|
query CompliancePageAccessEditDialogQuery($accessId: ID!) {
|
||||||
node(id: $accessId) {
|
node(id: $accessId) {
|
||||||
... on TrustCenterAccess {
|
... on CompliancePortalAccess {
|
||||||
id
|
id
|
||||||
ndaSignature {
|
ndaSignature {
|
||||||
...ElectronicSignatureSectionFragment
|
...ElectronicSignatureSectionFragment
|
||||||
@@ -152,10 +152,10 @@ const compliancePageAccessEditDialogQuery = graphql`
|
|||||||
|
|
||||||
const updateAccessMutation = graphql`
|
const updateAccessMutation = graphql`
|
||||||
mutation CompliancePageAccessEditDialogUpdateMutation(
|
mutation CompliancePageAccessEditDialogUpdateMutation(
|
||||||
$input: UpdateTrustCenterAccessInput!
|
$input: UpdateCompliancePortalAccessInput!
|
||||||
) {
|
) {
|
||||||
updateTrustCenterAccess(input: $input) {
|
updateCompliancePortalAccess(input: $input) {
|
||||||
trustCenterAccess {
|
compliancePortalAccess {
|
||||||
id
|
id
|
||||||
createdAt
|
createdAt
|
||||||
updatedAt
|
updatedAt
|
||||||
@@ -224,7 +224,7 @@ function CompliancePageAccessEditForm(props: {
|
|||||||
getCompliancePageDocumentAccessInfo(edge.node, __),
|
getCompliancePageDocumentAccessInfo(edge.node, __),
|
||||||
) ?? [];
|
) ?? [];
|
||||||
const initialStatusByID = initialDocumentAccesses.reduce<
|
const initialStatusByID = initialDocumentAccesses.reduce<
|
||||||
Record<string, TrustCenterDocumentAccessStatus>
|
Record<string, CompliancePortalDocumentAccessStatus>
|
||||||
>((acc, docAccess) => {
|
>((acc, docAccess) => {
|
||||||
acc[docAccess.id] = docAccess.status;
|
acc[docAccess.id] = docAccess.status;
|
||||||
return acc;
|
return acc;
|
||||||
@@ -236,7 +236,7 @@ function CompliancePageAccessEditForm(props: {
|
|||||||
const handleUpdateDocumentAccessStatus = useCallback(
|
const handleUpdateDocumentAccessStatus = useCallback(
|
||||||
(
|
(
|
||||||
documentAccess: CompliancePageDocumentAccessInfo,
|
documentAccess: CompliancePageDocumentAccessInfo,
|
||||||
status: TrustCenterDocumentAccessStatus,
|
status: CompliancePortalDocumentAccessStatus,
|
||||||
) => {
|
) => {
|
||||||
setDocumentAccesses((prev) => {
|
setDocumentAccesses((prev) => {
|
||||||
const nextDocumentAccesses = [...prev];
|
const nextDocumentAccesses = [...prev];
|
||||||
@@ -278,13 +278,13 @@ function CompliancePageAccessEditForm(props: {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
const documents: { id: string; status: TrustCenterDocumentAccessStatus }[]
|
const documents: { id: string; status: CompliancePortalDocumentAccessStatus }[]
|
||||||
= [];
|
= [];
|
||||||
const reports: { id: string; status: TrustCenterDocumentAccessStatus }[]
|
const reports: { id: string; status: CompliancePortalDocumentAccessStatus }[]
|
||||||
= [];
|
= [];
|
||||||
const compliancePageFiles: {
|
const compliancePageFiles: {
|
||||||
id: string;
|
id: string;
|
||||||
status: TrustCenterDocumentAccessStatus;
|
status: CompliancePortalDocumentAccessStatus;
|
||||||
}[] = [];
|
}[] = [];
|
||||||
|
|
||||||
for (const docAccess of documentAccesses) {
|
for (const docAccess of documentAccesses) {
|
||||||
@@ -312,7 +312,7 @@ function CompliancePageAccessEditForm(props: {
|
|||||||
id: access.id,
|
id: access.id,
|
||||||
documents,
|
documents,
|
||||||
reports,
|
reports,
|
||||||
trustCenterFiles: compliancePageFiles,
|
compliancePortalFiles: compliancePageFiles,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,11 +29,11 @@ import type { CompliancePageAccessListQuery } from "#/__generated__/core/Complia
|
|||||||
import { CompliancePageAccessListItem } from "./CompliancePageAccessListItem";
|
import { CompliancePageAccessListItem } from "./CompliancePageAccessListItem";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageAccessListFragment on TrustCenter
|
fragment CompliancePageAccessListFragment on CompliancePortal
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
first: { type: Int, defaultValue: 10 }
|
first: { type: Int, defaultValue: 10 }
|
||||||
after: { type: CursorKey, defaultValue: null }
|
after: { type: CursorKey, defaultValue: null }
|
||||||
order: { type: TrustCenterAccessOrder, defaultValue: { field: CREATED_AT, direction: DESC } }
|
order: { type: CompliancePortalAccessOrder, defaultValue: { field: CREATED_AT, direction: DESC } }
|
||||||
)
|
)
|
||||||
@refetchable(queryName: "CompliancePageAccessListQuery") {
|
@refetchable(queryName: "CompliancePageAccessListQuery") {
|
||||||
accesses(
|
accesses(
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import { CompliancePageAccessEditDialog } from "./CompliancePageAccessEditDialog
|
|||||||
import { NdaSignatureBadge } from "./NdaSignatureBadge";
|
import { NdaSignatureBadge } from "./NdaSignatureBadge";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageAccessListItemFragment on TrustCenterAccess {
|
fragment CompliancePageAccessListItemFragment on CompliancePortalAccess {
|
||||||
id
|
id
|
||||||
createdAt
|
createdAt
|
||||||
profile {
|
profile {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
// SOFTWARE.
|
// SOFTWARE.
|
||||||
|
|
||||||
import type { TrustCenterDocumentAccessStatus } from "@probo/coredata";
|
import type { CompliancePortalDocumentAccessStatus } from "@probo/coredata";
|
||||||
import type { CompliancePageDocumentAccessInfo } from "@probo/helpers";
|
import type { CompliancePageDocumentAccessInfo } from "@probo/helpers";
|
||||||
import { getCompliancePageDocumentAccessStatusBadgeVariant, getCompliancePageDocumentAccessStatusLabel } from "@probo/helpers";
|
import { getCompliancePageDocumentAccessStatusBadgeVariant, getCompliancePageDocumentAccessStatusLabel } from "@probo/helpers";
|
||||||
import { useTranslate } from "@probo/i18n";
|
import { useTranslate } from "@probo/i18n";
|
||||||
@@ -26,10 +26,10 @@ import { Badge, Button, Table, Tbody, Td, Th, Thead, Tr } from "@probo/ui";
|
|||||||
|
|
||||||
interface CompliancePageDocumentAccessListProps {
|
interface CompliancePageDocumentAccessListProps {
|
||||||
documentAccesses: CompliancePageDocumentAccessInfo[];
|
documentAccesses: CompliancePageDocumentAccessInfo[];
|
||||||
initialStatusByID: Record<string, TrustCenterDocumentAccessStatus>;
|
initialStatusByID: Record<string, CompliancePortalDocumentAccessStatus>;
|
||||||
onGrantAll: () => void;
|
onGrantAll: () => void;
|
||||||
onRejectOrRevokeAll: () => void;
|
onRejectOrRevokeAll: () => void;
|
||||||
onUpdateStatus: (docAccess: CompliancePageDocumentAccessInfo, status: TrustCenterDocumentAccessStatus) => void;
|
onUpdateStatus: (docAccess: CompliancePageDocumentAccessInfo, status: CompliancePortalDocumentAccessStatus) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function CompliancePageDocumentAccessList(props: CompliancePageDocumentAccessListProps) {
|
export function CompliancePageDocumentAccessList(props: CompliancePageDocumentAccessListProps) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import { CompliancePageAuditListItem } from "./CompliancePageAuditListItem";
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageAuditListFragment on Organization {
|
fragment CompliancePageAuditListFragment on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
...CompliancePageAuditListItem_compliancePageFragment
|
...CompliancePageAuditListItem_compliancePageFragment
|
||||||
}
|
}
|
||||||
audits(first: 100) {
|
audits(first: 100) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ import { useOrganizationId } from "#/hooks/useOrganizationId";
|
|||||||
import { useMutation } from "#/lib/relay/useMutation";
|
import { useMutation } from "#/lib/relay/useMutation";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageAuditListItem_compliancePageFragment on TrustCenter {
|
fragment CompliancePageAuditListItem_compliancePageFragment on CompliancePortal {
|
||||||
canUpdate: permission(action: "compliance-portal:portal:update")
|
canUpdate: permission(action: "compliance-portal:portal:update")
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -46,7 +46,7 @@ const auditFragment = graphql`
|
|||||||
}
|
}
|
||||||
validUntil
|
validUntil
|
||||||
state
|
state
|
||||||
compliancePageVisibility: trustCenterVisibility
|
compliancePageVisibility: compliancePortalVisibility
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ export function CompliancePageAuditListItem(props: {
|
|||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
id: audit.id,
|
id: audit.id,
|
||||||
trustCenterVisibility: typedValue,
|
compliancePortalVisibility: typedValue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const compliancePageBrandPageQuery = graphql`
|
|||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
...CompliancePageDomainsSection_organizationFragment
|
...CompliancePageDomainsSection_organizationFragment
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
...CompliancePageProfileSection_compliancePageFragment
|
...CompliancePageProfileSection_compliancePageFragment
|
||||||
...CompliancePageVisualIdentitySection_compliancePageFragment
|
...CompliancePageVisualIdentitySection_compliancePageFragment
|
||||||
...CompliancePageCustomLinksSection_compliancePageFragment
|
...CompliancePageCustomLinksSection_compliancePageFragment
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ export const CompliancePageCustomLinkDialog = forwardRef<CompliancePageCustomLin
|
|||||||
if (mode === "create") {
|
if (mode === "create") {
|
||||||
await create({
|
await create({
|
||||||
variables: {
|
variables: {
|
||||||
input: { trustCenterId: compliancePageId, name: data.name, url: data.url },
|
input: { compliancePortalId: compliancePageId, name: data.name, url: data.url },
|
||||||
},
|
},
|
||||||
updater: (store) => {
|
updater: (store) => {
|
||||||
const payload = store.getRootField("createComplianceCustomLink");
|
const payload = store.getRootField("createComplianceCustomLink");
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import { CompliancePageCustomLinkDialog, type CompliancePageCustomLinkDialogRef
|
|||||||
import { CompliancePageCustomLinkListItem } from "./CompliancePageCustomLinkListItem";
|
import { CompliancePageCustomLinkListItem } from "./CompliancePageCustomLinkListItem";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageCustomLinkList_compliancePageFragment on TrustCenter
|
fragment CompliancePageCustomLinkList_compliancePageFragment on CompliancePortal
|
||||||
@refetchable(queryName: "CompliancePageCustomLinkList_compliancePageRefetchQuery")
|
@refetchable(queryName: "CompliancePageCustomLinkList_compliancePageRefetchQuery")
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
first: { type: Int, defaultValue: 500 }
|
first: { type: Int, defaultValue: 500 }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import type { CompliancePageCustomLinksSection_compliancePageFragment$key } from
|
|||||||
import { CompliancePageCustomLinkList } from "./CompliancePageCustomLinkList";
|
import { CompliancePageCustomLinkList } from "./CompliancePageCustomLinkList";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageCustomLinksSection_compliancePageFragment on TrustCenter {
|
fragment CompliancePageCustomLinksSection_compliancePageFragment on CompliancePortal {
|
||||||
...CompliancePageCustomLinkList_compliancePageFragment
|
...CompliancePageCustomLinkList_compliancePageFragment
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import { NewCompliancePageDomainDialog } from "../../domain/_components/NewCompl
|
|||||||
const organizationFragment = graphql`
|
const organizationFragment = graphql`
|
||||||
fragment CompliancePageDomainsSection_organizationFragment on Organization {
|
fragment CompliancePageDomainsSection_organizationFragment on Organization {
|
||||||
canCreateCustomDomain: permission(action: "compliance-portal:custom-domain:create")
|
canCreateCustomDomain: permission(action: "compliance-portal:custom-domain:create")
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
id
|
id
|
||||||
defaultDomain {
|
defaultDomain {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import { useUpdateCompliancePageMutation } from "#/hooks/graph/CompliancePageGra
|
|||||||
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageProfileSection_compliancePageFragment on TrustCenter {
|
fragment CompliancePageProfileSection_compliancePageFragment on CompliancePortal {
|
||||||
id
|
id
|
||||||
title
|
title
|
||||||
description
|
description
|
||||||
@@ -72,7 +72,7 @@ export function CompliancePageProfileSection(props: {
|
|||||||
await updateCompliancePage({
|
await updateCompliancePage({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePage.id,
|
compliancePortalId: compliancePage.id,
|
||||||
title: data.title,
|
title: data.title,
|
||||||
description: data.description || null,
|
description: data.description || null,
|
||||||
websiteUrl: data.websiteUrl || null,
|
websiteUrl: data.websiteUrl || null,
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import type { CompliancePageVisualIdentitySection_updateMutation } from "#/__gen
|
|||||||
import { useMutation } from "#/lib/relay/useMutation";
|
import { useMutation } from "#/lib/relay/useMutation";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageVisualIdentitySection_compliancePageFragment on TrustCenter {
|
fragment CompliancePageVisualIdentitySection_compliancePageFragment on CompliancePortal {
|
||||||
id
|
id
|
||||||
logo {
|
logo {
|
||||||
downloadUrl
|
downloadUrl
|
||||||
@@ -44,9 +44,9 @@ const compliancePageFragment = graphql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const updateMutation = graphql`
|
const updateMutation = graphql`
|
||||||
mutation CompliancePageVisualIdentitySection_updateMutation($input: UpdateTrustCenterBrandInput!) {
|
mutation CompliancePageVisualIdentitySection_updateMutation($input: UpdateCompliancePortalBrandInput!) {
|
||||||
updateTrustCenterBrand(input: $input) {
|
updateCompliancePortalBrand(input: $input) {
|
||||||
trustCenter {
|
compliancePortal {
|
||||||
id
|
id
|
||||||
logo {
|
logo {
|
||||||
downloadUrl
|
downloadUrl
|
||||||
@@ -115,7 +115,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
|
|||||||
void updateBrand({
|
void updateBrand({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
logoFile: null,
|
logoFile: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -137,7 +137,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
|
|||||||
void updateBrand({
|
void updateBrand({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
darkLogoFile: null,
|
darkLogoFile: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -154,7 +154,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
|
|||||||
await updateBrand({
|
await updateBrand({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
logoFile: null,
|
logoFile: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -167,7 +167,7 @@ export function CompliancePageVisualIdentitySection(props: CompliancePageVisualI
|
|||||||
await updateBrand({
|
await updateBrand({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
darkLogoFile: null,
|
darkLogoFile: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const compliancePageCommitmentsPageQuery = graphql`
|
|||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
id
|
id
|
||||||
canCreateGroup: permission(action: "core:compliance-portal-commitment-group:create")
|
canCreateGroup: permission(action: "core:compliance-portal-commitment-group:create")
|
||||||
...CompliancePageCommitmentGroupListFragment
|
...CompliancePageCommitmentGroupListFragment
|
||||||
@@ -53,7 +53,7 @@ export function CompliancePageCommitmentsPage(props: { queryRef: PreloadedQuery<
|
|||||||
return (
|
return (
|
||||||
<CompliancePageCommitmentGroupList
|
<CompliancePageCommitmentGroupList
|
||||||
fragmentRef={organization.compliancePage}
|
fragmentRef={organization.compliancePage}
|
||||||
trustCenterId={organization.compliancePage.id}
|
compliancePortalId={organization.compliancePage.id}
|
||||||
canCreate={organization.compliancePage.canCreateGroup}
|
canCreate={organization.compliancePage.canCreateGroup}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ const groupSchema = z.object({
|
|||||||
type GroupFormData = z.infer<typeof groupSchema>;
|
type GroupFormData = z.infer<typeof groupSchema>;
|
||||||
|
|
||||||
export type CompliancePageCommitmentGroupDialogRef = {
|
export type CompliancePageCommitmentGroupDialogRef = {
|
||||||
openCreate: (trustCenterId: string) => void;
|
openCreate: (compliancePortalId: string) => void;
|
||||||
openEdit: (group: CompliancePageCommitmentGroupListItemFragment$data) => void;
|
openEdit: (group: CompliancePageCommitmentGroupListItemFragment$data) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ export const CompliancePageCommitmentGroupDialog = forwardRef<
|
|||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const dialogRef = useDialogRef();
|
const dialogRef = useDialogRef();
|
||||||
const [mode, setMode] = useState<"create" | "edit">("create");
|
const [mode, setMode] = useState<"create" | "edit">("create");
|
||||||
const [trustCenterId, setTrustCenterId] = useState<string>("");
|
const [compliancePortalId, setCompliancePortalId] = useState<string>("");
|
||||||
const [groupId, setGroupId] = useState<string>("");
|
const [groupId, setGroupId] = useState<string>("");
|
||||||
|
|
||||||
const [createGroup, isCreating] = useMutationWithToasts<CompliancePageCommitmentGroupDialogCreateMutation>(
|
const [createGroup, isCreating] = useMutationWithToasts<CompliancePageCommitmentGroupDialogCreateMutation>(
|
||||||
@@ -100,7 +100,7 @@ export const CompliancePageCommitmentGroupDialog = forwardRef<
|
|||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
openCreate: (tId: string) => {
|
openCreate: (tId: string) => {
|
||||||
setMode("create");
|
setMode("create");
|
||||||
setTrustCenterId(tId);
|
setCompliancePortalId(tId);
|
||||||
reset({ title: "", description: "" });
|
reset({ title: "", description: "" });
|
||||||
dialogRef.current?.open();
|
dialogRef.current?.open();
|
||||||
},
|
},
|
||||||
@@ -115,7 +115,7 @@ export const CompliancePageCommitmentGroupDialog = forwardRef<
|
|||||||
const onSubmit = async (data: GroupFormData) => {
|
const onSubmit = async (data: GroupFormData) => {
|
||||||
if (mode === "create") {
|
if (mode === "create") {
|
||||||
await createGroup({
|
await createGroup({
|
||||||
variables: { input: { trustCenterId, title: data.title, description: data.description } },
|
variables: { input: { compliancePortalId, title: data.title, description: data.description } },
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
reset();
|
reset();
|
||||||
dialogRef.current?.close();
|
dialogRef.current?.close();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import { CompliancePageCommitmentGroupDialog, type CompliancePageCommitmentGroup
|
|||||||
import { CompliancePageCommitmentGroupListItem } from "./CompliancePageCommitmentGroupListItem";
|
import { CompliancePageCommitmentGroupListItem } from "./CompliancePageCommitmentGroupListItem";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageCommitmentGroupListFragment on TrustCenter
|
fragment CompliancePageCommitmentGroupListFragment on CompliancePortal
|
||||||
@refetchable(queryName: "CompliancePageCommitmentGroupListRefetchQuery") {
|
@refetchable(queryName: "CompliancePageCommitmentGroupListRefetchQuery") {
|
||||||
commitmentGroups(first: 100, orderBy: { field: RANK, direction: ASC }) {
|
commitmentGroups(first: 100, orderBy: { field: RANK, direction: ASC }) {
|
||||||
edges {
|
edges {
|
||||||
@@ -62,10 +62,10 @@ const updateRankMutation = graphql`
|
|||||||
|
|
||||||
export function CompliancePageCommitmentGroupList(props: {
|
export function CompliancePageCommitmentGroupList(props: {
|
||||||
fragmentRef: CompliancePageCommitmentGroupListFragment$key;
|
fragmentRef: CompliancePageCommitmentGroupListFragment$key;
|
||||||
trustCenterId: string;
|
compliancePortalId: string;
|
||||||
canCreate: boolean;
|
canCreate: boolean;
|
||||||
}) {
|
}) {
|
||||||
const { fragmentRef, trustCenterId, canCreate } = props;
|
const { fragmentRef, compliancePortalId, canCreate } = props;
|
||||||
|
|
||||||
const { __ } = useTranslate();
|
const { __ } = useTranslate();
|
||||||
const dialogRef = useRef<CompliancePageCommitmentGroupDialogRef>(null);
|
const dialogRef = useRef<CompliancePageCommitmentGroupDialogRef>(null);
|
||||||
@@ -106,7 +106,7 @@ export function CompliancePageCommitmentGroupList(props: {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
{canCreate && (
|
{canCreate && (
|
||||||
<Button icon={IconPlusLarge} onClick={() => dialogRef.current?.openCreate(trustCenterId)}>
|
<Button icon={IconPlusLarge} onClick={() => dialogRef.current?.openCreate(compliancePortalId)}>
|
||||||
{__("Add Group")}
|
{__("Add Group")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import { CompliancePageDocumentListItem } from "./CompliancePageDocumentListItem
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageDocumentListFragment on Organization {
|
fragment CompliancePageDocumentListFragment on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
...CompliancePageDocumentListItem_compliancePageFragment
|
...CompliancePageDocumentListItem_compliancePageFragment
|
||||||
}
|
}
|
||||||
documents(first: 100 filter: { status: [ACTIVE] }) {
|
documents(first: 100 filter: { status: [ACTIVE] }) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ import { useMutation } from "#/lib/relay/useMutation";
|
|||||||
import { CompliancePageAliasField } from "../../_components/CompliancePageAliasField";
|
import { CompliancePageAliasField } from "../../_components/CompliancePageAliasField";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageDocumentListItem_compliancePageFragment on TrustCenter {
|
fragment CompliancePageDocumentListItem_compliancePageFragment on CompliancePortal {
|
||||||
canUpdate: permission(action: "compliance-portal:portal:update")
|
canUpdate: permission(action: "compliance-portal:portal:update")
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -45,7 +45,7 @@ const documentFragment = graphql`
|
|||||||
alias
|
alias
|
||||||
canSetAlias: permission(action: "resourcealias:alias:set")
|
canSetAlias: permission(action: "resourcealias:alias:set")
|
||||||
canRemoveAlias: permission(action: "resourcealias:alias:remove")
|
canRemoveAlias: permission(action: "resourcealias:alias:remove")
|
||||||
compliancePageVisibility: trustCenterVisibility
|
compliancePageVisibility: compliancePortalVisibility
|
||||||
latestPublishedVersion: versions(
|
latestPublishedVersion: versions(
|
||||||
first: 1
|
first: 1
|
||||||
orderBy: { field: CREATED_AT, direction: DESC }
|
orderBy: { field: CREATED_AT, direction: DESC }
|
||||||
@@ -107,7 +107,7 @@ export function CompliancePageDocumentListItem(props: {
|
|||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
id: document.id,
|
id: document.id,
|
||||||
trustCenterVisibility: typedValue,
|
compliancePortalVisibility: typedValue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ export function NewCompliancePageDomainDialog(props: PropsWithChildren<{ complia
|
|||||||
await createCustomDomain({
|
await createCustomDomain({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: compliancePageId,
|
compliancePortalId: compliancePageId,
|
||||||
domain: normalizedDomain,
|
domain: normalizedDomain,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ import { EditCompliancePageFileDialog } from "./EditCompliancePageFileDialog";
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageFileListFragment on Organization {
|
fragment CompliancePageFileListFragment on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
...CompliancePageFileListItem_compliancePageFragment
|
...CompliancePageFileListItem_compliancePageFragment
|
||||||
}
|
}
|
||||||
compliancePageFiles: trustCenterFiles(first: 100)
|
compliancePageFiles: compliancePortalFiles(first: 100)
|
||||||
@connection(key: "CompliancePageFileList_compliancePageFiles") {
|
@connection(key: "CompliancePageFileList_compliancePageFiles") {
|
||||||
__id
|
__id
|
||||||
edges {
|
edges {
|
||||||
|
|||||||
@@ -33,13 +33,13 @@ import { useMutation } from "#/lib/relay/useMutation";
|
|||||||
import { CompliancePageAliasField } from "../../_components/CompliancePageAliasField";
|
import { CompliancePageAliasField } from "../../_components/CompliancePageAliasField";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageFileListItem_compliancePageFragment on TrustCenter {
|
fragment CompliancePageFileListItem_compliancePageFragment on CompliancePortal {
|
||||||
canUpdate: permission(action: "compliance-portal:portal:update")
|
canUpdate: permission(action: "compliance-portal:portal:update")
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const fileFragment = graphql`
|
const fileFragment = graphql`
|
||||||
fragment CompliancePageFileListItem_fileFragment on TrustCenterFile {
|
fragment CompliancePageFileListItem_fileFragment on CompliancePortalFile {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
alias
|
alias
|
||||||
@@ -49,7 +49,7 @@ const fileFragment = graphql`
|
|||||||
file {
|
file {
|
||||||
downloadUrl
|
downloadUrl
|
||||||
}
|
}
|
||||||
compliancePageVisibility: trustCenterVisibility
|
compliancePageVisibility: compliancePortalVisibility
|
||||||
createdAt
|
createdAt
|
||||||
canUpdate: permission(action: "compliance-portal:portal-file:update")
|
canUpdate: permission(action: "compliance-portal:portal-file:update")
|
||||||
canDelete: permission(action: "compliance-portal:portal-file:delete")
|
canDelete: permission(action: "compliance-portal:portal-file:delete")
|
||||||
@@ -57,9 +57,9 @@ const fileFragment = graphql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const updateCompliancePageFileMutation = graphql`
|
const updateCompliancePageFileMutation = graphql`
|
||||||
mutation CompliancePageFileListItemMutation($input: UpdateTrustCenterFileInput!) {
|
mutation CompliancePageFileListItemMutation($input: UpdateCompliancePortalFileInput!) {
|
||||||
updateTrustCenterFile(input: $input) {
|
updateCompliancePortalFile(input: $input) {
|
||||||
trustCenterFile {
|
compliancePortalFile {
|
||||||
...CompliancePageFileListItem_fileFragment
|
...CompliancePageFileListItem_fileFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ export function CompliancePageFileListItem(props: {
|
|||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
id: file.id,
|
id: file.id,
|
||||||
trustCenterVisibility: typedValue,
|
compliancePortalVisibility: typedValue,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,11 +28,11 @@ import { useMutation } from "#/lib/relay/useMutation";
|
|||||||
|
|
||||||
const deleteCompliancePageFileMutation = graphql`
|
const deleteCompliancePageFileMutation = graphql`
|
||||||
mutation DeleteCompliancePageFileDialogMutation(
|
mutation DeleteCompliancePageFileDialogMutation(
|
||||||
$input: DeleteTrustCenterFileInput!
|
$input: DeleteCompliancePortalFileInput!
|
||||||
$connections: [ID!]!
|
$connections: [ID!]!
|
||||||
) {
|
) {
|
||||||
deleteTrustCenterFile(input: $input) {
|
deleteCompliancePortalFile(input: $input) {
|
||||||
deletedTrustCenterFileId @deleteEdge(connections: $connections)
|
deletedCompliancePortalFileId @deleteEdge(connections: $connections)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ import { useFormWithSchema } from "#/hooks/useFormWithSchema";
|
|||||||
import { useMutation } from "#/lib/relay/useMutation";
|
import { useMutation } from "#/lib/relay/useMutation";
|
||||||
|
|
||||||
const updateCompliancePageFileMutation = graphql`
|
const updateCompliancePageFileMutation = graphql`
|
||||||
mutation EditCompliancePageFileDialogMutation($input: UpdateTrustCenterFileInput!) {
|
mutation EditCompliancePageFileDialogMutation($input: UpdateCompliancePortalFileInput!) {
|
||||||
updateTrustCenterFile(input: $input) {
|
updateCompliancePortalFile(input: $input) {
|
||||||
trustCenterFile {
|
compliancePortalFile {
|
||||||
...CompliancePageFileListItem_fileFragment
|
...CompliancePageFileListItem_fileFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,11 @@ const acceptedFileTypes = {
|
|||||||
|
|
||||||
const createCompliancePageFileMutation = graphql`
|
const createCompliancePageFileMutation = graphql`
|
||||||
mutation NewCompliancePageFileDialog_createMutation(
|
mutation NewCompliancePageFileDialog_createMutation(
|
||||||
$input: CreateTrustCenterFileInput!
|
$input: CreateCompliancePortalFileInput!
|
||||||
$connections: [ID!]!
|
$connections: [ID!]!
|
||||||
) {
|
) {
|
||||||
createTrustCenterFile(input: $input) {
|
createCompliancePortalFile(input: $input) {
|
||||||
trustCenterFileEdge @prependEdge(connections: $connections) {
|
compliancePortalFileEdge @prependEdge(connections: $connections) {
|
||||||
node {
|
node {
|
||||||
...CompliancePageFileListItem_fileFragment
|
...CompliancePageFileListItem_fileFragment
|
||||||
}
|
}
|
||||||
@@ -122,7 +122,7 @@ export function NewCompliancePageFileDialog(props: {
|
|||||||
organizationId,
|
organizationId,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
category: data.category,
|
category: data.category,
|
||||||
trustCenterVisibility: data.compliancePageVisibility,
|
compliancePortalVisibility: data.compliancePageVisibility,
|
||||||
file: null,
|
file: null,
|
||||||
},
|
},
|
||||||
connections: connectionId ? [connectionId] : [],
|
connections: connectionId ? [connectionId] : [],
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const compliancePageMailingListPageQuery = graphql`
|
|||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
id
|
id
|
||||||
mailingList {
|
mailingList {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ const deleteMutation = graphql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageMailingListFragment on TrustCenter
|
fragment CompliancePageMailingListFragment on CompliancePortal
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
first: { type: Int, defaultValue: 20 }
|
first: { type: Int, defaultValue: 20 }
|
||||||
after: { type: CursorKey, defaultValue: null }
|
after: { type: CursorKey, defaultValue: null }
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export const compliancePageOverviewPageQuery = graphql`
|
|||||||
query CompliancePageOverviewPageQuery($organizationId: ID!) {
|
query CompliancePageOverviewPageQuery($organizationId: ID!) {
|
||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter {
|
compliancePage: compliancePortal {
|
||||||
canGetNDA: permission(action: "compliance-portal:portal:get-nda")
|
canGetNDA: permission(action: "compliance-portal:portal:get-nda")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ import type { CompliancePageFrameworkList_compliancePageRefetchQuery } from "#/_
|
|||||||
import { CompliancePageFrameworkListItem } from "./CompliancePageFrameworkListItem";
|
import { CompliancePageFrameworkListItem } from "./CompliancePageFrameworkListItem";
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageFrameworkList_compliancePageFragment on TrustCenter
|
fragment CompliancePageFrameworkList_compliancePageFragment on CompliancePortal
|
||||||
@refetchable(queryName: "CompliancePageFrameworkList_compliancePageRefetchQuery")
|
@refetchable(queryName: "CompliancePageFrameworkList_compliancePageRefetchQuery")
|
||||||
@argumentDefinitions(
|
@argumentDefinitions(
|
||||||
first: { type: Int, defaultValue: 100 }
|
first: { type: Int, defaultValue: 100 }
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const compliancePageFrameworkListItemFragment = graphql`
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
const compliancePageFragment = graphql`
|
const compliancePageFragment = graphql`
|
||||||
fragment CompliancePageFrameworkListItem_compliancePage on TrustCenter {
|
fragment CompliancePageFrameworkListItem_compliancePage on CompliancePortal {
|
||||||
id
|
id
|
||||||
canUpdate: permission(action: "compliance-portal:portal:update")
|
canUpdate: permission(action: "compliance-portal:portal:update")
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ export function CompliancePageFrameworkListItem(props: CompliancePageFrameworkLi
|
|||||||
);
|
);
|
||||||
const compliancePage = useFragment(compliancePageFragment, compliancePageKey);
|
const compliancePage = useFragment(compliancePageFragment, compliancePageKey);
|
||||||
const canUpdate = compliancePage.canUpdate;
|
const canUpdate = compliancePage.canUpdate;
|
||||||
const trustCenterId = compliancePage.id;
|
const compliancePortalId = compliancePage.id;
|
||||||
const { id, visibility, framework } = complianceFramework;
|
const { id, visibility, framework } = complianceFramework;
|
||||||
|
|
||||||
const serverPublic = visibility === "PUBLIC";
|
const serverPublic = visibility === "PUBLIC";
|
||||||
@@ -137,7 +137,7 @@ export function CompliancePageFrameworkListItem(props: CompliancePageFrameworkLi
|
|||||||
await createComplianceFramework({
|
await createComplianceFramework({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId,
|
compliancePortalId,
|
||||||
frameworkId: framework.id,
|
frameworkId: framework.id,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -161,7 +161,7 @@ export function CompliancePageFrameworkListItem(props: CompliancePageFrameworkLi
|
|||||||
id,
|
id,
|
||||||
onRefetch,
|
onRefetch,
|
||||||
createComplianceFramework,
|
createComplianceFramework,
|
||||||
trustCenterId,
|
compliancePortalId,
|
||||||
framework.id,
|
framework.id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { CompliancePageFrameworkList } from "./CompliancePageFrameworkList";
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageFrameworksSectionFragment on Organization {
|
fragment CompliancePageFrameworksSectionFragment on Organization {
|
||||||
compliancePage: trustCenter {
|
compliancePage: compliancePortal {
|
||||||
...CompliancePageFrameworkList_compliancePageFragment
|
...CompliancePageFrameworkList_compliancePageFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { graphql } from "relay-runtime";
|
|||||||
import type { CompliancePageNDACard_compliancePage$key } from "#/__generated__/core/CompliancePageNDACard_compliancePage.graphql";
|
import type { CompliancePageNDACard_compliancePage$key } from "#/__generated__/core/CompliancePageNDACard_compliancePage.graphql";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageNDACard_compliancePage on TrustCenter {
|
fragment CompliancePageNDACard_compliancePage on CompliancePortal {
|
||||||
nda {
|
nda {
|
||||||
fileName
|
fileName
|
||||||
downloadUrl
|
downloadUrl
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import { CompliancePageNDACard } from "./CompliancePageNDACard";
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageNDASectionFragment on Organization {
|
fragment CompliancePageNDASectionFragment on Organization {
|
||||||
compliancePage: trustCenter {
|
compliancePage: compliancePortal {
|
||||||
id
|
id
|
||||||
nda {
|
nda {
|
||||||
fileName
|
fileName
|
||||||
@@ -72,7 +72,7 @@ export function CompliancePageNDASection(props: CompliancePageNDASectionProps) {
|
|||||||
await uploadNDA({
|
await uploadNDA({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: organization.compliancePage.id,
|
compliancePortalId: organization.compliancePage.id,
|
||||||
fileName: file.name,
|
fileName: file.name,
|
||||||
file: null,
|
file: null,
|
||||||
},
|
},
|
||||||
@@ -111,8 +111,8 @@ export function CompliancePageNDASection(props: CompliancePageNDASectionProps) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleNDADelete = () => {
|
const handleNDADelete = () => {
|
||||||
const trustCenterId = organization.compliancePage?.id;
|
const compliancePortalId = organization.compliancePage?.id;
|
||||||
if (!trustCenterId) {
|
if (!compliancePortalId) {
|
||||||
toast({
|
toast({
|
||||||
title: __("Error"),
|
title: __("Error"),
|
||||||
description: __("Compliance page not found"),
|
description: __("Compliance page not found"),
|
||||||
@@ -122,7 +122,7 @@ export function CompliancePageNDASection(props: CompliancePageNDASectionProps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
confirm(
|
confirm(
|
||||||
() => deleteNDA({ variables: { input: { trustCenterId } } }),
|
() => deleteNDA({ variables: { input: { compliancePortalId } } }),
|
||||||
{
|
{
|
||||||
title: __("Delete NDA"),
|
title: __("Delete NDA"),
|
||||||
message: __("Are you sure you want to delete the NDA file? This action cannot be undone."),
|
message: __("Are you sure you want to delete the NDA file? This action cannot be undone."),
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import { useUpdateCompliancePageMutation } from "#/hooks/graph/CompliancePageGra
|
|||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageStatusSectionFragment on Organization {
|
fragment CompliancePageStatusSectionFragment on Organization {
|
||||||
compliancePage: trustCenter {
|
compliancePage: compliancePortal {
|
||||||
id
|
id
|
||||||
active
|
active
|
||||||
searchEngineIndexing
|
searchEngineIndexing
|
||||||
@@ -65,7 +65,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
await updateCompliancePage({
|
await updateCompliancePage({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: organization.compliancePage.id,
|
compliancePortalId: organization.compliancePage.id,
|
||||||
active,
|
active,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -85,7 +85,7 @@ export function CompliancePageStatusSection(props: {
|
|||||||
await updateCompliancePage({
|
await updateCompliancePage({
|
||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
trustCenterId: organization.compliancePage.id,
|
compliancePortalId: organization.compliancePage.id,
|
||||||
searchEngineIndexing: indexable ? "INDEXABLE" : "NOT_INDEXABLE",
|
searchEngineIndexing: indexable ? "INDEXABLE" : "NOT_INDEXABLE",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export const compliancePageReferencesPageQuery = graphql`
|
|||||||
organization: node(id: $organizationId) {
|
organization: node(id: $organizationId) {
|
||||||
__typename
|
__typename
|
||||||
... on Organization {
|
... on Organization {
|
||||||
compliancePage: trustCenter @required(action: THROW) {
|
compliancePage: compliancePortal @required(action: THROW) {
|
||||||
id
|
id
|
||||||
canCreateReference: permission(action: "compliance-portal:portal-reference:create")
|
canCreateReference: permission(action: "compliance-portal:portal-reference:create")
|
||||||
...CompliancePageReferenceListFragment
|
...CompliancePageReferenceListFragment
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ import { useUpdateCompliancePageReferenceRankMutation } from "#/pages/organizati
|
|||||||
import { CompliancePageReferenceListItem } from "./CompliancePageReferenceListItem";
|
import { CompliancePageReferenceListItem } from "./CompliancePageReferenceListItem";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageReferenceListFragment on TrustCenter
|
fragment CompliancePageReferenceListFragment on CompliancePortal
|
||||||
@refetchable(queryName: "CompliancePageReferenceListQuery")
|
@refetchable(queryName: "CompliancePageReferenceListQuery")
|
||||||
@argumentDefinitions (
|
@argumentDefinitions (
|
||||||
first: { type: Int defaultValue: 100 }
|
first: { type: Int defaultValue: 100 }
|
||||||
after: { type: CursorKey defaultValue: null }
|
after: { type: CursorKey defaultValue: null }
|
||||||
order: { type: TrustCenterReferenceOrder, defaultValue: { field: RANK, direction: ASC } }
|
order: { type: CompliancePortalReferenceOrder, defaultValue: { field: RANK, direction: ASC } }
|
||||||
) {
|
) {
|
||||||
references(first: $first, after: $after, orderBy: $order)
|
references(first: $first, after: $after, orderBy: $order)
|
||||||
@connection(key: "CompliancePageReferenceList_references", filters: ["orderBy"]) {
|
@connection(key: "CompliancePageReferenceList_references", filters: ["orderBy"]) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ import type { CompliancePageReferenceListItemFragment$data, CompliancePageRefere
|
|||||||
import { DeleteCompliancePageReferenceDialog } from "#/components/compliancePage/DeleteCompliancePageReferenceDialog";
|
import { DeleteCompliancePageReferenceDialog } from "#/components/compliancePage/DeleteCompliancePageReferenceDialog";
|
||||||
|
|
||||||
const fragment = graphql`
|
const fragment = graphql`
|
||||||
fragment CompliancePageReferenceListItemFragment on TrustCenterReference {
|
fragment CompliancePageReferenceListItemFragment on CompliancePortalReference {
|
||||||
id
|
id
|
||||||
logo {
|
logo {
|
||||||
downloadUrl
|
downloadUrl
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const thirdPartyFragment = graphql`
|
|||||||
id
|
id
|
||||||
category
|
category
|
||||||
name
|
name
|
||||||
showOnCompliancePage: showOnTrustCenter
|
showOnCompliancePage: showOnCompliancePortal
|
||||||
canUpdate: permission(action: "core:thirdParty:update")
|
canUpdate: permission(action: "core:thirdParty:update")
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -43,7 +43,7 @@ const updateThirdPartyVisibilityMutation = graphql`
|
|||||||
updateThirdParty(input: $input) {
|
updateThirdParty(input: $input) {
|
||||||
thirdParty {
|
thirdParty {
|
||||||
id
|
id
|
||||||
showOnTrustCenter
|
showOnCompliancePortal
|
||||||
...CompliancePageThirdPartyListItem_thirdPartyFragment
|
...CompliancePageThirdPartyListItem_thirdPartyFragment
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -94,7 +94,7 @@ export function CompliancePageThirdPartyListItem(props: {
|
|||||||
variables: {
|
variables: {
|
||||||
input: {
|
input: {
|
||||||
id: thirdParty.id,
|
id: thirdParty.id,
|
||||||
showOnTrustCenter: !thirdParty.showOnCompliancePage,
|
showOnCompliancePortal: !thirdParty.showOnCompliancePage,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user