implemented editAwayStandings
This commit is contained in:
parent
49963277be
commit
9c7c295a4b
|
@ -22,7 +22,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|||
module Mtlstats.Actions.EditStandings
|
||||
( editStandings
|
||||
, editHomeStandings
|
||||
, editRoadStandings
|
||||
, editAwayStandings
|
||||
) where
|
||||
|
||||
import Lens.Micro ((.~))
|
||||
|
@ -38,5 +38,5 @@ editHomeStandings :: ProgState -> ProgState
|
|||
editHomeStandings = progMode .~ EditStandings ESMHome
|
||||
|
||||
-- | Edits the road standings
|
||||
editRoadStandings :: ProgState -> ProgState
|
||||
editRoadStandings = undefined
|
||||
editAwayStandings :: ProgState -> ProgState
|
||||
editAwayStandings = progMode .~ EditStandings ESMAway
|
||||
|
|
|
@ -36,10 +36,14 @@ editStandingsC :: EditStandingsMode -> Controller
|
|||
editStandingsC = \case
|
||||
ESMMenu -> menuControllerWith header editStandingsMenu
|
||||
ESMHome -> editHomeStandingsC
|
||||
ESMAway -> editAwayStandingsC
|
||||
|
||||
editHomeStandingsC :: Controller
|
||||
editHomeStandingsC = undefined
|
||||
|
||||
editAwayStandingsC :: Controller
|
||||
editAwayStandingsC = undefined
|
||||
|
||||
header :: ProgState -> C.Update ()
|
||||
header = do
|
||||
db <- (^.database)
|
||||
|
|
|
@ -32,7 +32,7 @@ editStandingsMenu = Menu "*** EDIT STANDINGS ***" ()
|
|||
[ MenuItem '1' "Edit home standings" $
|
||||
modify editHomeStandings
|
||||
, MenuItem '2' "Edit road standings" $
|
||||
modify editRoadStandings
|
||||
modify editAwayStandings
|
||||
, MenuItem 'R' "Return to main menu" $
|
||||
modify backHome
|
||||
]
|
||||
|
|
|
@ -397,6 +397,7 @@ data EditGoalieMode
|
|||
data EditStandingsMode
|
||||
= ESMMenu
|
||||
| ESMHome
|
||||
| ESMAway
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- | Represents the database
|
||||
|
|
|
@ -47,4 +47,5 @@ spec = describe "EditStandings" $ mapM_
|
|||
-- label, function, expected mode
|
||||
[ ( "editStandings", editStandings, ESMMenu )
|
||||
, ( "editHomeStandings", editHomeStandings, ESMHome )
|
||||
, ( "editAwayStandings", editAwayStandings, ESMAway )
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue
Block a user