fix(management): Kein „Blech undefined" in der Vorbereitungsliste - #101
Merged
Merged
Conversation
Die Vorbereitungsliste (/admin/bakery/daily-prep) zeigte bei Einback und
Nougatplunder „Blech undefined": Der Markdown-Parser liefert für einen
Bereich wie „11-13" nur tray_numbers ohne trays_of, und formatTrayInfo()
fiel dann auf `Blech ${tray_number}` zurück. Dasselbe passierte bei
Positionen ganz ohne dritte Tabellenspalte.
- Blech-Text steht jetzt genau einmal in utils/trayInfo.ts und liefert
null, wenn keine Blechnummer bekannt ist; Karte und Druckansicht
(Produktionsplan) benutzen beide diesen Helfer. Bereiche ohne trays_of
heißen „Bleche 11, 12, 13", mit trays_of „3 Bleche à 12 (Bleche …)".
- Parser: parseTrayCell() setzt keine Blechfelder bei leerer, fehlender
oder unlesbarer Spalte (vorher NaN), akzeptiert „11 - 13" und Gedanken-
strich; convertToMarkdown() schreibt bei leerem tray_numbers keine
„undefined-undefined"-Zelle mehr.
- Druckansicht lässt die Beschreibungszeile weg, wenn eine Sektion keine
hat (gleiches Muster).
- feature-daily-prep bekommt einen Jest-Test-Target (jest.config,
tsconfigs, test-setup) und 27 Tests: Helfer, Parser ohne dritte Spalte,
Karte ohne Blech, Druckansicht.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDQ42tUXqC7U3y716SssNx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Die Vorbereitungsliste unter
/admin/bakery/daily-prepzeigte bei Positionen ohne Blechnummer „Blech undefined" (Einback, Nougatplunder) und bei unlesbaren Zellen „Blech NaN" (Smoke-Test vom 2026-09-07).Änderung
feature-daily-prep/src/lib/utils/trayInfo.ts; ohne Angabe wird keine Zeile gerendert. Karte und Druckansicht benutzen denselben Helfer.trays_ofund für fehlende dritte Spalte saubere Werte.Verifikation
nx test feature-daily-prep27 Tests (14 davon gegen den alten Code rot), Playwright-Reproduktion vor/nach dem Fix, unabhängiges Review (mergeable).🤖 Generated with Claude Code
https://claude.ai/code/session_01PDQ42tUXqC7U3y716SssNx