feat: record activity when checking off a household chore
This commit is contained in:
@@ -49,8 +49,12 @@ instance (DB :> es, IOE :> es) => HyperView DashboardPage es where
|
||||
(h : _) -> do
|
||||
dash <- getDashboard (unHouseholdId (householdId h)) today
|
||||
pure $ hyper DashboardPage $ pageLayout us $ dashboardView dash
|
||||
update (CheckOff _oid) = do
|
||||
-- TODO: wire up to activity form
|
||||
update (CheckOff oid) = do
|
||||
mUser <- lookupSession @UserSession
|
||||
case mUser of
|
||||
Nothing -> pure (el "Not authenticated")
|
||||
Just us -> do
|
||||
_ <- recordActivity (unOccurrenceId oid) (UserId (usUserId us)) ActivityCompleted Nothing False
|
||||
update RefreshDashboard
|
||||
|
||||
dashboardView :: Dashboard -> View DashboardPage ()
|
||||
|
||||
Reference in New Issue
Block a user