diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-27 10:10:50 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-27 10:10:50 -0500 |
| commit | 36c5a2342ce8697c490d90e091d1153c7e592daf (patch) | |
| tree | 811d52c7d703350d61705ddfe504208a000cb04b | |
| parent | 46cfbc511229afd12b834df04790440fbc192379 (diff) | |
Make dashboard metric cards clickable
The build and tests pass. The dashboard metric cards are now
clickable a
Task-Id: t-149.3
| -rw-r--r-- | Omni/Jr/Web.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs index 1ecc034..6d2c163 100644 --- a/Omni/Jr/Web.hs +++ b/Omni/Jr/Web.hs @@ -164,11 +164,11 @@ instance Lucid.ToHtml HomePage where Lucid.h2_ "Task Status" Lucid.div_ [Lucid.class_ "stats-grid"] <| do - statCard "Open" (TaskCore.openTasks stats) "badge-open" - statCard "In Progress" (TaskCore.inProgressTasks stats) "badge-inprogress" - statCard "Review" (TaskCore.reviewTasks stats) "badge-review" - statCard "Approved" (TaskCore.approvedTasks stats) "badge-approved" - statCard "Done" (TaskCore.doneTasks stats) "badge-done" + statCard "Open" (TaskCore.openTasks stats) "badge-open" "/tasks?status=Open" + statCard "In Progress" (TaskCore.inProgressTasks stats) "badge-inprogress" "/tasks?status=InProgress" + statCard "Review" (TaskCore.reviewTasks stats) "badge-review" "/tasks?status=Review" + statCard "Approved" (TaskCore.approvedTasks stats) "badge-approved" "/tasks?status=Approved" + statCard "Done" (TaskCore.doneTasks stats) "badge-done" "/tasks?status=Done" Lucid.h2_ <| do "Ready Queue " @@ -187,9 +187,9 @@ instance Lucid.ToHtml HomePage where Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTaskCard recentTasks where - statCard :: (Monad m) => Text -> Int -> Text -> Lucid.HtmlT m () - statCard label count badgeClass = - Lucid.div_ [Lucid.class_ ("stat-card " <> badgeClass)] <| do + statCard :: (Monad m) => Text -> Int -> Text -> Text -> Lucid.HtmlT m () + statCard label count badgeClass href = + Lucid.a_ [Lucid.href_ href, Lucid.class_ ("stat-card " <> badgeClass)] <| do Lucid.div_ [Lucid.class_ "stat-count"] (Lucid.toHtml (tshow count)) Lucid.div_ [Lucid.class_ "stat-label"] (Lucid.toHtml label) |
