module Web.View.LineageEnrichment.Index where import Web.View.Prelude data IndexView = IndexView { hubs :: ![Hub] , counts :: ![(Id Hub, Int)] } instance View IndexView where html IndexView { .. } = [hsx|

Lineage Enrichment

The trg_enrich_lineage trigger automatically enriches decision_records.outcome_summary and requirement_candidates.outcome_summary on every new outcome signal. Use the buttons below to backfill existing records.

{forM_ hubs (renderHubCard counts)}
|] where renderHubCard cs h = let unenriched = maybe 0 snd (find (\(hid, _) -> hid == h.id) cs) in [hsx|

{h.name}

{show unenriched} decision(s) pending enrichment

{csrfTokenTag}
|]