diff --git a/client/public/file.png b/client/public/file.png new file mode 100644 index 000000000..feee2cb8f Binary files /dev/null and b/client/public/file.png differ diff --git a/client/src/assets/file.png b/client/src/assets/file.png new file mode 100644 index 000000000..feee2cb8f Binary files /dev/null and b/client/src/assets/file.png differ diff --git a/client/src/components/chat-media-selector/chat-media-selector.component.jsx b/client/src/components/chat-media-selector/chat-media-selector.component.jsx index c2734403f..7d8282ba4 100644 --- a/client/src/components/chat-media-selector/chat-media-selector.component.jsx +++ b/client/src/components/chat-media-selector/chat-media-selector.component.jsx @@ -25,7 +25,7 @@ export function ChatMediaSelector({ }) { const { t } = useTranslation(); console.log("conversation", conversation); - const { loading, error, data, refetch } = useQuery(GET_DOCUMENTS_BY_JOB, { + const { loading, error, data } = useQuery(GET_DOCUMENTS_BY_JOB, { variables: { jobId: conversation.job_conversations[0] && diff --git a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx index 4fe08b8fe..b118557f3 100644 --- a/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx +++ b/client/src/components/jobs-documents-gallery/jobs-documents-gallery.component.jsx @@ -50,13 +50,14 @@ function JobsDocumentsComponent({ thumb = `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${fileType}/upload/c_fill,f_png,h_250,w_250/${value.key}`; break; case "raw": - thumb = ""; + thumb = `${window.location.origin}/file.png`; break; default: thumb = `${process.env.REACT_APP_CLOUDINARY_ENDPOINT}/${fileType}/upload/${process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS}/${value.key}`; break; } + const fileName = value.key.split("/").pop(); acc.other.push({ src: `${ process.env.REACT_APP_CLOUDINARY_ENDPOINT @@ -65,6 +66,11 @@ function JobsDocumentsComponent({ }${fileType === "raw" ? `.${value.extension}` : ""}`, thumbnail: thumb, tags: [ + { + value: fileName, + title: fileName, + }, + { value: value.type, title: value.type }, ...(value.bill ? [