diff --git a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx index 1c0f106e1..8d783557e 100644 --- a/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx +++ b/client/src/components/jobs-close-export-button/jobs-close-export-button.component.jsx @@ -51,7 +51,7 @@ export function JobsCloseExportButton({ { jobIds: [jobId], }, - { withCredentials: true } + ); } else { //Default is QBD diff --git a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.exportcustdata.component.jsx b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.exportcustdata.component.jsx index 6afef83ad..671d49929 100644 --- a/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.exportcustdata.component.jsx +++ b/client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.exportcustdata.component.jsx @@ -23,14 +23,10 @@ export function JobsDetailHeaderActionexportCustomerData({ logImEXEvent("job_export_cust_data"); let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/receivables`, - { - jobIds: [job.id], - custDataOnly: true, - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/receivables`, { + jobIds: [job.id], + custDataOnly: true, + }); } else { //Default is QBD diff --git a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx index 71098b524..80aa92f7f 100644 --- a/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx +++ b/client/src/components/jobs-export-all-button/jobs-export-all-button.component.jsx @@ -11,7 +11,7 @@ import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries"; import { UPDATE_JOBS } from "../../graphql/jobs.queries"; import { selectBodyshop, - selectCurrentUser + selectCurrentUser, } from "../../redux/user/user.selectors"; const mapStateToProps = createStructuredSelector({ @@ -30,7 +30,6 @@ export function JobsExportAllButton({ const { t } = useTranslation(); const [updateJob] = useMutation(UPDATE_JOBS); const [insertExportLog] = useMutation(INSERT_EXPORT_LOG); - const [loading, setLoading] = useState(false); const handleQbxml = async () => { @@ -38,13 +37,9 @@ export function JobsExportAllButton({ let PartnerResponse; setLoading(true); if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/receivables`, - { - jobIds: jobIds, - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/receivables`, { + jobIds: jobIds, + }); } else { let QbXmlResponse; try { diff --git a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx index ea02a4293..137fdabe0 100644 --- a/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx +++ b/client/src/components/payable-export-all-button/payable-export-all-button.component.jsx @@ -15,7 +15,6 @@ import { logImEXEvent } from "../../firebase/firebase.utils"; import _ from "lodash"; import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries"; - const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, currentUser: selectCurrentUser, @@ -34,7 +33,6 @@ export function PayableExportAll({ const [loading, setLoading] = useState(false); const [insertExportLog] = useMutation(INSERT_EXPORT_LOG); - const handleQbxml = async () => { logImEXEvent("accounting_payables_export_all"); let PartnerResponse; @@ -42,13 +40,9 @@ export function PayableExportAll({ setLoading(true); if (!!loadingCallback) loadingCallback(true); if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/receivables`, - { - bills: billids, - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/receivables`, { + bills: billids, + }); } else { let QbXmlResponse; try { diff --git a/client/src/components/payable-export-button/payable-export-button.component.jsx b/client/src/components/payable-export-button/payable-export-button.component.jsx index a43a93f39..17a2acedb 100644 --- a/client/src/components/payable-export-button/payable-export-button.component.jsx +++ b/client/src/components/payable-export-button/payable-export-button.component.jsx @@ -14,7 +14,6 @@ import { import { logImEXEvent } from "../../firebase/firebase.utils"; import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries"; - const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, currentUser: selectCurrentUser, @@ -32,7 +31,6 @@ export function PayableExportButton({ const [updateBill] = useMutation(UPDATE_BILLS); const [loading, setLoading] = useState(false); const [insertExportLog] = useMutation(INSERT_EXPORT_LOG); - const handleQbxml = async () => { logImEXEvent("accounting_export_payable"); @@ -43,13 +41,9 @@ export function PayableExportButton({ //Check if it's a QBO Setup. let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/payables`, - { - bills: [billId], - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/payables`, { + bills: [billId], + }); } else { //Default is QBD diff --git a/client/src/components/payment-export-button/payment-export-button.component.jsx b/client/src/components/payment-export-button/payment-export-button.component.jsx index f57864818..0d50032c4 100644 --- a/client/src/components/payment-export-button/payment-export-button.component.jsx +++ b/client/src/components/payment-export-button/payment-export-button.component.jsx @@ -9,7 +9,6 @@ import { auth, logImEXEvent } from "../../firebase/firebase.utils"; import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries"; import { UPDATE_PAYMENTS } from "../../graphql/payments.queries"; - import { selectBodyshop, selectCurrentUser, @@ -33,20 +32,15 @@ export function PaymentExportButton({ const [loading, setLoading] = useState(false); const [insertExportLog] = useMutation(INSERT_EXPORT_LOG); - const handleQbxml = async () => { logImEXEvent("accounting_payment_export"); setLoading(true); //Check if it's a QBO Setup. let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/payments`, - { - payments: [paymentId], - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/payments`, { + payments: [paymentId], + }); } else { //Default is QBD diff --git a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx index a70cd6d0c..b24536210 100644 --- a/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx +++ b/client/src/components/payments-export-all-button/payments-export-all-button.component.jsx @@ -9,7 +9,6 @@ import { createStructuredSelector } from "reselect"; import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries"; import { UPDATE_PAYMENTS } from "../../graphql/payments.queries"; - import { selectBodyshop, selectCurrentUser, @@ -32,19 +31,14 @@ export function PaymentsExportAllButton({ const [loading, setLoading] = useState(false); const [insertExportLog] = useMutation(INSERT_EXPORT_LOG); - const handleQbxml = async () => { setLoading(true); if (!!loadingCallback) loadingCallback(true); let PartnerResponse; if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) { - PartnerResponse = await axios.post( - `/qbo/payments`, - { - payments: paymentIds, - }, - { withCredentials: true } - ); + PartnerResponse = await axios.post(`/qbo/payments`, { + payments: paymentIds, + }); } else { let QbXmlResponse; try {