Lint all the things

This commit is contained in:
Dave
2025-08-19 16:23:29 -04:00
parent f6d6b548be
commit 33fb60ca1a
640 changed files with 2129 additions and 3927 deletions

View File

@@ -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>
);
}

View File

@@ -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:

View File

@@ -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) =>

View File

@@ -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)));
}}
/>