Actualizar index.html
This commit is contained in:
41
index.html
41
index.html
@@ -125,6 +125,19 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="quoteNudge" class="fixed bottom-24 right-10 z-[60] hidden pointer-events-none fade-in">
|
||||
<div class="bg-blue-600 text-white px-4 py-3 rounded-2xl shadow-2xl flex items-center gap-3 animate-bounce relative border-2 border-white/20">
|
||||
<div class="flex flex-col">
|
||||
<span class="text-[8px] font-black uppercase tracking-[0.2em] opacity-80 leading-none mb-1">Acción Pendiente</span>
|
||||
<span class="text-[11px] font-black uppercase tracking-wider whitespace-nowrap">Revisar Presupuesto</span>
|
||||
</div>
|
||||
<i data-lucide="arrow-big-down-dash" class="w-5 h-5"></i>
|
||||
|
||||
<div class="absolute -bottom-1.5 right-6 w-3 h-3 bg-blue-600 rotate-45"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
|
||||
<nav class="fixed bottom-0 w-full glass-nav border-t border-slate-200 pb-safe pt-2 z-50 transition-transform duration-300 translate-y-full" id="bottomNav">
|
||||
@@ -402,7 +415,17 @@
|
||||
|
||||
document.getElementById(`tab${tabName}`).classList.add('active');
|
||||
document.getElementById(`btnNav${tabName}`).classList.add('active');
|
||||
|
||||
// 🚨 Ocultar el señalador si entramos en presupuestos
|
||||
const nudge = document.getElementById('quoteNudge');
|
||||
if (tabName === 'Presupuestos') {
|
||||
nudge.classList.add('hidden');
|
||||
} else {
|
||||
// Si volvemos a Avisos, volvemos a evaluar si hay pendientes
|
||||
const hasPending = currentQuotes.some(q => !q.status || q.status === 'pending');
|
||||
if (hasPending) nudge.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
// --- GESTIÓN DE PRESUPUESTOS ---
|
||||
function renderQuotes() {
|
||||
@@ -485,7 +508,23 @@
|
||||
|
||||
container.innerHTML = html;
|
||||
updateQuotesBadges(unseenCount);
|
||||
lucide.createIcons();
|
||||
|
||||
|
||||
// 🚨 LÓGICA DEL SEÑALADOR (NUDGE)
|
||||
const nudge = document.getElementById('quoteNudge');
|
||||
// Comprobar si hay algún presupuesto que sea 'pending'
|
||||
const hasPending = currentQuotes.some(q => !q.status || q.status === 'pending');
|
||||
|
||||
// Solo lo mostramos si hay pendientes Y estamos en la pestaña de Avisos
|
||||
const isAvisosTab = document.getElementById('tabAvisos').classList.contains('active');
|
||||
|
||||
if (hasPending && isAvisosTab) {
|
||||
nudge.classList.remove('hidden');
|
||||
} else {
|
||||
nudge.classList.add('hidden');
|
||||
}
|
||||
|
||||
lucide.createIcons();
|
||||
}
|
||||
|
||||
function updateQuotesBadges(count) {
|
||||
|
||||
Reference in New Issue
Block a user