feat: add view loan page (datatables-tab) (#853)

Fixes: #840
Fixes: #841
This commit is contained in:
Muskan Khedia
2020-06-10 21:54:19 +05:30
committed by GitHub
parent a3f60783dc
commit 8503dc6d97
27 changed files with 776 additions and 28 deletions
+15 -3
View File
@@ -166,9 +166,21 @@ const routes: Routes = [
]
},
{
path: 'loans',
data: { title: extract('Loans'), breadcrumb: 'loans' },
loadChildren: '../loans/loans.module#LoansModule'
path: 'clients',
data: { title: extract('Clients'), breadcrumb: 'Clients', routeParamBreadcrumb: false },
children: [
{
path: ':clientId',
data: { title: extract('Clients View'), routeParamBreadcrumb: 'clientId' },
children: [
{
path: 'loans',
data: { title: extract('Loans'), breadcrumb: 'loans', routeParamBreadcrumb: false },
loadChildren: '../loans/loans.module#LoansModule'
}
]
}
]
}
])
];
@@ -133,7 +133,7 @@
</ng-container>
<tr mat-header-row *matHeaderRowDef="openLoansColumns"></tr>
<tr mat-row *matRowDef="let row; columns: openLoansColumns;" [routerLink]="['/loans', row.id, 'general']" class="select-row"></tr>
<tr mat-row *matRowDef="let row; columns: openLoansColumns;" [routerLink]="['/clients', clientid, 'loans', row.id, 'general']" class="select-row"></tr>
</table>
<!-- Closed Loan Accounts -->
@@ -31,6 +31,7 @@ export class GeneralTabComponent {
showClosedLoanAccounts = false;
showClosedSavingAccounts = false;
showClosedShareAccounts = false;
clientid: any;
constructor(
private route: ActivatedRoute,
@@ -43,6 +44,7 @@ export class GeneralTabComponent {
this.shareAccounts = data.clientAccountsData.shareAccounts;
this.upcomingCharges = data.clientChargesData.pageItems;
this.clientSummary = data.clientSummary[0];
this.clientid = this.route.parent.snapshot.params['clientId'];
});
}