feat(npa): add Recovery Management System reports + Recovery Journey popup

Adds loan-type-aware recovery tracking (EMI/Overdrawn/Bullet) with a Recovery
Management Dashboard, Day-wise Overdue/Overdrawn reports, an Agriculture/Gold
market-value report, and a security-value exception check — all derived from
new repaymentType/emiAmount/drawingPower/maturityDate/collateralMarketValue
fields on LoanAccount, wired into Export to Excel and the NPA mega-menu.

Also replaces the always-visible Recovery/Collection Journey card on the
Account Detail Report with a "Recovery Journey" popup: a date-led, icon-coded
timeline of every SMS/call/visit/notice and payment run against an account.
This commit is contained in:
2026-08-02 11:33:01 +05:30
parent 27cdaf7fc2
commit b4608cbbe4
6 changed files with 1737 additions and 23 deletions
+295
View File
@@ -88,6 +88,301 @@
}
}
// Recovery Management Dashboard's 3 loan-type panels — same .inv-kpi tile, just a 3-wide grid
// instead of the portfolio strip's 4-wide one.
.npa-kpis--three {
grid-template-columns: repeat(3, 1fr);
}
// Account Detail header — title/badge on the left, the Recovery Journey trigger pinned right.
.npa-detail-header {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.npa-timeline-trigger {
margin-left: auto;
display: inline-flex;
align-items: center;
gap: 7px;
background: linear-gradient(135deg, #eef2ff, #e0e7ff);
color: #4338ca;
border: 1px solid #c7d2fe;
font-weight: 700;
text-transform: none;
letter-spacing: normal;
transition:
box-shadow 0.15s ease,
transform 0.15s ease;
&:hover {
background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
box-shadow: 0 4px 14px rgb(67 56 202 / 22%);
transform: translateY(-1px);
}
}
// ---------------------------------------------------------------------------
// Recovery / Collection Journey popup — a date-led timeline of every SMS, call,
// visit, notice and payment run against one account, opened from the Account
// Detail Report's "Recovery Journey" button.
// ---------------------------------------------------------------------------
.npa-timeline-backdrop {
position: fixed;
inset: 0;
background: rgb(15 23 42 / 55%);
backdrop-filter: blur(3px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
padding: 24px;
animation: npa-timeline-fade-in 0.15s ease-out;
}
.npa-timeline-modal {
background: #fff;
border-radius: 18px;
width: 640px;
max-width: 100%;
max-height: min(720px, 88vh);
display: flex;
flex-direction: column;
box-shadow: 0 24px 60px rgb(15 23 42 / 35%);
animation: npa-timeline-slide-up 0.2s cubic-bezier(0.16, 1, 0.3, 1);
overflow: hidden;
&__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
padding: 20px 22px;
border-bottom: 1px solid #e2e8f0;
background: linear-gradient(180deg, #f8fafc, #fff);
}
&__title {
display: flex;
flex-direction: column;
gap: 6px;
min-width: 0;
h2 {
margin: 0;
font-size: 17px;
font-weight: 800;
color: #0f172a;
}
}
&__eyebrow {
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
color: #4338ca;
}
&__meta {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
font-size: 12px;
color: #64748b;
}
&__branch::before,
&__count::before {
content: '·';
margin-right: 8px;
color: #cbd5e1;
}
&__close {
flex-shrink: 0;
width: 32px;
height: 32px;
border-radius: 999px;
border: 1px solid #e2e8f0;
background: #fff;
color: #64748b;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition:
background 0.15s ease,
color 0.15s ease;
&:hover {
background: #f1f5f9;
color: #0f172a;
}
}
&__body {
overflow-y: auto;
padding: 22px;
}
}
@keyframes npa-timeline-fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes npa-timeline-slide-up {
from {
opacity: 0;
transform: translateY(14px) scale(0.98);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
@media (prefers-reduced-motion: reduce) {
.npa-timeline-backdrop,
.npa-timeline-modal {
animation: none;
}
}
// The timeline list itself — a connecting vertical line runs behind the icon badges.
.npa-timeline {
list-style: none;
margin: 0;
padding: 0;
}
.npa-timeline-item {
position: relative;
display: flex;
gap: 14px;
padding-bottom: 22px;
// The connecting line spans from just under this item's icon to just above the next one's —
// anchored to the item itself (not the fixed-size icon) via top+bottom, so it always reaches
// exactly as far as the gap to the next entry, however tall this entry's text runs.
&:not(:last-child)::before {
content: '';
position: absolute;
top: 34px;
bottom: -22px;
left: 17px;
width: 2px;
background: #e2e8f0;
}
&:last-child {
padding-bottom: 0;
}
&__icon {
position: relative;
flex-shrink: 0;
width: 34px;
height: 34px;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 13px;
z-index: 1;
}
&--neutral &__icon {
background: #eff6ff;
color: #1d4ed8;
}
&--alert &__icon {
background: #fef2f2;
color: #b91c1c;
}
&--positive &__icon {
background: #f0fdf4;
color: #15803d;
}
&__body {
flex: 1;
min-width: 0;
padding-top: 4px;
}
&__row {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 10px;
}
&__type {
font-weight: 700;
font-size: 13.5px;
color: #0f172a;
}
&__date {
font-size: 11.5px;
color: #94a3b8;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
&__remarks {
margin: 3px 0 6px;
font-size: 12.5px;
color: #475569;
line-height: 1.45;
}
&__channel {
display: inline-block;
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.03em;
text-transform: uppercase;
color: #64748b;
background: #f1f5f9;
padding: 2px 8px;
border-radius: 6px;
}
}
.npa-timeline-empty {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
padding: 40px 20px;
color: #64748b;
text-align: center;
fa-icon {
font-size: 26px;
color: #22c55e;
}
p {
margin: 0;
font-size: 13px;
}
}
.npa-detail-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));