Añade Ficha del Cliente: botón en el calendario + nueva página cliente.html
calendario.html: nuevo botón "Ficha del Cliente" en el modal de detalle del servicio (junto a Llamar/WhatsApp). cliente.html: página nueva con datos de contacto, historial de servicios anteriores (todas las compañías) y notas del equipo tipo trazabilidad.
This commit is contained in:
@@ -179,6 +179,9 @@
|
||||
<button onclick="openWhatsApp()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
||||
<i data-lucide="message-circle" class="w-4 h-4 text-emerald-500"></i> WhatsApp
|
||||
</button>
|
||||
<button onclick="abrirFichaCliente()" class="w-full mt-3 bg-slate-50 text-slate-700 font-black py-3 rounded-2xl border border-slate-200 flex items-center justify-center gap-2 text-xs uppercase tracking-widest active:scale-95 transition-all text-center">
|
||||
<i data-lucide="user-round" class="w-4 h-4 text-primary-dynamic"></i> Ficha del Cliente
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="bg-white border border-slate-200 rounded-3xl overflow-hidden shadow-sm text-left">
|
||||
@@ -1440,6 +1443,17 @@
|
||||
} else { alert("Sin teléfono"); }
|
||||
}
|
||||
|
||||
// 🧑🔧 Abre la ficha del cliente (historial de servicios + notas del equipo) con los
|
||||
// datos que ya tenemos cargados en el modal, para no tener que volver a pedirlos.
|
||||
function abrirFichaCliente() {
|
||||
const p = document.getElementById('detPhoneRaw').value;
|
||||
if (!p) { alert("Este servicio no tiene un teléfono válido para localizar al cliente."); return; }
|
||||
const nombre = document.getElementById('detName').innerText || "";
|
||||
const direccion = document.getElementById('detAddress').innerText || "";
|
||||
const params = new URLSearchParams({ phone: p, nombre, direccion });
|
||||
window.location.href = `cliente.html?${params.toString()}`;
|
||||
}
|
||||
|
||||
// 📞 Cuando el servicio trae más de un teléfono (típico de HomeServe), pintamos un
|
||||
// selector de chips para que el operario elija cuál usar antes de Llamar/WhatsApp.
|
||||
// Con un solo teléfono no mostramos nada (para no añadir ruido visual de más).
|
||||
|
||||
Reference in New Issue
Block a user