-
${svc.provider === 'multiasistencia' ? 'MULTI' : 'HOME'}
-
+
+
-
${isBlocked ? 'Expediente Bloqueado' : name}
+
+
${isBlocked ? 'Bloqueado' : name}
+ ${svc.provider === 'multiasistencia' ? 'MULTI' : 'HOME'}
+
${isBlocked ? 'Pendiente de liberación' : fullAddr}
${!isBlocked ? `
-
-
+
+
${phone ? `
-
-
+
+
` : ''}
-
+
` : '
'}
`;
container.appendChild(card);
@@ -241,22 +261,22 @@
const svc = scrapedData.find(s => s.id === id);
if(!svc) return;
const raw = svc.raw_data;
+ const companyName = raw['Compañía'] || raw['COMPAÑIA'] || "";
+ const logoUrl = getLogoUrl(companyName); //
// ACTUALIZACIÓN DE CABECERA
document.getElementById('displayRef').innerText = `REF: ${svc.service_ref}`;
- document.getElementById('displayCompany').innerText = raw['Compañía'] || raw['COMPAÑIA'] || svc.provider.toUpperCase();
+ document.getElementById('displayCompany').innerText = companyName || svc.provider.toUpperCase();
+ document.getElementById('modalCompanyLogo').innerHTML = `

`;
// RELLENAR FORMULARIO
document.getElementById('impScrapedId').value = id;
document.getElementById('impName').value = raw['Nombre Cliente'] || raw['CLIENTE'] || "";
-
const rawPhone = raw['Teléfono'] || raw['TELEFONOS'] || raw['TELEFONO'] || "";
document.getElementById('impPhone').value = rawPhone.match(/[6789]\d{8}/)?.[0] || "";
-
const addr = raw['Dirección'] || raw['DOMICILIO'] || "";
const pop = raw['Población'] || raw['POBLACION-PROVINCIA'] || "";
document.getElementById('impAddress').value = `${addr} ${pop}`.trim();
-
document.getElementById('impCP').value = raw['Código Postal'] || "";
document.getElementById('impDesc').value = raw['Descripción'] || "";
document.getElementById('impUrgent').value = (raw['Urgente'] === 'Sí' || raw['Urgente'] === 'true').toString();
@@ -264,8 +284,6 @@
document.getElementById('impNotesInt').value = "";
document.getElementById('impNotesExt').value = "";
document.getElementById('impGuild').value = "";
- document.getElementById('impOperator').innerHTML = '
';
-
document.getElementById('importModal').classList.remove('hidden');
lucide.createIcons();
}
@@ -299,7 +317,7 @@
});
const result = await res.json();
if(result.ok) {
- showToast("✅ Traspasado con éxito");
+ showToast("✅ Expediente traspasado con éxito");
closeModal();
loadInbox();
} else { showToast("❌ Error al importar", true); }