|
|
@@ -1557,7 +1557,7 @@ createApp({
|
|
|
const checkout = sel?.checkout_date ? parseWithTime(sel.checkout_date, sel.checkout_time) : null;
|
|
|
const fmtDate_ = (d, fmt) => d ? _strftime(fmt || dtFmt, d) : '';
|
|
|
const resId = [serviceName(sel?.service), sel?.reservation_id].filter(Boolean).join(' ');
|
|
|
- chatReply.value = raw.replace(/\{(\w+)(?::([^}]*))?\}/g, (_, key, fmt) => {
|
|
|
+ const rendered = raw.replace(/\{(\w+)(?::([^}]*))?\}/g, (_, key, fmt) => {
|
|
|
if (key === 'guest_name') return sel?.guest_name ?? '';
|
|
|
if (key === 'first_name') return (sel?.guest_name ?? '').split(' ')[0] ?? '';
|
|
|
if (key === 'wifi_key') return sel?.wifi_key ?? '';
|
|
|
@@ -1568,6 +1568,7 @@ createApp({
|
|
|
if (key === 'reservation_id') return resId;
|
|
|
return '';
|
|
|
});
|
|
|
+ chatReply.value = chatReply.value.trim() ? `${chatReply.value}\n\n${rendered}` : rendered;
|
|
|
}
|
|
|
|
|
|
function fmtChatTime(ts) {
|