- CFCFRMS cyber fraud complaint management with dashboard, complaints, escalation, report suspect/mule/fraud txn, FMR submission, CFR lookup - Mock HTTP interceptor with 20 dummy complaints and all endpoints - Simulator service for I4C/MHA integration testing - 3-row menu bar with 22 items (7+8+8 layout) - Mega menus for General Ledger, Sub Ledger, Deposits, Share, Others, HRM, RBI with search and grouped columns - Dropdowns for Cashier, Clearing, NPA, CKYC, Advances, Letter Mgmt, Insurance, Digital - Dashboard redesign with regulatory, financial health, deposits, risk/NPA sections using static banking data - All translations added to en-US.json - FontAwesome icons registered for all new menu items Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
84 lines
3.2 KiB
TypeScript
84 lines
3.2 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 { Injectable, inject } from '@angular/core';
|
|
import { HttpClient } from '@angular/common/http';
|
|
import { Observable } from 'rxjs';
|
|
import { environment } from '../../environments/environment';
|
|
import {
|
|
SimPushComplaintRequest,
|
|
SimPushComplaintResponse,
|
|
SimHoldDirectiveRequest,
|
|
SimHoldDirectiveResponse,
|
|
SimBulkPushRequest,
|
|
SimBulkPushResponse,
|
|
SimBankUpdateRequest,
|
|
SimBankUpdateResponse,
|
|
SimVerifyAccountRequest,
|
|
SimVerifyAccountResponse,
|
|
SimVerifyTransactionRequest,
|
|
SimVerifyTransactionResponse,
|
|
SimComplaintStatusResponse,
|
|
SimBankPerformanceResponse
|
|
} from './models/cfcfrms.models';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class CfcfrmsSimulatorService {
|
|
private http = inject(HttpClient);
|
|
private baseUrl = environment.cfcfrmsApiUrl
|
|
? environment.cfcfrmsApiUrl.replace('/cfcfrms', '/simulator/cfcfrms')
|
|
: `${environment.serverUrl}/simulator/cfcfrms`;
|
|
|
|
/** I4C pushes a complaint to the bank (creates a real ticket) */
|
|
pushComplaint(payload: SimPushComplaintRequest): Observable<SimPushComplaintResponse> {
|
|
return this.http.post<SimPushComplaintResponse>(`${this.baseUrl}/push-complaint`, payload);
|
|
}
|
|
|
|
/** I4C pushes an urgent hold/freeze directive */
|
|
pushHoldDirective(payload: SimHoldDirectiveRequest): Observable<SimHoldDirectiveResponse> {
|
|
return this.http.post<SimHoldDirectiveResponse>(`${this.baseUrl}/push-hold-directive`, payload);
|
|
}
|
|
|
|
/** I4C pushes a batch of complaints (max 10) */
|
|
pushBulkComplaints(payload: SimBulkPushRequest): Observable<SimBulkPushResponse> {
|
|
return this.http.post<SimBulkPushResponse>(`${this.baseUrl}/push-bulk-complaints`, payload);
|
|
}
|
|
|
|
/** Bank reports action taken on a complaint */
|
|
receiveBankUpdate(payload: SimBankUpdateRequest): Observable<SimBankUpdateResponse> {
|
|
return this.http.post<SimBankUpdateResponse>(`${this.baseUrl}/receive-bank-update`, payload);
|
|
}
|
|
|
|
/** Bank reports that funds have been moved/escalated */
|
|
receiveEscalation(payload: { ticketId: string }): Observable<any> {
|
|
return this.http.post<any>(`${this.baseUrl}/receive-escalation`, payload);
|
|
}
|
|
|
|
/** Verify if an account is known/flagged */
|
|
verifyAccount(payload: SimVerifyAccountRequest): Observable<SimVerifyAccountResponse> {
|
|
return this.http.post<SimVerifyAccountResponse>(`${this.baseUrl}/verify-account`, payload);
|
|
}
|
|
|
|
/** Verify a transaction for risk/fraud flags */
|
|
verifyTransaction(payload: SimVerifyTransactionRequest): Observable<SimVerifyTransactionResponse> {
|
|
return this.http.post<SimVerifyTransactionResponse>(`${this.baseUrl}/verify-transaction`, payload);
|
|
}
|
|
|
|
/** CFCFRMS-side status view for a complaint by reference */
|
|
getComplaintStatus(ref: string): Observable<SimComplaintStatusResponse> {
|
|
return this.http.get<SimComplaintStatusResponse>(`${this.baseUrl}/complaint-status/${ref}`);
|
|
}
|
|
|
|
/** Bank TAT / compliance performance metrics */
|
|
getBankPerformance(): Observable<SimBankPerformanceResponse> {
|
|
return this.http.get<SimBankPerformanceResponse>(`${this.baseUrl}/bank-performance`);
|
|
}
|
|
}
|