File size: 2,765 Bytes
e6ecc60
 
 
 
 
 
 
 
7a0da87
e6ecc60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7a0da87
e6ecc60
 
7a0da87
e6ecc60
7a0da87
 
e6ecc60
7a0da87
e6ecc60
 
 
 
 
 
 
 
 
 
 
7a0da87
e6ecc60
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{% extends "base_layout.html" %}

{% block title %}All Reports - InterroGen{% endblock %}

{% block page_content %}
<div class="heading-container">
    <h1 class="h3">All Generated Reports</h1>
    {# Optional: Add a button to quickly navigate to case creation or other relevant actions #}
    <a href="{{ url_for('manage_cases', action='new') }}" class="btn btn-primary"><i class="bi bi-plus-circle-fill me-1"></i>Create New Case</a>
</div>

<div class="card">
    <div class="card-header">
        <i class="bi bi-archive-fill me-2"></i>List of Reports
    </div>
    <div class="card-body p-0">
        {% if reports %}
            <div class="table-responsive">
                <table class="table table-hover mb-0">
                    <thead>
                        <tr>
                            <th>Report ID</th>
                            <th>Case ID</th>
                            <th>Suspect</th>
                            <th>Country Context</th>
                            <th>Generated At</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for report in reports | sort(attribute='generated_at', reverse=True) %}
                        <tr>
                            <td>{{ report.id }}</td>
                            <td><a href="{{ url_for('view_case', case_id=report.case.id) }}">{{ report.case.case_id_display }}</a></td>
                            <td>{{ report.case.suspect_name }}</td>
                            <td>{{ report.report_country_context.name if report.report_country_context else 'N/A' }}</td>
                            <td>{{ report.generated_at.strftime('%Y-%m-%d %H:%M') }}</td>
                            <td>
                                <a href="{{ url_for('view_report', report_id=report.id) }}" class="btn btn-sm btn-outline-primary">View Report</a>
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        {% else %}
            <div class="text-center p-5">
                <i class="bi bi-journal-x fs-1 text-muted"></i>
                <p class="mt-3 text-muted">No reports found in the system.</p>
                <p>Reports are generated from individual case detail pages after interrogation questions have been processed.</p>
                <a href="{{ url_for('manage_cases') }}" class="btn btn-primary">Go to Cases</a>
            </div>
        {% endif %}
    </div>
</div>

{% endblock %}

{% block scripts %}
<script>
    // Add any reports list page specific JS here if needed
    console.log("Reports list page loaded");
</script>
{% endblock %}