BIG-19 fix: scrollable area on details drawer.

This commit is contained in:
a.bouhuolia
2021-09-12 10:16:34 +02:00
parent e710edb0a1
commit d446300a71
38 changed files with 153 additions and 95 deletions

View File

@@ -16,6 +16,7 @@ export default function InventoryAdjustmentDetail() {
return (
<div className={clsx(InventoryAdjustmentDrawerCls.detail_panel)}>
<InventoryAdjustmentDetailActionsBar />
<Card>
<InventoryAdjustmentDetailHeader />
<InventoryAdjustmentDetailTable />

View File

@@ -26,9 +26,7 @@ function InventoryAdjustmentDetailActionsBar({
// Handle delete inventory adjustment.
const handleDeleteInventoryAdjustment = () => {
openAlert('inventory-adjustment-delete', {
inventoryId,
});
openAlert('inventory-adjustment-delete', { inventoryId });
closeDrawer('inventory-adjustment-drawer');
};

View File

@@ -1,4 +1,5 @@
import React from 'react';
import { DrawerBody } from 'components';
import InventoryAdjustmentDetail from './InventoryAdjustmentDetail';
import { InventoryAdjustmentDrawerProvider } from './InventoryAdjustmentDrawerProvider';
@@ -9,7 +10,9 @@ import { InventoryAdjustmentDrawerProvider } from './InventoryAdjustmentDrawerPr
export default function InventoryAdjustmentDrawerContent({ inventoryId }) {
return (
<InventoryAdjustmentDrawerProvider inventoryId={inventoryId}>
<InventoryAdjustmentDetail />
<DrawerBody>
<InventoryAdjustmentDetail />
</DrawerBody>
</InventoryAdjustmentDrawerProvider>
);
}

View File

@@ -1,6 +1,6 @@
import React from 'react';
import intl from 'react-intl-universal';
import { DrawerHeaderContent, DashboardInsider } from 'components';
import { DrawerHeaderContent, DrawerLoading } from 'components';
import { useInventoryAdjustment } from 'hooks/query';
const InventoryAdjustmentDrawerContext = React.createContext();
@@ -22,14 +22,13 @@ function InventoryAdjustmentDrawerProvider({ inventoryId, ...props }) {
};
return (
<DashboardInsider loading={isAdjustmentsLoading}>
<DrawerLoading loading={isAdjustmentsLoading}>
<DrawerHeaderContent
name="inventory-adjustment-drawer"
title={intl.get('inventory_adjustment.details_drawer.title')}
/>
<InventoryAdjustmentDrawerContext.Provider value={provider} {...props} />
</DashboardInsider>
</DrawerLoading>
);
}