Lint all the things
This commit is contained in:
@@ -51,7 +51,7 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier,
|
||||
a.href = url;
|
||||
a.download = `${identifier || "documents"}.zip`;
|
||||
a.click();
|
||||
} catch (error) {
|
||||
} catch {
|
||||
setLoading(false);
|
||||
setDownload(null);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier,
|
||||
|
||||
// Use the response data (Blob) to trigger download
|
||||
standardMediaDownload(response.data);
|
||||
} catch (error) {
|
||||
} catch {
|
||||
setLoading(false);
|
||||
setDownload(null);
|
||||
// handle error (optional)
|
||||
@@ -82,13 +82,11 @@ export function JobsDocumentsImgproxyDownloadButton({ galleryImages, identifier,
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button loading={download || loading} disabled={imagesToDownload.length < 1} onClick={handleDownload}>
|
||||
<Space>
|
||||
<span>{t("documents.actions.download")}</span>
|
||||
{download && <span>{`(${formatBytes(download.downloaded)} @ ${formatBytes(download.speed)} / second)`}</span>}
|
||||
</Space>
|
||||
</Button>
|
||||
</>
|
||||
<Button loading={download || loading} disabled={imagesToDownload.length < 1} onClick={handleDownload}>
|
||||
<Space>
|
||||
<span>{t("documents.actions.download")}</span>
|
||||
{download && <span>{`(${formatBytes(download.downloaded)} @ ${formatBytes(download.speed)} / second)`}</span>}
|
||||
</Space>
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -10,13 +10,15 @@ import { GET_DOC_SIZE_BY_JOB } from "../../graphql/documents.queries.js";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors.js";
|
||||
import JobSearchSelect from "../job-search-select/job-search-select.component.jsx";
|
||||
import { isFunction } from "lodash";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
const mapDispatchToProps = () => ({
|
||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||
});
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobsDocumentsImgproxyGalleryReassign);
|
||||
|
||||
/*
|
||||
################################################################################################
|
||||
Developer Note:
|
||||
|
||||
@@ -22,7 +22,8 @@ import JobsDocumentsGallerySelectAllComponent from "./jobs-documents-imgproxy-ga
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
});
|
||||
const mapDispatchToProps = (dispatch) => ({});
|
||||
const mapDispatchToProps = () => ({});
|
||||
|
||||
/*
|
||||
################################################################################################
|
||||
Developer Note:
|
||||
@@ -120,7 +121,7 @@ function JobsDocumentsImgproxyComponent({
|
||||
<Card title={t("jobs.labels.documents-images")}>
|
||||
<Gallery
|
||||
images={galleryImages.images}
|
||||
onClick={(index, item) => {
|
||||
onClick={(index) => {
|
||||
setModalState({ open: true, index: index });
|
||||
// window.open(
|
||||
// item.fullsize,
|
||||
@@ -128,7 +129,7 @@ function JobsDocumentsImgproxyComponent({
|
||||
// "toolbar=0,location=0,menubar=0"
|
||||
// );
|
||||
}}
|
||||
onSelect={(index, image) => {
|
||||
onSelect={(index) => {
|
||||
setGalleryImages({
|
||||
...galleryImages,
|
||||
images: galleryImages.images.map((g, idx) =>
|
||||
|
||||
@@ -22,7 +22,7 @@ function JobsDocumentImgproxyGalleryExternal({ jobId, externalMediaState }) {
|
||||
<Gallery
|
||||
images={galleryImages}
|
||||
backdropClosesModal={true}
|
||||
onSelect={(index, image) => {
|
||||
onSelect={(index) => {
|
||||
setgalleryImages(galleryImages.map((g, idx) => (index === idx ? { ...g, isSelected: !g.isSelected } : g)));
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user