Py-detect / src /app /question-summary-page /question-summary-page.component.html
pykara's picture
fix
73566f6
<!-- 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>