Actualizar automatizaciones.html
This commit is contained in:
@@ -297,8 +297,10 @@
|
||||
|
||||
document.getElementById('impScrapedId').value = id;
|
||||
document.getElementById('impName').value = raw['Nombre Cliente'] || raw['CLIENTE'] || "S/N";
|
||||
|
||||
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();
|
||||
@@ -308,15 +310,25 @@
|
||||
const isUrgent = raw['Urgente'] === 'Sí' || raw['Urgente'] === 'true' || raw['URGENTE'] === 'SI';
|
||||
document.getElementById('impUrgent').value = isUrgent.toString();
|
||||
|
||||
document.getElementById('impNotesInt').value = "";
|
||||
document.getElementById('impNotesExt').value = "";
|
||||
document.getElementById('impGuild').value = "";
|
||||
// RECUPERACIÓN DE DATOS GUARDADOS PREVIAMENTE
|
||||
document.getElementById('impNotesInt').value = raw['internal_notes'] || "";
|
||||
document.getElementById('impNotesExt').value = raw['client_notes'] || "";
|
||||
|
||||
// Cargar Gremio y disparar carga de operarios si ya existía
|
||||
const savedGuild = raw['guild_id'] || "";
|
||||
document.getElementById('impGuild').value = savedGuild;
|
||||
|
||||
if(savedGuild) {
|
||||
loadOpsForGuild(savedGuild).then(() => {
|
||||
document.getElementById('impOperator').value = raw['assigned_to'] || "";
|
||||
});
|
||||
} else {
|
||||
document.getElementById('impOperator').innerHTML = '<option value="">-- Automática --</option>';
|
||||
}
|
||||
|
||||
document.getElementById('importModal').classList.remove('hidden');
|
||||
lucide.createIcons();
|
||||
}
|
||||
|
||||
function closeModal() { document.getElementById('importModal').classList.add('hidden'); }
|
||||
|
||||
async function saveDraftChanges(e) {
|
||||
|
||||
Reference in New Issue
Block a user