fix: separate recipe preview image from task images

Recipe image_path is now used as preview thumbnail only. Removed
auto-creation of "Technical Drawing" task from recipe upload, and
removed recipe image strip from task_execute view. Each task displays
its own file_path independently.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Adriano
2026-02-20 18:29:27 +01:00
parent 22804a609d
commit dbfb5591c5
5 changed files with 6 additions and 38 deletions
-6
View File
@@ -124,21 +124,15 @@ def task_execute(task_id: int):
# Load all task IDs for this recipe (ordered) for auto-advance
recipe_id = task_resp.get("recipe_id")
all_task_ids = []
recipe_resp = {}
if recipe_id:
tasks_resp = api_client.get(f"/api/recipes/{recipe_id}/tasks")
if isinstance(tasks_resp, list):
sorted_tasks = sorted(tasks_resp, key=lambda t: t.get("order_index", 0))
all_task_ids = [t["id"] for t in sorted_tasks]
# Fetch recipe for image_path
resp = api_client.get(f"/api/recipes/{recipe_id}")
if not (isinstance(resp, dict) and resp.get("error")):
recipe_resp = resp
return render_template(
"measure/task_execute.html",
task=task_resp,
recipe=recipe_resp,
lot_number=lot_number,
serial_number=serial_number,
all_task_ids=all_task_ids,