From addc2af505932da57a25d3230305529f62cea6db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Mon, 18 Aug 2025 23:29:00 +0200 Subject: [PATCH] ocr wizualne --- static/js/receipt_analysis.js | 8 ++++---- templates/list_share.html | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/static/js/receipt_analysis.js b/static/js/receipt_analysis.js index ce24650..ee09992 100644 --- a/static/js/receipt_analysis.js +++ b/static/js/receipt_analysis.js @@ -21,8 +21,8 @@ async function analyzeReceipts(listId) { const duration = ((performance.now() - start) / 1000).toFixed(2); let html = `
`; - html += `

📊 Łącznie wykryto: ${data.total.toFixed(2)} PLN

`; html += `

⏱ Czas analizy OCR: ${duration} sek.

`; + html += `

📊 Łącznie wykryto: ${data.total.toFixed(2)} PLN

`; data.results.forEach((r, i) => { const disabled = r.already_added ? "disabled" : ""; @@ -30,8 +30,8 @@ async function analyzeReceipts(listId) { const inputField = ``; const button = r.already_added - ? `✅ Dodano` - : ``; + ? `✅ Dodano` + : ``; html += `
@@ -43,7 +43,7 @@ async function analyzeReceipts(listId) { if (data.results.length > 1) { - html += ``; + html += ``; } html += `
`; diff --git a/templates/list_share.html b/templates/list_share.html index 4aef75b..296209f 100644 --- a/templates/list_share.html +++ b/templates/list_share.html @@ -142,11 +142,12 @@ {% endif %}" id="receiptAnalysisBlock">
🔍 Analiza paragonów (OCR)
-

System spróbuje automatycznie rozpoznać kwoty z dodanych paragonów.

-

Dokonaj korekty jeśli źle rozpozna kwote na paragonie.

+

System spróbuje automatycznie rozpoznać kwoty z dodanych paragonów.
+ Dokonaj korekty jeśli źle rozpozna kwote na paragonie. +

{% if current_user.is_authenticated %} - {% else %}