Legt de bestaande wijzigingen in de hoofdworktree vast voordat de laatste worktree wordt gemerged.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
117 lines
2.6 KiB
Plaintext
117 lines
2.6 KiB
Plaintext
<div class="mb-4">
|
|
|
|
<h1>Welkom <%= user.name %> 👋</h1>
|
|
|
|
<p class="text-secondary">
|
|
Huishouden: <strong><%= user.household_name || "Geen huishouden" %></strong>
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3 class="card-title">📊 Statistieken</h3>
|
|
|
|
<div class="mb-3">
|
|
|
|
<div class="mb-2">Boodschappenlijsten: <strong><%= totalLists %></strong></div>
|
|
|
|
<% if(lists.length > 0) { %>
|
|
|
|
<div>Gemiddeld progress:
|
|
<%
|
|
const avg = lists.length > 0
|
|
? Math.round(lists.reduce((sum, l) => sum + (l.checked_count || 0) / (l.item_count || 1), 0) / lists.length * 100)
|
|
: 0;
|
|
%>
|
|
<strong><%= avg %>%</strong>
|
|
</div>
|
|
|
|
<% } %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<h3 class="card-title">🔗 Snelle links</h3>
|
|
|
|
<a href="/lists" class="btn btn-primary btn-block mb-2">
|
|
|
|
🛒 Naar boodschappenlijsten
|
|
|
|
</a>
|
|
|
|
<a href="/household" class="btn btn-secondary btn-block">
|
|
|
|
👨👩👧 Huishouden beheren
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% if(lists.length > 0) { %>
|
|
|
|
<div class="row mt-4">
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">📝 Recente lijsten</h3>
|
|
|
|
</div>
|
|
|
|
<div class="list-group">
|
|
|
|
<% lists.forEach(list => { %>
|
|
|
|
<a href="/lists/<%= list.id %>" class="list-group-item list-group-item-action">
|
|
|
|
<div class="d-flex justify-content-between">
|
|
|
|
<strong><%= list.name %></strong>
|
|
|
|
<small class="text-secondary">
|
|
<%= list.checked_count || 0 %>/<%= list.item_count || 0 %> gedaan
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<% }) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% } %>
|