summaryrefslogtreecommitdiff
path: root/Omni/Jr/Web.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Jr/Web.hs')
-rw-r--r--Omni/Jr/Web.hs16
1 files changed, 10 insertions, 6 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 2e4ee66..8508560 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -680,6 +680,7 @@ statusBadge status =
TaskCore.Review -> ("badge badge-review", "Review")
TaskCore.Approved -> ("badge badge-approved", "Approved")
TaskCore.Done -> ("badge badge-done", "Done")
+ TaskCore.NeedsHelp -> ("badge badge-needshelp", "Needs Help")
in Lucid.span_ [Lucid.class_ cls] label
complexityBadge :: (Monad m) => Int -> Lucid.HtmlT m ()
@@ -770,6 +771,7 @@ clickableBadge status _tid =
TaskCore.Review -> ("badge badge-review status-badge-clickable", "Review")
TaskCore.Approved -> ("badge badge-approved status-badge-clickable", "Approved")
TaskCore.Done -> ("badge badge-done status-badge-clickable", "Done")
+ TaskCore.NeedsHelp -> ("badge badge-needshelp status-badge-clickable", "Needs Help")
in Lucid.span_
[ Lucid.class_ cls,
Lucid.tabindex_ "0",
@@ -797,6 +799,7 @@ statusDropdownOptions currentStatus tid =
statusOption TaskCore.Review currentStatus tid
statusOption TaskCore.Approved currentStatus tid
statusOption TaskCore.Done currentStatus tid
+ statusOption TaskCore.NeedsHelp currentStatus tid
statusOption :: (Monad m) => TaskCore.Status -> TaskCore.Status -> Text -> Lucid.HtmlT m ()
statusOption opt currentStatus tid =
@@ -807,6 +810,7 @@ statusOption opt currentStatus tid =
TaskCore.Review -> ("badge badge-review", "Review")
TaskCore.Approved -> ("badge badge-approved", "Approved")
TaskCore.Done -> ("badge badge-done", "Done")
+ TaskCore.NeedsHelp -> ("badge badge-needshelp", "Needs Help")
isSelected = opt == currentStatus
optClass = cls <> " status-dropdown-option" <> if isSelected then " selected" else ""
in Lucid.form_
@@ -1083,8 +1087,8 @@ instance Lucid.ToHtml InterventionPage where
let crumbs = [Breadcrumb "Jr" (Just "/"), Breadcrumb "Needs Human Action" Nothing]
failed = TaskCore.failedTasks actionItems
epicsReady = TaskCore.epicsInReview actionItems
- human = TaskCore.humanTasks actionItems
- totalCount = length failed + length epicsReady + length human
+ needsHelp = TaskCore.tasksNeedingHelp actionItems
+ totalCount = length failed + length epicsReady + length needsHelp
in Lucid.doctypehtml_ <| do
pageHead "Needs Human Action - Jr"
pageBodyWithCrumbs crumbs <| do
@@ -1103,10 +1107,10 @@ instance Lucid.ToHtml InterventionPage where
Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Epics Ready for Review (" <> tshow (length epicsReady) <> ")")
Lucid.p_ [Lucid.class_ "info-msg"] "Epics with all children completed. Verify before closing."
Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderEpicReviewCard epicsReady
- unless (null human) <| do
- Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Human Tasks (" <> tshow (length human) <> ")")
- Lucid.p_ [Lucid.class_ "info-msg"] "Tasks explicitly marked as needing human work."
- Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTaskCard (sortTasks currentSort human)
+ unless (null needsHelp) <| do
+ Lucid.h2_ [Lucid.class_ "section-header"] <| Lucid.toHtml ("Needs Help (" <> tshow (length needsHelp) <> ")")
+ Lucid.p_ [Lucid.class_ "info-msg"] "Tasks where Jr needs human guidance or decisions."
+ Lucid.div_ [Lucid.class_ "task-list"] <| traverse_ renderTaskCard (sortTasks currentSort needsHelp)
renderEpicReviewCard :: (Monad m) => TaskCore.EpicForReview -> Lucid.HtmlT m ()
renderEpicReviewCard epicReview = do