feat(election): server-side pagination + CEO pre-check family loan UI
- election.service.ts: all 3 list APIs now accept page/size params and return PagedResponse - election-dashboard: server-side paginated elections with statusCounts from backend - nomination-list: server-side pagination; summary chips use backend totals (all pages) - candidate-board: server-side pagination; post filter triggers new API call - nomination-detail: full 8-check CEO pre-check display (director loan, relation accounts, KYC, family KYC, guarantor, AML, family loans) - nomination-apply: guarantor status section added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
71552d6875
commit
9e33392b01
@@ -27,7 +27,7 @@
|
||||
} @else {
|
||||
<div class="stats-row">
|
||||
<div class="stat-card">
|
||||
<span class="stat-value">{{ elections.length }}</span>
|
||||
<span class="stat-value">{{ totalElements }}</span>
|
||||
<span class="stat-label">Total Elections</span>
|
||||
</div>
|
||||
<div class="stat-card">
|
||||
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
|
||||
<div class="elections-grid">
|
||||
@for (election of elections; track election.id) {
|
||||
@for (election of paginatedElections; track election.id) {
|
||||
<div class="election-card">
|
||||
<div class="card-header">
|
||||
<div>
|
||||
@@ -126,5 +126,46 @@
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@if (totalPages > 1 || totalElements > pageSizeOptions[0]) {
|
||||
<div class="pagination-bar">
|
||||
<div class="pg-info">Showing {{ startItem }}–{{ endItem }} of {{ totalElements }}</div>
|
||||
<div class="pg-controls">
|
||||
<button class="pg-btn" [disabled]="currentPage === 1" (click)="goToPage(1)" title="First">
|
||||
<mat-icon>first_page</mat-icon>
|
||||
</button>
|
||||
<button class="pg-btn" [disabled]="currentPage === 1" (click)="goToPage(currentPage - 1)" title="Previous">
|
||||
<mat-icon>chevron_left</mat-icon>
|
||||
</button>
|
||||
@for (p of pageNumbers; track $index) {
|
||||
@if (isNumber(p)) {
|
||||
<button class="pg-btn pg-num" [class.pg-num--active]="p === currentPage" (click)="goToPage(p)">
|
||||
{{ p }}
|
||||
</button>
|
||||
} @else {
|
||||
<span class="pg-ellipsis">…</span>
|
||||
}
|
||||
}
|
||||
<button
|
||||
class="pg-btn"
|
||||
[disabled]="currentPage === totalPages"
|
||||
(click)="goToPage(currentPage + 1)"
|
||||
title="Next"
|
||||
>
|
||||
<mat-icon>chevron_right</mat-icon>
|
||||
</button>
|
||||
<button class="pg-btn" [disabled]="currentPage === totalPages" (click)="goToPage(totalPages)" title="Last">
|
||||
<mat-icon>last_page</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<div class="pg-size">
|
||||
<select [(ngModel)]="pageSize" (change)="onPageSizeChange()">
|
||||
@for (n of pageSizeOptions; track n) {
|
||||
<option [value]="n">{{ n }} / page</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user