Skip to content

Commit

Permalink
Show report button only if lesson presences found (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
caebr authored Aug 3, 2021
1 parent f6b2352 commit 88a7c62
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 @@ -21,9 +21,8 @@
>
<div class="buttons">
<a
*ngIf="!data.loadingPage"
*ngIf="!data.loadingPage && reportUrl$ | async"
class="report btn btn-primary mb-2"
[class.disabled]="!reportUrl$ | async"
[href]="reportUrl$ | async"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class EvaluateAbsencesListComponent implements OnInit, AfterViewInit {
return this.state.validFilter$.pipe(
switchMap((filter) => this.lessonPresencesService.getLessonRefs(filter)),
map((lessonPresences) =>
lessonPresences
lessonPresences.length > 0
? this.reportsService.getEvaluateAbsencesUrl(
this.getReportRecordIds(lessonPresences)
)
Expand Down

0 comments on commit 88a7c62

Please sign in to comment.