Fixed typing regarding genomforandeReferens

This commit is contained in:
Erik Tiekstra
2021-10-13 10:53:59 +02:00
parent ce87ef5aac
commit 7ebdf104d1
2 changed files with 6 additions and 6 deletions

View File

@@ -43,11 +43,11 @@ export class FranvaroReportFormComponent {
error$ = new BehaviorSubject<CustomError>(null); error$ = new BehaviorSubject<CustomError>(null);
submitLoading$ = new BehaviorSubject<boolean>(false); submitLoading$ = new BehaviorSubject<boolean>(false);
lastSubmittedFranvaroReport$ = new BehaviorSubject<Date>(null); lastSubmittedFranvaroReport$ = new BehaviorSubject<Date>(null);
currentGenomforandeReferens$: Observable<string> = this.activatedRoute.params.pipe( currentGenomforandeReferens$: Observable<number> = this.activatedRoute.params.pipe(
map(params => params.genomforandeReferens as string) map(params => +params.genomforandeReferens)
); );
avrop$: Observable<Avrop> = this.currentGenomforandeReferens$.pipe( avrop$: Observable<Avrop> = this.currentGenomforandeReferens$.pipe(
switchMap(genomforandeReferens => this.franvaroReportFormService.fetchAvropInformation$(+genomforandeReferens)), switchMap(genomforandeReferens => this.franvaroReportFormService.fetchAvropInformation$(genomforandeReferens)),
shareReplay(1) shareReplay(1)
); );
reasons$: Observable<FranvaroReason[]> = this.franvaroReportFormService.reasons$; reasons$: Observable<FranvaroReason[]> = this.franvaroReportFormService.reasons$;

View File

@@ -32,11 +32,11 @@ export class GemensamPlaneringFormComponent {
submitLoading$ = new BehaviorSubject<boolean>(false); submitLoading$ = new BehaviorSubject<boolean>(false);
activities$: Observable<Activity[]> = this.gemensamPlaneringFormService.activities$; activities$: Observable<Activity[]> = this.gemensamPlaneringFormService.activities$;
currentGenomforandeReferens$: Observable<string> = this.activatedRoute.params.pipe( currentGenomforandeReferens$: Observable<number> = this.activatedRoute.params.pipe(
map(params => params.genomforandeReferens as string) map(params => +params.genomforandeReferens)
); );
avrop$: Observable<Avrop> = this.currentGenomforandeReferens$.pipe( avrop$: Observable<Avrop> = this.currentGenomforandeReferens$.pipe(
switchMap(genomforandeReferens => this.gemensamPlaneringFormService.fetchAvropInformation$(+genomforandeReferens)), switchMap(genomforandeReferens => this.gemensamPlaneringFormService.fetchAvropInformation$(genomforandeReferens)),
shareReplay(1) shareReplay(1)
); );