feat: Enhance case conversation display with detailed message stats and loading indicator
This commit is contained in:
@@ -290,13 +290,25 @@
|
||||
</form>
|
||||
|
||||
{% if question_completed %}
|
||||
<div class="mt-3"
|
||||
hx-get="{% url 'atlas:collection_case_review_thread' exam_id=collection.id cid_user_exam_id=cid_user_exam.id case_id=case.id %}{% if cid %}?cid={{ cid }}&passcode={{ passcode }}{% endif %}"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML">
|
||||
<div class="small text-muted">Loading case conversation...</div>
|
||||
</div>
|
||||
<details class="mt-3" {% if case_review_stats.has_outstanding_any %}open{% endif %}>
|
||||
<summary class="small fw-semibold d-flex flex-wrap align-items-center gap-2">
|
||||
<span>Case conversation</span>
|
||||
{% if case_review_stats.has_outstanding_any %}
|
||||
<span class="badge bg-danger">{{ case_review_stats.outstanding_total_count }} unacknowledged message{{ case_review_stats.outstanding_total_count|pluralize }}</span>
|
||||
{% elif case_review_stats.has_messages %}
|
||||
<span class="badge bg-secondary">{{ case_review_stats.message_count }} message{{ case_review_stats.message_count|pluralize }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted">No messages yet</span>
|
||||
{% endif %}
|
||||
</summary>
|
||||
<div class="mt-2"
|
||||
hx-get="{% url 'atlas:collection_case_review_thread' exam_id=collection.id cid_user_exam_id=cid_user_exam.id case_id=case.id %}{% if cid %}?cid={{ cid }}&passcode={{ passcode }}{% endif %}"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
hx-swap="innerHTML">
|
||||
<div class="small text-muted">Loading case conversation...</div>
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
|
||||
<aside id="selfReviewSidebar" class="self-review-sidebar" aria-live="polite" aria-label="Self review sidebar">
|
||||
|
||||
Reference in New Issue
Block a user