feat: refactoring alerts.

This commit is contained in:
elforjani13
2021-10-31 13:13:38 +02:00
parent 60f45f281a
commit ea466404ec
34 changed files with 264 additions and 227 deletions

View File

@@ -3,7 +3,6 @@ import React from 'react';
import 'style/pages/InventoryAdjustments/List.scss';
import { DashboardContentTable, DashboardPageContent } from 'components';
import InventoryAdjustmentsAlerts from './InventoryAdjustmentsAlerts';
import { InventoryAdjustmentsProvider } from './InventoryAdjustmentsProvider';
import InventoryAdjustmentTable from './InventoryAdjustmentTable';
@@ -28,7 +27,7 @@ function InventoryAdjustmentList({
<InventoryAdjustmentTable />
</DashboardContentTable>
<InventoryAdjustmentsAlerts />
</DashboardPageContent>
</InventoryAdjustmentsProvider>
);

View File

@@ -1,12 +1,20 @@
import React from 'react';
import InventoryAdjustmentDeleteAlert from 'containers/Alerts/Items/InventoryAdjustmentDeleteAlert';
import InventoryAdjustmentPublishAlert from 'containers/Alerts/Items/InventoryAdjustmentPublishAlert';
export default function InventoryAdjustmentsAlerts() {
return (
<div className={'inventory-adjustments-alert'}>
<InventoryAdjustmentDeleteAlert name={'inventory-adjustment-delete'} />
<InventoryAdjustmentPublishAlert name={'inventory-adjustment-publish'} />
</div>
);
}
const InventoryAdjustmentDeleteAlert = React.lazy(() =>
import('../Alerts/Items/InventoryAdjustmentDeleteAlert'),
);
const InventoryAdjustmentPublishAlert = React.lazy(() =>
import('../Alerts/Items/InventoryAdjustmentPublishAlert'),
);
export default [
{
name: 'inventory-adjustment-delete',
component: InventoryAdjustmentDeleteAlert,
},
{
name: 'inventory-adjustment-publish',
component: InventoryAdjustmentPublishAlert,
},
];