fix: show total hours right-aligned in Today's Todos headline
This commit is contained in:
+8
-1
@@ -612,6 +612,13 @@
|
||||
.map(buildMeetingCard)
|
||||
.join("");
|
||||
const todosHtml = todos.map(buildTodoItem).join("");
|
||||
const totalMinutes = todos.reduce(
|
||||
(sum, t) => sum + (t.Minutes || 0),
|
||||
0,
|
||||
);
|
||||
const totalHours = (totalMinutes / 60)
|
||||
.toFixed(1)
|
||||
.replace(/\.0$/, "");
|
||||
const signups = buildSignupItems(currentTestsRaw);
|
||||
|
||||
document.getElementById("dashboard").innerHTML = `
|
||||
@@ -643,7 +650,7 @@
|
||||
|
||||
<!-- TODOS -->
|
||||
<div class="box" style="grid-column:2; grid-row:2;">
|
||||
<div class="title">Today's Todos</div>
|
||||
<div class="title" style="display:flex;align-items:center;">Today's Todos<span style="margin-left:auto;font-size:13px;font-weight:normal;opacity:0.6;background:#2f3e4e;border-radius:10px;padding:1px 9px;">${totalHours}h</span></div>
|
||||
<div class="todos-scroll">
|
||||
${todosHtml || '<div style="opacity:0.4;font-size:13px;">No todos</div>'}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user