feat(loan-origination): tabbed CIC report dialog with real PDF parsing via pdfjs-dist
Tests / testRigor (push) Canceled after 0s
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s

Extracts score, accounts, DPD payment history and enquiries directly from an
uploaded bureau PDF (position-aware parsing, so blank DPD months are handled
correctly) instead of always showing a simulated report, falling back to the
simulated analysis when a file can't be read.
This commit is contained in:
2026-08-13 18:05:22 +05:30
parent 997e8920e4
commit 8d67a22f18
11 changed files with 2526 additions and 434 deletions
@@ -1409,54 +1409,70 @@
</p>
}
} @else {
<dl class="loan-kv-grid" style="padding: 0 0 14px">
<div class="loan-kv-field">
<dt>Bureau</dt>
<dd>{{ a.cicBureau }}</dd>
<div class="loi-cic-hero-card">
<div
class="loi-cic-score-badge"
[class.loi-cic-score-badge--excellent]="a.cibilScore >= 750"
[class.loi-cic-score-badge--good]="a.cibilScore >= 650 && a.cibilScore < 750"
[class.loi-cic-score-badge--fair]="a.cibilScore >= 550 && a.cibilScore < 650"
[class.loi-cic-score-badge--poor]="a.cibilScore < 550"
>
<span class="loi-cic-score-num">{{ a.cibilScore }}</span>
<span class="loi-cic-score-band">{{ cibilBandOf(a.cibilScore) }}</span>
</div>
<div class="loan-kv-field">
<dt>Credit Score</dt>
<dd>{{ a.cibilScore }} ({{ cibilBandOf(a.cibilScore) }})</dd>
<div class="loi-cic-details-grid">
<div class="loi-cic-detail-item">
<span class="loi-cic-label">Credit Bureau</span>
<strong class="loi-cic-val">{{ a.cicBureau }}</strong>
</div>
<div class="loi-cic-detail-item">
<span class="loi-cic-label">Uploaded Report File</span>
<strong class="loi-cic-val loi-cic-file-name">{{
a.cicReportUploaded ? a.cicReportFileName : 'Not uploaded yet'
}}</strong>
</div>
<div class="loi-cic-detail-item">
<span class="loi-cic-label">Field Inquiry Status</span>
<strong class="loi-cic-val">
{{
a.fiRequestPushed
? 'Pushed to ' + a.fiAgencyAssigned + ' (' + a.fiRequestDate + ')'
: 'Not pushed yet'
}}
</strong>
</div>
</div>
<div class="loan-kv-field">
<dt>Report</dt>
<dd>
{{ a.cicReportUploaded ? a.cicReportFileName : 'Not uploaded yet' }}
@if (a.cicReportUploaded) {
<button type="button" class="loi-bsa-reopen" (click)="openCicReportAnalysis(a)">
📊 View Analysis
</button>
}
</dd>
</div>
<div class="loan-kv-field">
<dt>Field Inquiry</dt>
<dd>
{{
a.fiRequestPushed
? 'Pushed to ' + a.fiAgencyAssigned + ' (' + a.fiRequestDate + ')'
: 'Not pushed yet'
}}
</dd>
</div>
</dl>
@if (a.cicReportUploaded) {
<div class="loi-cic-action-box">
<button
type="button"
class="pg-btn pg-btn--primary loi-cic-analysis-btn"
(click)="openCicReportAnalysis(a)"
>
📊 View Analysis
</button>
</div>
}
</div>
}
@if (a.cibilScore > 0) {
@if (!a.cicReportUploaded) {
<div class="loan-action-row">
<label class="pg-btn pg-btn--ghost" style="cursor: pointer">
Upload {{ a.cicBureau }} Report
<input type="file" hidden accept=".pdf,.jpg,.jpeg,.png" (change)="onCicFileSelected($event, a)" />
</label>
</div>
} @else if (!a.fiRequestPushed) {
<div class="loan-action-row">
<div class="loan-action-row loi-cic-action-row">
<label
class="pg-btn pg-btn--ghost loi-cic-upload-btn"
title="Upload or change PDF Credit Bureau Report"
>
<span>{{
a.cicReportUploaded ? '📄 Re-upload PDF Report' : 'Upload ' + a.cicBureau + ' Report (PDF)'
}}</span>
<input type="file" hidden accept=".pdf,.jpg,.jpeg,.png" (change)="onCicFileSelected($event, a)" />
</label>
@if (a.cicReportUploaded && !a.fiRequestPushed) {
<button type="button" class="pg-btn pg-btn--ghost" (click)="pushFieldInquiryNow(a)">
Push Field Inquiry to Agency
</button>
</div>
} @else {
<div class="loan-action-row">
} @else if (a.cicReportUploaded && a.fiRequestPushed) {
<button
type="button"
class="pg-btn pg-btn--primary"
@@ -1474,8 +1490,8 @@
>
Proceed to Field Investigation
</button>
</div>
}
}
</div>
}
</div>
</div>