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 {