diff --git a/apps/console/src/hooks/graph/AuditGraph.ts b/apps/console/src/hooks/graph/AuditGraph.ts index 77d8de7d4..3f90a0db1 100644 --- a/apps/console/src/hooks/graph/AuditGraph.ts +++ b/apps/console/src/hooks/graph/AuditGraph.ts @@ -53,8 +53,12 @@ export const auditNodeQuery = graphql` framework { id name - lightLogoURL - darkLogoURL + lightLogo { + downloadUrl + } + darkLogo { + downloadUrl + } } organization { id diff --git a/apps/console/src/hooks/graph/TrustCenterGraph.ts b/apps/console/src/hooks/graph/TrustCenterGraph.ts index e970a4867..e3ea1637c 100644 --- a/apps/console/src/hooks/graph/TrustCenterGraph.ts +++ b/apps/console/src/hooks/graph/TrustCenterGraph.ts @@ -47,7 +47,10 @@ const uploadTrustCenterNDAMutation = graphql` uploadTrustCenterNDA(input: $input) { trustCenter { id - ndaFileName + nda { + fileName + downloadUrl + } updatedAt } } @@ -68,7 +71,10 @@ const deleteTrustCenterNDAMutation = graphql` deleteTrustCenterNDA(input: $input) { trustCenter { id - ndaFileName + nda { + fileName + downloadUrl + } updatedAt } } diff --git a/apps/console/src/hooks/graph/TrustCenterReferenceGraph.ts b/apps/console/src/hooks/graph/TrustCenterReferenceGraph.ts index b1d28f33d..9c0a74fad 100644 --- a/apps/console/src/hooks/graph/TrustCenterReferenceGraph.ts +++ b/apps/console/src/hooks/graph/TrustCenterReferenceGraph.ts @@ -33,7 +33,9 @@ export const createTrustCenterReferenceMutation = graphql` name description websiteUrl - logoUrl + logo { + downloadUrl + } rank createdAt updatedAt @@ -55,7 +57,9 @@ export const updateTrustCenterReferenceMutation = graphql` name description websiteUrl - logoUrl + logo { + downloadUrl + } rank createdAt updatedAt diff --git a/apps/console/src/pages/organizations/audits/AuditDetailsPage.tsx b/apps/console/src/pages/organizations/audits/AuditDetailsPage.tsx index e1048a2a0..6e0635f62 100644 --- a/apps/console/src/pages/organizations/audits/AuditDetailsPage.tsx +++ b/apps/console/src/pages/organizations/audits/AuditDetailsPage.tsx @@ -189,8 +189,8 @@ export default function AuditDetailsPage(props: Props) {
{auditEntry.framework?.name}
diff --git a/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx b/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx index 6137999ea..9fd83528b 100644 --- a/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/access/_components/ElectronicSignatureSection.tsx @@ -26,7 +26,10 @@ const fragment = graphql` fragment ElectronicSignatureSectionFragment on ElectronicSignature { status signedAt - certificateFileUrl + certificate { + downloadUrl + fileName + } events { id eventType @@ -36,16 +39,6 @@ const fragment = graphql` } `; -function getFilenameFromUrl(url: string): string | null { - try { - const disposition = new URL(url).searchParams.get("response-content-disposition"); - const match = disposition?.match(/filename="([^"]+)"/); - return match ? decodeURIComponent(match[1]) : null; - } catch { - return null; - } -} - export function ElectronicSignatureSection({ fragmentRef, }: { @@ -72,17 +65,17 @@ export function ElectronicSignatureSection({ )} - {signature.certificateFileUrl && ( + {signature.certificate?.downloadUrl && (
{__("Certificate")} - {getFilenameFromUrl(signature.certificateFileUrl) ?? __("Download")} + {signature.certificate.fileName ?? __("Download")}
)} diff --git a/apps/console/src/pages/organizations/compliance-page/brand/CompliancePageBrandPage.tsx b/apps/console/src/pages/organizations/compliance-page/brand/CompliancePageBrandPage.tsx index e6297887e..bb1f45989 100644 --- a/apps/console/src/pages/organizations/compliance-page/brand/CompliancePageBrandPage.tsx +++ b/apps/console/src/pages/organizations/compliance-page/brand/CompliancePageBrandPage.tsx @@ -42,8 +42,12 @@ export const compliancePageBrandPageQuery = graphql` ... on Organization { compliancePage: trustCenter @required(action: THROW) { id - logoFileUrl - darkLogoFileUrl + logo { + downloadUrl + } + darkLogo { + downloadUrl + } canUpdate: permission(action: "core:trust-center:update") ...CompliancePageFrameworkList_compliancePageFragment ...CompliancePageExternalUrlsSection_trustCenterFragment @@ -58,8 +62,12 @@ const updateTrustCenterBrandMutation = graphql` updateTrustCenterBrand(input: $input) { trustCenter { id - logoFileUrl - darkLogoFileUrl + logo { + downloadUrl + } + darkLogo { + downloadUrl + } } } } @@ -77,8 +85,8 @@ export function CompliancePageBrandPage(props: { queryRef: PreloadedQuery(null); const [darkLogoPreview, setDarkLogoPreview] = useState(null); @@ -234,8 +242,8 @@ export function CompliancePageBrandPage(props: { queryRef: PreloadedQuery diff --git a/apps/console/src/pages/organizations/compliance-page/files/_components/CompliancePageFileListItem.tsx b/apps/console/src/pages/organizations/compliance-page/files/_components/CompliancePageFileListItem.tsx index 306c8a74a..40438e76e 100644 --- a/apps/console/src/pages/organizations/compliance-page/files/_components/CompliancePageFileListItem.tsx +++ b/apps/console/src/pages/organizations/compliance-page/files/_components/CompliancePageFileListItem.tsx @@ -35,7 +35,9 @@ const fileFragment = graphql` id name category - fileUrl + file { + downloadUrl + } trustCenterVisibility createdAt canUpdate: permission(action: "core:trust-center-file:update") @@ -124,7 +126,7 @@ export function CompliancePageFileListItem(props: { variant="secondary" icon={IconArrowLink} onClick={() => - window.open(file.fileUrl, "_blank", "noopener,noreferrer")} + window.open(file.file?.downloadUrl, "_blank", "noopener,noreferrer")} title={__("Download")} /> {file.canUpdate && ( diff --git a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageFrameworkList.tsx b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageFrameworkList.tsx index 2a66b7535..bf597bca9 100644 --- a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageFrameworkList.tsx +++ b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageFrameworkList.tsx @@ -45,8 +45,12 @@ const compliancePageFragment = graphql` framework { id name - lightLogoURL - darkLogoURL + lightLogo { + downloadUrl + } + darkLogo { + downloadUrl + } } } } @@ -198,8 +202,8 @@ function CompliancePageFrameworkListItem(props: {
{framework.name} diff --git a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageNDASection.tsx b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageNDASection.tsx index 945395960..24fef8e39 100644 --- a/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageNDASection.tsx +++ b/apps/console/src/pages/organizations/compliance-page/overview/_components/CompliancePageNDASection.tsx @@ -24,8 +24,10 @@ const fragment = graphql` fragment CompliancePageNDASectionFragment on Organization { compliancePage: trustCenter { id - ndaFileName - ndaFileUrl + nda { + fileName + downloadUrl + } canUploadNDA: permission(action: "core:trust-center:upload-nda") canDeleteNDA: permission(action: "core:trust-center:delete-nda") } @@ -103,7 +105,7 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA {(isUploadingNDA || isDeletingNDA) && }
- {!organization.compliancePage?.ndaFileName + {!organization.compliancePage?.nda?.fileName && organization.compliancePage?.canUploadNDA ? (

@@ -115,14 +117,14 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA : ( <> )} - {organization.compliancePage?.ndaFileName + {organization.compliancePage?.nda?.fileName ? (

- {organization.compliancePage.ndaFileName + {organization.compliancePage.nda?.fileName || __("Non-Disclosure Agreement")}

@@ -137,9 +139,9 @@ export function CompliancePageNDASection(props: { fragmentRef: CompliancePageNDA type="button" variant="secondary" onClick={() => { - if (organization.compliancePage?.ndaFileUrl) { + if (organization.compliancePage?.nda?.downloadUrl) { window.open( - organization.compliancePage.ndaFileUrl, + organization.compliancePage.nda.downloadUrl, "_blank", "noopener,noreferrer", ); diff --git a/apps/console/src/pages/organizations/compliance-page/references/_components/CompliancePageReferenceListItem.tsx b/apps/console/src/pages/organizations/compliance-page/references/_components/CompliancePageReferenceListItem.tsx index 324baf166..abb15129a 100644 --- a/apps/console/src/pages/organizations/compliance-page/references/_components/CompliancePageReferenceListItem.tsx +++ b/apps/console/src/pages/organizations/compliance-page/references/_components/CompliancePageReferenceListItem.tsx @@ -24,7 +24,9 @@ import { DeleteTrustCenterReferenceDialog } from "#/components/trustCenter/Delet const fragment = graphql` fragment CompliancePageReferenceListItemFragment on TrustCenterReference { id - logoUrl + logo { + downloadUrl + } name description websiteUrl @@ -81,7 +83,7 @@ export function CompliancePageReferenceListItem(props: { >
- + {reference.name}
diff --git a/apps/console/src/pages/organizations/frameworks/FrameworkDetailPage.tsx b/apps/console/src/pages/organizations/frameworks/FrameworkDetailPage.tsx index 99c9c8afa..11462700c 100644 --- a/apps/console/src/pages/organizations/frameworks/FrameworkDetailPage.tsx +++ b/apps/console/src/pages/organizations/frameworks/FrameworkDetailPage.tsx @@ -53,10 +53,13 @@ const frameworkDetailFragment = graphql` name # eslint-disable-next-line relay/unused-fields description + lightLogo { + downloadUrl + } # eslint-disable-next-line relay/unused-fields - lightLogoURL - # eslint-disable-next-line relay/unused-fields - darkLogoURL + darkLogo { + downloadUrl + } canExport: permission(action: "core:franework:export") canUpdate: permission(action: "core:framework:update") canDelete: permission(action: "core:framework:delete") @@ -147,7 +150,11 @@ export default function FrameworkDetailPage(props: Props) { - + {framework.name} )} diff --git a/apps/console/src/pages/organizations/frameworks/FrameworksPage.tsx b/apps/console/src/pages/organizations/frameworks/FrameworksPage.tsx index 55647aadb..3df36c938 100644 --- a/apps/console/src/pages/organizations/frameworks/FrameworksPage.tsx +++ b/apps/console/src/pages/organizations/frameworks/FrameworksPage.tsx @@ -187,8 +187,12 @@ const frameworkCardFragment = graphql` id name description - lightLogoURL - darkLogoURL + lightLogo { + downloadUrl + } + darkLogo { + downloadUrl + } canUpdate: permission(action: "core:framework:update") canDelete: permission(action: "core:framework:delete") } @@ -220,8 +224,8 @@ function FrameworkCard(props: FrameworkCardProps) {
{props.hasAnyAction && ( diff --git a/apps/console/src/pages/organizations/third-parties/dialogs/CommonThirdPartyCombobox.tsx b/apps/console/src/pages/organizations/third-parties/dialogs/CommonThirdPartyCombobox.tsx index 06852fea3..2ebd8b3e7 100644 --- a/apps/console/src/pages/organizations/third-parties/dialogs/CommonThirdPartyCombobox.tsx +++ b/apps/console/src/pages/organizations/third-parties/dialogs/CommonThirdPartyCombobox.tsx @@ -30,7 +30,9 @@ export type CommonThirdPartyRef export const commonThirdPartyFragment = graphql` fragment CommonThirdPartyCombobox_commonThirdParty on CommonThirdParty @inline { name - logoUrl + logo { + downloadUrl + } category websiteUrl headquarterAddress @@ -51,7 +53,9 @@ export const commonThirdPartiesQuery = graphql` commonThirdParties(name: $name) { id name - logoUrl + logo { + downloadUrl + } ...CommonThirdPartyCombobox_commonThirdParty } } @@ -107,7 +111,7 @@ export function CommonThirdPartyCombobox({ > {thirdParty.name} diff --git a/apps/console/src/pages/organizations/third-parties/dialogs/EditBusinessAssociateAgreementDialog.tsx b/apps/console/src/pages/organizations/third-parties/dialogs/EditBusinessAssociateAgreementDialog.tsx index 4303a00e7..438bab56c 100644 --- a/apps/console/src/pages/organizations/third-parties/dialogs/EditBusinessAssociateAgreementDialog.tsx +++ b/apps/console/src/pages/organizations/third-parties/dialogs/EditBusinessAssociateAgreementDialog.tsx @@ -36,7 +36,9 @@ const updateBusinessAssociateAgreementMutation = graphql` updateThirdPartyBusinessAssociateAgreement(input: $input) { thirdPartyBusinessAssociateAgreement { id - fileUrl + file { + downloadUrl + } validFrom validUntil createdAt diff --git a/apps/console/src/pages/organizations/third-parties/dialogs/EditDataPrivacyAgreementDialog.tsx b/apps/console/src/pages/organizations/third-parties/dialogs/EditDataPrivacyAgreementDialog.tsx index c42553606..b112e0b54 100644 --- a/apps/console/src/pages/organizations/third-parties/dialogs/EditDataPrivacyAgreementDialog.tsx +++ b/apps/console/src/pages/organizations/third-parties/dialogs/EditDataPrivacyAgreementDialog.tsx @@ -36,7 +36,9 @@ const updateDataPrivacyAgreementMutation = graphql` updateThirdPartyDataPrivacyAgreement(input: $input) { thirdPartyDataPrivacyAgreement { id - fileUrl + file { + downloadUrl + } validFrom validUntil createdAt diff --git a/apps/console/src/pages/organizations/third-parties/dialogs/UploadBusinessAssociateAgreementDialog.tsx b/apps/console/src/pages/organizations/third-parties/dialogs/UploadBusinessAssociateAgreementDialog.tsx index 12219dc36..845f37f95 100644 --- a/apps/console/src/pages/organizations/third-parties/dialogs/UploadBusinessAssociateAgreementDialog.tsx +++ b/apps/console/src/pages/organizations/third-parties/dialogs/UploadBusinessAssociateAgreementDialog.tsx @@ -38,8 +38,10 @@ const uploadBusinessAssociateAgreementMutation = graphql` uploadThirdPartyBusinessAssociateAgreement(input: $input) { thirdPartyBusinessAssociateAgreement { id - fileName - fileUrl + file { + fileName + downloadUrl + } validFrom validUntil createdAt diff --git a/apps/console/src/pages/organizations/third-parties/dialogs/UploadDataPrivacyAgreementDialog.tsx b/apps/console/src/pages/organizations/third-parties/dialogs/UploadDataPrivacyAgreementDialog.tsx index 675660844..7ffeeeec0 100644 --- a/apps/console/src/pages/organizations/third-parties/dialogs/UploadDataPrivacyAgreementDialog.tsx +++ b/apps/console/src/pages/organizations/third-parties/dialogs/UploadDataPrivacyAgreementDialog.tsx @@ -38,8 +38,10 @@ const uploadDataPrivacyAgreementMutation = graphql` uploadThirdPartyDataPrivacyAgreement(input: $input) { thirdPartyDataPrivacyAgreement { id - fileName - fileUrl + file { + fileName + downloadUrl + } validFrom validUntil createdAt diff --git a/apps/console/src/pages/organizations/third-parties/tabs/ThirdPartyOverviewTab.tsx b/apps/console/src/pages/organizations/third-parties/tabs/ThirdPartyOverviewTab.tsx index 72ffc0f16..434d73f41 100644 --- a/apps/console/src/pages/organizations/third-parties/tabs/ThirdPartyOverviewTab.tsx +++ b/apps/console/src/pages/organizations/third-parties/tabs/ThirdPartyOverviewTab.tsx @@ -50,8 +50,10 @@ const thirdPartyBusinessAssociateAgreementFragment = graphql` fragment ThirdPartyOverviewTabBusinessAssociateAgreementFragment on ThirdParty { businessAssociateAgreement { id - fileName - fileUrl + file { + fileName + downloadUrl + } validFrom validUntil canUpdate: permission( @@ -68,8 +70,10 @@ const thirdPartyDataPrivacyAgreementFragment = graphql` fragment ThirdPartyOverviewTabDataPrivacyAgreementFragment on ThirdParty { dataPrivacyAgreement { id - fileName - fileUrl + file { + fileName + downloadUrl + } validFrom validUntil canUpdate: permission(action: "core:thirdParty-data-privacy-agreement:update") @@ -299,7 +303,7 @@ export default function ThirdPartyOverviewTab() {

{businessAssociateAgreement - ? businessAssociateAgreement.fileName + ? businessAssociateAgreement.file.fileName : __("No business associate agreement available")}

{(businessAssociateAgreement?.validFrom @@ -322,8 +326,8 @@ export default function ThirdPartyOverviewTab() { variant="secondary" onClick={() => downloadFile( - businessAssociateAgreement.fileUrl, - businessAssociateAgreement.fileName, + businessAssociateAgreement.file.downloadUrl, + businessAssociateAgreement.file.fileName, )} > {__("Download PDF")} @@ -343,7 +347,7 @@ export default function ThirdPartyOverviewTab() { {businessAssociateAgreement.canDelete && ( window.location.reload()} >