feat: add current accounts list module with redesigned UI
- New accounts module with list, routing, and service - Redesigned accounts-list UI with modern card layout, status badges, and action buttons - Fixed totalRecords formatting (removed formatNumber pipe from integer count) - Register accounts module in app.module and shell navigation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
43bab670a0
commit
45d4397b0e
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* 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, HttpParams } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface AccountListParams {
|
||||
offset?: number;
|
||||
limit?: number;
|
||||
accountNo?: string;
|
||||
clientName?: string;
|
||||
orderBy?: string;
|
||||
sortOrder?: string;
|
||||
}
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AccountsService {
|
||||
private http = inject(HttpClient);
|
||||
|
||||
getSavingsAccounts(params: AccountListParams = {}): Observable<any> {
|
||||
let httpParams = new HttpParams()
|
||||
.set('depositType', '100')
|
||||
.set('offset', (params.offset ?? 0).toString())
|
||||
.set('limit', (params.limit ?? 20).toString());
|
||||
if (params.accountNo) httpParams = httpParams.set('accountNo', params.accountNo);
|
||||
if (params.clientName) httpParams = httpParams.set('clientName', params.clientName);
|
||||
if (params.orderBy) httpParams = httpParams.set('orderBy', params.orderBy);
|
||||
if (params.sortOrder) httpParams = httpParams.set('sortOrder', params.sortOrder);
|
||||
return this.http.get('/savingsaccounts', { params: httpParams });
|
||||
}
|
||||
|
||||
getCurrentAccounts(params: AccountListParams = {}): Observable<any> {
|
||||
let httpParams = new HttpParams()
|
||||
.set('offset', (params.offset ?? 0).toString())
|
||||
.set('limit', (params.limit ?? 20).toString());
|
||||
if (params.accountNo) httpParams = httpParams.set('accountNo', params.accountNo);
|
||||
if (params.clientName) httpParams = httpParams.set('clientName', params.clientName);
|
||||
return this.http.get('/currentaccounts', { params: httpParams });
|
||||
}
|
||||
|
||||
getFixedDepositAccounts(params: AccountListParams = {}): Observable<any> {
|
||||
let httpParams = new HttpParams()
|
||||
.set('paged', 'true')
|
||||
.set('offset', (params.offset ?? 0).toString())
|
||||
.set('limit', (params.limit ?? 20).toString());
|
||||
if (params.accountNo) httpParams = httpParams.set('accountNo', params.accountNo);
|
||||
if (params.clientName) httpParams = httpParams.set('clientName', params.clientName);
|
||||
if (params.orderBy) httpParams = httpParams.set('orderBy', params.orderBy);
|
||||
if (params.sortOrder) httpParams = httpParams.set('sortOrder', params.sortOrder);
|
||||
return this.http.get('/fixeddepositaccounts', { params: httpParams });
|
||||
}
|
||||
|
||||
getRecurringDepositAccounts(params: AccountListParams = {}): Observable<any> {
|
||||
let httpParams = new HttpParams()
|
||||
.set('paged', 'true')
|
||||
.set('offset', (params.offset ?? 0).toString())
|
||||
.set('limit', (params.limit ?? 20).toString());
|
||||
if (params.accountNo) httpParams = httpParams.set('accountNo', params.accountNo);
|
||||
if (params.clientName) httpParams = httpParams.set('clientName', params.clientName);
|
||||
if (params.orderBy) httpParams = httpParams.set('orderBy', params.orderBy);
|
||||
if (params.sortOrder) httpParams = httpParams.set('sortOrder', params.sortOrder);
|
||||
return this.http.get('/recurringdepositaccounts', { params: httpParams });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user