feat: record activity when checking off a household chore

This commit is contained in:
2026-08-04 09:49:19 -04:00
parent 47a2eff484
commit 92c9fae885
+7 -3
View File
@@ -49,9 +49,13 @@ instance (DB :> es, IOE :> es) => HyperView DashboardPage es where
(h : _) -> do (h : _) -> do
dash <- getDashboard (unHouseholdId (householdId h)) today dash <- getDashboard (unHouseholdId (householdId h)) today
pure $ hyper DashboardPage $ pageLayout us $ dashboardView dash pure $ hyper DashboardPage $ pageLayout us $ dashboardView dash
update (CheckOff _oid) = do update (CheckOff oid) = do
-- TODO: wire up to activity form mUser <- lookupSession @UserSession
update RefreshDashboard 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 () dashboardView :: Dashboard -> View DashboardPage ()
dashboardView dash = do dashboardView dash = do