From 1b9df689d9465d63013f442b7f526507f99becd9 Mon Sep 17 00:00:00 2001 From: Jose Alberto Hernandez Date: Fri, 28 Oct 2022 01:00:23 -0500 Subject: [PATCH] Fix waive loan charge button --- src/app/core/shell/breadcrumb/breadcrumb.component.ts | 2 +- src/app/loans/loans-view/view-charge/view-charge.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/core/shell/breadcrumb/breadcrumb.component.ts b/src/app/core/shell/breadcrumb/breadcrumb.component.ts index 0199f7845..598bef248 100644 --- a/src/app/core/shell/breadcrumb/breadcrumb.component.ts +++ b/src/app/core/shell/breadcrumb/breadcrumb.component.ts @@ -133,7 +133,7 @@ export class BreadcrumbComponent implements OnInit, AfterViewInit { } else if (routeData.breadcrumb === 'Loan Products') { breadcrumbLabel = routeData.loanProduct.name; } else if (routeData.breadcrumb === 'Charges') { - breadcrumbLabel = routeData.charge.name; + breadcrumbLabel = routeData.loansAccountCharge.name; } else if (routeData.breadcrumb === 'Saving Products') { breadcrumbLabel = routeData.savingProduct.name; } else if (routeData.breadcrumb === 'Share Products') { diff --git a/src/app/loans/loans-view/view-charge/view-charge.component.ts b/src/app/loans/loans-view/view-charge/view-charge.component.ts index 4617f499a..3ce48a707 100644 --- a/src/app/loans/loans-view/view-charge/view-charge.component.ts +++ b/src/app/loans/loans-view/view-charge/view-charge.component.ts @@ -90,7 +90,7 @@ export class ViewChargeComponent { dateFormat, locale }; - this.loansService.executeLoansAccountChargesCommand(this.chargeData.accountId, 'paycharge', dataObject, this.chargeData.id) + this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId, 'paycharge', dataObject, this.chargeData.id) .subscribe(() => { this.reload(); }); @@ -105,7 +105,7 @@ export class ViewChargeComponent { const waiveChargeDialogRef = this.dialog.open(ConfirmationDialogComponent, { data: { heading: 'Waive Charge', dialogContext: `Are you sure you want to waive charge with id: ${this.chargeData.id}`, type: 'Basic' } }); waiveChargeDialogRef.afterClosed().subscribe((response: any) => { if (response.confirm) { - this.loansService.executeLoansAccountChargesCommand(this.chargeData.accountId, 'waive', {}, this.chargeData.id) + this.loansService.executeLoansAccountChargesCommand(this.chargeData.loanId, 'waive', {}, this.chargeData.id) .subscribe(() => { this.reload(); });