feat(warehouseTransfer): warehouse transfer detail.

This commit is contained in:
elforjani13
2022-02-03 01:02:31 +02:00
parent 8bf64c68e0
commit e7024955dd
5 changed files with 19 additions and 7 deletions

View File

@@ -7,6 +7,7 @@ import { useDeleteWarehouseTransfer } from 'hooks/query';
import withAlertStoreConnect from 'containers/Alert/withAlertStoreConnect';
import withAlertActions from 'containers/Alert/withAlertActions';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { compose } from 'utils';
@@ -23,9 +24,12 @@ function WarehouseTransferDeleteAlert({
// #withAlertActions
closeAlert,
// #withDrawerActions
closeDrawer,
}) {
const { mutateAsync: deleteWarehouseTransferMutate, isLoading } =
useDeleteWarehouseTransfer();
useDeleteWarehouseTransfer();
// handle cancel delete warehouse alert.
const handleCancelDeleteAlert = () => {
@@ -40,6 +44,7 @@ function WarehouseTransferDeleteAlert({
message: intl.get('warehouse_transfer.alert.delete_message'),
intent: Intent.SUCCESS,
});
closeDrawer('warehouse-transfer-detail-drawer');
})
.catch(
({
@@ -76,4 +81,5 @@ function WarehouseTransferDeleteAlert({
export default compose(
withAlertStoreConnect(),
withAlertActions,
withDrawerActions,
)(WarehouseTransferDeleteAlert);