File size: 2,956 Bytes
e6ecc60
 
 
 
 
 
 
 
ff4abcd
e6ecc60
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585b158
e6ecc60
 
ff4abcd
e6ecc60
585b158
e6ecc60
585b158
e6ecc60
ff4abcd
e6ecc60
 
 
 
 
 
 
 
 
 
 
ff4abcd
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
67
68
{% extends "base_layout.html" %}

{% block title %}Interrogation Sessions - InterroGen{% endblock %}

{% block page_content %}
<div class="heading-container">
    <h1 class="h3">Interrogation Sessions</h1>
    {# Add a button or link to initiate a new interrogation if applicable, or link to cases #}
    <a href="{{ url_for('manage_cases') }}" class="btn btn-outline-primary"><i class="bi bi-folder2-open me-1"></i>View Cases</a>
</div>

<div class="card">
    <div class="card-header">
        <i class="bi bi-list-ul me-2"></i>All Recorded Interrogation Sessions
    </div>
    <div class="card-body p-0">
        {% if sessions %}
            <div class="table-responsive">
                <table class="table table-hover mb-0">
                    <thead>
                        <tr>
                            <th>Session ID</th>
                            <th>Case ID</th>
                            <th>Suspect</th>
                            <th>Session Date</th>
                            <th>Questions Generated</th>
                            <th>Summary Notes</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for session in sessions | sort(attribute='session_date', reverse=True) %}
                        <tr>
                            <td>{{ session.id }}</td>
                            <td><a href="{{ url_for('view_case', case_id=session.case.id) }}">{{ session.case.case_id_display }}</a></td>
                            <td>{{ session.case.suspect_name }}</td>
                            <td>{{ session.session_date.strftime('%Y-%m-%d %H:%M') }}</td>
                            <td>{{ session.generated_questions | length }}</td>
                            <td>{{ session.summary_notes | truncate(100, True) if session.summary_notes else 'N/A' }}</td>
                            <td>
                                <a href="{{ url_for('view_case', case_id=session.case.id) }}#accordionSession{{session.id}}" class="btn btn-sm btn-outline-primary">View Details in Case</a>
                            </td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
        {% else %}
            <div class="text-center p-5">
                <i class="bi bi-mic-mute-fill fs-1 text-muted"></i>
                <p class="mt-3 text-muted">No interrogation sessions found in the system.</p>
                <p>Interrogation questions are generated from the individual case detail pages.</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 interrogations page specific JS here if needed
    console.log("Interrogations page loaded");
</script>
{% endblock %}