IO-3092 Implement delete, move and download on image proxy. Add imgproxy based components.
This commit is contained in:
@@ -2,6 +2,7 @@ import { useQuery } from "@apollo/client";
|
||||
import React from "react";
|
||||
import AlertComponent from "../../components/alert/alert.component";
|
||||
import JobsDocumentsComponent from "../../components/jobs-documents-gallery/jobs-documents-gallery.component";
|
||||
import JobsDocumentsContainer from "../../components/jobs-documents-gallery/jobs-documents-gallery.container";
|
||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||
import { QUERY_TEMPORARY_DOCS } from "../../graphql/documents.queries";
|
||||
|
||||
@@ -22,7 +23,7 @@ export function TemporaryDocsComponent({ bodyshop }) {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_TEMPORARY_DOCS, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
skip: bodyshop.uselocalmediaserver
|
||||
skip: bodyshop.uselocalmediaserver //TODO: Add skip if imgproxy is enabled.
|
||||
});
|
||||
|
||||
if (loading) return <LoadingSpinner />;
|
||||
@@ -32,12 +33,14 @@ export function TemporaryDocsComponent({ bodyshop }) {
|
||||
return <JobsDocumentsLocalGallery job={{ id: "temporary" }} />;
|
||||
}
|
||||
return (
|
||||
<JobsDocumentsComponent
|
||||
data={data ? data.documents : []}
|
||||
jobId={null}
|
||||
billId={null}
|
||||
refetch={refetch}
|
||||
ignoreSizeLimit
|
||||
/>
|
||||
<>
|
||||
<JobsDocumentsContainer
|
||||
documentsList={data ? data.documents : []}
|
||||
jobId={null}
|
||||
billId={null}
|
||||
refetchOverride={refetch}
|
||||
ignoreSizeLimit
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user