Technician Dashboard

⚠️ Important: Access the Live Dashboard

This page has been replaced with a direct web app dashboard that doesn't require any setup or configuration. To access the live dashboard:

    1. Go to your Google Apps Script web app URL and add ?view=dashboard

    2. Example: https://script.google.com/macros/s/AKfycbwPFEhBaq0-fPDvkQGtgN5GZD90TGxmqDPLNBBC6PCPrG2toHLFjxmsVmArlUSy4uYmZA/exec?view=dashboard

The live dashboard allows you to: - View all service requests - Filter by status - Update status and add notes - Message customers via WhatsApp

Open Live Dashboard
if (!filtered.length) { document.getElementById('tableWrap').innerHTML = '
No complaints found.
'; return; } const html = []; html.push(''); filtered.forEach(r => { html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(``); html.push(''); }); html.push('
IDNamePhoneModelProblemAddressPreferredStatusActions
${r.row}${escapeHtml(r.name)}${escapeHtml(r.phone)}${escapeHtml(r.model)}${escapeHtml(r.problem)}${escapeHtml(r.address)}${escapeHtml(r.preferred_time)} WhatsApp
'); document.getElementById('tableWrap').innerHTML = html.join(''); // set selects to current status document.querySelectorAll('tr[data-id]').forEach(tr => { const row = tr.getAttribute('data-id'); const r = rows.find(x=>String(x.row)===String(row)); const sel = tr.querySelector('.statusSelect'); if (r && sel) sel.value = r.status || 'planned'; }); // wire save buttons document.querySelectorAll('.saveBtn').forEach(btn => { btn.addEventListener('click', async (e) => { const tr = e.target.closest('tr'); const row = tr.getAttribute('data-id'); const status = tr.querySelector('.statusSelect').value; await updateStatus(row, status); }); }); } async function updateStatus(row, status) { const payload = { action: 'update', row: row, status: status }; try { const res = await fetch(SCRIPT_URL, { method:'POST', headers:{'Content-Type':'application/json'}, body:JSON.stringify(payload) }); const json = await res.json(); if (json.success) { alert('Updated row '+row); fetchComplaints(); } else alert('Update failed: '+(json.error||'unknown')); } catch (err) { alert('Network error'); } } function escapeHtml(s){ if (!s) return ''; return String(s).replace(/[&<>"']/g, c=>({'&':'&','<':'<','>':'>','"':'"',"'":"'"})[c]); } document.getElementById('refresh').addEventListener('click', fetchComplaints); document.getElementById('filterStatus').addEventListener('change', fetchComplaints); fetchComplaints();