diff --git a/public/css/style.css b/public/css/style.css index 63a304d..1d97557 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1498,3 +1498,42 @@ body:not(.admin-body) > * { .mail-type-direct { background: #dbeafe; color: #1e40af; } .mail-type-renewal { background: #dcfce7; color: var(--success); } .mail-type-renewal_auto { background: #fef3c7; color: var(--warning); } + +/* ---- Pending Badge in Sidebar ---- */ +.nav-badge { + display: inline-block; + background: var(--error); + color: white; + font-size: 0.7rem; + font-weight: 700; + padding: 1px 6px; + border-radius: 10px; + margin-left: 6px; + vertical-align: middle; + animation: pulse-badge 2s infinite; +} +@keyframes pulse-badge { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.6; } +} + +/* ---- Pending Stat Card ---- */ +.stat-card-pending { + border: 1.5px solid #fecaca !important; + background: #fff5f5 !important; + transition: box-shadow 0.2s; +} +.stat-card-pending:hover { + box-shadow: 0 0 0 3px rgba(220,38,38,0.15); +} + +/* ---- Pending Member Row ---- */ +.member-row-pending td { + background: #fffbeb !important; +} +.member-row-pending:hover td { + background: #fef3c7 !important; +} +.member-row-pending::before { + content: '⏳'; +} diff --git a/routes/admin.js b/routes/admin.js index 0f9e4dd..cca314e 100644 --- a/routes/admin.js +++ b/routes/admin.js @@ -50,7 +50,8 @@ router.get('/', requireAdmin, async (req, res) => { COUNT(*) as total, SUM(CASE WHEN status = 'active' THEN 1 ELSE 0 END) as active_count, SUM(CASE WHEN is_minor = 1 THEN 1 ELSE 0 END) as minors, - SUM(CASE WHEN created_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN 1 ELSE 0 END) as last_30_days + SUM(CASE WHEN created_at >= DATE_SUB(NOW(), INTERVAL 30 DAY) THEN 1 ELSE 0 END) as last_30_days, + SUM(CASE WHEN status = 'pending' THEN 1 ELSE 0 END) as pending_count FROM memberships `); res.render('admin/dashboard', { diff --git a/views/admin/dashboard.ejs b/views/admin/dashboard.ejs index f965ac2..54ac6a5 100644 --- a/views/admin/dashboard.ejs +++ b/views/admin/dashboard.ejs @@ -15,7 +15,12 @@