Fix error in the Loan charge reload after actions

This commit is contained in:
Jose Alberto Hernandez
2022-11-03 08:08:58 -06:00
parent f8f669cab6
commit 703c313a95
2 changed files with 7 additions and 4 deletions
@@ -37,7 +37,7 @@
<div fxFlex="50%">
{{ chargeData.name }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Charge Type
</div>
@@ -77,7 +77,7 @@
<div fxFlex="50%">
{{ chargeData.chargeCalculationType.value }}
</div>
<div fxFlex="50%" class="mat-body-strong">
Due
</div>
@@ -112,6 +112,9 @@
</div>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
<button type="button" mat-raised-button color="primary" [routerLink]="['../']">{{ 'Back' | translate }}</button>
</div>
</mat-card-content>
</mat-card>
@@ -172,8 +172,8 @@ export class ViewChargeComponent {
*/
private reload() {
const clientId = this.loansAccountData.clientId;
const url: string = this.router.url.replace(`/${this.chargeData.id}`, '');
this.router.navigateByUrl(`/clients/${clientId}/loansaccounts`, {skipLocationChange: true})
const url: string = this.router.url;
this.router.navigateByUrl(`/clients/${clientId}/loans-accounts`, { skipLocationChange: true })
.then(() => this.router.navigate([url]));
}