Added unknown file icon IO-525

This commit is contained in:
Patrick Fic
2021-02-22 13:04:12 -08:00
parent 6bdf5b8499
commit 67bfb48c95
4 changed files with 8 additions and 2 deletions

BIN
client/public/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
client/src/assets/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -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] &&

View File

@@ -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
? [