From 63ab9643ce70b9aa6b17cb66fd3df83c59701281 Mon Sep 17 00:00:00 2001 From: Nitesh Yadav Date: Thu, 6 Aug 2026 14:21:06 +0530 Subject: [PATCH] fix(headers): add missing MPL-2.0 license headers on merged files Files restored from dev during the demo-backup merge were missing the standard license header (dev's copies predate that fix, which had only been applied on the demo line previously). Also fixed pre-existing lint debt surfaced by the edit: wrong component selector prefix and constructor-injection pattern in client-family-member-child-dialog. --- ...-family-member-child-dialog.component.html | 178 ++++++++++-------- ...nt-family-member-child-dialog.component.ts | 70 ++++--- .../client-edit-email-dialog.component.scss | 33 +++- 3 files changed, 171 insertions(+), 110 deletions(-) diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.html b/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.html index a681b04e5..9df64819d 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.html +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.html @@ -1,90 +1,110 @@ + +
-
+
people - CHILDREN + CHILDREN
-
+
@for (child of children.controls; track $index) { -
-
- - Child Full Name* - - - - Gender* - - @for (g of genderIdOptions; track g.id) { - {{ g.name }} +
+
+ + Child Full Name* + + + + Gender* + + @for (g of genderIdOptions; track g.id) { + {{ g.name }} + } + + + + Date of Birth + + + + + + Nationality + + Indian + NRI + Foreign National + Other + + + + Aadhaar Number (Optional) + + + + PAN Number (Optional) + + @if ( + $any(children.at($index)).get('panNumber')?.hasError('pattern') && + $any(children.at($index)).get('panNumber')?.touched + ) { + Invalid PAN format } - - - - Date of Birth - - - - - - Nationality - - Indian - NRI - Foreign National - Other - - - - Aadhaar Number (Optional) - - - - PAN Number (Optional) - - @if ( - $any(children.at($index)).get('panNumber')?.hasError('pattern') && $any(children.at($index)).get('panNumber')?.touched - ) { - Invalid PAN format - } - + +
-
- @if ($index < children.controls.length - 1) {
+ @if ($index < children.controls.length - 1) { +
+ } + } +
+
- } - } -
- -
- - + + - - - - -
\ No newline at end of file + + + + +
diff --git a/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.ts b/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.ts index 6e457afbb..6130001d7 100644 --- a/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.ts +++ b/src/app/clients/client-stepper/client-family-members-step/client-family-member-child-dialog/client-family-member-child-dialog.component.ts @@ -1,4 +1,12 @@ -import { Component, Inject, OnInit } from '@angular/core'; +/** + * 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/. + */ + +import { Component, OnInit, inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { UntypedFormBuilder, UntypedFormGroup, UntypedFormArray, Validators } from '@angular/forms'; @@ -13,7 +21,7 @@ import { ReactiveFormsModule } from '@angular/forms'; import { CommonModule } from '@angular/common'; @Component({ - selector: 'cbs-client-family-member-child-dialog', + selector: 'mifosx-client-family-member-child-dialog', templateUrl: './client-family-member-child-dialog.component.html', styleUrls: ['../client-family-member-dialog/client-family-member-dialog.component.scss'], standalone: true, @@ -30,18 +38,17 @@ import { CommonModule } from '@angular/common'; ] }) export class ClientFamilyMemberChildDialogComponent implements OnInit { + dialogRef = inject(MatDialogRef); + data = inject(MAT_DIALOG_DATA); + private formBuilder = inject(UntypedFormBuilder); childrenForm: UntypedFormGroup; genderIdOptions: any[]; maxDate: Date = new Date(); - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any, - private formBuilder: UntypedFormBuilder - ) { - this.genderIdOptions = data.genderIdOptions; - + constructor() { + this.genderIdOptions = this.data.genderIdOptions; + this.childrenForm = this.formBuilder.group({ children: this.formBuilder.array([]) }); @@ -50,15 +57,26 @@ export class ClientFamilyMemberChildDialogComponent implements OnInit { ngOnInit() { if (this.data.children && this.data.children.length > 0) { this.data.children.forEach((child: any) => { - this.children.push(this.formBuilder.group({ - id: [child.id], - fullName: [child.fullName, Validators.required], - genderId: [child.genderId, Validators.required], - dateOfBirth: [child.dateOfBirth ? new Date(child.dateOfBirth) : ''], - nationality: [child.nationality || 'INDIAN'], - aadhaarNumber: [child.aadhaarNumber || ''], - panNumber: [child.panNumber || '', Validators.pattern(/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/)] - })); + this.children.push( + this.formBuilder.group({ + id: [child.id], + fullName: [ + child.fullName, + Validators.required + ], + genderId: [ + child.genderId, + Validators.required + ], + dateOfBirth: [child.dateOfBirth ? new Date(child.dateOfBirth) : ''], + nationality: [child.nationality || 'INDIAN'], + aadhaarNumber: [child.aadhaarNumber || ''], + panNumber: [ + child.panNumber || '', + Validators.pattern(/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/) + ] + }) + ); }); } else { this.addChild(); @@ -72,12 +90,21 @@ export class ClientFamilyMemberChildDialogComponent implements OnInit { createChildFormGroup(): UntypedFormGroup { return this.formBuilder.group({ id: [''], - fullName: ['', Validators.required], - genderId: ['', Validators.required], + fullName: [ + '', + Validators.required + ], + genderId: [ + '', + Validators.required + ], dateOfBirth: [''], nationality: ['INDIAN'], aadhaarNumber: [''], - panNumber: ['', Validators.pattern(/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/)] + panNumber: [ + '', + Validators.pattern(/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/) + ] }); } @@ -94,5 +121,4 @@ export class ClientFamilyMemberChildDialogComponent implements OnInit { this.dialogRef.close(this.children.value); } } - } diff --git a/src/app/tasks/checker-inbox-and-tasks-tabs/pending-client-edits/client-edit-email-dialog/client-edit-email-dialog.component.scss b/src/app/tasks/checker-inbox-and-tasks-tabs/pending-client-edits/client-edit-email-dialog/client-edit-email-dialog.component.scss index f50f1cd82..7663df382 100644 --- a/src/app/tasks/checker-inbox-and-tasks-tabs/pending-client-edits/client-edit-email-dialog/client-edit-email-dialog.component.scss +++ b/src/app/tasks/checker-inbox-and-tasks-tabs/pending-client-edits/client-edit-email-dialog/client-edit-email-dialog.component.scss @@ -1,6 +1,9 @@ /** * Copyright since 2025 Mifos Initiative - * MPL-2.0 + * + * 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/. */ :host { @@ -35,14 +38,14 @@ flex-direction: column; margin-bottom: 30px; padding: 0 4px; - font-family: 'Roboto', 'Inter', sans-serif; /* Gmail-like typography */ + font-family: Roboto, Inter, sans-serif; /* Gmail-like typography */ } .ced-gmail-subject { font-size: 1.35rem; font-weight: 400; color: #202124; - margin: 0 0 24px 0; + margin: 0 0 24px; line-height: 1.4; } @@ -153,13 +156,19 @@ &--sent { background: #e8f5e9; color: #1b5e20; - .ced-chip__dot { background: #43a047; } + + .ced-chip__dot { + background: #43a047; + } } &--notsent { background: #f5f5f5; color: #757575; - .ced-chip__dot { background: #bdbdbd; } + + .ced-chip__dot { + background: #bdbdbd; + } } &--seen { @@ -176,7 +185,7 @@ /* ── Divider ────────────────────────────────────────────────────────────── */ .ced-divider { border: none; - border-top: 1px solid #eeeeee; + border-top: 1px solid #eee; margin: 12px 0; } @@ -197,13 +206,19 @@ width: 100%; } - td, th { + td, + th { padding: 6px 12px; border: 1px solid #e0e0e0; } - p { margin: 0 0 10px; } - ul { padding-left: 20px; } + p { + margin: 0 0 10px; + } + + ul { + padding-left: 20px; + } } /* ── Empty state ────────────────────────────────────────────────────────── */