mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
import React, { useEffect } from 'react';
|
|
import { useIntl } from 'react-intl';
|
|
|
|
import DashboardPageContent from 'components/Dashboard/DashboardPageContent';
|
|
|
|
import InventoryAdjustmentsAlerts from './InventoryAdjustmentsAlerts';
|
|
|
|
import { InventoryAdjustmentsProvider } from './InventoryAdjustmentsProvider';
|
|
import InventoryAdjustmentTable from './InventoryAdjustmentTable';
|
|
|
|
import withInventoryAdjustments from './withInventoryAdjustments';
|
|
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
|
|
|
|
import { compose, transformTableStateToQuery } from 'utils';
|
|
|
|
/**
|
|
* Inventory Adjustment List.
|
|
*/
|
|
function InventoryAdjustmentList({
|
|
// #withDashboardActions
|
|
changePageTitle,
|
|
|
|
// #withInventoryAdjustments
|
|
inventoryAdjustmentTableState,
|
|
}) {
|
|
const { formatMessage } = useIntl();
|
|
|
|
// Changes the dashboard title once the page mount.
|
|
useEffect(() => {
|
|
changePageTitle(formatMessage({ id: 'inventory_adjustment_list' }));
|
|
}, [changePageTitle, formatMessage]);
|
|
|
|
return (
|
|
<InventoryAdjustmentsProvider
|
|
query={transformTableStateToQuery(inventoryAdjustmentTableState)}
|
|
>
|
|
<DashboardPageContent>
|
|
<InventoryAdjustmentTable />
|
|
<InventoryAdjustmentsAlerts />
|
|
</DashboardPageContent>
|
|
</InventoryAdjustmentsProvider>
|
|
);
|
|
}
|
|
|
|
export default compose(
|
|
withDashboardActions,
|
|
withInventoryAdjustments(({ inventoryAdjustmentTableState }) => ({
|
|
inventoryAdjustmentTableState,
|
|
})),
|
|
)(InventoryAdjustmentList);
|