IO-1855 Change QBO changes to server side.
This commit is contained in:
@@ -45,7 +45,7 @@ export function AccountingPayablesContainer({
|
||||
checkPartnerStatus(bodyshop, true);
|
||||
}, [t, setBreadcrumbs, setSelectedHeader, bodyshop]);
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_BILLS_FOR_EXPORT, {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_BILLS_FOR_EXPORT, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
@@ -73,6 +73,7 @@ export function AccountingPayablesContainer({
|
||||
<AccountingPayablesTable
|
||||
loadaing={loading}
|
||||
bills={data ? data.bills : []}
|
||||
refetch={refetch}
|
||||
/>
|
||||
</RbacWrapper>
|
||||
</div>
|
||||
|
||||
@@ -44,10 +44,13 @@ export function AccountingPaymentsContainer({
|
||||
checkPartnerStatus(bodyshop, true);
|
||||
}, [t, setBreadcrumbs, setSelectedHeader, bodyshop]);
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_PAYMENTS_FOR_EXPORT, {
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
});
|
||||
const { loading, error, data, refetch } = useQuery(
|
||||
QUERY_PAYMENTS_FOR_EXPORT,
|
||||
{
|
||||
fetchPolicy: "network-only",
|
||||
nextFetchPolicy: "network-only",
|
||||
}
|
||||
);
|
||||
|
||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||
const noPath =
|
||||
@@ -70,6 +73,7 @@ export function AccountingPaymentsContainer({
|
||||
<AccountingPaymentsTable
|
||||
loadaing={loading}
|
||||
payments={data ? data.payments : []}
|
||||
refetch={refetch}
|
||||
/>
|
||||
</RbacWrapper>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@ export function AccountingReceivablesContainer({
|
||||
checkPartnerStatus(bodyshop, true);
|
||||
}, [t, setBreadcrumbs, setSelectedHeader, bodyshop]);
|
||||
|
||||
const { loading, error, data } = useQuery(QUERY_JOBS_FOR_EXPORT, {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_JOBS_FOR_EXPORT, {
|
||||
variables: {
|
||||
invoicedStatus: bodyshop.md_ro_statuses.default_invoiced || "Invoiced*",
|
||||
},
|
||||
@@ -75,6 +75,7 @@ export function AccountingReceivablesContainer({
|
||||
<AccountingReceivablesTable
|
||||
loadaing={loading}
|
||||
jobs={data ? data.jobs : []}
|
||||
refetch={refetch}
|
||||
/>
|
||||
</RbacWrapper>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user