feat: MFA/2FA, OTP audit logs, KYC + client/user enhancements

- Access Control module: SMS/Email/TOTP/Hardware-token MFA factor management
- OTP Audit Logs module under Admin menu (list + detail) with 401/403 handling
- Two-factor authentication login flow updates
- Client KYC, India address, family-members, ckyc, nominee enhancements
- New shared KYC helpers (kyc-proof-types, kyc-upload-helper.service)
- User create/edit/view enhancements
- Shell navigation: OTP Audit Logs entry under real Admin menu
This commit is contained in:
Aditya
2026-05-10 13:24:48 +05:30
parent 2d4fb4237e
commit 3b752dc6ae
56 changed files with 7741 additions and 599 deletions
@@ -23,6 +23,19 @@
color: var(--md-sys-color-primary, #1074b9);
font-size: 14px;
}
.section-required-tag {
margin-left: 6px;
padding: 2px 9px;
border-radius: 999px;
background: #fee2e2;
color: #b91c1c;
border: 1px solid #fecaca;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.4px;
text-transform: uppercase;
}
}
.kyc-badge {
@@ -948,12 +961,23 @@
border-radius: 10px;
background: #f9fafb;
text-align: center;
transition: border-color 0.15s;
transition:
border-color 0.15s,
background 0.15s;
&:hover {
border-color: #1353a0;
}
&--missing {
border-color: #dc2626;
background: #fef2f2;
&:hover {
border-color: #b91c1c;
}
}
&__icon {
width: 44px;
height: 44px;
@@ -972,6 +996,19 @@
color: #0f172a;
}
&__req {
color: #dc2626;
font-weight: 700;
margin-left: 2px;
}
&__error {
margin-top: 6px;
font-size: 12px;
font-weight: 600;
color: #b91c1c;
}
&__hint {
font-size: 11px;
color: #94a3b8;
@@ -1214,3 +1251,393 @@
font-weight: 600;
}
}
/* ===================== KYC Document chip-grouped picker ===================== */
.kyc-doc-pickbox {
border: 1px solid #e2e8f0;
border-radius: 14px;
background: #fff;
padding: 16px 18px;
margin: 6px 0 14px;
box-shadow: 0 1px 3px rgb(15 23 42 / 4%);
&__head {
display: flex;
align-items: center;
gap: 12px;
padding-bottom: 10px;
border-bottom: 1px solid #f1f5f9;
margin-bottom: 14px;
}
&__icon {
color: #2563eb;
background: #eff6ff;
border-radius: 999px;
width: 36px;
height: 36px;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 20px;
flex-shrink: 0;
}
&__titles {
min-width: 0;
}
&__title {
margin: 0;
font-size: 14px;
font-weight: 700;
color: #0f172a;
}
&__sub {
margin: 2px 0 0;
font-size: 12px;
color: #64748b;
}
}
.kyc-doc-field {
margin-bottom: 4px;
}
.kyc-doc-label {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
color: #334155;
margin-bottom: 10px;
mat-icon {
font-size: 18px;
width: 18px;
height: 18px;
color: #64748b;
}
}
.kyc-doc-chip-wrap {
border: 1px solid #e2e8f0;
border-radius: 12px;
padding: 14px 16px;
background: #f8fafc;
}
.kyc-doc-chip-group-label {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.6px;
text-transform: uppercase;
color: #64748b;
margin-bottom: 8px;
mat-icon {
font-size: 14px;
width: 14px;
height: 14px;
color: #94a3b8;
}
}
.kyc-doc-chip-grid {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.kyc-doc-chip-divider {
height: 1px;
background: #e2e8f0;
margin: 14px 0 10px;
}
.kyc-doc-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
border-radius: 999px;
background: #fff;
border: 1px solid #cbd5e1;
font-size: 13px;
color: #334155;
cursor: pointer;
user-select: none;
transition:
background 0.15s,
border-color 0.15s,
color 0.15s,
box-shadow 0.15s;
&:hover {
border-color: #1976d2;
color: #1976d2;
}
&__icon {
font-size: 16px;
width: 16px;
height: 16px;
color: #94a3b8;
}
&--sel {
background: #e3f2fd;
border-color: #1976d2;
color: #0d47a1;
font-weight: 600;
box-shadow: inset 0 0 0 1px #1976d2;
.kyc-doc-chip__icon {
color: #1976d2;
}
}
&:focus-visible {
outline: 2px solid #1976d2;
outline-offset: 2px;
}
}
.kyc-doc-banner {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 14px;
margin-top: 12px;
border-radius: 10px;
background: #ecfdf5;
border: 1px solid #a7f3d0;
color: #065f46;
font-size: 13px;
mat-icon {
font-size: 18px;
width: 18px;
height: 18px;
color: #059669;
flex-shrink: 0;
}
}
.kyc-doc-error {
margin-top: 8px;
color: #b91c1c;
font-size: 12px;
padding-left: 4px;
strong {
font-weight: 700;
}
}
/* ===================== KYC Document upload dropzones ===================== */
.kyc-doc-upload-grid {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
margin-top: 14px;
&--two {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (width <= 720px) {
grid-template-columns: 1fr !important;
}
}
.kyc-doc-upload-slot {
display: flex;
flex-direction: column;
gap: 8px;
}
.kyc-doc-upload-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.kyc-doc-upload-title {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 600;
color: #334155;
mat-icon {
font-size: 16px;
width: 16px;
height: 16px;
color: #64748b;
}
}
.kyc-doc-upload-req {
display: inline-flex;
align-items: center;
padding: 2px 9px;
border-radius: 999px;
background: #fee2e2;
color: #b91c1c;
border: 1px solid #fecaca;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.4px;
text-transform: uppercase;
}
.kyc-merged {
margin-top: 16px;
border: 1px solid #e2e8f0;
border-radius: 12px;
background: #fff;
padding: 14px 16px;
&__head {
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 6px 16px;
margin-bottom: 10px;
}
&__title {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 13px;
font-weight: 700;
color: #0f172a;
mat-icon {
font-size: 18px;
width: 18px;
height: 18px;
color: #2563eb;
}
}
&__hint {
font-size: 12px;
color: #64748b;
}
&__preview {
display: flex;
justify-content: center;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-radius: 10px;
padding: 12px;
overflow: hidden;
img {
max-width: 100%;
max-height: 360px;
border-radius: 6px;
box-shadow: 0 1px 6px rgb(15 23 42 / 8%);
}
}
&__actions {
display: flex;
gap: 10px;
flex-wrap: wrap;
margin-top: 12px;
}
&__btn {
mat-icon {
font-size: 16px;
width: 16px;
height: 16px;
margin-right: 4px;
vertical-align: middle;
}
}
}
.kyc-doc-dropzone {
display: block;
border: 2px dashed #cbd5e1;
border-radius: 12px;
background: #f8fafc;
padding: 18px 14px;
cursor: pointer;
transition:
background 0.15s,
border-color 0.15s;
&:hover {
background: #f1f5f9;
border-color: #94a3b8;
}
&--req {
border-color: #fca5a5;
background: #fef2f2;
}
&--has {
border-style: solid;
border-color: #86efac;
background: #f0fdf4;
}
&__hint {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
color: #64748b;
font-size: 13px;
mat-icon {
font-size: 22px;
width: 22px;
height: 22px;
color: #94a3b8;
}
}
&__file {
display: flex;
align-items: center;
gap: 10px;
min-width: 0;
mat-icon {
color: #16a34a;
flex-shrink: 0;
}
}
&__name {
flex: 1;
min-width: 0;
font-size: 13px;
font-weight: 600;
color: #0f172a;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&__remove {
flex-shrink: 0;
}
}