feat(npa): add Cash Credit (CC) Recovery Management tab

New tab under NPA > Reports > Recovery Management, dedicated to Cash
Credit accounts: Drawing Power vs outstanding, interest due/paid this
cycle, lifetime recovery, and a Days-Overdrawn/Status view (Regular /
Overdrawn / NPA) in place of the generic EMI-style SMA labels, matching
how a CC/OD book is actually monitored in real banks.

Status now checks NPA history first so an account doesn't show
"Regular" just because it's briefly back within DP (RBI upgrade norms
require full clearance, not a one-off snapshot).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 15:38:03 +05:30
co-authored by Claude Sonnet 5
parent 1b70fb4534
commit 1bf441114e
5 changed files with 460 additions and 2 deletions
+159
View File
@@ -94,6 +94,165 @@
grid-template-columns: repeat(3, 1fr);
}
// -----------------------------------------------------------------------
// Cash Credit Recovery Management — a glossary strip explaining DP / Out of
// Order / SMA / NPA to a reader meeting the terms for the first time (e.g. a
// stakeholder demo), plus tone-coloured accents for that screen's KPI row.
// -----------------------------------------------------------------------
.npa-glossary {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 14px;
margin-top: 18px;
}
.npa-glossary-card {
padding: 16px 16px 16px 18px;
border-radius: 12px;
background: #fff;
border: 1px solid #e2e8f0;
border-left: 4px solid #64748b;
transition: box-shadow 0.15s ease;
&:hover {
box-shadow: 0 4px 14px rgb(15 23 42 / 8%);
}
&__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 34px;
height: 34px;
border-radius: 999px;
background: #f1f5f9;
color: #475569;
font-size: 14px;
margin-bottom: 10px;
}
&__term {
font-size: 12px;
font-weight: 800;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #0f172a;
margin-bottom: 6px;
}
&__desc {
font-size: 12.5px;
line-height: 1.55;
color: #475569;
margin: 0;
}
&--dp {
border-left-color: #2563eb;
.npa-glossary-card__icon {
background: #dbeafe;
color: #2563eb;
}
}
&--ooo {
border-left-color: #d97706;
.npa-glossary-card__icon {
background: #fef3c7;
color: #b45309;
}
}
&--sma {
border-left-color: #ca8a04;
.npa-glossary-card__icon {
background: #fef9c3;
color: #854d0e;
}
}
&--npa {
border-left-color: #dc2626;
.npa-glossary-card__icon {
background: #fee2e2;
color: #dc2626;
}
}
}
// Compact gap variant for a KPI row that otherwise uses npa-kpis--ratio's 4-wide grid — used by
// the CC Recovery Management summary row, which packs more (smaller) tiles than the main header.
.npa-kpis--compact {
gap: 8px;
}
// Tone-coloured KPI tile for the CC summary row — same .inv-kpi tile, with a left accent + icon
// chip so "Out of Order"/"SMA"/"NPA" read as a severity strip rather than four identical boxes.
// Sized smaller than the default .inv-kpi tile since this row packs 6 of them.
.npa-kpi--accent {
padding: 10px 12px 10px 14px;
border-left: 4px solid var(--npa-kpi-accent, #64748b);
.inv-kpi__label {
font-size: 9px;
}
.inv-kpi__value {
font-size: 16px;
}
.inv-kpi__sub {
font-size: 10px;
}
.npa-kpi__icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
height: 22px;
border-radius: 999px;
background: var(--npa-kpi-accent-soft, #f1f5f9);
color: var(--npa-kpi-accent, #475569);
font-size: 10px;
margin-bottom: 4px;
}
&--neutral {
--npa-kpi-accent: #0f4f3c;
--npa-kpi-accent-soft: #dcfce7;
}
&--warn {
--npa-kpi-accent: #d97706;
--npa-kpi-accent-soft: #fef3c7;
}
&--sma {
--npa-kpi-accent: #ca8a04;
--npa-kpi-accent-soft: #fef9c3;
}
&--npa {
--npa-kpi-accent: #dc2626;
--npa-kpi-accent-soft: #fee2e2;
}
&--info {
--npa-kpi-accent: #2563eb;
--npa-kpi-accent-soft: #dbeafe;
}
&--positive {
--npa-kpi-accent: #15803d;
--npa-kpi-accent-soft: #dcfce7;
}
}
// Account Detail header — title/badge on the left, the Recovery Journey trigger pinned right.
.npa-detail-header {
display: flex;