import { Component, OnInit } from '@angular/core'; import { AuthService } from 'src/app/shared/services/auth.service'; import { UtilityService } from 'src/app/shared/services/utility.service'; import { TournamentRole } from 'tournee.businesslogic'; @Component({ selector: 'app-profile-tournamentroles-container', templateUrl: './profile-tournamentroles-container.component.html', styleUrls: ['./profile-tournamentroles-container.component.css'] }) export class ProfileTournamentrolesContainerComponent implements OnInit { ShowHistorical: boolean = false; FilteredRoles(): Array { if (this.ShowHistorical) { return this.auth.User.tournament_roles; } else { return this.auth.User.tournament_roles.filter((tr) => { return tr.IsCurrentOrFuture() == true; }); } }; constructor(public auth: AuthService, public utility: UtilityService) { } ngOnInit() { } }