feat: rebrand Dashboard + mobile nav + filtrar leads com lembrete futuro

- Renomear "Plan EAL" para "Dashboard Descomplicar" (header + footer)
- Adicionar menu hamburger mobile com navegacao Dashboard/Monitor
- Excluir leads com lembrete futuro da seccao "Contactar" (NOT EXISTS tblreminders)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 21:50:54 +00:00
parent e99fb8b274
commit 24d63cf233
2 changed files with 42 additions and 4 deletions

View File

@@ -123,6 +123,10 @@ export async function getContactarLeads() {
OR (SELECT MAX(date) FROM tbllead_activity_log WHERE leadid = l.id) < DATE_SUB(CURDATE(), INTERVAL 60 DAY) OR (SELECT MAX(date) FROM tbllead_activity_log WHERE leadid = l.id) < DATE_SUB(CURDATE(), INTERVAL 60 DAY)
)) ))
) )
AND NOT EXISTS (
SELECT 1 FROM tblreminders r
WHERE r.rel_id = l.id AND r.rel_type = 'lead' AND r.date > NOW() AND r.isnotified = 0
)
ORDER BY l.dateadded DESC ORDER BY l.dateadded DESC
`) `)
return rows return rows

View File

@@ -24,6 +24,8 @@ import {
LayoutDashboard, LayoutDashboard,
Activity, Activity,
Target, Target,
Menu,
X,
} from 'lucide-react' } from 'lucide-react'
// Types // Types
@@ -418,6 +420,7 @@ function App() {
const [data, setData] = useState<DashboardData | null>(null) const [data, setData] = useState<DashboardData | null>(null)
const [loading, setLoading] = useState(true) const [loading, setLoading] = useState(true)
const [refreshing, setRefreshing] = useState(false) const [refreshing, setRefreshing] = useState(false)
const [mobileMenuOpen, setMobileMenuOpen] = useState(false)
const fetchData = useCallback(async () => { const fetchData = useCallback(async () => {
setRefreshing(true) setRefreshing(true)
@@ -484,8 +487,8 @@ function App() {
<Zap className="w-6 h-6 text-white" /> <Zap className="w-6 h-6 text-white" />
</motion.div> </motion.div>
<div> <div>
<h1 className="text-xl font-bold text-white tracking-tight">Plan EAL</h1> <h1 className="text-xl font-bold text-white tracking-tight">Dashboard Descomplicar</h1>
<p className="text-xs text-zinc-500">Descomplicar Dashboard SDK</p> <p className="text-xs text-zinc-500">Painel de Gestão</p>
</div> </div>
</div> </div>
@@ -501,6 +504,14 @@ function App() {
</nav> </nav>
<div className="flex items-center gap-3"> <div className="flex items-center gap-3">
<motion.button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
className="md:hidden p-2.5 rounded-xl bg-white/5 hover:bg-white/10 border border-white/10 transition-all"
>
{mobileMenuOpen ? <X className="w-5 h-5 text-zinc-400" /> : <Menu className="w-5 h-5 text-zinc-400" />}
</motion.button>
<motion.button <motion.button
whileHover={{ scale: 1.05 }} whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }} whileTap={{ scale: 0.95 }}
@@ -516,6 +527,29 @@ function App() {
</div> </div>
</header> </header>
{/* Mobile Navigation */}
<AnimatePresence>
{mobileMenuOpen && (
<motion.nav
initial={{ opacity: 0, height: 0 }}
animate={{ opacity: 1, height: 'auto' }}
exit={{ opacity: 0, height: 0 }}
className="md:hidden border-b border-white/5 bg-[#0a0a0f]/95 backdrop-blur-2xl overflow-hidden"
>
<div className="px-6 py-3 flex flex-col gap-1">
<a href="#" onClick={() => setMobileMenuOpen(false)} className="px-4 py-3 rounded-lg bg-brand-500 text-white text-sm font-medium flex items-center gap-3">
<LayoutDashboard className="w-4 h-4" />
Dashboard
</a>
<a href="/monitor" onClick={() => setMobileMenuOpen(false)} className="px-4 py-3 rounded-lg text-zinc-400 hover:text-white hover:bg-white/10 text-sm font-medium transition-all flex items-center gap-3">
<Activity className="w-4 h-4" />
Monitor
</a>
</div>
</motion.nav>
)}
</AnimatePresence>
{/* Main Content */} {/* Main Content */}
<main className="max-w-[1800px] mx-auto px-6 lg:px-8 py-8"> <main className="max-w-[1800px] mx-auto px-6 lg:px-8 py-8">
<AnimatePresence mode="wait"> <AnimatePresence mode="wait">
@@ -809,9 +843,9 @@ function App() {
<div className="flex items-center justify-between text-sm text-zinc-500"> <div className="flex items-center justify-between text-sm text-zinc-500">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div className="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" /> <div className="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" />
<span>Plan EAL v3.0</span> <span>Dashboard Descomplicar v3.0</span>
<span className="text-zinc-700">·</span> <span className="text-zinc-700">·</span>
<span>SDK Dashboard</span> <span>Painel de Gestão</span>
</div> </div>
<span>Actualizado: {new Date().toLocaleString('pt-PT')}</span> <span>Actualizado: {new Date().toLocaleString('pt-PT')}</span>
</div> </div>