feat(warehouseTransfer): warehouse transfer detail.

This commit is contained in:
elforjani13
2022-02-03 01:02:31 +02:00
committed by a.bouhuolia
parent 731ecaeeb3
commit a50d6358f4
5 changed files with 19 additions and 7 deletions

View File

@@ -34,15 +34,18 @@ function WarehouseTransferDetailActionsBar({
}) {
const history = useHistory();
const { warehouseTransferId, warehouseTransfer } =
useWarehouseDetailDrawerContext();
// Handle edit warehosue transfer.
const handleEditWarehosueTransfer = () => {
// history.push(`/warehouse-transfers/${warehouseTransferId}/edit`);
history.push(`/warehouses-transfers/${warehouseTransferId}/edit`);
closeDrawer('warehouse-transfer-detail-drawer');
};
// Handle delete warehouse transfer.
const handleDeletetWarehosueTransfer = () => {
// openAlert('warehouse-transfer-delete', { warehouseTransferId });
openAlert('warehouse-transfer-delete', { warehouseTransferId });
};
return (

View File

@@ -28,7 +28,9 @@ function WarehouseTransferDetailDrawerProvider({
<DrawerHeaderContent
name="warehouse-transfer-detail-drawer"
title={intl.get('warehouse_transfer.drawer.title', {
number: 'W-10',
number: warehouseTransfer.transaction_number
? `(${warehouseTransfer.transaction_number})`
: null,
})}
/>
<WarehouseTransferDetailDrawerContext.Provider

View File

@@ -25,7 +25,7 @@ export default function WarehouseTransferDetailHeader() {
<CommercialDocHeader>
<DetailsMenu direction={'horizantal'} minLabelSize={'180px'}>
<DetailItem label={intl.get('date')}>
<FormatDate value={warehouseTransfer.date} />
<FormatDate value={warehouseTransfer.formatted_date} />
</DetailItem>
<DetailItem