Zeige Erkennungsquelle je Eintrag in der Sitzungsliste
commitAssignment speichert je Eintrag bereits, ob per Barcode oder Texterkennung erkannt wurde - das wurde bisher nirgends angezeigt. Die Sitzungsliste zeigt es jetzt knapp neben jedem Eintrag, weil der Unterschied beim Sortieren wertvoll ist: Barcode ist exakt, Texterkennung fehleranfälliger. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-1
@@ -14,10 +14,20 @@ function describeSpec(spec) {
|
||||
return parts.join(' ');
|
||||
}
|
||||
|
||||
/**
|
||||
* Kurzbezeichnung der Erkennungsquelle eines Eintrags - beim Sortieren
|
||||
* wertvoll, weil Barcode exakt ist und Texterkennung fehleranfaelliger.
|
||||
*/
|
||||
function describeSource(source) {
|
||||
if (source === 'barcode') return 'per Barcode';
|
||||
if (source === 'ocr') return 'per Texterkennung';
|
||||
return 'unsicher';
|
||||
}
|
||||
|
||||
/**
|
||||
* Vollbild-Liste aller Stapel der laufenden Sitzung.
|
||||
* @param {HTMLElement} root
|
||||
* @param {{stacks: Array<{id: string, count: number, spec: object}>, entries: Array<{entryId: number, spec: object, stackId: string}>}} session
|
||||
* @param {{stacks: Array<{id: string, count: number, spec: object}>, entries: Array<{entryId: number, spec: object, stackId: string, source: string}>}} session
|
||||
* @param {{onMove: (entryId: number, stackId: string) => void, onRemove: (entryId: number) => void, onEndSession: () => void, onClose: () => void}} callbacks
|
||||
*/
|
||||
export function renderSessionList(root, session, { onMove, onRemove, onEndSession, onClose }) {
|
||||
@@ -58,6 +68,13 @@ export function renderSessionList(root, session, { onMove, onRemove, onEndSessio
|
||||
label.textContent = entry.spec.partNumber ?? describeSpec(entry.spec);
|
||||
row.appendChild(label);
|
||||
|
||||
const sourceLabel = document.createElement('span');
|
||||
sourceLabel.style.fontSize = '12px';
|
||||
sourceLabel.style.opacity = '0.7';
|
||||
sourceLabel.style.textAlign = 'right';
|
||||
sourceLabel.textContent = describeSource(entry.source);
|
||||
row.appendChild(sourceLabel);
|
||||
|
||||
// Bedienflaechen muessen mindestens 56px hoch sein - auch die Auswahl,
|
||||
// nicht nur die Schaltflaechen.
|
||||
const select = document.createElement('select');
|
||||
|
||||
Reference in New Issue
Block a user