From 40a927aa1c185a954b306cc73306bcdf0d3c3883 Mon Sep 17 00:00:00 2001 From: lehel Date: Wed, 1 Oct 2025 21:42:11 +0200 Subject: [PATCH] ui tweak --- ui.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ui.html b/ui.html index 21e6137..13d9b3b 100644 --- a/ui.html +++ b/ui.html @@ -39,12 +39,20 @@ const data = await resp.json(); messages.lastChild.remove(); // remove 'Thinking...' if (data.match) { - var txt = "Match: " + data.match + "\n"; - if (data.procedures) { - txt += "Procedures:\n"; - data.procedures.forEach(function(p) { - txt += `- ${p.name} (${p.price} Ft, ${p.duration_minutes} min${p.note ? ', ' + p.note : ''})\n`; + let txt = ''; + txt += `Match: ${data.match}\n`; + if (data.notes) { + txt += `\nNotes: ${data.notes}\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'); } else {