Add the task editor as a separate page/route, task sorting?

This commit is contained in:
Charles Descamps 2025-03-25 01:38:06 -07:00
parent 15b5bd63e1
commit ec2eb211cd
4 changed files with 217 additions and 59 deletions

View file

@ -23,20 +23,30 @@
</div>
<!-- Completed Task List -->
<ul class="list-group">
{% for task in tasks %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<div>
<strong>{{ task.name }}</strong>
(Priority: {{ task.priority }}, Duration: {{ format_duration(task.duration) }})
{% if task.due_date %}
- Due: {{ task.due_date }}
{% endif %}
- Completed At: {{ task.completed_at }}
</div>
</li>
{% endfor %}
</ul>
<table class="table table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Priority</th>
<th>Duration</th>
<th>Due Date</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for task in tasks %}
<tr>
<td>{{ task.name }}</td>
<td>{{ task.priority }}</td>
<td>{{ format_duration(task.duration) }}</td>
<td>{{ task.due_date }}</td>
<td>
<a href="/move_to_pending_from_completed/{{ task.id }}" class="btn btn-secondary btn-sm">Move to Pending</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<script>