Sort items alphabetically within categories, move live pill next to menu, fix category add button wrap, and fix meal plan ingredients import

This commit is contained in:
2026-10-15 22:11:02 +02:00
parent fef6956d62
commit 9665e245c2
3 changed files with 156 additions and 81 deletions
+3 -2
View File
@@ -1069,8 +1069,9 @@ async def api_update_shopping_item(item_id: int, payload: ShoppingItemUpdate):
async def api_add_shopping_bulk(payload: ShoppingBulkCreate):
items_dicts = [it.model_dump() for it in payload.items]
count = add_shopping_items_bulk(items_dicts)
await shopping_ws_manager.broadcast({"action": "items_updated", "items": get_shopping_list()})
return {"status": "ok", "added_count": count}
current_items = get_shopping_list()
await shopping_ws_manager.broadcast({"action": "items_updated", "items": current_items})
return {"status": "ok", "added_count": count, "items": current_items}
@app.post("/api/shopping-list/{item_id}/toggle")