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";
@@ -35,8 +35,7 @@ export function PaymentsExportAllButton({
paymentIds,
disabled,
loadingCallback,
completedCallback,
refetch
completedCallback
}) {
const { t } = useTranslation();
const [updatePayments] = useMutation(UPDATE_PAYMENTS);
@@ -48,7 +47,7 @@ export function PaymentsExportAllButton({
setLoading(true);
if (loadingCallback) loadingCallback(true);
let PartnerResponse;
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
if (bodyshop.accountingconfig?.qbo) {
PartnerResponse = await axios.post(`/qbo/payments`, {
payments: paymentIds,
elgen: true
@@ -100,7 +99,7 @@ export function PaymentsExportAllButton({
})
})
);
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
variables: {
@@ -117,7 +116,7 @@ export function PaymentsExportAllButton({
});
}
} else {
if (!(bodyshop.accountingconfig && bodyshop.accountingconfig.qbo)) {
if (!bodyshop.accountingconfig?.qbo) {
//QBO Logs are handled server side.
await insertExportLog({
@@ -135,7 +134,7 @@ export function PaymentsExportAllButton({
const paymentUpdateResponse = await updatePayments({
variables: {
paymentIdList: successfulTransactions.map(
(st) => st[bodyshop.accountingconfig && bodyshop.accountingconfig.qbo ? "paymentid" : "id"]
(st) => st[bodyshop.accountingconfig?.qbo ? "paymentid" : "id"]
),
payment: {
exportedat: new Date()
@@ -164,11 +163,7 @@ export function PaymentsExportAllButton({
message: t("payments.successes.exported")
});
updatePaymentCache([
...new Set(
successfulTransactions.map(
(st) => st[bodyshop.accountingconfig && bodyshop.accountingconfig.qbo ? "paymentid" : "id"]
)
)
...new Set(successfulTransactions.map((st) => st[bodyshop.accountingconfig?.qbo ? "paymentid" : "id"]))
]);
}
}