Skip to content

Commit

Permalink
Code review comments resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-HMCTS committed Jul 16, 2024
1 parent c920315 commit 63f0454
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export class StaffUsersComponent {
takeUntil(this.unsubscribe$),
tap((error) => {
this.staffSelectError = !!error;
this.staffSelectErrors = error ? { title: 'Staff error', description: error.errorDescription } : null;
this.staffSelectErrors = error ? { title: 'Staff error', description: error?.errorDescription ? error?.errorDescription: 'An unknown error has occured' } : null;
})
)
.subscribe();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot } from '@angular/router';
import { Store } from '@ngrx/store';
import { catchError, map, tap } from 'rxjs/operators';
import { catchError, map } from 'rxjs/operators';
import { of } from 'rxjs';
import { StaffUser } from '../models/staff-user.model';
import { StaffDataAccessService } from '../services/staff-data-access/staff-data-access.service';
Expand All @@ -19,7 +19,6 @@ export class StaffUserDetailsResolverService {
public resolve(route?: ActivatedRouteSnapshot) {
this.store.dispatch(new ResetStaffSelect());
return this.staffDataAccessService.fetchSingleUserById(route.params.id).pipe(
tap((user:StaffUser) => console.log('User:', user)),
map((user) => StaffUser.from(user)),
catchError((error) => {
this.store.dispatch(new SetError(error.error));
Expand Down

0 comments on commit 63f0454

Please sign in to comment.