Files
cbsnexora/src/app/investment/investment-shared.scss
T
nitesh 8ac4010967 feat(investment): add portfolio allocation targets and interest receivable/post/receive lifecycle
Adds a Portfolio Allocation (Target vs Actual %) section to the Investment
Dashboard, and reworks Investment Interest into the full accrual lifecycle:
Interest Receivable, FD/Govt./Bond Interest Calculation & Post, and Interest
Receive, plus the existing registers.

Interest Calculation & Post now tracks cumulative posted/received amounts
per holding instead of recomputing full accrued interest on every click
(which previously double-counted on repeat posting). Holdings classified
Non-Performing (Sub-Standard/Doubtful/Loss) are excluded from accrual
posting per RBI norms — their interest accrues in memo/suspense only and is
recognised solely on actual cash receipt via Interest Receive.

Also bumps the production initial-bundle budget in angular.json (13/14mb ->
15/17mb) since the growing set of eagerly-loaded feature modules (Investment,
NPA, Reconciliation, GL Reports, OSS Returns) pushed the build past the old
limit.
2026-08-01 17:56:44 +05:30

263 lines
5.0 KiB
SCSS

/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Extra styles layered on top of ../cashier/cashier-shared.scss (pg-*, cctr-*) for the
// Investment module — instrument nav cards, status badges, KPI tiles, entry-form layout.
.inv-kpis {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 12px;
@media (width <= 1100px) {
grid-template-columns: repeat(2, 1fr);
}
}
.inv-kpi {
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 14px 16px;
display: flex;
flex-direction: column;
gap: 4px;
&__label {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.07em;
color: #64748b;
}
&__value {
font-size: 20px;
font-weight: 800;
font-variant-numeric: tabular-nums;
color: #0f172a;
}
&__sub {
font-size: 11px;
color: #94a3b8;
}
}
.inv-nav-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 12px;
}
.inv-nav-card {
display: flex;
flex-direction: column;
gap: 6px;
padding: 16px;
background: #fff;
border: 1px solid #e2e8f0;
border-radius: 12px;
text-decoration: none;
color: inherit;
transition:
border-color 0.15s,
box-shadow 0.15s;
&:hover {
border-color: #0f4f3c;
box-shadow: 0 2px 10px rgb(15 79 60 / 10%);
}
&__label {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: #64748b;
}
&__count {
font-size: 22px;
font-weight: 800;
color: #0f172a;
}
&__value {
font-size: 13px;
font-weight: 600;
color: #0f4f3c;
}
}
.inv-badge {
display: inline-flex;
align-items: center;
padding: 3px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.04em;
&--active {
background: #f0fdf4;
color: #15803d;
border: 1px solid #bbf7d0;
}
&--matured {
background: #eff6ff;
color: #1d4ed8;
border: 1px solid #bfdbfe;
}
&--sold {
background: #fefce8;
color: #a16207;
border: 1px solid #fde68a;
}
&--written_off {
background: #fef2f2;
color: #b91c1c;
border: 1px solid #fecaca;
}
// Investment-provisioning classification (Non-Performing Investment) — same severity ramp as
// the NPA module's stage badges, kept local since it colours a different status field here.
&--standard {
background: #f0fdf4;
color: #15803d;
border: 1px solid #bbf7d0;
}
&--sub_standard {
background: #fef2f2;
color: #dc2626;
border: 1px solid #fecaca;
}
&--doubtful {
background: #fdf2f8;
color: #9d174d;
border: 1px solid #fbcfe8;
}
&--loss {
background: #1f2937;
color: #f9fafb;
border: 1px solid #1f2937;
}
}
.inv-form-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 14px 20px;
padding: 18px;
}
.inv-form-field {
display: flex;
flex-direction: column;
gap: 4px;
font-size: 11px;
font-weight: 600;
color: #64748b;
input,
select {
width: 100%;
height: 36px;
padding: 0 10px;
border: 1px solid #e2e8f0;
border-radius: 8px;
font-size: 13px;
color: #0d1b2a;
font-family: inherit;
background: #fff;
box-sizing: border-box;
}
// Long "code — name (branch)" style option text must never run under the native dropdown
// arrow — truncate it with an ellipsis instead of letting the browser clip it mid-word.
select {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Computed / lookup-filled fields are rendered read-only and greyed out so they read as
// derived values rather than something the user is expected to type into.
/* stylelint-disable-next-line selector-no-qualifying-type -- [readonly] only applies to inputs */
input[readonly] {
background: #f8fafc;
color: #64748b;
}
}
.inv-form-actions {
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
gap: 10px;
padding: 0 18px 18px;
}
.inv-maturity-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 14px;
border-bottom: 1px dotted #eef2f7;
font-size: 13px;
&:last-child {
border-bottom: none;
}
}
.inv-maturity-days {
font-weight: 800;
font-variant-numeric: tabular-nums;
&--soon {
color: #dc2626;
}
&--ok {
color: #16a34a;
}
}
.inv-toast {
position: fixed;
bottom: 24px;
left: 50%;
transform: translateX(-50%) translateY(20px);
background: #0f172a;
color: #fff;
padding: 12px 20px;
border-radius: 10px;
font-size: 13px;
font-weight: 600;
box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
opacity: 0;
pointer-events: none;
transition:
opacity 0.2s,
transform 0.2s;
z-index: 2000;
&.show {
opacity: 1;
transform: translateX(-50%) translateY(0);
}
}