Now reloading employee-card for every visit to avoid cache-problems

This commit is contained in:
Erik Tiekstra
2021-09-13 08:11:28 +02:00
parent 51d42b1669
commit c81d7fb38c
5 changed files with 5 additions and 2 deletions

View File

@@ -50,11 +50,11 @@ export class EmployeeService extends UnsubscribeDirective {
super.unsubscribeOnDestroy(
combineLatest([this._currentEmployeeId$, this._lastUpdatedEmployeeId$])
.pipe(
filter(([currentEmployeeId]) => !!currentEmployeeId),
distinctUntilChanged(
([prevEmployeeId], [currEmployeeId, currLastUpdatedEmployeeId]) =>
!currLastUpdatedEmployeeId && prevEmployeeId === currEmployeeId
),
filter(([currentEmployeeId]) => !!currentEmployeeId),
switchMap(([currentEmployeeId]) =>
this._fetchEmployee$(currentEmployeeId).pipe(filter(employee => !!employee))
)