Merge pull request #54 from mtlstats/player-zero

don't show player zero in reports
This commit is contained in:
Jonathan Lamothe 2019-12-28 21:05:23 -05:00 committed by GitHub
commit 1adf6de990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,8 @@
# Changelog for mtlstats
## current
- Don't show player number zero in reports
## 0.9.0
- Bugfix: Display lifetime stats in report, not YTD
- Force expected capitalization on player/goalie names

View File

@ -189,8 +189,9 @@ filteredPlayerReport
-> [(Player, PlayerStats)]
-> [String]
filteredPlayerReport width label criteria showTotals ps = let
tStats = foldl addPlayerStats newPlayerStats $ map snd ps
fps = filter criteria ps
tStats = foldl addPlayerStats newPlayerStats $ map snd ps
criteria' = (&&) <$> criteria <*> \(p, _) -> p^.pNumber /= 0
fps = filter criteria' ps
rHeader =
[ centre width (label ++ " STATISTICS")