Deadline-sarake ekaksi tehtävälistassa, käynnissä-rivit vihreällä
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -474,12 +474,12 @@
|
|||||||
<table class="data-table" id="tasks-table" style="display:none;">
|
<table class="data-table" id="tasks-table" style="display:none;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Deadline</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Prioriteetti</th>
|
<th>Prioriteetti</th>
|
||||||
<th>Tyyppi</th>
|
<th>Tyyppi</th>
|
||||||
<th>Tehtävä</th>
|
<th>Tehtävä</th>
|
||||||
<th>Vastuuhenkilö</th>
|
<th>Vastuuhenkilö</th>
|
||||||
<th>Deadline</th>
|
|
||||||
<th>Tunnit</th>
|
<th>Tunnit</th>
|
||||||
<th>💬</th>
|
<th>💬</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -3975,14 +3975,14 @@ function renderTasksList() {
|
|||||||
tbody.innerHTML = tasks.map(t => {
|
tbody.innerHTML = tasks.map(t => {
|
||||||
const overdue = t.deadline && t.status !== 'valmis' && t.deadline < today;
|
const overdue = t.deadline && t.status !== 'valmis' && t.deadline < today;
|
||||||
const soon = t.deadline && t.status !== 'valmis' && !overdue && t.deadline <= new Date(Date.now()+3*86400000).toISOString().slice(0,10);
|
const soon = t.deadline && t.status !== 'valmis' && !overdue && t.deadline <= new Date(Date.now()+3*86400000).toISOString().slice(0,10);
|
||||||
const rowClass = overdue ? 'todo-row-overdue' : (soon ? 'todo-row-soon' : (t.status === 'valmis' ? 'todo-row-done' : ''));
|
const rowClass = overdue ? 'todo-row-overdue' : (soon ? 'todo-row-soon' : (t.status === 'kaynnissa' ? 'todo-row-active' : (t.status === 'valmis' ? 'todo-row-done' : '')));
|
||||||
return `<tr class="${rowClass}" onclick="openTaskRead('${t.id}')" style="cursor:pointer;">
|
return `<tr class="${rowClass}" onclick="openTaskRead('${t.id}')" style="cursor:pointer;">
|
||||||
|
<td class="nowrap">${t.deadline ? `<span${overdue ? ' style="color:#e74c3c;font-weight:600;"' : (soon ? ' style="color:#f39c12;font-weight:600;"' : '')}>${t.deadline}</span>` : '<span style="color:#ccc;">—</span>'}</td>
|
||||||
<td><span class="todo-status status-${t.status}">${todoStatusLabels[t.status]||t.status}</span></td>
|
<td><span class="todo-status status-${t.status}">${todoStatusLabels[t.status]||t.status}</span></td>
|
||||||
<td><span class="priority-badge priority-${t.priority}">${todoPriorityLabels[t.priority]||t.priority}</span></td>
|
<td><span class="priority-badge priority-${t.priority}">${todoPriorityLabels[t.priority]||t.priority}</span></td>
|
||||||
<td>${t.category ? `<span class="todo-category cat-${t.category}">${todoCategoryLabels[t.category]||t.category}</span>` : '<span style="color:#ccc;">—</span>'}</td>
|
<td>${t.category ? `<span class="todo-category cat-${t.category}">${todoCategoryLabels[t.category]||t.category}</span>` : '<span style="color:#ccc;">—</span>'}</td>
|
||||||
<td><strong>${esc(t.title)}</strong></td>
|
<td><strong>${esc(t.title)}</strong></td>
|
||||||
<td>${t.assigned_to ? esc(t.assigned_to) : '<span style="color:#ccc;">—</span>'}</td>
|
<td>${t.assigned_to ? esc(t.assigned_to) : '<span style="color:#ccc;">—</span>'}</td>
|
||||||
<td class="nowrap">${t.deadline ? `<span${overdue ? ' style="color:#e74c3c;font-weight:600;"' : (soon ? ' style="color:#f39c12;font-weight:600;"' : '')}>${t.deadline}</span>` : '<span style="color:#ccc;">—</span>'}</td>
|
|
||||||
<td style="text-align:center;">${t.total_hours > 0 ? t.total_hours + 'h' : '<span style="color:#ccc;">—</span>'}</td>
|
<td style="text-align:center;">${t.total_hours > 0 ? t.total_hours + 'h' : '<span style="color:#ccc;">—</span>'}</td>
|
||||||
<td style="text-align:center;">${t.comment_count > 0 ? t.comment_count : ''}</td>
|
<td style="text-align:center;">${t.comment_count > 0 ? t.comment_count : ''}</td>
|
||||||
</tr>`;
|
</tr>`;
|
||||||
|
|||||||
@@ -1133,6 +1133,8 @@ span.empty {
|
|||||||
.todo-row-overdue:hover { background:#fde8e8 !important; }
|
.todo-row-overdue:hover { background:#fde8e8 !important; }
|
||||||
.todo-row-soon { background:#fffbeb !important; }
|
.todo-row-soon { background:#fffbeb !important; }
|
||||||
.todo-row-soon:hover { background:#fef3c7 !important; }
|
.todo-row-soon:hover { background:#fef3c7 !important; }
|
||||||
|
.todo-row-active { background:#ecfdf5 !important; }
|
||||||
|
.todo-row-active:hover { background:#d1fae5 !important; }
|
||||||
.todo-row-done { opacity:0.55; }
|
.todo-row-done { opacity:0.55; }
|
||||||
.todo-row-done:hover { opacity:0.75; }
|
.todo-row-done:hover { opacity:0.75; }
|
||||||
.priority-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:600; }
|
.priority-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:0.72rem; font-weight:600; }
|
||||||
|
|||||||
Reference in New Issue
Block a user