module Web.View.HubRoutingRules.RoutedCandidates where import Web.Types import Generated.Types import IHP.Prelude import IHP.ViewPrelude data RoutedCandidatesView = RoutedCandidatesView { hub :: !Hub , candidates :: ![RequirementCandidate] } instance View RoutedCandidatesView where html RoutedCandidatesView { .. } = [hsx|
Routing Rules /

Routed In: {hub.name}

Requirement candidates routed to this hub from other hubs.

{if null candidates then [hsx|

No candidates routed to this hub yet.

|] else [hsx|
{forEach candidates renderRow}
Summary Category Status Created
|]} |] where renderRow :: RequirementCandidate -> Html renderRow c = [hsx| {c.summary} {c.category} {c.status} {show c.createdAt} View |]