module Web.View.HubRoutingRules.Show where import Web.Types import Generated.Types import IHP.Prelude import IHP.ViewPrelude import Web.View.HubRoutingRules.Index (statusBadge) data ShowView = ShowView { rule :: !HubRoutingRule , sourceHub :: !Hub , targetHub :: !Hub } instance View ShowView where html ShowView { .. } = [hsx|
Routing Rules /

Routing Rule

{sourceHub.name} → {targetHub.name} " text-xs px-2 py-0.5 rounded font-medium"}> {rule.status}
Match Category
{maybe "any" id rule.matchCategory}
Match Widget Type
{maybe "any" id rule.matchWidgetType}
Priority
{show rule.priority}
Created
{show rule.createdAt}
{whenJust rule.notes \n -> [hsx|
Notes
{n}
|]}
Edit {if rule.status == "inactive" then [hsx|Activate|] else [hsx|Deactivate|]} Routed Candidates →
|]