Actualizar index.html

This commit is contained in:
2026-02-24 20:32:15 +00:00
parent 9d5a5cdc21
commit 09741fdaf5

View File

@@ -9,6 +9,7 @@
<style> <style>
body { body {
background-color: #f4f7f9; background-color: #f4f7f9;
/* Patrón de fondo muy sutil */
background-image: radial-gradient(#e2e8f0 1px, transparent 1px); background-image: radial-gradient(#e2e8f0 1px, transparent 1px);
background-size: 24px 24px; background-size: 24px 24px;
} }
@@ -185,7 +186,6 @@
// --- CONSTRUCCIÓN DEL BLOQUE DE ESTADO DEPENDIENDO DE LA SITUACIÓN --- // --- CONSTRUCCIÓN DEL BLOQUE DE ESTADO DEPENDIENDO DE LA SITUACIÓN ---
let statusHtml = ''; let statusHtml = '';
let isPendingClientAction = false;
if (isFinalized) { if (isFinalized) {
// MODO HISTORIAL (Gris y apagado) // MODO HISTORIAL (Gris y apagado)
@@ -195,6 +195,18 @@
<span class="text-xs font-black text-slate-400">${formatDate(srv.scheduled_date) || 'Cerrado'}</span> <span class="text-xs font-black text-slate-400">${formatDate(srv.scheduled_date) || 'Cerrado'}</span>
</div> </div>
`; `;
} else if (srv.status_name === 'Pendiente de Asignar') {
// MODO 1: AÚN NO HAY TÉCNICO
// BLOQUEAMOS LA CITA E INFORMAMOS DE QUE ESTAMOS BUSCANDO
statusHtml = `
<div class="bg-slate-100 border border-slate-200 p-6 rounded-2xl text-center">
<div class="w-12 h-12 bg-slate-200 text-slate-500 rounded-full flex items-center justify-center mx-auto mb-3">
<i data-lucide="search" class="w-6 h-6 animate-pulse"></i>
</div>
<h4 class="font-black text-slate-700 uppercase text-sm mb-1 tracking-tight">Buscando Técnico</h4>
<p class="text-[10px] text-slate-500 font-bold leading-tight px-4">Estamos asignando al técnico más cercano a tu domicilio para esta reparación. <br><br>En cuanto esté asignado, se habilitará la opción de agendar la visita aquí mismo.</p>
</div>
`;
} else if (srv.appointment_status === 'pending') { } else if (srv.appointment_status === 'pending') {
// MODO 2: PENDIENTE DE ACEPTACIÓN POR LA OFICINA // MODO 2: PENDIENTE DE ACEPTACIÓN POR LA OFICINA
statusHtml = ` statusHtml = `
@@ -270,7 +282,8 @@
`; `;
} else { } else {
// MODO 4: PENDIENTE DE CITA NORMAL (TU DISEÑO QUE TE GUSTABA) // MODO 4: PENDIENTE DE CITA NORMAL (TU DISEÑO QUE TE GUSTABA)
isPendingClientAction = true; // (Solo se llega aquí si no está en otro estado, y al no ser "Pendiente de asignar",
// significa que YA tiene un operario asignado y puede coger cita).
statusHtml = ` statusHtml = `
<div class="bg-blue-50/50 border border-blue-100 p-6 rounded-2xl text-center"> <div class="bg-blue-50/50 border border-blue-100 p-6 rounded-2xl text-center">
<div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative"> <div class="w-12 h-12 bg-blue-100 text-blue-600 rounded-full flex items-center justify-center mx-auto mb-3 relative">