wip league admin tools
This commit is contained in:
@@ -47,15 +47,14 @@ export class GetLeagueSeasonsUseCase {
|
||||
}
|
||||
|
||||
const seasons = await this.seasonRepository.findByLeagueId(leagueId);
|
||||
const activeCount = seasons.filter(season => season.status === 'active').length;
|
||||
const activeCount = seasons.filter(season => season.status.isActive()).length;
|
||||
|
||||
const result: GetLeagueSeasonsResult = {
|
||||
league,
|
||||
seasons: seasons.map(season => ({
|
||||
season,
|
||||
isPrimary: false,
|
||||
isParallelActive:
|
||||
season.status === 'active' && activeCount > 1,
|
||||
isParallelActive: season.status.isActive() && activeCount > 1,
|
||||
})),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user