Időpontfoglalás Vision - Általános szemészeti vizsgálatra
var genParams = function(params) { if (!params || Object.keys(params).length === 0) return ''; return Object.entries(params).reduce((acc, [key, value], index) => { const prefix = index === 0 ? '?' : '&'; const encodedKey = encodeURIComponent(key); const encodedValue = encodeURIComponent(value); return acc + prefix + encodedKey + '=' + encodedValue; }, ''); }; var params = { }; var vb = new Valuebot.Widget({ target: 'portal_widget', height: '100%', width: '100%', chatbot: 'https://app.valuebot.io/portal/embed/69c50e1fdad1bc07b461fdc5IjOTcwa4' + genParams(params) }); vb.on('redirect', e => { let url = ((e || {}).detail || {}).url; if (url && window) window.location.href = url; }); vb.on('loaded', e => { let widget = document.querySelector("#portal_widget"); let contentHeight = ((e || {}).detail || {}).contentHeight; if (contentHeight) widget.style.height = contentHeight + "px"; });