Actualizar proveedores.html
This commit is contained in:
@@ -479,7 +479,16 @@
|
|||||||
const dbStatusObj = systemStatuses.find(st => String(st.id) === String(dbStatusId));
|
const dbStatusObj = systemStatuses.find(st => String(st.id) === String(dbStatusId));
|
||||||
|
|
||||||
const isUrgent = svc.is_urgent === true || (raw['Urgente'] && raw['Urgente'].toLowerCase() === 'sí') || (raw['URGENTE'] && raw['URGENTE'].toLowerCase() === 'si');
|
const isUrgent = svc.is_urgent === true || (raw['Urgente'] && raw['Urgente'].toLowerCase() === 'sí') || (raw['URGENTE'] && raw['URGENTE'].toLowerCase() === 'si');
|
||||||
const urgentBadge = isUrgent ? `<span class="bg-red-500 text-white px-2 py-0.5 rounded-md text-[9px] font-black uppercase shadow-sm animate-pulse ml-3">🔥 Urgente</span>` : '';
|
// Le he quitado el ml-3 para que use el gap automático
|
||||||
|
const urgentBadge = isUrgent ? `<span class="bg-red-500 text-white px-2 py-0.5 rounded-md text-[9px] font-black uppercase shadow-sm animate-pulse">🔥 Urgente</span>` : '';
|
||||||
|
|
||||||
|
// 🛑 NUEVO: EXTRAER Y PINTAR LOS ICONOS DE CANDADO Y OJOS
|
||||||
|
const hasLock = raw.has_lock === true || String(raw.has_lock) === 'true';
|
||||||
|
const hasEyes = raw.has_eyes === true || String(raw.has_eyes) === 'true';
|
||||||
|
|
||||||
|
let alertBadges = '';
|
||||||
|
if (hasLock) alertBadges += `<span class="bg-slate-800 text-white px-2 py-0.5 rounded-md text-[9px] font-black uppercase shadow-sm flex items-center gap-1" title="Gestora (Candado)"><i data-lucide="lock" class="w-3 h-3"></i></span>`;
|
||||||
|
if (hasEyes) alertBadges += `<span class="bg-amber-500 text-white px-2 py-0.5 rounded-md text-[9px] font-black uppercase shadow-sm animate-pulse flex items-center gap-1" title="Requiere Información (Ojos)"><i data-lucide="eye" class="w-3 h-3"></i></span>`;
|
||||||
|
|
||||||
if (!isArchived) {
|
if (!isArchived) {
|
||||||
if (autoStatus.includes('bolsa') || autoStatus === 'in_progress') {
|
if (autoStatus.includes('bolsa') || autoStatus === 'in_progress') {
|
||||||
@@ -601,9 +610,10 @@
|
|||||||
<img src="${getLogoUrl(raw['Compañía'] || raw['COMPAÑIA'])}" onerror="this.src='${companyLogos['DEFAULT']}'" class="max-w-full max-h-full object-contain">
|
<img src="${getLogoUrl(raw['Compañía'] || raw['COMPAÑIA'])}" onerror="this.src='${companyLogos['DEFAULT']}'" class="max-w-full max-h-full object-contain">
|
||||||
</div>
|
</div>
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<div class="flex items-center">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<h3 class="font-black text-slate-800 truncate uppercase text-lg leading-tight">${name}</h3>
|
<h3 class="font-black text-slate-800 truncate uppercase text-lg leading-tight">${name}</h3>
|
||||||
${urgentBadge}
|
${urgentBadge}
|
||||||
|
${alertBadges}
|
||||||
</div>
|
</div>
|
||||||
<p class="text-xs text-slate-400 truncate italic mt-0.5">${fullAddr}</p>
|
<p class="text-xs text-slate-400 truncate italic mt-0.5">${fullAddr}</p>
|
||||||
<div class="flex flex-wrap gap-2 mt-2 items-center">
|
<div class="flex flex-wrap gap-2 mt-2 items-center">
|
||||||
|
|||||||
Reference in New Issue
Block a user