refactoring: sales tables.

refacoring: purchases tables.
This commit is contained in:
a.bouhuolia
2021-02-11 20:45:06 +02:00
parent 3901c336df
commit d48532a7e6
210 changed files with 2799 additions and 5392 deletions

View File

@@ -10,7 +10,6 @@ import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
import withAlertActions from 'containers/Alert/withAlertActions';
import { useDeleteBill } from 'hooks/query';
import { compose } from 'utils';
/**
@@ -29,12 +28,12 @@ function BillDeleteAlert({
const { formatMessage } = useIntl();
const { isLoading, mutateAsync: deleteBillMutate } = useDeleteBill();
// handle cancel Bill
// Handle cancel Bill
const handleCancel = () => {
closeAlert(name);
};
// handleConfirm delete invoice
// Handle confirm delete invoice
const handleConfirmBillDelete = () => {
deleteBillMutate(billId).then(() => {
AppToaster.show({

View File

@@ -40,8 +40,9 @@ function BillOpenAlert({
}),
intent: Intent.SUCCESS,
});
closeAlert(name);
})
.finally((error) => {
.catch((error) => {
closeAlert(name);
});
};