implemented editGoalieYtdMinsPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-14 01:03:47 -05:00
parent 1b9c072a76
commit 0961f14c5f
2 changed files with 11 additions and 1 deletions

View File

@ -23,6 +23,7 @@ module Mtlstats.Actions.EditGoalie
( editGoalieNumber
, editGoalieName
, editGoalieYtdGames
, editGoalieYtdMins
) where
import Control.Monad (void)
@ -56,6 +57,14 @@ editGoalieYtdGames
-> ProgState
editGoalieYtdGames games = editGoalie (gYtd.gsGames .~ games) EGYtd
-- | Edits a goalie's YTD minutes
editGoalieYtdMins
:: Int
-- ^ The number of minutes played
-> ProgState
-> ProgState
editGoalieYtdMins = undefined
editGoalie :: (Goalie -> Goalie) -> EditGoalieMode -> ProgState -> ProgState
editGoalie f mode s = fromMaybe s $ do
gid <- s^.progMode.editGoalieStateL.egsSelectedGoalie

View File

@ -56,4 +56,5 @@ editGoalieYtdGamesPrompt = numPrompt "Year-to-date games played: " $
-- | Prompt to edit a goalie's YTD minutes played
editGoalieYtdMinsPrompt :: Prompt
editGoalieYtdMinsPrompt = undefined
editGoalieYtdMinsPrompt = numPrompt "Year-to-date minutes played: " $
modify . editGoalieYtdMins