implemented editGoalieNamePrompt

This commit is contained in:
Jonathan Lamothe 2019-11-13 11:40:02 -05:00
parent 895f090f17
commit fceba7eed1
2 changed files with 11 additions and 1 deletions

View File

@ -21,6 +21,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Actions.EditGoalie module Mtlstats.Actions.EditGoalie
( editGoalieNumber ( editGoalieNumber
, editGoalieName
) where ) where
import Control.Monad (void) import Control.Monad (void)
@ -43,3 +44,11 @@ editGoalieNumber n s = fromMaybe s $ do
Just $ s Just $ s
& database.dbGoalies %~ modifyNth gid updateGoalie & database.dbGoalies %~ modifyNth gid updateGoalie
& progMode.editGoalieStateL.egsMode .~ EGMenu & progMode.editGoalieStateL.egsMode .~ EGMenu
-- | Edits a goalie's name
editGoalieName
:: String
-- ^ The new name
-> ProgState
-> ProgState
editGoalieName = undefined

View File

@ -44,4 +44,5 @@ editGoalieNumberPrompt = numPrompt "Goalie number: " $
-- | Prompt to edit a goalie's name -- | Prompt to edit a goalie's name
editGoalieNamePrompt :: Prompt editGoalieNamePrompt :: Prompt
editGoalieNamePrompt = undefined editGoalieNamePrompt = strPrompt "Goalie name: " $
modify . editGoalieName