minor update
This commit is contained in:
@@ -5,8 +5,13 @@
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-header bg-primary text-white">
|
||||
<h3>Department Dashboard</h3>
|
||||
<p>Welcome, {{ request.user.username }}. Your Departments:
|
||||
{% for dept in departments %} {{ dept.name }}{% if not forloop.last %}, {% endif %}{% endfor %}
|
||||
<p>
|
||||
Welcome, {{ request.user.username }}. Your Departments:
|
||||
{% for dept in departments %}
|
||||
<span class="badge bg-light text-dark">{{ dept.name }}</span>
|
||||
{% empty %}
|
||||
<span class="text-muted">No department assigned.</span>
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -20,6 +25,7 @@
|
||||
<th>Reported By</th>
|
||||
<th>Status</th>
|
||||
<th>Created At</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -43,6 +49,23 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ issue.created_at|date:"M d, Y H:i" }}</td>
|
||||
<td>
|
||||
{% if issue.status in "reported,acknowledged" %}
|
||||
<form method="post" action="{% url 'update_issue_status' issue.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="status" value="in_progress">
|
||||
<button type="submit" class="btn btn-sm btn-warning">In Progress</button>
|
||||
</form>
|
||||
{% elif issue.status == "in_progress" %}
|
||||
<form method="post" action="{% url 'update_issue_status' issue.id %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="status" value="resolved">
|
||||
<button type="submit" class="btn btn-sm btn-success">Resolved</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<span class="text-muted">No actions</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user