IO-1307 Resolve table check error on export tables.
This commit is contained in:
@@ -121,6 +121,7 @@ export default function AccountingPayablesTableComponent({ loading, bills }) {
|
||||
billId={record.id}
|
||||
disabled={transInProgress || !!record.exported}
|
||||
loadingCallback={setTransInProgress}
|
||||
setSelectedBills={setSelectedBills}
|
||||
/>
|
||||
</div>
|
||||
),
|
||||
|
||||
@@ -120,6 +120,7 @@ export default function AccountingPayablesTableComponent({
|
||||
paymentId={record.id}
|
||||
disabled={transInProgress || !!record.exportedat}
|
||||
loadingCallback={setTransInProgress}
|
||||
setSelectedPayments={setSelectedPayments}
|
||||
/>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -125,6 +125,7 @@ export default function AccountingReceivablesTableComponent({ loading, jobs }) {
|
||||
<JobExportButton
|
||||
jobId={record.id}
|
||||
disabled={!!record.date_exported}
|
||||
setSelectedJobs={setSelectedJobs}
|
||||
/>
|
||||
<Link to={`/manage/jobs/${record.id}/close`}>
|
||||
<Button>{t("jobs.labels.viewallocations")}</Button>
|
||||
|
||||
@@ -24,6 +24,7 @@ export function JobsCloseExportButton({
|
||||
currentUser,
|
||||
jobId,
|
||||
disabled,
|
||||
setSelectedJobs,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateJob] = useMutation(UPDATE_JOB);
|
||||
@@ -147,6 +148,11 @@ export function JobsCloseExportButton({
|
||||
}),
|
||||
});
|
||||
}
|
||||
if (setSelectedJobs) {
|
||||
setSelectedJobs((selectedJobs) => {
|
||||
return selectedJobs.filter((i) => i.id !== jobId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setLoading(false);
|
||||
|
||||
@@ -25,6 +25,7 @@ export function PayableExportButton({
|
||||
billId,
|
||||
disabled,
|
||||
loadingCallback,
|
||||
setSelectedBills,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updateBill] = useMutation(UPDATE_BILLS);
|
||||
@@ -142,6 +143,11 @@ export function PayableExportButton({
|
||||
}),
|
||||
});
|
||||
}
|
||||
if (setSelectedBills) {
|
||||
setSelectedBills((selectedBills) => {
|
||||
return selectedBills.filter((i) => i.id !== billId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!!loadingCallback) loadingCallback(false);
|
||||
|
||||
@@ -24,6 +24,7 @@ export function PaymentExportButton({
|
||||
paymentId,
|
||||
disabled,
|
||||
loadingCallback,
|
||||
setSelectedPayments,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const [updatePayment] = useMutation(UPDATE_PAYMENTS);
|
||||
@@ -141,6 +142,12 @@ export function PaymentExportButton({
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
if (setSelectedPayments) {
|
||||
setSelectedPayments((selectedBills) => {
|
||||
return selectedBills.filter((i) => i.id !== paymentId);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (!!loadingCallback) loadingCallback(false);
|
||||
|
||||
Reference in New Issue
Block a user