fix: badge shows 'matched'/'no match' instead of machine ID

This commit is contained in:
2026-05-25 21:14:38 -04:00
parent 6c54912cfc
commit 22c2acf0da
+2 -2
View File
@@ -567,7 +567,7 @@ function lookupPrevAsset(p) {
function renderPrevCard(p) { function renderPrevCard(p) {
const hasMatch = p.machine_id ? 'matched' : 'no-match'; const hasMatch = p.machine_id ? 'matched' : 'no-match';
const matchText = p.machine_id || (p.ocr_match_5plus ? 'digits found' : 'no match'); const matchText = p.machine_id ? 'matched' : (p.ocr_match_5plus ? 'digits found' : 'no match');
const engine = p.ocr_engine || 'tesseract'; const engine = p.ocr_engine || 'tesseract';
const engCls = engine === 'llm' || engine === 'llm_batch' ? 'llm' : engine === 'google' ? 'llm' : 'tesseract'; const engCls = engine === 'llm' || engine === 'llm_batch' ? 'llm' : engine === 'google' ? 'llm' : 'tesseract';
const time = p.created_at ? new Date(p.created_at + 'Z').toLocaleString() : ''; const time = p.created_at ? new Date(p.created_at + 'Z').toLocaleString() : '';
@@ -671,7 +671,7 @@ function saveMachineIdInline(input, photoId, cancel) {
if (card) { if (card) {
const badge = card.querySelector('.match-badge'); const badge = card.querySelector('.match-badge');
if (badge) { if (badge) {
badge.textContent = val; badge.textContent = 'matched';
badge.className = 'match-badge matched'; badge.className = 'match-badge matched';
} }
} }