diff --git a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html index 98fc6d4de..08a6f88dc 100644 --- a/src/app/clients/client-stepper/client-general-step/client-general-step.component.html +++ b/src/app/clients/client-stepper/client-general-step/client-general-step.component.html @@ -1232,38 +1232,6 @@ } - - Monthly Turnover - ₹ - - @if ( - createClientForm.get('monthlyTurnover')?.hasError('pattern') && - createClientForm.get('monthlyTurnover')?.touched - ) { - Enter a valid amount - } @else if ( - createClientForm.get('monthlyTurnover')?.hasError('min') && createClientForm.get('monthlyTurnover')?.touched - ) { - Amount cannot be negative - } - - - - Yearly Turnover - ₹ - - @if ( - createClientForm.get('annualTurnover')?.hasError('pattern') && - createClientForm.get('annualTurnover')?.touched - ) { - Enter a valid amount - } @else if ( - createClientForm.get('annualTurnover')?.hasError('min') && createClientForm.get('annualTurnover')?.touched - ) { - Amount cannot be negative - } - -
Other Income @@ -1303,6 +1271,38 @@ } + + Monthly Turnover + ₹ + + @if ( + createClientForm.get('monthlyTurnover')?.hasError('pattern') && + createClientForm.get('monthlyTurnover')?.touched + ) { + Enter a valid amount + } @else if ( + createClientForm.get('monthlyTurnover')?.hasError('min') && createClientForm.get('monthlyTurnover')?.touched + ) { + Amount cannot be negative + } + + + + Yearly Turnover + ₹ + + @if ( + createClientForm.get('annualTurnover')?.hasError('pattern') && + createClientForm.get('annualTurnover')?.touched + ) { + Enter a valid amount + } @else if ( + createClientForm.get('annualTurnover')?.hasError('min') && createClientForm.get('annualTurnover')?.touched + ) { + Amount cannot be negative + } + +
Senior Citizen / Person with Disability diff --git a/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.html b/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.html index ebefe625c..0efe524f2 100644 --- a/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.html +++ b/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.html @@ -173,8 +173,9 @@ @if (selectedAddrProof.requiresDate) { Issue / bill date - event - + + + }
diff --git a/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.ts b/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.ts index e92614174..66ac05ee9 100644 --- a/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.ts +++ b/src/app/clients/client-stepper/client-india-address-step/client-india-address-step.component.ts @@ -20,6 +20,7 @@ import { ClientsService } from '../../clients.service'; import { ProofType, normalizeProofType, groupProofsByCategory } from '../../shared/kyc-proof-types'; import { KycUploadHelperService } from '../../shared/kyc-upload-helper.service'; import { DocumentPreviewDialogComponent } from '../../shared/document-preview-dialog/document-preview-dialog.component'; +import { Dates } from 'app/core/utils/dates'; @Component({ selector: 'mifosx-client-india-address-step', @@ -41,6 +42,7 @@ export class ClientIndiaAddressStepComponent implements OnInit, OnChanges { private clientsService = inject(ClientsService); private kycUpload = inject(KycUploadHelperService); private dialog = inject(MatDialog); + private dates = inject(Dates); /** Client ID — when set, loads existing addresses for edit mode */ @Input() clientId: string = ''; @@ -413,11 +415,12 @@ export class ClientIndiaAddressStepComponent implements OnInit, OnChanges { files.push({ slot: 'Back', file: this.addrFiles.back }); } } + const rawIssueDate = this.permanentForm.get('issueDate')?.value; return { proof: this.selectedAddrProof, proofId: this.permanentForm.get('proofId')?.value || '', documentKey: this.permanentForm.get('documentKey')?.value || '', - issueDate: this.permanentForm.get('issueDate')?.value || '', + issueDate: rawIssueDate ? this.dates.getDate(rawIssueDate) : '', files }; } @@ -560,13 +563,13 @@ export class ClientIndiaAddressStepComponent implements OnInit, OnChanges { proofId: matchedProof.id, documentKey: identifier.documentKey || '' }); - // The description carries `Issue date: dd/mm/yyyy` when set on create (see + // The description carries `Issue date: yyyy-MM-dd` when set on create (see // create-client.saveAddressProof) — pull it out so the form's issueDate field // shows what was previously entered. const desc: string = identifier.description || ''; const issueMatch = desc.match(/Issue date:\s*(.+)$/i); if (issueMatch) { - this.permanentForm.patchValue({ issueDate: issueMatch[1].trim() }); + this.permanentForm.patchValue({ issueDate: this.dates.parseDate(issueMatch[1].trim()) }); } } diff --git a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html index 4de539f95..970887224 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html +++ b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.html @@ -347,9 +347,18 @@ Issue / statement date (not older than 3 months) -
- - +
+ + +
} diff --git a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.scss b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.scss index cc9027d80..3fcb87e67 100644 --- a/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.scss +++ b/src/app/clients/clients-view/custom-dialogs/upload-document-dialog/upload-document-dialog.component.scss @@ -388,42 +388,32 @@ $red-900: #993c1d; padding-left: 38px; } -/* Date input — match styling of other kyc inputs */ +/* Date input — opens the Material calendar picker; styled to match other kyc inputs */ .kyc-input--date { font-family: inherit; color: $gray-900; cursor: pointer; min-height: 40px; - padding-right: 14px !important; + padding-left: 12px !important; + padding-right: 40px !important; +} - &::-webkit-calendar-picker-indicator { - opacity: 0.55; - cursor: pointer; - filter: grayscale(1); - transition: opacity 0.15s; +.kyc-input-wrap--date .kyc-input-wrap__calendar-toggle { + position: absolute; + right: 2px; + top: 50%; + transform: translateY(-50%); + color: $gray-500; + + ::ng-deep .mat-mdc-icon-button { + width: 32px; + height: 32px; + padding: 4px; } - &:hover::-webkit-calendar-picker-indicator { - opacity: 0.9; - } - - &::-webkit-datetime-edit { - color: $gray-900; - padding-top: 1px; - } - - &::-webkit-datetime-edit-fields-wrapper { - color: $gray-900; - } - - &::-webkit-datetime-edit-text { - color: $gray-500; - padding: 0 2px; - } - - &:invalid::-webkit-datetime-edit, - &:not(:focus):placeholder-shown::-webkit-datetime-edit { - color: $gray-500; + ::ng-deep .mat-mdc-icon-button svg { + width: 18px; + height: 18px; } } diff --git a/src/app/clients/shared/kyc-proof-types.ts b/src/app/clients/shared/kyc-proof-types.ts index 7d23c4bec..38eedb9d4 100644 --- a/src/app/clients/shared/kyc-proof-types.ts +++ b/src/app/clients/shared/kyc-proof-types.ts @@ -145,6 +145,7 @@ export const PROOF_META: Record> = { PENSION_PAYMENT_ORDER: { sides: 1, category: 'Financial & other', + requiresDate: true, info: 'Pension payment order — upload full document issued by pension authority.' }, CERT_INCORPORATION: {