mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 22:30:31 +00:00
BIG-37: fix close drawer when delete payment made.
This commit is contained in:
@@ -6,6 +6,7 @@ import { AppToaster } from 'components';
|
|||||||
|
|
||||||
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
|
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
|
||||||
import withAlertActions from 'containers/Alert/withAlertActions';
|
import withAlertActions from 'containers/Alert/withAlertActions';
|
||||||
|
import withDrawerActions from 'containers/Drawer/withDrawerActions';
|
||||||
|
|
||||||
import { useDeletePaymentMade } from 'hooks/query';
|
import { useDeletePaymentMade } from 'hooks/query';
|
||||||
|
|
||||||
@@ -23,12 +24,12 @@ function PaymentMadeDeleteAlert({
|
|||||||
|
|
||||||
// #withAlertActions
|
// #withAlertActions
|
||||||
closeAlert,
|
closeAlert,
|
||||||
|
|
||||||
|
// #withDrawerActions
|
||||||
|
closeDrawer,
|
||||||
}) {
|
}) {
|
||||||
|
const { mutateAsync: deletePaymentMadeMutate, isLoading } =
|
||||||
const {
|
useDeletePaymentMade();
|
||||||
mutateAsync: deletePaymentMadeMutate,
|
|
||||||
isLoading,
|
|
||||||
} = useDeletePaymentMade();
|
|
||||||
|
|
||||||
// Handle cancel payment made.
|
// Handle cancel payment made.
|
||||||
const handleCancelPaymentMadeDelete = () => {};
|
const handleCancelPaymentMadeDelete = () => {};
|
||||||
@@ -41,6 +42,7 @@ function PaymentMadeDeleteAlert({
|
|||||||
message: intl.get('the_payment_made_has_been_deleted_successfully'),
|
message: intl.get('the_payment_made_has_been_deleted_successfully'),
|
||||||
intent: Intent.SUCCESS,
|
intent: Intent.SUCCESS,
|
||||||
});
|
});
|
||||||
|
closeDrawer('payment-made-detail-drawer');
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
closeAlert(name);
|
closeAlert(name);
|
||||||
@@ -68,4 +70,5 @@ function PaymentMadeDeleteAlert({
|
|||||||
export default compose(
|
export default compose(
|
||||||
withAlertStoreConnect(),
|
withAlertStoreConnect(),
|
||||||
withAlertActions,
|
withAlertActions,
|
||||||
|
withDrawerActions,
|
||||||
)(PaymentMadeDeleteAlert);
|
)(PaymentMadeDeleteAlert);
|
||||||
|
|||||||
Reference in New Issue
Block a user