implemented goalieToEditPrompt

This commit is contained in:
Jonathan Lamothe 2019-11-11 15:30:04 -05:00
parent cadbd6354b
commit 8aa8d39f70
2 changed files with 10 additions and 1 deletions

View File

@ -21,8 +21,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
module Mtlstats.Prompt.EditGoalie (goalieToEditPrompt) where module Mtlstats.Prompt.EditGoalie (goalieToEditPrompt) where
import Control.Monad.Trans.State (modify)
import Lens.Micro ((.~))
import Mtlstats.Prompt
import Mtlstats.Types import Mtlstats.Types
-- | Prompt to select a 'Goalie' for editing -- | Prompt to select a 'Goalie' for editing
goalieToEditPrompt :: Prompt goalieToEditPrompt :: Prompt
goalieToEditPrompt = undefined goalieToEditPrompt = selectGoaliePrompt "Goalie to edit: " $
modify . (progMode.editGoalieStateL.egsSelectedGoalie .~)

View File

@ -54,6 +54,7 @@ module Mtlstats.Types (
createPlayerStateL, createPlayerStateL,
createGoalieStateL, createGoalieStateL,
editPlayerStateL, editPlayerStateL,
editGoalieStateL,
-- ** GameState Lenses -- ** GameState Lenses
gameYear, gameYear,
gameMonth, gameMonth,
@ -651,6 +652,9 @@ editPlayerStateL = lens
_ -> newEditPlayerState) _ -> newEditPlayerState)
(\_ eps -> EditPlayer eps) (\_ eps -> EditPlayer eps)
editGoalieStateL :: Lens' ProgMode EditGoalieState
editGoalieStateL = undefined
-- | Constructor for a 'ProgState' -- | Constructor for a 'ProgState'
newProgState :: ProgState newProgState :: ProgState
newProgState = ProgState newProgState = ProgState