Actualizar index.html
This commit is contained in:
21
index.html
21
index.html
@@ -186,6 +186,9 @@
|
||||
hasWorker = true;
|
||||
}
|
||||
|
||||
// 🚨 DETECTAMOS SI ES URGENCIA 🚨
|
||||
let isUrgent = srv.is_urgent === true || (raw['Urgente'] && (raw['Urgente'].toLowerCase() === 'sí' || raw['Urgente'].toLowerCase() === 'si' || raw['Urgente'].toLowerCase() === 'true'));
|
||||
|
||||
let statusHtml = '';
|
||||
|
||||
if (isFinalized || stNameLower.includes('finalizado') || stNameLower.includes('anulado')) {
|
||||
@@ -293,6 +296,24 @@
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
// 🚨 NUEVO BLOQUE: SI ES URGENCIA, MOSTRAMOS ESTO EN VEZ DE "ELEGIR CITA"
|
||||
else if (isUrgent) {
|
||||
statusHtml = `<div class="bg-red-50 border border-red-200 p-6 rounded-3xl relative overflow-hidden shadow-inner">
|
||||
<div class="flex items-center gap-4 relative z-10">
|
||||
<div class="w-14 h-14 bg-red-600 text-white rounded-2xl flex items-center justify-center shadow-lg shadow-red-500/40 shrink-0 animate-pulse">
|
||||
<i data-lucide="flame" class="w-7 h-7"></i>
|
||||
</div>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-[9px] font-black uppercase tracking-widest text-red-500 mb-0.5">Prioridad Máxima</p>
|
||||
<h4 class="font-black text-red-900 uppercase text-lg leading-none mb-1.5 tracking-tight">Aviso Urgente</h4>
|
||||
<p class="text-[10px] font-bold text-red-700 leading-tight">
|
||||
${hasWorker ? 'Técnico de urgencia asignado. Acudirá a tu domicilio lo antes posible.' : 'Estamos localizando al técnico de urgencia más cercano para que acuda de inmediato.'}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
// Si NO es urgente, entonces sí mostramos el botón de Elegir cita
|
||||
else if (stNameLower.includes('esperando') || stNameLower.includes('asignado') || (hasWorker && !hasDate)) {
|
||||
statusHtml = `<div class="bg-blue-50 border border-blue-200 p-6 rounded-3xl relative overflow-hidden shadow-inner">
|
||||
<div class="flex items-center gap-4 relative z-10">
|
||||
|
||||
Reference in New Issue
Block a user