fix(credit-bureau): keep customer enquiry list stable and add back navigation in alert detail

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 15:33:43 +05:30
co-authored by Claude Sonnet 5.5
parent f9748036c3
commit 896e3fd7e8
2 changed files with 53 additions and 6 deletions
@@ -12,6 +12,12 @@
<div class="cic-empty">Loading…</div>
}
@if (alert) {
@if (history.length) {
<div class="cic-alert info" style="margin-bottom: 12px">
You are viewing another enquiry of this customer.
<button class="cic-btn sm" style="margin-left: 8px" (click)="back()">← Back to previous enquiry</button>
</div>
}
<div style="display: flex; justify-content: space-between; gap: 12px; align-items: flex-start">
<div>
<h3 style="margin-bottom: 4px">
@@ -160,8 +166,8 @@
@if (alert.otherAlertsOfCustomer?.length) {
<div class="cic-card" style="margin-top: 14px; margin-bottom: 0">
<h2>
Other enquiries on this customer
<span class="cic-card-sub">{{ alert.otherAlertsOfCustomer?.length }} more</span>
All enquiries on this customer
<span class="cic-card-sub">{{ customerEnquiries.length }} in total</span>
</h2>
<div class="cic-table-wrap">
<table class="cic-table">
@@ -174,10 +180,19 @@
</tr>
</thead>
<tbody>
@for (o of alert.otherAlertsOfCustomer; track o.id) {
<tr class="clickable" (click)="alertId = o.id; load()">
@for (o of customerEnquiries; track o.id) {
<tr
class="clickable"
[style.background]="o.id === alert.id ? '#eef4ff' : null"
(click)="o.id !== alert.id && openOther(o.id)"
>
<td>{{ o.enquiryDate | date: 'dd MMM yyyy' }}</td>
<td>{{ o.loanType }}</td>
<td>
{{ o.loanType }}
@if (o.id === alert.id) {
<b>(shown above)</b>
}
</td>
<td class="num">{{ o.amount | number: '1.0-0' }}</td>
<td>
<span class="cic-badge" [class]="'cic-badge ' + statusTone(o.status)">{{ o.status }}</span>