Actualizar automatizaciones.html
This commit is contained in:
@@ -9,109 +9,116 @@
|
|||||||
<style>
|
<style>
|
||||||
.fade-in { animation: fadeIn 0.3s ease-in-out; }
|
.fade-in { animation: fadeIn 0.3s ease-in-out; }
|
||||||
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
||||||
.service-card { transition: all 0.2s ease; }
|
/* Forzamos el ancho del sidebar para que no colapse */
|
||||||
.service-card:hover { transform: translateY(-2px); }
|
#layout-sidebar { width: 260px; height: 100vh; shrink: 0; }
|
||||||
|
.service-card { transition: all 0.2s ease; border-left-width: 6px; }
|
||||||
|
.service-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-50 text-gray-800 font-sans h-screen overflow-hidden flex">
|
<body class="bg-gray-50 text-gray-800 font-sans h-screen overflow-hidden flex">
|
||||||
|
|
||||||
<div id="sidebar-container" class="h-full shrink-0"></div>
|
<div id="layout-sidebar" class="h-full"></div>
|
||||||
|
|
||||||
<div class="flex-1 flex flex-col h-full relative min-w-0">
|
<div class="flex-1 flex flex-col h-full relative min-w-0">
|
||||||
<div id="header-container"></div>
|
|
||||||
|
<div id="layout-header"></div>
|
||||||
|
|
||||||
<main class="flex-1 overflow-hidden flex flex-col relative">
|
<main class="flex-1 overflow-hidden flex flex-col relative">
|
||||||
|
|
||||||
<div class="bg-white border-b border-gray-200 p-4 shrink-0 z-10 shadow-sm">
|
<div class="bg-white border-b border-gray-200 p-6 shrink-0 shadow-sm z-10">
|
||||||
<div class="flex flex-col md:flex-row justify-between items-start md:items-center gap-4">
|
<div class="flex flex-col md:flex-row justify-between items-center gap-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-2xl font-bold text-gray-800 flex items-center gap-2">
|
<h2 class="text-2xl font-extrabold text-gray-800 flex items-center gap-3">
|
||||||
<i data-lucide="bot" class="text-blue-600"></i> Buzón de Automatizaciones
|
<span class="bg-blue-600 p-2 rounded-lg text-white">
|
||||||
|
<i data-lucide="bot" class="w-6 h-6"></i>
|
||||||
|
</span>
|
||||||
|
Buzón de Automatizaciones
|
||||||
</h2>
|
</h2>
|
||||||
<p class="text-xs text-gray-500 mt-1">Revisa e importa servicios detectados por Multiasistencia y HomeServe.</p>
|
<p class="text-sm text-gray-500 mt-1">Valida e importa los expedientes capturados por los robots.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button onclick="loadInbox()" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg text-sm font-bold flex items-center gap-2 transition-colors shadow-lg shadow-blue-100">
|
<button onclick="loadInbox()" class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2.5 rounded-xl font-bold flex items-center gap-2 transition-all shadow-lg shadow-blue-200 active:scale-95">
|
||||||
<i data-lucide="refresh-cw" class="w-4 h-4"></i> Actualizar Buzón
|
<i data-lucide="refresh-cw" class="w-4 h-4"></i> Actualizar Listado
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-1 overflow-y-auto p-6 space-y-4" id="inboxContainer">
|
<div class="flex-1 overflow-y-auto p-6 space-y-4 bg-slate-50/50" id="inboxContainer">
|
||||||
<div class="flex flex-col items-center justify-center py-20 text-gray-400">
|
|
||||||
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mb-4"></div>
|
|
||||||
<p>Sincronizando con los robots...</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="importModal" class="fixed inset-0 bg-black bg-opacity-50 hidden z-50 flex items-center justify-center backdrop-blur-sm">
|
<div id="importModal" class="fixed inset-0 bg-slate-900/60 hidden z-[999] flex items-center justify-center backdrop-blur-md p-4">
|
||||||
<div class="bg-white rounded-xl shadow-2xl w-full max-w-lg p-6 animate-slide-in flex flex-col max-h-[90vh] overflow-y-auto">
|
<div class="bg-white rounded-2xl shadow-2xl w-full max-w-2xl overflow-hidden animate-slide-in flex flex-col max-h-[95vh]">
|
||||||
<div class="flex justify-between items-center mb-4 border-b pb-2">
|
<div class="bg-slate-800 text-white p-6 flex justify-between items-center">
|
||||||
<h3 class="text-lg font-bold text-gray-800 flex items-center gap-2">
|
<div>
|
||||||
<i data-lucide="file-check" class="text-green-600"></i> Validar Datos de Importación
|
<h3 class="text-xl font-bold flex items-center gap-2">
|
||||||
|
<i data-lucide="file-edit" class="text-blue-400"></i> Revisar Expediente
|
||||||
</h3>
|
</h3>
|
||||||
<button onclick="closeModal()" class="text-gray-400 hover:text-gray-600"><i data-lucide="x" class="w-5 h-5"></i></button>
|
<p class="text-slate-400 text-xs mt-1">Verifica la información antes de enviarla al CRM.</p>
|
||||||
|
</div>
|
||||||
|
<button onclick="closeModal()" class="text-slate-400 hover:text-white transition-colors">
|
||||||
|
<i data-lucide="x" class="w-6 h-6"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id="importForm" onsubmit="handleFinalImport(event)" class="space-y-4">
|
<form id="importForm" onsubmit="handleFinalImport(event)" class="p-8 space-y-6 overflow-y-auto">
|
||||||
<input type="hidden" id="impScrapedId">
|
<input type="hidden" id="impScrapedId">
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-3">
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||||
<div class="col-span-2">
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Nombre del Cliente</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Nombre del Cliente</label>
|
||||||
<input type="text" id="impName" required class="w-full border p-2 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="impName" required class="w-full border-2 border-slate-100 bg-slate-50 p-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Teléfono</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Teléfono Principal</label>
|
||||||
<input type="text" id="impPhone" required class="w-full border p-2 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none">
|
<input type="text" id="impPhone" required class="w-full border-2 border-slate-100 bg-slate-50 p-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all">
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Compañía</label>
|
|
||||||
<input type="text" id="impCompany" class="w-full border p-2 rounded-lg text-sm bg-gray-50 font-medium" readonly>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Dirección Completa</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Dirección de Trabajo</label>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<i data-lucide="map-pin" class="w-4 h-4 absolute left-3 top-2.5 text-gray-400"></i>
|
<i data-lucide="map-pin" class="w-4 h-4 absolute left-4 top-3.5 text-slate-400"></i>
|
||||||
<input type="text" id="impAddress" required class="w-full border pl-9 pr-3 py-2 rounded-lg text-sm outline-none focus:ring-2 focus:ring-blue-500">
|
<input type="text" id="impAddress" required class="w-full border-2 border-slate-100 bg-slate-50 pl-11 pr-4 py-3 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Descripción de la Avería</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Descripción de Daños / Trabajos</label>
|
||||||
<textarea id="impDesc" rows="4" class="w-full border p-2 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 outline-none" placeholder="Detalles extraídos por el robot..."></textarea>
|
<textarea id="impDesc" rows="5" class="w-full border-2 border-slate-100 bg-slate-50 p-4 rounded-xl text-sm focus:border-blue-500 focus:bg-white outline-none transition-all" placeholder="Escribe aquí los detalles..."></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-3">
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||||
<div>
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Referencia Externa</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Ref. Robot</label>
|
||||||
<input type="text" id="impRef" class="w-full border p-2 rounded-lg text-sm bg-gray-50" readonly>
|
<input type="text" id="impRef" class="w-full border-2 border-slate-100 bg-slate-100 p-3 rounded-xl text-sm font-bold text-slate-600" readonly>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="space-y-1">
|
||||||
<label class="block text-[10px] font-bold text-gray-400 uppercase mb-1">Prioridad</label>
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Proveedor</label>
|
||||||
<select id="impUrgent" class="w-full border p-2 rounded-lg text-sm bg-white outline-none">
|
<input type="text" id="impCompany" class="w-full border-2 border-slate-100 bg-slate-100 p-3 rounded-xl text-sm font-bold text-slate-600" readonly>
|
||||||
<option value="false">Normal</option>
|
</div>
|
||||||
<option value="true">🚨 Urgente</option>
|
<div class="space-y-1">
|
||||||
|
<label class="text-[11px] font-black text-slate-500 uppercase tracking-wider">Urgencia</label>
|
||||||
|
<select id="impUrgent" class="w-full border-2 border-slate-100 bg-white p-3 rounded-xl text-sm font-bold outline-none focus:border-blue-500 transition-all">
|
||||||
|
<option value="false">Servicio Normal</option>
|
||||||
|
<option value="true">⚠️ URGENTE</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pt-4">
|
<div class="pt-4">
|
||||||
<button type="submit" class="w-full bg-green-600 text-white px-4 py-3 rounded-xl text-sm font-bold hover:bg-green-700 shadow-lg shadow-green-100 flex items-center justify-center gap-2 transition-all">
|
<button type="submit" class="w-full bg-emerald-600 text-white py-4 rounded-2xl font-black text-sm hover:bg-emerald-700 shadow-xl shadow-emerald-100 flex items-center justify-center gap-3 transition-all active:scale-95">
|
||||||
<i data-lucide="save" class="w-4 h-4"></i> CONFIRMAR Y GUARDAR EN CRM
|
<i data-lucide="cloud-upload" class="w-5 h-5"></i> IMPORTAR AL CRM AHORA
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="toast" class="fixed bottom-5 right-5 bg-slate-800 text-white px-6 py-3 rounded-lg shadow-2xl hidden z-[100] translate-y-0 transition-all duration-300">
|
<div id="toast" class="fixed bottom-8 right-8 bg-slate-900 text-white px-8 py-4 rounded-2xl shadow-2xl hidden z-[1000] border border-slate-700 animate-bounce-in">
|
||||||
<span id="toastMsg"></span>
|
<span id="toastMsg" class="font-bold text-sm"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/layout.js"></script>
|
<script src="js/layout.js"></script>
|
||||||
@@ -121,12 +128,17 @@
|
|||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', async () => {
|
document.addEventListener('DOMContentLoaded', async () => {
|
||||||
if (!localStorage.getItem("token")) window.location.href = "index.html";
|
if (!localStorage.getItem("token")) window.location.href = "index.html";
|
||||||
await loadInbox();
|
// Damos un pequeño tiempo para que layout.js termine de pintar
|
||||||
|
setTimeout(() => {
|
||||||
|
loadInbox();
|
||||||
lucide.createIcons();
|
lucide.createIcons();
|
||||||
|
}, 100);
|
||||||
});
|
});
|
||||||
|
|
||||||
async function loadInbox() {
|
async function loadInbox() {
|
||||||
const container = document.getElementById('inboxContainer');
|
const container = document.getElementById('inboxContainer');
|
||||||
|
container.innerHTML = '<div class="flex flex-col items-center justify-center py-20 text-blue-600"><div class="animate-spin rounded-full h-10 w-10 border-b-2 border-current mb-4"></div><p class="font-bold text-slate-400">Leyendo a los robots...</p></div>';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [svcRes, mapRes] = await Promise.all([
|
const [svcRes, mapRes] = await Promise.all([
|
||||||
fetch(`${API_URL}/providers/scraped`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }),
|
fetch(`${API_URL}/providers/scraped`, { headers: { "Authorization": `Bearer ${localStorage.getItem("token")}` } }),
|
||||||
@@ -138,10 +150,10 @@
|
|||||||
allScraped = svcData.services || [];
|
allScraped = svcData.services || [];
|
||||||
|
|
||||||
if (allScraped.length === 0) {
|
if (allScraped.length === 0) {
|
||||||
container.innerHTML = `
|
container.innerHTML = `<div class="bg-white p-12 rounded-3xl border-2 border-dashed border-slate-200 text-center flex flex-col items-center">
|
||||||
<div class="flex flex-col items-center justify-center py-20 text-gray-400 bg-white rounded-xl border-2 border-dashed">
|
<div class="bg-green-50 text-green-500 p-4 rounded-full mb-4"><i data-lucide="check-circle-2" class="w-10 h-10"></i></div>
|
||||||
<i data-lucide="check-circle" class="w-12 h-12 mb-2 text-green-500"></i>
|
<h3 class="text-xl font-black text-slate-800">¡Buzón Limpio!</h3>
|
||||||
<p class="font-medium">No hay servicios nuevos pendientes.</p>
|
<p class="text-slate-400 mt-2">No hay nuevos expedientes para procesar.</p>
|
||||||
</div>`;
|
</div>`;
|
||||||
lucide.createIcons();
|
lucide.createIcons();
|
||||||
return;
|
return;
|
||||||
@@ -152,34 +164,46 @@
|
|||||||
const raw = svc.raw_data || {};
|
const raw = svc.raw_data || {};
|
||||||
const myMap = globalMappings.filter(m => m.provider === svc.provider);
|
const myMap = globalMappings.filter(m => m.provider === svc.provider);
|
||||||
|
|
||||||
const name = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || "No detectado";
|
const name = raw[myMap.find(m => m.target_key === 'clientName')?.original_key] || "Nombre no identificado";
|
||||||
const addr = raw[myMap.find(m => m.target_key === 'address')?.original_key] || "Sin dirección";
|
const addr = raw[myMap.find(m => m.target_key === 'address')?.original_key] || "Sin dirección";
|
||||||
const phone = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || "S/T";
|
const phone = raw[myMap.find(m => m.target_key === 'phone')?.original_key] || raw['Teléfono'] || "S/T";
|
||||||
|
|
||||||
const card = document.createElement('div');
|
const card = document.createElement('div');
|
||||||
card.className = "service-card bg-white p-4 rounded-xl border border-gray-200 shadow-sm flex items-center gap-4 fade-in";
|
card.className = "service-card bg-white p-5 rounded-2xl border border-slate-200 flex items-center gap-6 fade-in shadow-sm";
|
||||||
|
card.style.borderLeftColor = svc.provider === 'homeserve' ? '#ef4444' : '#3b82f6';
|
||||||
|
|
||||||
card.innerHTML = `
|
card.innerHTML = `
|
||||||
<div class="w-20 h-20 rounded-lg flex flex-col items-center justify-center shrink-0 ${svc.provider === 'homeserve' ? 'bg-red-50 text-red-600' : 'bg-blue-50 text-blue-600'}">
|
<div class="w-20 h-20 rounded-2xl flex flex-col items-center justify-center shrink-0 ${svc.provider === 'homeserve' ? 'bg-red-50 text-red-600' : 'bg-blue-50 text-blue-600'}">
|
||||||
<span class="text-[10px] font-black uppercase tracking-tighter">${svc.provider}</span>
|
<span class="text-[9px] font-black uppercase tracking-widest mb-1">${svc.provider}</span>
|
||||||
<i data-lucide="${svc.provider === 'homeserve' ? 'home' : 'briefcase'}" class="w-6 h-6 my-1"></i>
|
<i data-lucide="${svc.provider === 'homeserve' ? 'home' : 'briefcase'}" class="w-7 h-7"></i>
|
||||||
<span class="text-[10px] font-bold">#${svc.service_ref.slice(-4)}</span>
|
<span class="text-[10px] font-black mt-1">#${svc.service_ref.slice(-4)}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1 min-w-0">
|
<div class="flex-1 min-w-0">
|
||||||
<h4 class="font-bold text-gray-900 truncate">${name}</h4>
|
<div class="flex items-center gap-2">
|
||||||
<p class="text-xs text-gray-500 flex items-center gap-1 mt-0.5 truncate"><i data-lucide="map-pin" class="w-3 h-3"></i> ${addr}</p>
|
<h4 class="font-black text-slate-800 text-lg truncate">${name}</h4>
|
||||||
<div class="flex gap-2 mt-2">
|
${svc.raw_data.Urgente === 'Sí' ? '<span class="bg-red-100 text-red-600 text-[9px] font-black px-2 py-0.5 rounded-full">URGENTE</span>' : ''}
|
||||||
<span class="text-[10px] bg-gray-100 px-2 py-0.5 rounded font-bold text-gray-600"><i data-lucide="phone" class="w-2.5 h-2.5 inline mr-1"></i>${phone}</span>
|
</div>
|
||||||
|
<p class="text-sm text-slate-500 flex items-center gap-1.5 mt-1 truncate">
|
||||||
|
<i data-lucide="map-pin" class="w-3.5 h-3.5 text-slate-400"></i> ${addr}
|
||||||
|
</p>
|
||||||
|
<div class="flex gap-3 mt-3">
|
||||||
|
<span class="flex items-center gap-1.5 text-xs font-bold text-slate-600 bg-slate-100 px-3 py-1 rounded-lg">
|
||||||
|
<i data-lucide="phone" class="w-3 h-3 text-slate-400"></i> ${phone}
|
||||||
|
</span>
|
||||||
|
<span class="text-xs font-bold text-slate-400 flex items-center gap-1.5">
|
||||||
|
<i data-lucide="clock" class="w-3 h-3"></i> Detectado: ${new Date(svc.created_at).toLocaleTimeString([], {hour: '2-digit', minute:'2-digit'})}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button onclick="openEditor(${svc.id})" class="bg-white border-2 border-green-500 text-green-600 p-3 rounded-full hover:bg-green-50 transition-colors shadow-sm shadow-green-50">
|
<button onclick="openEditor(${svc.id})" class="bg-emerald-500 hover:bg-emerald-600 text-white p-4 rounded-2xl shadow-lg shadow-emerald-100 transition-all active:scale-90">
|
||||||
<i data-lucide="check" class="w-6 h-6"></i>
|
<i data-lucide="arrow-right-circle" class="w-7 h-7"></i>
|
||||||
</button>
|
</button>
|
||||||
`;
|
`;
|
||||||
container.appendChild(card);
|
container.appendChild(card);
|
||||||
});
|
});
|
||||||
lucide.createIcons();
|
lucide.createIcons();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showToast("Error al cargar datos", true);
|
showToast("Error al conectar con la API", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -203,9 +227,7 @@
|
|||||||
lucide.createIcons();
|
lucide.createIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeModal() {
|
function closeModal() { document.getElementById('importModal').classList.add('hidden'); }
|
||||||
document.getElementById('importModal').classList.add('hidden');
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleFinalImport(e) {
|
async function handleFinalImport(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -227,20 +249,20 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
showToast("✅ Servicio importado al CRM");
|
showToast("🚀 ¡Expediente enviado al CRM!");
|
||||||
closeModal();
|
closeModal();
|
||||||
loadInbox();
|
loadInbox();
|
||||||
} else {
|
} else {
|
||||||
showToast("Error al importar", true);
|
showToast("Error al guardar", true);
|
||||||
}
|
}
|
||||||
} catch (e) { showToast("Error de conexión", true); }
|
} catch (e) { showToast("Error de conexión", true); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function showToast(msg, isError = false) {
|
function showToast(msg, isError = false) {
|
||||||
const t = document.getElementById('toast'), m = document.getElementById('toastMsg');
|
const t = document.getElementById('toast'), m = document.getElementById('toastMsg');
|
||||||
t.className = `fixed bottom-5 right-5 px-6 py-3 rounded-lg shadow-2xl z-[100] flex items-center gap-3 ${isError ? 'bg-red-600' : 'bg-slate-800'} text-white font-medium`;
|
t.className = `fixed bottom-8 right-8 px-8 py-4 rounded-2xl shadow-2xl z-[1000] flex items-center gap-3 transition-all ${isError ? 'bg-red-600' : 'bg-slate-900'} text-white border border-white/10`;
|
||||||
m.innerText = msg; t.classList.remove('hidden');
|
m.innerText = msg; t.classList.remove('hidden');
|
||||||
setTimeout(() => t.classList.add('hidden'), 3000);
|
setTimeout(() => t.classList.add('hidden'), 4000);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user