${navItems.find(n=>n.id===active)?.label || 'Dashboard'}
${content}
/* ═══ CYPHER-HR Employee Module ═══ */ const Employee = { async showDashboard() { App.setView(this.layout('dashboard', await this.dashboardContent())); this.bindNav(); }, layout(active, content) { const navItems = [ { id: 'dashboard', icon: 'home', label: 'Dashboard' }, { id: 'apply', icon: 'plus', label: 'Apply Leave' }, { id: 'history', icon: 'clock', label: 'Leave History' }, { id: 'reports', icon: 'report', label: 'My Reports' }, ]; return `
${App.user.position || ''} ${App.user.department ? '• ' + App.user.department : ''}
${App.user.email}
No leave requests yet
' : `| Type | Dates | Reason | Status |
|---|---|---|---|
| ${l.leave_type} | ${App.formatDate(l.start_date)} - ${App.formatDate(l.end_date)} | ${l.reason || '—'} | ${App.statusBadge(l.status)} |
No leave history
' : `| Type | Start | End | Reason | Status | Remarks |
|---|---|---|---|---|---|
| ${l.leave_type} | ${App.formatDate(l.start_date)} | ${App.formatDate(l.end_date)} | ${l.reason || '—'} | ${App.statusBadge(l.status)} | ${l.admin_remarks || '—'} |