Hotel
Samaira Travels
Travel Deals & Services
Loading...
Loading data...
Unable to load data.
"; console.error(error); }) .getSheetData();}/* CREATE CATEGORY FILTER */function createCategoryFilter() { const select = document.getElementById("categoryFilter"); const categories = []; allData.forEach(row => { const category = row["Category"]; if ( category && !categories.includes(category) ) { categories.push(category); } }); categories.sort(); categories.forEach(category => { const option = document.createElement("option"); option.value = category; option.textContent = category; select.appendChild(option); });}/* DISPLAY DATA */function displayData(data) { const container = document.getElementById("content"); const resultInfo = document.getElementById("resultInfo"); resultInfo.textContent = data.length + " results found"; if (!data.length) { container.innerHTML = "No results found.
"; retu; } let html = ""; data.forEach(row => { html += createCard(row); }); html += "
"; container.innerHTML = html;}/* CREATE CARD */function createCard(row) { const category = row["Category"] || ""; /* * Change "Name" if your * main title column has * another name. */ const title = row["Name"] || row["Hotel"] || row["Package"] || row["Service"] || "Travel Service"; let html = ` ${escapeHTML(category)}
${escapeHTML(title)}
`; Object.keys(row).forEach(key => { if ( key === "Category" || key === "Name" || key === "Hotel" || key === "Package" || key === "Service" ) { retu; } if (!row[key]) { retu; } html += ` ${escapeHTML(key)}: ${escapeHTML(row[key])}
`; }); html += `



