IO-3307 Resolve bill document for imgproxy.
This commit is contained in:
@@ -46,8 +46,8 @@ function JobsDocumentsImgproxyComponent({
|
||||
const [modalState, setModalState] = useState({ open: false, index: 0 });
|
||||
|
||||
const fetchThumbnails = useCallback(() => {
|
||||
fetchImgproxyThumbnails({ setStateCallback: setGalleryImages, jobId });
|
||||
}, [jobId, setGalleryImages]);
|
||||
fetchImgproxyThumbnails({ setStateCallback: setGalleryImages, jobId, billId });
|
||||
}, [jobId, billId, setGalleryImages]);
|
||||
|
||||
useEffect(() => {
|
||||
if (data) {
|
||||
@@ -208,8 +208,8 @@ function JobsDocumentsImgproxyComponent({
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsDocumentsImgproxyComponent);
|
||||
|
||||
export const fetchImgproxyThumbnails = async ({ setStateCallback, jobId, imagesOnly }) => {
|
||||
const result = await axios.post("/media/imgproxy/thumbnails", { jobid: jobId });
|
||||
export const fetchImgproxyThumbnails = async ({ setStateCallback, jobId, billId, imagesOnly }) => {
|
||||
const result = await axios.post("/media/imgproxy/thumbnails", { jobid: jobId, billid: billId });
|
||||
const documents = result.data.reduce(
|
||||
(acc, value) => {
|
||||
if (value.type.startsWith("image")) {
|
||||
|
||||
Reference in New Issue
Block a user