File size: 4,045 Bytes
73566f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!-- Modern UI header with logo and PyDetect title -->
<div class="site-header">
 <div class="header-inner">
 <div class="logo-cluster">
 <span (click)="navigateHome()" style="cursor:pointer;display:flex;align-items:center;">
 <img src="/assets/pykara-logo.png" alt="PyDetect Logo" class="logo-img-header" />
 </span>
 <div class="py-detect-title-header">
 <span class="py-letter p">P</span>
 <span class="py-letter y">Y</span>
 <span class="py-shape"></span>
 <span class="py-letter d">D</span>
 <span class="py-letter e">E</span>
 <span class="py-letter t">T</span>
 <span class="py-letter e2">E</span>
 <span class="py-letter c">C</span>
 <span class="py-letter t2">T</span>
 </div>
 </div>
 <div class="header-actions-right">
 <button class="back-btn" (click)="goBack()">
 <span class="back-icon"></span> Back to Validation Summary
 </button>
 </div>
 </div>
</div>

<div class="question-summary-fullpage">
 <div class="qs-header-row">
 <header class="qs-header">
 <div class="qs-header-title">
 <span class="qs-logo">🕵️‍♂️</span>
 <span class="qs-title-main">Investigation Question Summary</span>
 </div>
 <div class="qs-header-meta">
 <span class="qs-meta-label">Case ID:</span> <b>{{ caseDetails.caseId || '—' }}</b>
 <span class="qs-meta-label">Officer:</span> <b>{{ caseDetails.officer || '—' }}</b>
 <span class="qs-meta-label">Suspect:</span> <b>{{ caseDetails.suspect || '—' }}</b>
 <span class="qs-meta-label">Date:</span> <b>{{ caseDetails.date || '—' }}</b>
 <span class="qs-meta-label">Verdict:</span> <b class="qs-verdict">{{ caseDetails.verdict || '—' }}</b>
 </div>
 <div style="margin-top:18px; text-align:center;">
 <button class="download-btn" (click)="downloadExcel()">
 📊 Download Questions & Answers
 </button>
 </div>
 </header>
 </div>

 <div class="excel-table-container">
 <table class="excel-table compact">
 <thead>
 <tr>
 <th>S. No</th>
 <th>Question</th>
 <th>Answer</th>
 <th>Truth Probability</th>
 <th>Dominant Emotion</th>
 <th>View Details</th>
 </tr>
 </thead>
 <tbody>
 <tr *ngFor="let q of pagedQuestions; let i = index">
 <td>{{ (currentPage -1) * pageSize + i +1 }}</td>
 <td>{{q.text}}</td>
 <td>{{q.answer}}</td>
 <td>{{q.truthProbability}}%</td>
 <td>{{q.dominantEmotion}}</td>
 <td>
 <span class="view-details-icon" 
 matTooltip="View Details" 
 (click)="viewDetails(i)"
 tabindex="0">
 <i class="fa fa-eye"></i>
 </span>
 </td>
 </tr>
 </tbody>
 </table>
 </div>

 <!-- Results toolbar (professional centered pagination) -->
<div class="results-toolbar-new" *ngIf="totalPages >1">
 <div class="toolbar-inner">
 <div class="left-controls">
 <div class="results-summary-mini">
 <i class="fa fa-list" aria-hidden="true"></i>
 <span class="results-mini-text">Results: {{ resultsStart }} - {{ resultsEnd }} of {{ totalResults }}</span>
 </div>
 <div class="entries-select">
 <label for="pageSizeSelect">Show</label>
 <select id="pageSizeSelect" (change)="changePageSize($event)">
 <option [value]="5" [selected]="pageSize===5">5</option>
 <option [value]="10" [selected]="pageSize===10">10</option>
 <option [value]="20" [selected]="pageSize===20">20</option>
 </select>
 <span class="entries-label">entries</span>
 </div>
 </div>

 <div class="page-info">Page {{ currentPage }} of {{ totalPages }}</div>

 <ul class="pagination-list" role="navigation" aria-label="Pagination">
 <li>
 <button class="nav-btn" (click)="prevPage()" [disabled]="currentPage ===1" aria-label="Previous page">«</button>
 </li>

 <ng-container *ngFor="let p of visiblePages()">
 <li *ngIf="p === '...'" class="dots"></li>
 <li *ngIf="p !== '...'">
 <button
 class="page-number"
 [class.active]="currentPage === +p"
 (click)="goToPage(+p)"
 [attr.aria-current]="currentPage === +p ? 'page' : null">
 {{ p }}
 </button>
 </li>
 </ng-container>

 <li>
 <button class="nav-btn" (click)="nextPage()" [disabled]="currentPage === totalPages" aria-label="Next page">»</button>
 </li>
 </ul>
 </div>
</div>

 <footer>
 <p>©2025 Pykara Technologies Pvt. Ltd. All rights reserved.</p>
 </footer>
</div>