From 36b0544fd1ea73cd08d1a4343edf6a8a168111fa Mon Sep 17 00:00:00 2001 From: Mohamed Marrouchi Date: Fri, 17 Jan 2025 07:17:25 +0100 Subject: [PATCH] fix: media library --- frontend/src/components/media-library/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/media-library/index.tsx b/frontend/src/components/media-library/index.tsx index 51a2213d..4409cd44 100644 --- a/frontend/src/components/media-library/index.tsx +++ b/frontend/src/components/media-library/index.tsx @@ -1,11 +1,12 @@ /* - * Copyright © 2024 Hexastack. All rights reserved. + * Copyright © 2025 Hexastack. All rights reserved. * * Licensed under the GNU Affero General Public License v3.0 (AGPLv3) with the following additional terms: * 1. The name "Hexabot" is a trademark of Hexastack. You may not use this name in derivative works without express written permission. * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ + import DriveFolderUploadIcon from "@mui/icons-material/DriveFolderUpload"; import { Box, Grid, Paper } from "@mui/material"; import { GridColDef, GridEventListener } from "@mui/x-data-grid"; @@ -32,7 +33,10 @@ import { PermissionAction } from "@/types/permission.types"; import { TFilterStringFields } from "@/types/search.types"; import { getDateTimeFormatter } from "@/utils/date"; -import { IAttachment } from "../../types/attachment.types"; +import { + AttachmentResourceRef, + IAttachment, +} from "../../types/attachment.types"; type MediaLibraryProps = { showTitle?: boolean; @@ -53,6 +57,10 @@ export const MediaLibrary = ({ onSelect, accept }: MediaLibraryProps) => { { params: { where: { + resourceRef: [ + AttachmentResourceRef.BlockAttachment, + AttachmentResourceRef.ContentAttachment, + ], ...searchPayload.where, or: { ...searchPayload.where.or,