feat(loan-origination): product type, income/co-borrower affordability, bank statement & CIC analysis, richer Field Investigation, and meeting-scheduled Personal Discussion
Publish Image in Docker Hub / build (push) Canceled after 0s
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Tests / testRigor (push) Canceled after 0s

- New Application: add Product Type (Term Loan/Overdraft) driven by product eligibility.
- KYC: 3-year ITR capture with exceptions, product-specific document checklists with officer-added
  custom docs, Housing Loan co-owner Aadhaar/PAN capture+verify in a popup dialog.
- Income & Affordability: editable income/amount/tenure with product bounds validation, 40% EMI
  rule, and a full co-borrower flow (relationship, salary slips, combined-income eligibility).
- Bank Statement upload auto-opens a full CSV-driven cash-flow/FOIR/risk analysis dialog.
- CIC report upload auto-opens a bureau-style credit report analysis (score gauge, accounts,
  DPD history, enquiries) generated from the application's own credit score.
- Field Investigation reworked into per-address cards (Home/Office/Property/Shop) with officer
  assignment, 48-hour SLA tracking, GPS + multi-photo capture, verify/reject with remarks, a
  full-detail popup, real Fineract addresses for existing clients, and a calculated property
  valuation (market/guideline/realizable value, LTV).
- Personal Discussion: meeting scheduler (date/time/mode/officer) gating the discussion report,
  plus a full Application Summary Report PDF (KYC, CIC, FI, valuation, stage history) for the
  meeting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-13 15:14:39 +05:30
co-authored by Claude Sonnet 5
parent 5581d4180d
commit 997e8920e4
20 changed files with 4747 additions and 241 deletions
@@ -27,12 +27,16 @@ import {
OriginationStage,
OverallStatus,
PRODUCT_TARGET_PCT,
PRODUCT_TYPE_LABELS,
ProductType,
STAGE_LABELS,
STAGE_ORDER,
STATUS_LABELS,
TARGET_STATUS_LABELS,
TargetStatus,
allowedProductTypes,
createApplication,
defaultProductType,
progressPct,
stageBadgeClass,
targetStatus,
@@ -138,10 +142,26 @@ export class LoanPipelineComponent implements OnInit {
clientId: null as number | null,
branchCode: this.branches[0].code,
productCode: this.products[0].code,
productType: defaultProductType(this.products[0].code),
requestedAmount: null as number | null,
tenureMonths: null as number | null
};
readonly productTypeLabels = PRODUCT_TYPE_LABELS;
/** Which Product Types the currently-selected product can be sanctioned as -- Cash Credit/KCC
* are Overdraft-only, Gold Loan offers both, everything else is Term Loan-only. */
get newAppProductTypeOptions(): ProductType[] {
return allowedProductTypes(this.newApp.productCode);
}
/** Switching Product can change which Product Types are even valid -- reset to that product's
* default rather than leaving a stale selection (e.g. "Overdraft" left over from Gold Loan)
* on a product that doesn't offer it. */
onProductChange(): void {
this.newApp.productType = defaultProductType(this.newApp.productCode);
}
/** Existing-customer search (real Fineract clients, unlike the rest of this mock pipeline). */
existingClientSearchText = '';
existingClientSearchResults: any[] = [];
@@ -513,6 +533,7 @@ export class LoanPipelineComponent implements OnInit {
branchName: branch.name,
productCode: product.code,
productName: product.name,
productType: this.newApp.productType,
secured: product.secured,
requestedAmount: this.newApp.requestedAmount,
tenureMonths: this.newApp.tenureMonths || product.minTenure,
@@ -530,6 +551,7 @@ export class LoanPipelineComponent implements OnInit {
clientId: null,
branchCode: this.isHeadOffice ? this.branches[0].code : this.ownBranchCode || this.branches[0].code,
productCode: this.products[0].code,
productType: defaultProductType(this.products[0].code),
requestedAmount: null,
tenureMonths: null
};