From 1ec9e93f16d20712777ca54477678baf512662c4 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 13 Dec 2019 11:42:49 -0500 Subject: [PATCH 1/2] hlint recommenfations --- src/Mtlstats/Report.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 384fb79..43ed865 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -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 From 3738088dde04a9f7fdbce65146f537923e356329 Mon Sep 17 00:00:00 2001 From: Jonathan Lamothe Date: Fri, 13 Dec 2019 11:43:22 -0500 Subject: [PATCH 2/2] display lifetime stats in report --- ChangeLog.md | 3 +++ src/Mtlstats/Report.hs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index ca15e04..7cd7aa9 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/src/Mtlstats/Report.hs b/src/Mtlstats/Report.hs index 43ed865..f2eead8 100644 --- a/src/Mtlstats/Report.hs +++ b/src/Mtlstats/Report.hs @@ -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