Feature #291
openCanteen: D28 — tray label print + mobile scan entry
100%
Description
Week 6 D28. Printable tray label (window.print(), shows allergy
snapshot prominently, a loud "not yet plated" state when there is
none) + a mobile scan entry point: the tray-round page accepts
?trayId= to jump straight to one tray, linked from the label.
NP Updated by Navya P. about 1 month ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Resolved By set to Navya P.
Done. Printable tray label at /dietary/trays/{id}/label (window.print()
on load, Code128 barcode of the tray number, allergy section built on a
pure allergyStateFor helper with four distinct states -- not-plated,
none, listed, unreadable -- malformed data reads as a loud warning, never
silently as "no allergies"). The label's printed link carries ?trayId=;
tray-round now reads it and jumps straight to that tray via a new
findIndexByTrayId helper.
Added GET /api/canteen/dietary/trays/{id} + extended TrayDto with
ServiceDate/MealSlotId/DietTypeCode, needed by both tasks.
Backend: 785/787 (2 pre-existing unrelated failures). Portal: type-check
clean, 480/480 tests green. Pushed to integration/canteen-v1 (9a246f0).