Actualizar servicios.html
This commit is contained in:
@@ -577,7 +577,7 @@ async function searchClientByPhone(phone) {
|
||||
const addr = raw["Dirección"] || raw["DOMICILIO"] || "---";
|
||||
const pop = raw["Población"] || raw["POBLACION-PROVINCIA"] || "";
|
||||
const fullAddr = `${addr} ${pop}`.trim();
|
||||
const cita = raw.scheduled_date ? `${raw.scheduled_date} | ${raw.scheduled_time}` : 'Pendiente Cita';
|
||||
const cita = raw.scheduled_date ? `${raw.scheduled_date.split('-').reverse().slice(0,2).join('/')} | ${raw.scheduled_time}` : 'Pte. Cita';
|
||||
const companyName = raw['Compañía'] || raw['COMPAÑIA'] || raw['Procedencia'] || (s.provider === 'MANUAL' ? 'PARTICULAR' : 'ASEGURADORA');
|
||||
|
||||
const isUrgent = s.is_urgent === true || (raw['Urgente'] && raw['Urgente'].toLowerCase() === 'sí') || (raw['URGENTE'] && raw['URGENTE'].toLowerCase() === 'si');
|
||||
@@ -603,7 +603,6 @@ async function searchClientByPhone(phone) {
|
||||
<span class="truncate">${stateInfo.name}</span>
|
||||
</span>
|
||||
${isUrgent ? `<span class="bg-red-500 text-white px-2 py-1 rounded-lg text-[9px] font-black uppercase shadow-sm animate-pulse shrink-0">🔥 URGENTE</span>` : `<span class="text-[10px] text-slate-400 font-bold uppercase bg-slate-50 border border-slate-100 px-2.5 py-1 rounded-lg shrink-0">#${s.service_ref}</span>`}
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
@@ -618,21 +617,25 @@ async function searchClientByPhone(phone) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center justify-between mt-4 pt-4 border-t border-slate-100">
|
||||
<div class="flex items-center gap-2 min-w-0">
|
||||
<div class="bg-slate-100 p-1.5 rounded-lg text-slate-500 shrink-0"><i data-lucide="hard-hat" class="w-3.5 h-3.5"></i></div>
|
||||
<span class="text-[10px] font-black text-slate-600 uppercase truncate" title="${s.assigned_name || 'Sin asignar'}">${s.assigned_name || 'Sin asignar'}</span>
|
||||
<button onclick="event.stopPropagation(); window.location.href='trazabilidad.html?id=${s.id}'" class="p-1.5 bg-slate-50 text-slate-400 hover:text-blue-600 rounded-lg transition-colors border border-slate-100" title="Ver Historial">
|
||||
<i data-lucide="history" class="w-3.5 h-3.5"></i>
|
||||
<div class="flex items-center justify-between mt-4 pt-4 border-t border-slate-100 gap-2">
|
||||
<div class="flex items-center gap-1 min-w-0 flex-1">
|
||||
<div class="bg-slate-100 p-1 rounded-lg text-slate-500 shrink-0"><i data-lucide="hard-hat" class="w-3 h-3"></i></div>
|
||||
<span class="text-[10px] font-black text-slate-600 uppercase truncate flex-1" style="max-width: 70px;" title="${s.assigned_name || 'Sin asignar'}">${s.assigned_name || 'Sin asignar'}</span>
|
||||
|
||||
<div class="flex items-center gap-0.5 shrink-0">
|
||||
<button onclick="event.stopPropagation(); window.location.href='trazabilidad.html?id=${s.id}'" class="p-1.5 text-slate-300 hover:text-blue-600 transition-colors" title="Ver Historial">
|
||||
<i data-lucide="history" class="w-4 h-4"></i>
|
||||
</button>
|
||||
<button onclick="event.stopPropagation(); openDetail(${s.id}, true)" class="p-1.5 text-slate-300 hover:text-amber-600 transition-colors" title="Editar Ficha">
|
||||
<i data-lucide="edit-3" class="w-4 h-4"></i>
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
${raw.scheduled_date ? `
|
||||
<div class="flex items-center gap-1.5 text-blue-600 shrink-0 ml-2 bg-blue-50 px-2 py-1 rounded-md border border-blue-100">
|
||||
<i data-lucide="${iconEstado}" class="w-3.5 h-3.5"></i>
|
||||
<span class="text-[9px] font-black uppercase">${cita}</span>
|
||||
</div>` : ''}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-1 text-blue-600 shrink-0 bg-blue-50 px-2 py-1 rounded-md border border-blue-100">
|
||||
<i data-lucide="${iconEstado}" class="w-3 h-3"></i>
|
||||
<span class="text-[9px] font-black uppercase whitespace-nowrap">${raw.scheduled_date ? cita.split('|')[0] : 'Pte. Cita'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user