module Web.View.ModelRoutingPolicies.New where import Web.View.Prelude data NewView = NewView { policy :: !ModelRoutingPolicy , hubs :: ![Hub] , agents :: ![AgentRegistration] } taskTypeOptions :: [Text] taskTypeOptions = [ "requirement_draft" , "triage" , "synthesis" , "policy_check" , "implementation" ] instance View NewView where html NewView { .. } = [hsx|

Add Routing Policy

{renderForm policy hubs agents}
|] renderForm :: ModelRoutingPolicy -> [Hub] -> [AgentRegistration] -> Html renderForm policy hubs agents = formFor policy [hsx|
{(numberField #priority) { fieldLabel = "Priority (higher wins)", placeholder = "0" }}
{submitButton { label = "Create Policy" }} Cancel
|] renderHubOption :: Hub -> Html renderHubOption h = [hsx||] renderTaskTypeOption :: Text -> Html renderTaskTypeOption t = [hsx||] renderAgentOption :: AgentRegistration -> Html renderAgentOption a = [hsx||]