Update interaction guidance for checkbox model
This commit is contained in:
1 parent
64acab1cf2
commit
6452b41e0c
3 files changed
+42
-50
No files matched your search
@@ -37,12 +37,11 @@ export const ActivePickListScreen = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleSwipeLeft = async (itemId: string) => {
|
||||
await db.pickItems.update(itemId, { status: 'picked', updated_at: Date.now() });
|
||||
};
|
||||
|
||||
const handleSwipeRight = async (itemId: string) => {
|
||||
await db.pickItems.delete(itemId);
|
||||
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 returnToLists = () => {
|
||||
@@ -70,8 +69,7 @@ export const ActivePickListScreen = () => {
|
||||
product={products.find((p) => p.id === item.product_id)}
|
||||
onIncrementUnit={() => handleIncrementUnit(item.id)}
|
||||
onIncrementBulk={() => handleIncrementBulk(item.id)}
|
||||
onSwipeLeft={() => handleSwipeLeft(item.id)}
|
||||
onSwipeRight={() => handleSwipeRight(item.id)}
|
||||
onToggleStatus={() => handleToggleStatus(item.id)}
|
||||
/>
|
||||
))}
|
||||
</Stack>
|
||||
|
||||
Reference in new issue
Block a user