<%- include('partials/header') %>

<%= t('dashboard.title') %>

<%= t('dashboard.studentLabel') %> #<%= studentId %> • <% if (lastSynced) { %> <%= t('dashboard.lastSynced') %> <%= new Date(lastSynced).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }) %> <% } else { %> <%= t('dashboard.notSynced') %> <% } %>

<%= t('dashboard.statCompletion') %>
<%= stats.completionRate %>%
<%= stats.completed %> / <%= stats.total %> <%= t('dashboard.statDoneUnit') %>
<%= t('dashboard.statActive') %>
<%= stats.active %>
<%= t('dashboard.statActiveSub') %>
<%= t('dashboard.statNextWeek') %>
<%= stats.checkedNextWeek %>
<%= t('dashboard.statNextWeekSub') %>
<%= t('dashboard.statDueSoon') %>
<%= stats.dueSoon %>
<%= t('dashboard.statDueSoonSub') %>
<%= t('dashboard.statOverdue') %>
<%= stats.overdue %>
<%= t('dashboard.statOverdueSub') %>
<%= t('dashboard.statTotal') %>
<%= stats.total %>
<%= t('dashboard.statTotalSub') %>
<%= t('dashboard.subjectsTitle') %> (<%= Object.keys(stats.bySubject).length %>) ▼
<% Object.values(stats.bySubject).forEach(function(subj) { %>
<%= subj.subject %> <%= subj.completed %>/<%= subj.total %> (<%= subj.percentage %>%)
<% }); %>
<%= t('dashboard.showingCount', { count: assignments.length }) %>
<% assignments.forEach(function(item) { %>
<%= item.excluded ? 'disabled' : '' %> >
<%= item.subject %> <% if (item.type) { %> <%= item.type %> <% } %>
<% if (item.detectedCheckDate) { %> <%= t('dashboard.checkDateBadge') %> <%= item.detectedCheckDate %> <% } %> <% if (item.excluded) { %> <%= t('dashboard.badgeExcluded') %> <% } else if (item.completed) { %> <%= t('dashboard.badgeCompleted') %> <% } else if (item.status === 'next-week') { %> <%= t('dashboard.badgeNextWeek') %> <% } else if (item.status === 'due-soon') { %> <%= t('dashboard.badgeDueSoon') %> <% } else if (item.status === 'overdue') { %> <%= t('dashboard.badgeOverdue') %> <% } else { %> <%= t('dashboard.badgeActive') %> <% } %>
<% if (item.unit || item.topic) { %>
<% if (item.unit) { %><%= t('dashboard.unitLabel') %> <%= item.unit %><% } %> <% if (item.topic) { %><%= t('dashboard.topicLabel') %> <%= item.topic %><% } %>
<% } %>
<%= item.description %>
<% }); %>
<%- include('partials/footer') %>