Actualizar automatizaciones.html

This commit is contained in:
2026-02-14 11:18:16 +00:00
parent 3d2a46810b
commit ef0ea6d52c

View File

@@ -42,110 +42,108 @@
</div> </div>
</div> </div>
<div id="importModal" class="fixed inset-0 bg-slate-900/60 hidden z-[100] flex items-center justify-center backdrop-blur-md p-4"> <div id="importModal" class="fixed inset-0 bg-slate-900/70 hidden z-[100] flex items-center justify-center backdrop-blur-md p-2">
<div class="bg-white rounded-[2rem] shadow-2xl w-full max-w-4xl flex flex-col max-h-[92vh] overflow-hidden border border-slate-200 fade-in"> <div class="bg-white rounded-[2.5rem] shadow-2xl w-full max-w-4xl flex flex-col max-h-[95vh] overflow-hidden border border-slate-200 fade-in">
<div class="px-8 py-4 bg-slate-50 border-b flex justify-between items-center"> <div class="px-8 pt-6 pb-2 flex justify-between items-start">
<div class="flex items-center gap-6"> <div>
<div class="flex flex-col"> <h3 class="text-xl font-black text-slate-800 flex items-center gap-2">
<span class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Referencia</span> <i data-lucide="zap" class="text-amber-500 fill-amber-500 w-5 h-5"></i>
<input type="text" id="impRef" readonly class="bg-transparent border-none p-0 text-sm font-black text-slate-700 outline-none focus:ring-0 w-24"> Validación de Expediente
</div> </h3>
<div class="h-8 w-px bg-slate-200"></div> <div class="flex gap-3 mt-1">
<div class="flex flex-col"> <span id="displayRef" class="text-[10px] bg-slate-100 text-slate-500 px-2 py-0.5 rounded-lg font-bold border border-slate-200">REF: --</span>
<span class="text-[10px] font-black text-slate-400 uppercase tracking-widest">Compañía de Origen</span> <span id="displayCompany" class="text-[10px] bg-blue-50 text-blue-600 px-2 py-0.5 rounded-lg font-bold border border-blue-100 uppercase tracking-tighter">--</span>
<input type="text" id="impCompany" readonly class="bg-transparent border-none p-0 text-sm font-black text-blue-600 outline-none focus:ring-0 w-64 truncate">
</div> </div>
</div> </div>
<button onclick="closeModal()" class="bg-white p-2 rounded-full shadow-sm hover:bg-red-50 hover:text-red-500 transition-all border border-slate-100"> <button onclick="closeModal()" class="bg-slate-50 p-2 rounded-full hover:bg-red-50 hover:text-red-500 transition-all">
<i data-lucide="x" class="w-5 h-5"></i> <i data-lucide="x" class="w-5 h-5"></i>
</button> </button>
</div> </div>
<form id="importForm" onsubmit="handleFinalImport(event)" class="p-8 space-y-6 overflow-y-auto no-scrollbar"> <form id="importForm" onsubmit="handleFinalImport(event)" class="px-8 py-4 space-y-4 overflow-y-auto no-scrollbar">
<input type="hidden" id="impScrapedId"> <input type="hidden" id="impScrapedId">
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="space-y-1">
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Titular del Seguro</label>
<div class="flex items-center gap-3 bg-slate-50 p-3 rounded-2xl border border-slate-100">
<i data-lucide="user" class="w-4 h-4 text-slate-400"></i>
<input type="text" id="impName" readonly class="bg-transparent border-none p-0 text-sm font-bold text-slate-600 w-full outline-none focus:ring-0">
</div>
</div>
<div class="space-y-1">
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Teléfono de Contacto</label>
<div class="flex items-center gap-3 bg-slate-50 p-3 rounded-2xl border border-slate-100">
<i data-lucide="phone" class="w-4 h-4 text-emerald-500"></i>
<input type="text" id="impPhone" readonly class="bg-transparent border-none p-0 text-sm font-black text-emerald-700 w-full outline-none focus:ring-0">
</div>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div class="md:col-span-3 space-y-1">
<label class="text-[10px] font-black text-blue-600 uppercase tracking-widest ml-1 flex items-center gap-2">
Dirección y Población <i data-lucide="edit-2" class="w-3 h-3"></i>
</label>
<div class="relative group">
<i data-lucide="map-pin" class="w-4 h-4 absolute left-4 top-3.5 text-slate-400 group-focus-within:text-blue-500 transition-colors"></i>
<input type="text" id="impAddress" required class="w-full border-2 border-slate-100 bg-white pl-11 pr-4 py-3 rounded-2xl text-sm font-medium outline-none focus:border-blue-500 transition-all shadow-sm">
</div>
</div>
<div class="space-y-1">
<label class="text-[10px] font-black text-blue-600 uppercase tracking-widest ml-1 flex items-center gap-2">
C.P. <i data-lucide="edit-2" class="w-3 h-3"></i>
</label>
<input type="text" id="impCP" required class="w-full border-2 border-slate-100 bg-white p-3 rounded-2xl text-sm font-black text-center outline-none focus:border-blue-500 transition-all shadow-sm">
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 p-6 rounded-[1.5rem] border-2 border-blue-50 bg-blue-50/20 shadow-inner">
<div class="space-y-1">
<label class="text-[10px] font-black text-blue-600 uppercase tracking-widest ml-1">Gremio Especialista *</label>
<select id="impGuild" required onchange="loadOpsForGuild(this.value)" class="w-full border-2 border-white bg-white p-3 rounded-xl text-sm font-bold shadow-sm outline-none focus:ring-2 focus:ring-blue-500 transition-all">
<option value="">-- Seleccionar Gremio --</option>
</select>
</div>
<div class="space-y-1">
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Asignación Operario</label>
<select id="impOperator" class="w-full border-2 border-white bg-white p-3 rounded-xl text-sm font-bold shadow-sm outline-none focus:ring-2 focus:ring-blue-500 transition-all">
<option value="">-- Automática (Por defecto) --</option>
</select>
</div>
</div>
<div class="space-y-4">
<div class="space-y-1">
<label class="text-[10px] font-black text-slate-400 uppercase tracking-widest ml-1">Detalle de la Avería</label>
<textarea id="impDesc" rows="3" class="w-full border-2 border-slate-100 bg-slate-50/50 p-4 rounded-2xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all resize-none shadow-sm"></textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4"> <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="space-y-1"> <div class="bg-slate-50/80 p-3 rounded-2xl border border-slate-100 flex items-center gap-3">
<label class="text-[10px] font-black text-amber-600 uppercase tracking-widest ml-1">Notas Internas de Oficina</label> <div class="bg-white p-2 rounded-xl shadow-sm text-slate-400"><i data-lucide="user" class="w-4 h-4"></i></div>
<textarea id="impNotesInt" rows="2" class="w-full border border-amber-100 bg-amber-50/30 p-3 rounded-xl text-xs outline-none focus:border-amber-400 transition-all"></textarea> <div class="flex flex-col min-w-0">
<span class="text-[9px] font-black text-slate-400 uppercase leading-none mb-1">Asegurado</span>
<input type="text" id="impName" readonly class="bg-transparent border-none p-0 text-sm font-bold text-slate-700 outline-none focus:ring-0 truncate">
</div> </div>
<div class="space-y-1"> </div>
<label class="text-[10px] font-black text-blue-600 uppercase tracking-widest ml-1">Notas para el Operario/Cliente</label> <div class="bg-slate-50/80 p-3 rounded-2xl border border-slate-100 flex items-center gap-3">
<textarea id="impNotesExt" rows="2" class="w-full border border-blue-100 bg-blue-50/30 p-3 rounded-xl text-xs outline-none focus:border-blue-400 transition-all"></textarea> <div class="bg-white p-2 rounded-xl shadow-sm text-emerald-500"><i data-lucide="phone" class="w-4 h-4"></i></div>
<div class="flex flex-col min-w-0">
<span class="text-[9px] font-black text-slate-400 uppercase leading-none mb-1">Contacto Directo</span>
<input type="text" id="impPhone" readonly class="bg-transparent border-none p-0 text-sm font-black text-emerald-600 outline-none focus:ring-0">
</div> </div>
</div> </div>
</div> </div>
<div class="flex items-center justify-between border-t pt-6"> <div class="grid grid-cols-1 md:grid-cols-5 gap-3">
<div class="flex items-center gap-4"> <div class="md:col-span-4 space-y-1">
<div class="flex flex-col"> <label class="text-[9px] font-black text-blue-600 uppercase tracking-widest ml-2">Dirección de la Reparación</label>
<span class="text-[9px] font-black text-slate-400 uppercase">Prioridad</span> <div class="relative">
<select id="impUrgent" class="border-none bg-transparent text-xs font-black text-slate-700 focus:ring-0 p-0"> <i data-lucide="map-pin" class="w-4 h-4 absolute left-4 top-3 text-slate-300"></i>
<option value="false">BAJA (Normal)</option> <input type="text" id="impAddress" required class="w-full border-2 border-slate-100 bg-white pl-10 pr-4 py-2.5 rounded-2xl text-sm font-medium outline-none focus:border-blue-500 transition-all shadow-sm">
<option value="true">🚨 MUY URGENTE</option> </div>
</div>
<div class="space-y-1">
<label class="text-[9px] font-black text-blue-600 uppercase tracking-widest text-center block">C.P.</label>
<input type="text" id="impCP" required class="w-full border-2 border-slate-100 bg-white py-2.5 rounded-2xl text-sm font-black text-center outline-none focus:border-blue-500 shadow-sm">
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 p-4 rounded-[1.8rem] border-2 border-blue-50 bg-blue-50/20 shadow-sm">
<div class="space-y-1">
<label class="text-[9px] font-black text-blue-600 uppercase tracking-widest ml-2">Gremio Especialista *</label>
<select id="impGuild" required onchange="loadOpsForGuild(this.value)" class="w-full border border-blue-100 bg-white px-3 py-2 rounded-xl text-sm font-bold shadow-sm outline-none focus:ring-2 focus:ring-blue-500">
<option value="">-- Elegir Especialidad --</option>
</select>
</div>
<div class="space-y-1">
<label class="text-[9px] font-black text-slate-400 uppercase tracking-widest ml-2">Asignación Operario</label>
<select id="impOperator" class="w-full border border-blue-100 bg-white px-3 py-2 rounded-xl text-sm font-bold shadow-sm outline-none focus:ring-2 focus:ring-blue-500">
<option value="">-- Automática --</option>
</select> </select>
</div> </div>
</div> </div>
<button type="submit" class="bg-emerald-600 hover:bg-emerald-700 text-white font-black px-12 py-4 rounded-2xl shadow-xl shadow-emerald-100 transition-all flex items-center gap-3 active:scale-95 text-sm uppercase tracking-widest"> <div class="space-y-3">
<i data-lucide="send" class="w-5 h-5"></i> Confirmar e Importar <div class="space-y-1">
<label class="text-[9px] font-black text-slate-400 uppercase tracking-widest ml-2">Descripción de la Avería</label>
<textarea id="impDesc" rows="2" class="w-full border border-slate-200 bg-white px-4 py-2 rounded-2xl text-sm font-medium text-slate-600 outline-none focus:border-blue-400 resize-none shadow-sm"></textarea>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="relative">
<label class="text-[9px] font-black text-amber-600 uppercase tracking-widest ml-2 mb-1 block">Notas Internas</label>
<textarea id="impNotesInt" rows="1" class="w-full border border-amber-100 bg-amber-50/30 px-3 py-2 rounded-xl text-xs outline-none focus:bg-white transition-all"></textarea>
</div>
<div class="relative">
<label class="text-[9px] font-black text-blue-500 uppercase tracking-widest ml-2 mb-1 block">Notas Cliente</label>
<textarea id="impNotesExt" rows="1" class="w-full border border-blue-100 bg-blue-50/30 px-3 py-2 rounded-xl text-xs outline-none focus:bg-white transition-all"></textarea>
</div>
</div>
</div>
<div class="flex items-center gap-3 pt-4 border-t">
<div class="flex-1 bg-slate-100 p-1.5 rounded-2xl flex items-center gap-2">
<div class="bg-white px-4 py-2 rounded-xl shadow-sm">
<span class="text-[8px] font-black text-slate-400 uppercase block leading-none mb-1">Urgencia</span>
<select id="impUrgent" class="border-none bg-transparent text-xs font-black text-slate-700 focus:ring-0 p-0 cursor-pointer">
<option value="false">BAJA (Normal)</option>
<option value="true">⚠️ MUY URGENTE</option>
</select>
</div>
<div class="flex-1 text-center hidden md:block">
<p class="text-[10px] text-slate-400 font-bold uppercase tracking-tighter">Estado: <span class="text-blue-600">PENDIENTE</span></p>
</div>
</div>
<button type="submit" class="bg-slate-900 hover:bg-emerald-600 text-white font-black px-10 py-4 rounded-[1.5rem] shadow-xl transition-all flex items-center gap-3 active:scale-95 text-xs uppercase tracking-widest group">
<span>TRASPASAR AL CRM</span>
<i data-lucide="chevron-right" class="w-4 h-4 group-hover:translate-x-1 transition-transform"></i>
</button> </button>
</div> </div>
</form> </form>