Files
cbsnexora/src/app/savings/savings-account-stepper/savings-account-details-step/savings-account-details-step.component.scss
T
Jaanu423andClaude Sonnet 4.6 ad6f629c3f fix: nominee share & joint ownership validation across all account types
- Block 0% nominee share in all steppers (Savings, FD, RD, Current) —
  Add button disabled via isValid, addNominee() guards < 1, nominee-form
  error condition fixed for value=0
- Joint ownership: default primary share 50%, enforce min 1% on blur,
  max 100% on input with DOM clamp via $event, auto-redistribute
  co-holders proportionally when primary share changes,
  isJointOwnershipValid guards each holder >= 1
- Pending/Rejected account tabs: normalize date format to 22 May 2026
  for both array and string date values from API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-23 14:05:00 +05:30

1155 lines
18 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/.
*/
$accent: #0ea5e9;
$border: #e2e8f0;
$gray-50: #f8f9fa;
$gray-200: #e8eaed;
$gray-900: #202124;
.sad-section {
border: 1px solid $border;
border-radius: 10px;
overflow: visible;
background: #fff;
&--mt {
margin-top: 16px;
}
&__header {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 24px;
background: $gray-50;
border-bottom: 1px solid $gray-200;
i {
font-size: 14px;
color: $accent;
}
h3 {
margin: 0;
font-size: 14px;
font-weight: 600;
color: $gray-900;
flex: 1;
}
}
}
.sad-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px 16px;
padding: 16px 24px;
@media (width <= 600px) {
grid-template-columns: 1fr;
}
}
.sad-grid--classification {
grid-template-columns: repeat(3, 1fr);
@media (width <= 900px) {
grid-template-columns: repeat(2, 1fr);
}
@media (width <= 600px) {
grid-template-columns: 1fr;
}
}
.sad-field {
width: 100%;
}
.sad-info-row {
display: flex;
align-items: center;
gap: 12px;
min-height: 56px;
}
.sad-info-label {
font-size: 14px;
color: $gray-900;
font-weight: 500;
}
.sad-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 3px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
background: #dbeafe;
color: #1d4ed8;
border: 1px solid #bfdbfe;
&--yes {
background: #dcfce7;
color: #15803d;
border-color: #bbf7d0;
}
}
// ── Status of Account card ────────────────────────────────────────────
.soa-card {
margin-top: 16px;
border: 1px solid #e2e8f0;
border-radius: 10px;
background: #fff;
overflow: visible;
&__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 24px;
background: #f8f9fa;
border-bottom: 1px solid #e8eaed;
border-radius: 10px 10px 0 0;
}
&__header-left {
display: flex;
align-items: center;
gap: 12px;
}
&__icon {
width: 36px;
height: 36px;
border-radius: 8px;
background: #ede9fe;
display: flex;
align-items: center;
justify-content: center;
i {
font-size: 16px;
color: #7c3aed;
}
}
&__title {
margin: 0;
font-size: 14px;
font-weight: 600;
color: #202124;
}
&__sub {
font-size: 11px;
color: #6b7280;
display: block;
}
}
.soa-pill {
display: inline-flex;
align-items: center;
padding: 3px 12px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
background: #ede9fe;
color: #7c3aed;
border: 1px solid #ddd6fe;
&--minor {
background: #fef3c7;
color: #b45309;
border-color: #fde68a;
}
&--senior {
background: #d1fae5;
color: #065f46;
border-color: #a7f3d0;
}
&--ok {
background: #dcfce7;
color: #15803d;
border-color: #bbf7d0;
}
}
// Client info bar (auto-detected DOB + Age)
.soa-client-info-bar {
display: flex;
align-items: center;
gap: 20px;
padding: 10px 24px;
background: #f0f9ff;
border-bottom: 1px solid #bae6fd;
flex-wrap: wrap;
&__item {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
color: #0369a1;
mat-icon {
font-size: 16px;
height: 16px;
width: 16px;
}
strong {
font-weight: 700;
}
}
}
.soa-auto-pill {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
margin-left: auto;
mat-icon {
font-size: 13px;
height: 13px;
width: 13px;
}
&--minor {
background: #fef3c7;
color: #b45309;
border: 1px solid #fde68a;
}
&--senior {
background: #d1fae5;
color: #065f46;
border: 1px solid #a7f3d0;
}
&--ok {
background: #dcfce7;
color: #15803d;
border: 1px solid #bbf7d0;
}
}
// Status tiles
.soa-tiles {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 12px;
padding: 16px 24px;
border-bottom: 1px solid #f1f5f9;
@media (width <= 900px) {
grid-template-columns: repeat(3, 1fr);
}
@media (width <= 600px) {
grid-template-columns: repeat(2, 1fr);
}
}
.soa-tile {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 14px 10px;
border: 2px solid #e2e8f0;
border-radius: 10px;
background: #fff;
cursor: pointer;
transition:
border-color 0.15s,
box-shadow 0.15s;
position: relative;
&:hover {
border-color: #a5b4fc;
box-shadow: 0 2px 8px rgb(99 102 241 / 12%);
}
&--selected {
border-color: #6366f1;
background: #eef2ff;
box-shadow: 0 2px 12px rgb(99 102 241 / 20%);
}
&__icon {
font-size: 28px;
height: 28px;
width: 28px;
}
&__label {
font-size: 12px;
font-weight: 600;
color: #374151;
text-align: center;
}
&__check {
position: absolute;
top: 6px;
right: 6px;
font-size: 16px;
height: 16px;
width: 16px;
color: #6366f1;
}
&__lock {
position: absolute;
top: 4px;
right: 4px;
display: flex;
align-items: center;
mat-icon {
font-size: 13px;
height: 13px;
width: 13px;
color: #94a3b8;
}
}
&--disabled {
opacity: 0.45;
cursor: not-allowed;
background: #f8fafc;
border-color: #e2e8f0;
box-shadow: none;
&:hover {
border-color: #e2e8f0;
box-shadow: none;
}
}
}
// Block inside SOA card
.soa-block {
padding: 16px 24px;
&--sep {
border-top: 1px dashed #e2e8f0;
}
&__head {
display: flex;
align-items: flex-start;
justify-content: space-between;
margin-bottom: 14px;
}
&__head-left {
display: flex;
align-items: flex-start;
gap: 12px;
}
&__letter {
width: 28px;
height: 28px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 700;
color: #fff;
flex-shrink: 0;
margin-top: 2px;
}
&__title {
font-size: 13px;
font-weight: 600;
color: #1f2937;
display: block;
}
&__hint {
font-size: 11px;
color: #6b7280;
display: block;
}
}
// Joint holders table
.soa-table-wrap {
overflow-x: auto;
border-radius: 8px;
border: 1px solid #e2e8f0;
}
.soa-tbl {
width: 100%;
border-collapse: collapse;
font-size: 13px;
}
.soa-th {
padding: 10px 14px;
background: #f8fafc;
text-align: left;
font-weight: 600;
font-size: 11px;
color: #64748b;
text-transform: uppercase;
letter-spacing: 0.04em;
border-bottom: 1px solid #e2e8f0;
&--sr {
width: 44px;
}
&--center {
text-align: center;
}
}
.soa-td {
padding: 10px 14px;
border-bottom: 1px solid #f1f5f9;
vertical-align: middle;
&--sr {
text-align: center;
font-size: 12px;
color: #94a3b8;
font-weight: 600;
}
&--center {
text-align: center;
}
&--total-label {
font-size: 12px;
font-weight: 600;
color: #475569;
text-align: right;
}
}
.soa-tr {
transition: background 0.1s;
&:hover {
background: #f8fafc;
}
&--mandatory {
background: #fdf4ff;
}
&--primary {
background: #f0f9ff;
border-left: 3px solid #0891b2;
}
}
.soa-avatar--primary {
background: #cffafe;
color: #0e7490;
}
.soa-primary-tag {
font-size: 10px;
color: #0e7490;
font-weight: 600;
background: #cffafe;
padding: 1px 7px;
border-radius: 999px;
display: inline-block;
}
.soa-pct-input {
width: 56px;
padding: 4px 6px;
border: 1px solid #cbd5e1;
border-radius: 6px;
font-size: 13px;
font-weight: 600;
text-align: center;
color: #1f2937;
&:focus {
outline: none;
border-color: #0891b2;
box-shadow: 0 0 0 2px rgb(8 145 178 / 15%);
}
&::-webkit-inner-spin-button,
&::-webkit-outer-spin-button {
opacity: 1;
}
}
.soa-pct-unit {
font-size: 13px;
font-weight: 600;
color: #64748b;
margin-left: 2px;
}
.soa-pct-error {
font-size: 11px;
color: #ef4444;
margin-top: 2px;
}
.soa-no-action {
color: #cbd5e1;
font-size: 16px;
}
.soa-tr-total {
background: #f8fafc;
}
.soa-client-cell {
display: flex;
align-items: center;
gap: 10px;
}
.soa-avatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: #dbeafe;
color: #1d4ed8;
font-weight: 700;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
&--mandatory {
background: #ede9fe;
color: #7c3aed;
}
}
.soa-client-name {
font-weight: 600;
font-size: 13px;
color: #1f2937;
display: block;
}
.soa-mandatory-tag {
font-size: 10px;
color: #7c3aed;
font-weight: 600;
background: #ede9fe;
padding: 1px 7px;
border-radius: 999px;
}
.soa-mono {
font-family: 'Roboto Mono', monospace;
font-size: 12px;
color: #64748b;
}
.soa-pct-badge {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 2px 10px;
border-radius: 999px;
font-size: 12px;
font-weight: 700;
background: #f1f5f9;
color: #475569;
&--full,
&--ok {
background: #dcfce7;
color: #15803d;
}
&--warn {
background: #fef3c7;
color: #b45309;
}
}
.soa-sign-toggle {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
border: 1px solid #e2e8f0;
cursor: pointer;
transition: all 0.15s;
mat-icon {
font-size: 14px;
height: 14px;
width: 14px;
}
&--mandatory {
background: #ede9fe;
color: #7c3aed;
border-color: #ddd6fe;
}
&--optional {
background: #f8fafc;
color: #94a3b8;
}
}
.soa-mandatory-count {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 12px;
font-weight: 600;
color: #7c3aed;
mat-icon {
font-size: 14px;
height: 14px;
width: 14px;
}
}
.soa-alert {
display: flex;
align-items: center;
gap: 8px;
margin-top: 10px;
padding: 8px 14px;
border-radius: 8px;
font-size: 13px;
font-weight: 500;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
}
&--warn {
background: #fef3c7;
color: #b45309;
}
&--ok {
background: #dcfce7;
color: #15803d;
}
}
.soa-empty {
display: flex;
align-items: center;
gap: 10px;
padding: 20px;
background: #f8fafc;
border-radius: 8px;
font-size: 13px;
color: #64748b;
mat-icon {
color: #94a3b8;
font-size: 22px;
height: 22px;
width: 22px;
}
}
.soa-add-btn {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
}
// Mode of operation grid
.soa-mode-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 10px;
@media (width <= 700px) {
grid-template-columns: repeat(2, 1fr);
}
}
.soa-mode-card {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 12px 8px;
border: 2px solid #e2e8f0;
border-radius: 10px;
background: #fff;
cursor: pointer;
transition: all 0.15s;
&:hover {
border-color: #a5b4fc;
}
&--selected {
border-color: #7c3aed;
background: #faf5ff;
}
&__icon {
font-size: 24px;
height: 24px;
width: 24px;
color: #7c3aed;
}
&__code {
font-size: 13px;
font-weight: 700;
color: #1f2937;
}
&__desc {
font-size: 11px;
color: #6b7280;
text-align: center;
}
&__check {
position: absolute;
top: 6px;
right: 6px;
font-size: 16px;
height: 16px;
width: 16px;
color: #7c3aed;
}
}
.soa-mode-summary {
display: flex;
align-items: center;
gap: 8px;
margin-top: 12px;
padding: 8px 14px;
border-radius: 8px;
font-size: 13px;
background: #f8fafc;
color: #64748b;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
}
&--set {
background: #faf5ff;
color: #7c3aed;
}
&__from {
font-size: 11px;
color: #94a3b8;
}
}
.soa-auto-badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
background: #fef9c3;
color: #854d0e;
border: 1px solid #fde68a;
mat-icon {
font-size: 13px;
height: 13px;
width: 13px;
}
}
// Minor account
.soa-minor-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px 16px;
margin-bottom: 16px;
@media (width <= 700px) {
grid-template-columns: 1fr;
}
}
.soa-field {
width: 100%;
}
.soa-guardian-search {
margin-bottom: 12px;
&__label {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
color: #374151;
margin-bottom: 8px;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
color: #7c3aed;
}
}
}
.soa-guardian-selected {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 14px;
background: #f0fdf4;
border: 1px solid #bbf7d0;
border-radius: 8px;
margin-top: 10px;
&__icon {
font-size: 24px;
height: 24px;
width: 24px;
color: #16a34a;
}
&__name {
font-size: 13px;
font-weight: 600;
color: #1f2937;
}
&__cif {
font-size: 11px;
color: #6b7280;
}
}
// Senior citizen benefits
.soa-sc-benefits {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 10px;
margin-bottom: 14px;
@media (width <= 600px) {
grid-template-columns: 1fr;
}
}
.soa-sc-benefit {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px;
background: #f0fdf4;
border: 1px solid #bbf7d0;
border-radius: 8px;
mat-icon {
color: #16a34a;
font-size: 20px;
height: 20px;
width: 20px;
flex-shrink: 0;
margin-top: 2px;
}
strong {
display: block;
font-size: 13px;
color: #1f2937;
font-weight: 600;
}
span {
font-size: 11px;
color: #6b7280;
}
}
// Individual Male / Female — Category grid
.soa-category-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
margin-bottom: 16px;
@media (width <= 700px) {
grid-template-columns: repeat(2, 1fr);
}
}
.soa-cat-tile {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 14px 10px;
border: 2px solid #e2e8f0;
border-radius: 10px;
background: #fff;
cursor: pointer;
transition: all 0.15s;
&:hover {
border-color: #a5b4fc;
box-shadow: 0 2px 8px rgb(99 102 241 / 12%);
}
&--selected {
&.soa-cat-tile--male {
border-color: #3b82f6;
background: #eff6ff;
box-shadow: 0 2px 12px rgb(59 130 246 / 20%);
}
&.soa-cat-tile--female {
border-color: #ec4899;
background: #fdf2f8;
box-shadow: 0 2px 12px rgb(236 72 153 / 20%);
}
}
&__icon {
font-size: 26px;
height: 26px;
width: 26px;
color: #64748b;
}
&--selected.soa-cat-tile--male &__icon {
color: #3b82f6;
}
&--selected.soa-cat-tile--female &__icon {
color: #ec4899;
}
&__label {
font-size: 11px;
font-weight: 600;
color: #374151;
text-align: center;
line-height: 1.3;
}
&__check {
position: absolute;
top: 6px;
right: 6px;
font-size: 16px;
height: 16px;
width: 16px;
.soa-cat-tile--male & {
color: #3b82f6;
}
.soa-cat-tile--female & {
color: #ec4899;
}
}
}
// Single Account — Nominee section
.soa-nominee-section {
margin-bottom: 16px;
&__header {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
font-weight: 600;
color: #0e7490;
margin-bottom: 12px;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
}
}
}
.soa-field--full {
grid-column: 1 / -1;
}
// PoA section
.soa-poa-section {
margin-bottom: 14px;
padding: 12px 14px;
background: #faf5ff;
border: 1px dashed #ddd6fe;
border-radius: 8px;
&__header {
display: flex;
align-items: center;
gap: 10px;
font-size: 13px;
font-weight: 600;
color: #6d28d9;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
}
}
}
// Toggle switch
.soa-toggle {
position: relative;
display: inline-block;
width: 40px;
height: 22px;
flex-shrink: 0;
input {
opacity: 0;
width: 0;
height: 0;
}
&__slider {
position: absolute;
cursor: pointer;
inset: 0;
background: #cbd5e1;
border-radius: 22px;
transition: background 0.2s;
&::before {
content: '';
position: absolute;
height: 16px;
width: 16px;
left: 3px;
bottom: 3px;
background: #fff;
border-radius: 50%;
transition: transform 0.2s;
}
}
input:checked + &__slider {
background: #7c3aed;
&::before {
transform: translateX(18px);
}
}
&__label {
font-size: 12px;
color: #6b7280;
font-weight: 500;
}
}
// Info banners
.soa-info-banner {
display: flex;
align-items: flex-start;
gap: 10px;
padding: 12px 14px;
border-radius: 8px;
font-size: 12px;
background: #eff6ff;
border: 1px solid #bfdbfe;
color: #1e40af;
mat-icon {
font-size: 18px;
height: 18px;
width: 18px;
flex-shrink: 0;
margin-top: 2px;
}
ul {
margin: 4px 0 0;
padding-left: 18px;
li {
margin-bottom: 3px;
}
}
&--minor {
background: #fefce8;
border-color: #fde68a;
color: #92400e;
}
&--senior {
background: #f0fdf4;
border-color: #bbf7d0;
color: #065f46;
}
&--male {
background: #eff6ff;
border-color: #bfdbfe;
color: #1e40af;
}
&--female {
background: #fdf2f8;
border-color: #f9a8d4;
color: #9d174d;
}
}