confirmar-cita | TRIAGE

Confirmando tu cita…

(function() { var params = new URLSearchParams(window.location.search); var token = params.get(‘t’); if (!token) { document.getElementById(‘cw-loading’).style.display = ‘none’; document.getElementById(‘cw-invalid’).style.display = ‘block’; document.getElementById(‘cw-error’).textContent = ‘No se proporciono un enlace de confirmacion valido.’; return; } fetch(‘https://n8n.srv914565.hstgr.cloud/webhook/confirm-booking?token=’ + encodeURIComponent(token)) .then(function(res) { return res.json(); }) .then(function(data) { document.getElementById(‘cw-loading’).style.display = ‘none’; if (data.status === ‘confirmed’) { document.getElementById(‘cw-name’).textContent = data.name; document.getElementById(‘cw-date’).textContent = data.date; document.getElementById(‘cw-time’).textContent = data.startTime + ‘ – ‘ + data.endTime + ‘ hrs’; document.getElementById(‘cw-email’).textContent = data.email; if (data.meetLink) { document.getElementById(‘cw-meet-link’).href = data.meetLink; document.getElementById(‘cw-meet’).style.display = ‘block’; } document.getElementById(‘cw-confirmed’).style.display = ‘block’; } else if (data.status === ‘unavailable’) { document.getElementById(‘cw-unavailable’).style.display = ‘block’; } else { document.getElementById(‘cw-error’).textContent = data.error || ‘Este enlace no es valido.’; document.getElementById(‘cw-invalid’).style.display = ‘block’; } }) .catch(function() { document.getElementById(‘cw-loading’).style.display = ‘none’; document.getElementById(‘cw-error-net’).style.display = ‘block’; }); })();