Add delete control for pick list items
This commit is contained in:
1 parent
6452b41e0c
commit
dc2aeaa3dd
2 files changed
+12
-2
No files matched your search
@@ -44,6 +44,10 @@ export const ActivePickListScreen = () => {
|
||||
await db.pickItems.update(itemId, { status: nextStatus, updated_at: Date.now() });
|
||||
};
|
||||
|
||||
const handleDeleteItem = async (itemId: string) => {
|
||||
await db.pickItems.delete(itemId);
|
||||
};
|
||||
|
||||
const returnToLists = () => {
|
||||
navigate('/pick-lists');
|
||||
};
|
||||
@@ -70,6 +74,7 @@ export const ActivePickListScreen = () => {
|
||||
onIncrementUnit={() => handleIncrementUnit(item.id)}
|
||||
onIncrementBulk={() => handleIncrementBulk(item.id)}
|
||||
onToggleStatus={() => handleToggleStatus(item.id)}
|
||||
onDelete={() => handleDeleteItem(item.id)}
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user