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

@@ -1,7 +1,7 @@
import { useMutation } from "@apollo/client";
import { Button } from "antd";
import axios from "axios";
import React, { useState } from "react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useNavigate } from "react-router-dom";
@@ -35,15 +35,7 @@ function updateJobCache(items) {
});
}
export function JobsCloseExportButton({
bodyshop,
currentUser,
jobId,
disabled,
setSelectedJobs,
refetch,
insertAuditTrail
}) {
export function JobsCloseExportButton({ bodyshop, currentUser, jobId, disabled, setSelectedJobs, insertAuditTrail }) {
const history = useNavigate();
const { t } = useTranslation();
const [updateJob] = useMutation(UPDATE_JOB);
@@ -62,7 +54,7 @@ export function JobsCloseExportButton({
setLoading(true);
//Check if it's a QBO Setup.
let PartnerResponse;
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
if (bodyshop.accountingconfig?.qbo) {
PartnerResponse = await axios.post(`/qbo/receivables`, {
jobIds: [jobId],
elgen: true
@@ -132,7 +124,7 @@ export function JobsCloseExportButton({
});
});
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
variables: {
@@ -150,7 +142,7 @@ export function JobsCloseExportButton({
}
} else {
//Insert success export log.
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
variables: {
@@ -195,7 +187,7 @@ export function JobsCloseExportButton({
});
}
}
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo && successfulTransactions.length > 0) {
if (bodyshop.accountingconfig?.qbo && successfulTransactions.length > 0) {
notification.open({
type: "success",
key: "jobsuccessexport",
@@ -207,11 +199,7 @@ export function JobsCloseExportButton({
type: "jobexported"
});
updateJobCache([
...new Set(
successfulTransactions.map(
(st) => st[bodyshop.accountingconfig && bodyshop.accountingconfig.qbo ? "jobid" : "id"]
)
)
...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "jobid" : "id"]))
]);
}
if (setSelectedJobs) {