Merge branch 'main' into codex/add-quantity-and-is_carton-fields-to-pickitem
This commit is contained in:
3 files changed
+55
-51
No files matched your search
@@ -28,11 +28,14 @@ export const ActivePickListScreen = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleSwipeLeft = async (itemId: string) => {
|
||||
await db.pickItems.update(itemId, { status: 'picked', updated_at: Date.now() });
|
||||
const handleToggleStatus = async (itemId: string) => {
|
||||
const existing = await db.pickItems.get(itemId);
|
||||
if (!existing) return;
|
||||
const nextStatus = existing.status === 'picked' ? 'pending' : 'picked';
|
||||
await db.pickItems.update(itemId, { status: nextStatus, updated_at: Date.now() });
|
||||
};
|
||||
|
||||
const handleSwipeRight = async (itemId: string) => {
|
||||
const handleDeleteItem = async (itemId: string) => {
|
||||
await db.pickItems.delete(itemId);
|
||||
};
|
||||
|
||||
@@ -59,9 +62,10 @@ export const ActivePickListScreen = () => {
|
||||
key={item.id}
|
||||
item={item}
|
||||
product={products.find((p) => p.id === item.product_id)}
|
||||
onIncrement={() => handleIncrement(item.id)}
|
||||
onSwipeLeft={() => handleSwipeLeft(item.id)}
|
||||
onSwipeRight={() => handleSwipeRight(item.id)}
|
||||
onIncrementUnit={() => handleIncrementUnit(item.id)}
|
||||
onIncrementBulk={() => handleIncrementBulk(item.id)}
|
||||
onToggleStatus={() => handleToggleStatus(item.id)}
|
||||
onDelete={() => handleDeleteItem(item.id)}
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user