feat: client general tab and current account details step updates
This commit is contained in:
@@ -236,6 +236,89 @@
|
||||
}
|
||||
</section>
|
||||
|
||||
<!-- Current Accounts -->
|
||||
@if (currentAccounts?.length > 0) {
|
||||
<section class="account-section">
|
||||
<div class="section-header">
|
||||
<div class="section-header__left">
|
||||
<i class="fa fa-credit-card section-header__icon"></i>
|
||||
<h3 class="section-header__title">Current Accounts</h3>
|
||||
<span class="section-header__badge">{{ currentAccounts?.length || 0 }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-wrapper">
|
||||
<table mat-table [dataSource]="currentAccounts">
|
||||
<ng-container matColumnDef="Account No">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Account No' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<i class="fa fa-stop" [ngClass]="element.status.code | statusLookup"></i>
|
||||
<mifosx-account-number accountNo="{{ element.accountNo }}"></mifosx-account-number>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Saving Account">
|
||||
<th mat-header-cell *matHeaderCellDef>Current Account Product</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mifosx-long-text textValue="{{ element.productName }}" chars="35"></mifosx-long-text>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Last Active">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.Last Active' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">{{ element.lastActiveTransactionDate | dateFormat }}</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Balance">
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef>{{ 'labels.inputs.Balance' | translate }}</th>
|
||||
<td mat-cell class="r-amount" *matCellDef="let element">
|
||||
{{ element.accountBalance | currency: element.currency?.code || 'INR' : 'symbol-narrow' : '1.2-2' }}
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="Actions">
|
||||
<th mat-header-cell class="center" *matHeaderCellDef>{{ 'labels.inputs.Actions' | translate }}</th>
|
||||
<td mat-cell class="center" *matCellDef="let element">
|
||||
@if (element.status.submittedAndPendingApproval) {
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="routeEdit($event)"
|
||||
[routerLink]="['../', 'current-accounts', element.id, 'actions', 'Approve']"
|
||||
>
|
||||
<i class="fa fa-check"></i>
|
||||
</button>
|
||||
}
|
||||
<button
|
||||
class="account-action-button"
|
||||
mat-raised-button
|
||||
color="primary"
|
||||
(click)="routeEdit($event)"
|
||||
[routerLink]="['../', 'current-accounts', element.id, 'general']"
|
||||
>
|
||||
<i class="fa fa-eye"></i>
|
||||
</button>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="no-data">
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="openSavingsColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">No Active Current Accounts Available</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="openSavingsColumns"></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: openSavingsColumns"
|
||||
[routerLink]="['../', 'current-accounts', row.id, 'general']"
|
||||
></tr>
|
||||
<tr mat-footer-row *matFooterRowDef="currentAccounts?.length === 0 ? ['no-data'] : []"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
}
|
||||
|
||||
<!-- Upcoming Charges -->
|
||||
<section class="account-section">
|
||||
<div class="section-header">
|
||||
|
||||
@@ -228,6 +228,8 @@ export class GeneralTabComponent implements OnDestroy {
|
||||
loanAccounts: any[] = [];
|
||||
/** Savings Accounts Data */
|
||||
savingAccounts: any[] = [];
|
||||
/** Current Accounts Data */
|
||||
currentAccounts: any[] = [];
|
||||
/** Shares Accounts Data */
|
||||
shareAccounts: any[] = [];
|
||||
/** Upcoming Charges Data */
|
||||
@@ -273,6 +275,7 @@ export class GeneralTabComponent implements OnDestroy {
|
||||
(data: { clientAccountsData: any; clientChargesData: any; clientSummary: any; clientCollateralData: any }) => {
|
||||
this.clientAccountData = data.clientAccountsData;
|
||||
this.savingAccounts = data.clientAccountsData?.savingsAccounts ?? [];
|
||||
this.currentAccounts = data.clientAccountsData?.currentAccounts ?? [];
|
||||
this.loanAccounts = data.clientAccountsData?.loanAccounts ?? [];
|
||||
this.shareAccounts = data.clientAccountsData?.shareAccounts ?? [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user