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QGNKX5CZRSKEYHTD6BQ6NTFQC
SAESJLLYCQJUIHKFYFV53AWHFOSGI5SKLVS7DPTQO6BKGITPYPUQC
eval :: BillingAction -> H.HalogenM BillingState BillingAction Slots ProjectList.Output m Unit
eval action = do
handleAction :: BillingAction -> H.HalogenM BillingState BillingAction Slots ProjectList.Output m Unit
handleAction action = do
eval :: OverviewAction -> H.HalogenM OverviewState OverviewAction Slots ProjectList.Output m Unit
eval action = do
handleAction :: OverviewAction -> H.HalogenM OverviewState OverviewAction Slots ProjectList.Output m Unit
handleAction action = do
when (all (_ /= pid) currentProject)
$ do
H.raise (ProjectList.ProjectChange pid)
H.modify_ (_ { selectedProject = Just pid })
setProjectDetail pid
when (currentProject /= pidMay)
$ traverse_ projectSelected pidMay
where
projectSelected pid = do
H.modify_ (_ { selectedProject = Just pid })
setProjectDetail pid
H.raise (ProjectList.ProjectChange pid)
lift <<< console.log $ "Selected project index " <> show i
traverse_ (\p -> H.raise $ ProjectChange (unwrap p).projectId) (index projects (i - 1))
traverse_ projectSelected (index projects (i - 1))
where
projectSelected p = do
let pid = (unwrap p).projectId
H.modify_ (_ { selectedPid = Just pid })
H.raise $ ProjectChange pid
eval :: TimelineAction -> H.HalogenM TimelineState TimelineAction Slots ProjectList.Output m Unit
eval action = do
handleAction :: TimelineAction -> H.HalogenM TimelineState TimelineAction Slots ProjectList.Output m Unit
handleAction action = do
-- End any active intervals when switching projects.
when (oldActive && any (_ /= pid) currentProject)
$ (traverse_ logEnd currentProject)
H.raise (ProjectList.ProjectChange pid)
setStateForProject pid
when (currentProject /= pidMay) $ do
-- End any active intervals when switching projects.
when oldActive $ traverse_ logEnd currentProject
traverse_ projectSelected pidMay