feat:glim and gsim account create and view
This commit is contained in:
+32
@@ -98,6 +98,38 @@
|
||||
|
||||
</table>
|
||||
|
||||
<div fxFlex="98%" *ngIf="activeClientMembers">
|
||||
<table fxFlex="98%" mat-table [dataSource]="dataSource">
|
||||
|
||||
<!-- Check Column -->
|
||||
<ng-container matColumnDef="check">
|
||||
<th mat-header-cell *matHeaderCellDef>
|
||||
<mat-checkbox (change)="toggleSelects()" [(ngModel)]="selectAllItems"></mat-checkbox>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-checkbox (change)="toggleSelect()" [(ngModel)]="element.selected"></mat-checkbox>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Position Column -->
|
||||
<ng-container matColumnDef="id">
|
||||
<th mat-header-cell *matHeaderCellDef> Client ID </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.id}} </td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Client Name </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.displayName}} </td>
|
||||
</ng-container>
|
||||
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumn"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumn;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
|
||||
+30
@@ -11,6 +11,7 @@ import { FormfieldBase } from 'app/shared/form-dialog/formfield/model/formfield-
|
||||
import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
|
||||
import { DatepickerBase } from 'app/shared/form-dialog/formfield/model/datepicker-base';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
|
||||
/**
|
||||
* Savings Account Charges Step
|
||||
@@ -28,6 +29,8 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
@Input() savingsAccountTemplate: any;
|
||||
/** Currency Code */
|
||||
@Input() currencyCode: FormControl;
|
||||
/** active Client Members in case of GSIM Account */
|
||||
@Input() activeClientMembers?: any;
|
||||
|
||||
/** Charge Data */
|
||||
chargeData: any = [];
|
||||
@@ -39,6 +42,15 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
isChargesPatched = false;
|
||||
/** Display columns for charges table */
|
||||
displayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType', 'date', 'repaymentsEvery', 'action'];
|
||||
/** Table Data Source */
|
||||
dataSource: any;
|
||||
/** Check for select all the Clients List */
|
||||
selectAllItems = false;
|
||||
/** Loan Purpose Options */
|
||||
loanPurposeOptions: string[] = [];
|
||||
/** Table Displayed Columns */
|
||||
displayedColumn: string[] = ['check', 'id', 'name'];
|
||||
|
||||
|
||||
/**
|
||||
* @param {MatDialog} dialog Mat Dialog
|
||||
@@ -54,6 +66,7 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
} else {
|
||||
this.chargesDataSource = [];
|
||||
}
|
||||
this.dataSource = new MatTableDataSource<any>(this.activeClientMembers);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -191,4 +204,21 @@ export class SavingsAccountChargesStepComponent implements OnInit, OnChanges {
|
||||
return { charges: this.chargesDataSource };
|
||||
}
|
||||
|
||||
get selectedClientMembers() {
|
||||
return { selectedMembers: this.activeClientMembers.filter( (item: any) => item.selected ) };
|
||||
}
|
||||
|
||||
/** Toggle all checks */
|
||||
toggleSelects() {
|
||||
for (const member of this.activeClientMembers) {
|
||||
member.selected = this.selectAllItems;
|
||||
}
|
||||
}
|
||||
|
||||
/** Check if all the checks are selected */
|
||||
toggleSelect() {
|
||||
const len = this.activeClientMembers.length;
|
||||
this.selectAllItems = len === 0 ? false : this.activeClientMembers.filter( (item: any) => item.selected ).length === len;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user