letter-mgmt (new module): - Notice page: overdue loan list with filters, KPI strip, bulk actions, call disposition logging (Promise-to-Pay, Not Reachable, etc.), Speed Post dispatch dialog with consignment + post-office tracking, PDF preview + download, call-contact dialog with primary / alt / family / nominee numbers and per-contact disposition history. - Certificates: Loan Interest, Share, Balance, Form 60 (no-PAN flow), Form 15G/H (auto age-based), Hypothecation, NOC - each with shared preview dialog (six tone variants) and jsPDF generator using a common letterhead / summary-grid / signature-seal helper. digital: - IMPS module: report (P2A/P2P/Aadhaar tabs) + entry form with MMID/mobile lookup, NPCI switch resolve-to-A/C+IFSC BANL flow, sender autocomplete, hide sender field for P2P/Aadhaar, charges + 18% GST + waive checkbox, per-sender today-only history dialog. - UPI report with app-mix tab and full transaction filtering. - ATM/POS/ECOM hub with three ticket cards routing to today/status/cycle. - NEFT/RTGS entry: sender-account autocomplete, charges + GST + waive, field reorder (sender before amount), NEFT cap / RTGS floor validation, History button opening per-sender today's transactions. - NEFT/RTGS report: horizontal-bar trend leaderboard replacing tall bars. shell + theme: - Header redesigned with IBM Plex Sans 12/500 typography, 11-column grid per row, top-accent hover indicator, bordered cells via grid-gap. - Live KPI ticker below menu (CASH, TXN TODAY, CLEARING IN/OUT, NPA, CASA, CD RATIO, RBI CIRC, REPO) with marquee scroll, pause-on-hover, brand-blue gradient, amber bottom strip, pulsing red LIVE chip. - Sidebar 'KYC Management' -> 'KYC & ReKYC Management'. - Letter Mgmt / certificate menu items wired with green icon hints for items that have a working page. access-control: - MFA card layout compacted; method header inlines back button + title. icons: - Register faTruck/TruckFast, faEllipsisV/H, faCommentDots. - Add IBM Plex Sans Google Fonts import to index.html. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
92 lines
2.8 KiB
TypeScript
92 lines
2.8 KiB
TypeScript
/**
|
|
* 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, inject } from '@angular/core';
|
|
import { CommonModule } from '@angular/common';
|
|
import { FormsModule } from '@angular/forms';
|
|
import { FaIconComponent } from '@fortawesome/angular-fontawesome';
|
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
|
import { MatTooltip } from '@angular/material/tooltip';
|
|
import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module';
|
|
|
|
import { NoticeEvent, OverdueLoan } from '../notice.component';
|
|
|
|
export interface SpeedPostDialogData {
|
|
loan: OverdueLoan;
|
|
notice: NoticeEvent;
|
|
}
|
|
|
|
export interface SpeedPostDialogResult {
|
|
confirmed: boolean;
|
|
consignmentNo?: string;
|
|
postOffice?: string;
|
|
bookedDate?: string;
|
|
postage?: number;
|
|
}
|
|
|
|
@Component({
|
|
selector: 'mifosx-speed-post-dialog',
|
|
templateUrl: './speed-post-dialog.component.html',
|
|
styleUrls: ['./speed-post-dialog.component.scss'],
|
|
imports: [
|
|
...STANDALONE_SHARED_IMPORTS,
|
|
CommonModule,
|
|
FormsModule,
|
|
FaIconComponent,
|
|
MatTooltip
|
|
]
|
|
})
|
|
export class SpeedPostDialogComponent {
|
|
private dialogRef = inject(MatDialogRef<SpeedPostDialogComponent, SpeedPostDialogResult>);
|
|
data: SpeedPostDialogData = inject(MAT_DIALOG_DATA);
|
|
|
|
consignmentNo = '';
|
|
postOffice = '';
|
|
bookedDate = todayIso();
|
|
postage: number | null = 45;
|
|
|
|
/** Suggested India-post Speed Post 13-char article ID format: 2 letters + 9 digits + 2 letters
|
|
(e.g. "EM123456789IN"). Loose pattern — operator can paste any tracking ID. */
|
|
readonly consignmentPattern = /^[A-Z]{2}\d{9}[A-Z]{2}$|^[A-Za-z0-9]{6,20}$/;
|
|
|
|
get isConsignmentValid(): boolean {
|
|
const c = (this.consignmentNo || '').trim();
|
|
return c.length >= 6 && this.consignmentPattern.test(c);
|
|
}
|
|
|
|
get isFormValid(): boolean {
|
|
return this.isConsignmentValid && (this.postOffice || '').trim().length >= 2 && !!this.bookedDate;
|
|
}
|
|
|
|
/** Force the consignment number to uppercase for the India-Post-style ID. */
|
|
upperCaseConsignment(value: string): void {
|
|
this.consignmentNo = (value || '').toUpperCase();
|
|
}
|
|
|
|
confirm(): void {
|
|
if (!this.isFormValid) return;
|
|
this.dialogRef.close({
|
|
confirmed: true,
|
|
consignmentNo: this.consignmentNo.trim(),
|
|
postOffice: this.postOffice.trim(),
|
|
bookedDate: this.bookedDate,
|
|
postage: this.postage != null ? Number(this.postage) : undefined
|
|
});
|
|
}
|
|
|
|
cancel(): void {
|
|
this.dialogRef.close({ confirmed: false });
|
|
}
|
|
}
|
|
|
|
function todayIso(): string {
|
|
const d = new Date();
|
|
const pad = (n: number) => String(n).padStart(2, '0');
|
|
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`;
|
|
}
|