ui tweak
This commit is contained in:
parent
241163d9ab
commit
40a927aa1c
18
ui.html
18
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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue