Upgrade/angular 14 (#1853)
* Fix Loan product Payment Allocation * Upgrade to Angular 14 --------- Co-authored-by: Jose Alberto Hernandez <alberto@blue-daemon.local>
This commit is contained in:
co-authored by
Jose Alberto Hernandez
parent
2dab3b70ca
commit
80936a3ea9
@@ -4,7 +4,7 @@ import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from
|
||||
|
||||
/** rxjs Imports */
|
||||
import { Observable } from 'rxjs';
|
||||
import { tap, catchError } from 'rxjs/operators';
|
||||
import { finalize } from 'rxjs/operators';
|
||||
|
||||
/** Custom Services */
|
||||
import { ProgressBarService } from './progress-bar.service';
|
||||
@@ -28,17 +28,9 @@ export class ProgressInterceptor implements HttpInterceptor {
|
||||
this.progressBarService.increase();
|
||||
return next.handle(request)
|
||||
.pipe(
|
||||
tap(event => {
|
||||
if (event instanceof HttpResponse) {
|
||||
this.progressBarService.decrease();
|
||||
}
|
||||
})
|
||||
)
|
||||
.pipe(
|
||||
catchError(error => {
|
||||
this.progressBarService.decrease();
|
||||
throw error;
|
||||
})
|
||||
finalize(
|
||||
() => { this.progressBarService.decrease(); }
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user