mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1203: #3062 Clear Items Cache If Navigate to Remission
#3062 Clear Items Cache If Navigate to Remission
This commit is contained in:
committed by
Andreas Schickinger
parent
b666e4b38c
commit
833542f303
@@ -2,6 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, Router } from '@angular/router';
|
||||
import { ApplicationService } from '@core/application';
|
||||
import { BreadcrumbService } from '@core/breadcrumb';
|
||||
import { CacheService } from '@core/cache';
|
||||
import { Config } from '@core/config';
|
||||
import { Subject } from 'rxjs';
|
||||
import { filter, first, takeUntil } from 'rxjs/operators';
|
||||
@@ -23,11 +24,13 @@ export class RemissionComponent implements OnInit, OnDestroy {
|
||||
private readonly _config: Config,
|
||||
private _activatedRoute: ActivatedRoute,
|
||||
private _applicationService: ApplicationService,
|
||||
private _router: Router
|
||||
private _router: Router,
|
||||
private _cache: CacheService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.addBreadcrumbIfNotExists();
|
||||
this.clearCache();
|
||||
|
||||
this._router.events
|
||||
?.pipe(
|
||||
@@ -75,4 +78,8 @@ export class RemissionComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
clearCache() {
|
||||
this._cache.delete({ processId: String(this.processId) });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user