implemented year-to-date report
This commit is contained in:
parent
bfe568492d
commit
32f61ccc89
|
@ -41,6 +41,8 @@ report width s
|
|||
= standingsReport width s
|
||||
++ [""]
|
||||
++ gameStatsReport width s
|
||||
++ [""]
|
||||
++ yearToDateStatsReport width s
|
||||
|
||||
standingsReport :: Int -> ProgState -> [String]
|
||||
standingsReport width s = fromMaybe [] $ do
|
||||
|
@ -96,6 +98,11 @@ gameStatsReport width s = maybe [] (playerReport width "GAME") $
|
|||
Just (p, stats))
|
||||
(M.toList $ s^.progMode.gameStateL.gamePlayerStats)
|
||||
|
||||
yearToDateStatsReport :: Int -> ProgState -> [String]
|
||||
yearToDateStatsReport width s = playerReport width "YEAR TO DATE" $
|
||||
map (\p -> (p, p^.pYtd)) $
|
||||
filter playerIsActive $ s^.database.dbPlayers
|
||||
|
||||
gameDate :: GameState -> String
|
||||
gameDate gs = fromMaybe "" $ do
|
||||
year <- show <$> gs^.gameYear
|
||||
|
|
Loading…
Reference in New Issue
Block a user