Files
bigcapital/client/src/containers/Dialogs/InventoryAdjustmentFormDialog/index.js
2021-01-13 07:14:38 +02:00

38 lines
940 B
JavaScript

import React, { lazy } from 'react';
import { FormattedMessage as T } from 'react-intl';
import { Dialog, DialogSuspense } from 'components';
import withDialogRedux from 'components/DialogReduxConnect';
import { compose } from 'redux';
const InventoryAdjustmentFormDialogContent = lazy(() =>
import('./InventoryAdjustmentFormDialogContent'),
);
/**
* Inventory adjustments form dialog.
*/
function InventoryAdjustmentFormDialog({
dialogName,
payload = { action: '', id: null },
isOpen,
}) {
return (
<Dialog
name={dialogName}
title={<T id={'make_adjustment'} />}
isOpen={isOpen}
canEscapeJeyClose={true}
autoFocus={true}
>
<DialogSuspense>
<InventoryAdjustmentFormDialogContent
dialogName={dialogName}
itemDetail={payload}
/>
</DialogSuspense>
</Dialog>
);
}
export default compose(withDialogRedux())(InventoryAdjustmentFormDialog);