feat: current account details step and client general tab updates
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
-->
|
||||
|
||||
<div class="general-tab-container mat-typography">
|
||||
|
||||
<!-- Performance History - KPI Stat Cards -->
|
||||
<section class="performance-section">
|
||||
<h3 class="performance-title">{{ 'labels.heading.Performance History' | translate }}</h3>
|
||||
@@ -164,7 +163,9 @@
|
||||
<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">{{ 'labels.messages.No Active Saving Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Active Saving Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -211,7 +212,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="closedSavingsColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Closed Saving Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Closed Saving Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -233,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">
|
||||
@@ -258,7 +344,8 @@
|
||||
<ng-container matColumnDef="Name">
|
||||
<th mat-header-cell *matHeaderCellDef>{{ 'labels.inputs.name' | translate }}</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<i class="fa fa-stop" [ngClass]="!(element.isWaived || element.isPaid) | statusLookup"></i> {{ element.name }}
|
||||
<i class="fa fa-stop" [ngClass]="!(element.isWaived || element.isPaid) | statusLookup"></i>
|
||||
{{ element.name }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -322,7 +409,11 @@
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="upcomingChargesColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: upcomingChargesColumns" [routerLink]="['../', 'charges', row.id]"></tr>
|
||||
<tr
|
||||
mat-row
|
||||
*matRowDef="let row; columns: upcomingChargesColumns"
|
||||
[routerLink]="['../', 'charges', row.id]"
|
||||
></tr>
|
||||
<tr mat-footer-row *matFooterRowDef="upcomingCharges?.length === 0 ? ['no-data'] : []"></tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -407,7 +498,9 @@
|
||||
<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">{{ 'labels.messages.No Active Fixed Deposit Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Active Fixed Deposit Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -454,7 +547,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="closedSavingsColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Closed Fixed Deposit Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Closed Fixed Deposit Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -559,7 +654,9 @@
|
||||
<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">{{ 'labels.messages.No Active Recurring Deposit Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Active Recurring Deposit Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -607,7 +704,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="closedSavingsColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Closed Recurring Deposit Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Closed Recurring Deposit Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -775,7 +874,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="openLoansColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Active Loan Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Active Loan Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -867,7 +968,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="closedLoansColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Closed Loan Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Closed Loan Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -924,7 +1027,8 @@
|
||||
<th mat-header-cell class="r-amount" *matHeaderCellDef>{{ 'labels.inputs.Total Value' | translate }}</th>
|
||||
<td mat-cell class="r-amount" *matCellDef="let element">
|
||||
{{
|
||||
element.basePrice * element.quantity | currency: element.currency?.code || 'USD' : 'symbol-narrow' : '1.2-2'
|
||||
element.basePrice * element.quantity
|
||||
| currency: element.currency?.code || 'USD' : 'symbol-narrow' : '1.2-2'
|
||||
}}
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -1043,7 +1147,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="openSharesColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Active Share Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Active Share Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -1094,7 +1200,9 @@
|
||||
<td mat-footer-cell *matFooterCellDef [attr.colspan]="closedSharesColumns.length">
|
||||
<div class="table-empty-state">
|
||||
<i class="fa fa-folder-open-o table-empty-state__icon"></i>
|
||||
<p class="table-empty-state__text">{{ 'labels.messages.No Closed Share Accounts Available' | translate }}</p>
|
||||
<p class="table-empty-state__text">
|
||||
{{ 'labels.messages.No Closed Share Accounts Available' | translate }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -1123,4 +1231,4 @@
|
||||
<embed [src]="pdfUrl" type="application/pdf" width="100%" height="600px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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 ?? [];
|
||||
|
||||
|
||||
+15
-7
@@ -472,10 +472,18 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
if (this.introducerId) {
|
||||
value.introducerId = this.introducerId;
|
||||
value.introducerName = this.introducerName;
|
||||
value.introducerCif = this.introducerCif;
|
||||
value.introducerCifNumber = this.introducerCif;
|
||||
}
|
||||
value.isNonIndividualClient = this.isNonIndividualClient;
|
||||
|
||||
// Product classification fields
|
||||
if (this.selectedAccountType) {
|
||||
value.accountType = this.selectedAccountType;
|
||||
}
|
||||
if (this.selectedCustomerSegment) {
|
||||
value.customerSegment = this.selectedCustomerSegment;
|
||||
}
|
||||
|
||||
// accountStatus applies to all client types
|
||||
value.accountStatus = this.selectedAccountStatus || null;
|
||||
if (this.selectedAccountStatus === 'INDIVIDUAL_MALE' && this.selectedSpecialCategory)
|
||||
@@ -487,8 +495,8 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
value.jointHolders = [
|
||||
{
|
||||
clientId: this.primaryClientId,
|
||||
clientName: this.primaryClientName,
|
||||
clientCif: this.primaryClientCif,
|
||||
displayName: this.primaryClientName,
|
||||
cifNumber: this.primaryClientCif,
|
||||
sharePercentage: this.primaryHolderShare,
|
||||
isMandatory: true,
|
||||
isPrimary: true,
|
||||
@@ -497,8 +505,8 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
},
|
||||
...this.jointHolders.map((h) => ({
|
||||
clientId: h.clientId,
|
||||
clientName: h.clientName,
|
||||
clientCif: h.clientCif,
|
||||
displayName: h.clientName,
|
||||
cifNumber: h.clientCif,
|
||||
sharePercentage: h.sharePercentage,
|
||||
isMandatory: h.isMandatory,
|
||||
isPrimary: false,
|
||||
@@ -510,9 +518,9 @@ export class CurrentAccountDetailsStepComponent implements OnInit {
|
||||
if (this.selectedAccountStatus === 'MINOR') {
|
||||
value.guardianClientId = this.guardianClientId;
|
||||
value.guardianName = this.guardianName;
|
||||
value.guardianCif = this.guardianCif;
|
||||
value.guardianCifNumber = this.guardianCif;
|
||||
value.guardianRelationship = this.guardianRelationship;
|
||||
value.minorDob = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null;
|
||||
value.minorDateOfBirth = this.minorDob ? this.dateUtils.formatDate(this.minorDob, 'yyyy-MM-dd') : null;
|
||||
}
|
||||
|
||||
// non-individual: partners are a separate dataset
|
||||
|
||||
@@ -48,6 +48,10 @@ export class AccountsFilterPipe implements PipeTransform {
|
||||
accounts = accounts.filter((account: any) => {
|
||||
return account.depositType.value === 'Savings';
|
||||
});
|
||||
} else if (checkSavings === 'isCurrent') {
|
||||
accounts = accounts.filter((account: any) => {
|
||||
return account.depositType.id === 400 || account.depositType.value === 'Current Deposit';
|
||||
});
|
||||
}
|
||||
if (status === 'closed') {
|
||||
accounts = accounts.filter((account: any) => {
|
||||
|
||||
@@ -5,13 +5,12 @@
|
||||
* 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/.
|
||||
*/
|
||||
|
||||
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
||||
/* tslint:disable */
|
||||
export default {
|
||||
'mifos_x': {
|
||||
'version': '260428',
|
||||
'hash': '31b2490f'
|
||||
'version': '260429',
|
||||
'hash': '0d3d8379'
|
||||
},
|
||||
'allow_switching_backend_instance': true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user