File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -216,6 +216,10 @@ export class DataService {
216216 }
217217 }
218218
219+ getPupilsVisible ( ) {
220+ return this . getPupils ( ) . filter ( x => ! x . deleted ) ;
221+ }
222+
219223 getPupil ( id ) {
220224 let pupils = this . getPupils ( ) ;
221225 return pupils . filter ( e => e . id == id ) [ 0 ] ;
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ <h4 class="modal-title">Wirklich löschen?</h4>
9393 < label class ="control-label col-sm-4 " for ="pupil "> Schüler:</ label >
9494 < div class ="col-sm-8 ">
9595 < select class ="form-control " id ="pupil " [(ngModel)] ="model.pupilId " required >
96- < option *ngFor ="let pupil of dataService.getPupils () " [value] ="pupil.id "> {{pupil.firstName}}
96+ < option *ngFor ="let pupil of dataService.getPupilsVisible () " [value] ="pupil.id "> {{pupil.firstName}}
9797 {{pupil.lastName}}
9898 </ option >
9999 </ select >
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ <h1>Schülerübersicht</h1>
1515 < th > Einträge</ th >
1616 < th > </ th >
1717 </ tr >
18- < tr class ="clickable " *ngFor ="let pupil of dataService.getPupils () " routerLink ="/pupil/{{pupil.id}} ">
18+ < tr class ="clickable " *ngFor ="let pupil of dataService.getPupilsVisible () " routerLink ="/pupil/{{pupil.id}} ">
1919 < td > {{pupil.firstName}}</ td >
2020 < td > {{pupil.lastName}}</ td >
2121 < td > {{dataService.getPupilClass(pupil.id).name}}</ td >
You can’t perform that action at this time.
0 commit comments