This commit is contained in:
lehel 2025-10-01 21:42:11 +02:00
parent 241163d9ab
commit 40a927aa1c
No known key found for this signature in database
GPG Key ID: 9C4F9D6111EE5CFA
1 changed files with 13 additions and 5 deletions

18
ui.html
View File

@ -39,12 +39,20 @@
const data = await resp.json(); const data = await resp.json();
messages.lastChild.remove(); // remove 'Thinking...' messages.lastChild.remove(); // remove 'Thinking...'
if (data.match) { if (data.match) {
var txt = "Match: " + data.match + "\n"; let txt = '';
if (data.procedures) { txt += `Match: ${data.match}\n`;
txt += "Procedures:\n"; if (data.notes) {
data.procedures.forEach(function(p) { txt += `\nNotes: ${data.notes}\n`;
txt += `- ${p.name} (${p.price} Ft, ${p.duration_minutes} min${p.note ? ', ' + p.note : ''})\n`; }
if (data.procedures && data.procedures.length > 0) {
txt += `\nProcedures:\n`;
data.procedures.forEach(function(p, idx) {
txt += ` ${idx+1}. ${p.name}\n`;
txt += ` Cost: ${p.price} Ft\n`;
txt += ` Time: ${p.duration_minutes} min\n`;
if (p.note && p.note.trim()) txt += ` Note: ${p.note}\n`;
}); });
txt += `\nTotal: ${data.total_price} Ft, ${data.total_duration} min\n`;
} }
appendMsg(txt, 'bot'); appendMsg(txt, 'bot');
} else { } else {