Revert "IO-1567 Resolve refretch on export."
This reverts commit cd191dae70.
This commit is contained in:
@@ -15,6 +15,7 @@ import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
currentUser: selectCurrentUser,
|
||||
@@ -29,7 +30,7 @@ export function JobsCloseExportButton({
|
||||
}) {
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
const [updateJob] = useMutation(UPDATE_JOB, {});
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -45,9 +46,13 @@ export function JobsCloseExportButton({
|
||||
//Check if it's a QBO Setup.
|
||||
let PartnerResponse;
|
||||
if (bodyshop.accountingconfig && bodyshop.accountingconfig.qbo) {
|
||||
PartnerResponse = await axios.post(`/qbo/receivables`, {
|
||||
jobIds: [jobId],
|
||||
});
|
||||
PartnerResponse = await axios.post(
|
||||
`/qbo/receivables`,
|
||||
{
|
||||
jobIds: [jobId],
|
||||
},
|
||||
|
||||
);
|
||||
} else {
|
||||
//Default is QBD
|
||||
|
||||
@@ -150,7 +155,6 @@ export function JobsCloseExportButton({
|
||||
date_exported: new Date(),
|
||||
},
|
||||
},
|
||||
refetchQueries: ["QUERY_JOBS_FOR_EXPORT "],
|
||||
});
|
||||
|
||||
if (!jobUpdateResponse.errors) {
|
||||
|
||||
@@ -28,9 +28,7 @@ export function JobsExportAllButton({
|
||||
completedCallback,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateJob] = useMutation(UPDATE_JOBS, {
|
||||
refetchQueries: ["QUERY_JOBS_FOR_EXPORT "],
|
||||
});
|
||||
const [updateJob] = useMutation(UPDATE_JOBS);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
@@ -29,9 +29,7 @@ export function PayableExportAll({
|
||||
completedCallback,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateBill] = useMutation(UPDATE_BILLS, {
|
||||
refetchQueries: ["QUERY_BILLS_FOR_EXPORT "],
|
||||
});
|
||||
const [updateBill] = useMutation(UPDATE_BILLS);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
|
||||
@@ -28,9 +28,7 @@ export function PayableExportButton({
|
||||
setSelectedBills,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateBill] = useMutation(UPDATE_BILLS, {
|
||||
refetchQueries: ["QUERY_BILLS_FOR_EXPORT "],
|
||||
});
|
||||
const [updateBill] = useMutation(UPDATE_BILLS);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
|
||||
@@ -28,9 +28,7 @@ export function PaymentExportButton({
|
||||
setSelectedPayments,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updatePayment] = useMutation(UPDATE_PAYMENTS, {
|
||||
refetchQueries: ["QUERY_PAYMENTS_FOR_EXPORT "],
|
||||
});
|
||||
const [updatePayment] = useMutation(UPDATE_PAYMENTS);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
|
||||
@@ -27,9 +27,7 @@ export function PaymentsExportAllButton({
|
||||
completedCallback,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updatePayments] = useMutation(UPDATE_PAYMENTS, {
|
||||
refetchQueries: ["QUERY_PAYMENTS_FOR_EXPORT "],
|
||||
});
|
||||
const [updatePayments] = useMutation(UPDATE_PAYMENTS);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [insertExportLog] = useMutation(INSERT_EXPORT_LOG);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user