feat: add view client charges component (#688)

Fixes: #688
This commit is contained in:
Benura Abeywardena
2020-07-15 15:45:00 +05:30
committed by GitHub
parent 90b6e3cc6d
commit bf98074b71
11 changed files with 327 additions and 3 deletions
@@ -78,7 +78,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="upcomingChargesColumns"></tr>
<tr mat-row *matRowDef="let row; columns: upcomingChargesColumns;"></tr>
<tr mat-row *matRowDef="let row; columns: upcomingChargesColumns;" [routerLink]="[routeToCharges,row.id]"></tr>
</table>
@@ -12,6 +12,9 @@
table {
width: 100%;
td:hover {
cursor: pointer;
}
.account-action-button{
min-width: 26px;
padding: 0 6px;
@@ -35,6 +35,8 @@ export class GeneralTabComponent {
showClosedFixedAccounts = false;
clientid: any;
/** Route to Charges */
routeToCharges: any;
constructor(
private route: ActivatedRoute,
@@ -48,6 +50,11 @@ export class GeneralTabComponent {
this.upcomingCharges = data.clientChargesData.pageItems;
this.clientSummary = data.clientSummary[0];
this.clientid = this.route.parent.snapshot.params['clientId'];
});
/** Get Client Id and generate the route link. */
this.route.parent.params.subscribe((params: any) => {
this.routeToCharges = '../../' + params.clientId + '/charges';
});
}