From cd5773a1bee511251bce426544f2efb0eea6f85c Mon Sep 17 00:00:00 2001 From: root Date: Tue, 17 Feb 2026 13:16:50 -0500 Subject: [PATCH] feat: add "Hoje" preset to corporate dashboard Co-Authored-By: Claude Opus 4.6 --- src/admin-dashboard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/admin-dashboard.js b/src/admin-dashboard.js index 979a008..2780e16 100644 --- a/src/admin-dashboard.js +++ b/src/admin-dashboard.js @@ -488,6 +488,7 @@ ${buildHeader({ role: role, userName: user.nome, activePage: 'dashboard' })}
Periodo:
+ @@ -555,7 +556,10 @@ let charts = {}; function getPresetDates(preset) { const now = new Date(); let inicio, fim; - if (preset === 'thisMonth') { + if (preset === 'hoje') { + inicio = now; + fim = now; + } else if (preset === 'thisMonth') { inicio = new Date(now.getFullYear(), now.getMonth(), 1); fim = now; } else if (preset === 'lastMonth') {