fix: badge shows 'matched'/'no match' instead of machine ID
This commit is contained in:
+2
-2
@@ -567,7 +567,7 @@ function lookupPrevAsset(p) {
|
||||
|
||||
function renderPrevCard(p) {
|
||||
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 engCls = engine === 'llm' || engine === 'llm_batch' ? 'llm' : engine === 'google' ? 'llm' : 'tesseract';
|
||||
const time = p.created_at ? new Date(p.created_at + 'Z').toLocaleString() : '';
|
||||
@@ -671,7 +671,7 @@ function saveMachineIdInline(input, photoId, cancel) {
|
||||
if (card) {
|
||||
const badge = card.querySelector('.match-badge');
|
||||
if (badge) {
|
||||
badge.textContent = val;
|
||||
badge.textContent = 'matched';
|
||||
badge.className = 'match-badge matched';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user