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

@@ -2,7 +2,7 @@ import { useMutation } from "@apollo/client";
import { Button } from "antd";
import axios from "axios";
import _ from "lodash";
import React, { useState } from "react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
@@ -42,7 +42,6 @@ export function JobsExportAllButton({
disabled,
loadingCallback,
completedCallback,
refetch,
insertAuditTrail
}) {
const { t } = useTranslation();
@@ -55,7 +54,7 @@ export function JobsExportAllButton({
logImEXEvent("jobs_export_all");
let PartnerResponse;
setLoading(true);
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
if (bodyshop.accountingconfig?.qbo) {
PartnerResponse = await axios.post(`/qbo/receivables`, {
jobIds: jobIds,
elgen: true
@@ -125,7 +124,7 @@ export function JobsExportAllButton({
//Call is not awaited as it is not critical to finish before proceeding.
});
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
variables: {
@@ -142,7 +141,7 @@ export function JobsExportAllButton({
});
}
} else {
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
variables: {
@@ -189,18 +188,14 @@ export function JobsExportAllButton({
});
}
}
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo && successfulTransactions.length > 0) {
if (bodyshop.accountingconfig?.qbo && successfulTransactions.length > 0) {
notification.open({
type: "success",
key: "jobsuccessexport",
message: t("jobs.successes.exported")
});
const successfulTransactionsSet = [
...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 (successfulTransactionsSet.length > 0) {
insertAuditTrail({