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 ?? [];
|
||||
|
||||
|
||||
+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