feat: item-duplicate

This commit is contained in:
elforjani3
2021-02-10 18:29:23 +02:00
parent 08beb9a0d6
commit 3a90141113
7 changed files with 46 additions and 20 deletions

View File

@@ -95,6 +95,10 @@ function ItemsDataTable({
openDialog('inventory-adjustment', { itemId: id });
};
const handleDuplicate = ({ id }) => {
history.push(`/items/${id}/duplicate`, { action: 'duplicate' });
};
// Cannot continue in case the items has empty status.
if (isEmptyStatus) {
return <ItemsEmptyStatus />;
@@ -131,6 +135,7 @@ function ItemsDataTable({
onInactivateItem: handleInactiveItem,
onActivateItem: handleActivateItem,
onMakeAdjustment: handleMakeAdjustment,
onDuplicate: handleDuplicate,
}}
noResults={'There is no items in the table yet.'}
{...tableProps}