Merge pull request #48 from mtlstats/bugfix

Bugfix: display lifetime statistics in report instead of year-to-date
This commit is contained in:
Jonathan Lamothe 2019-12-14 00:16:55 -05:00 committed by GitHub
commit 4ca0b54de2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -1,5 +1,8 @@
# Changelog for mtlstats
## current
- Bugfix: Display lifetime stats ib report, not YTD
## 0.8.0
- Bugfix: removed quotation marks from goalie names in report
- Allow lower case player names

View File

@ -151,10 +151,10 @@ lifetimeStatsReport :: Int -> ProgState -> [String]
lifetimeStatsReport width s = let
db = s^.database
playerStats = map (\p -> (p, p^.pYtd))
playerStats = map (\p -> (p, p^.pLifetime))
$ db^.dbPlayers
goalieStats = map (\g -> (g, g^.gYtd))
goalieStats = map (\g -> (g, g^.gLifetime))
$ db^.dbGoalies
in playerReport width "LIFETIME" playerStats
@ -169,8 +169,8 @@ gameDate gs = fromMaybe "" $ do
Just $ m ++ " " ++ d ++ " " ++ y
playerReport :: Int -> String -> [(Player, PlayerStats)] -> [String]
playerReport width label ps =
filteredPlayerReport width label (const True) ps
playerReport width label =
filteredPlayerReport width label (const True)
filteredPlayerReport
:: Int