Skip to content

Commit

Permalink
Reload student IDs w/unconfirmed absences after confirm #669
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Apr 30, 2024
1 parent ddda878 commit cdfbe33
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ export class PresenceControlStateService

presenceTypes$ = this.loadPresenceTypes().pipe(shareReplay(1));

studentIdsWithUnconfirmedAbsences$ = reemitOnTrigger(
private reloadStudentIdsWithUnconfirmedAbsences$ = new Subject<void>();
studentIdsWithUnconfirmedAbsences$ = merge(
this.selectedDate$,
this.selectedLesson$.pipe(skip(1)),
this.reloadStudentIdsWithUnconfirmedAbsences$,
).pipe(
switchMap(() => this.loadStudentIdsWithUnconfirmedAbsences()),
shareReplay(1),
Expand Down Expand Up @@ -281,6 +283,7 @@ export class PresenceControlStateService
// Reload the lesson presences if absences have been confirmed in the
// dossier view and the user is returing to the presence control list
this.reloadLessonPresences$.next();
this.reloadStudentIdsWithUnconfirmedAbsences$.next();
}

private loadLessonPresencesByLesson(
Expand Down

0 comments on commit cdfbe33

Please sign in to comment.