feat(warehouseTransfer): add create & delete transfer & details.

This commit is contained in:
elforjani13
2022-02-02 15:53:09 +02:00
committed by a.bouhuolia
parent 9089e3d120
commit d6b781a14c
21 changed files with 513 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
import React from 'react';
import intl from 'react-intl-universal';
// import {} from 'hooks/query';
import { useWarehouseTransfer } from 'hooks/query';
import { DrawerHeaderContent, DrawerLoading } from 'components';
const WarehouseTransferDetailDrawerContext = React.createContext();
@@ -9,17 +9,22 @@ const WarehouseTransferDetailDrawerContext = React.createContext();
* Warehouse transfer detail drawer provider.
*/
function WarehouseTransferDetailDrawerProvider({
warehouseTransferId,
warehouseTransferId = 5,
...props
}) {
// Handle fetch invoice detail.
const { data: warehouseTransfer, isLoading: isWarehouseTransferLoading } =
useWarehouseTransfer(warehouseTransferId, {
enabled: !!warehouseTransferId,
});
const provider = {
warehouseTransfer,
warehouseTransferId,
};
return (
<DrawerLoading
// loading={}
>
<DrawerLoading loading={isWarehouseTransferLoading}>
<DrawerHeaderContent
name="warehouse-transfer-detail-drawer"
title={intl.get('warehouse_transfer.drawer.title', {