generated from coulomb/repo-seed
Some checks failed
Test / test (push) Has been cancelled
Fix 13 modules that blocked compilation on Alpine: - FrontController: remove annotationLauncherScript helper (IHP Html is a constrained type synonym); add (?context, ?request) constraint to defaultLayout matching what setLayout expects - HubCapabilityManifests: switch JSONB fill to paramList+toJSON; fix dynamic SQL Text→Query via fromString/cs; void sqlExec; add Control.Monad.void - Hubs: replace raw Array sqlQuery with filterWhereIn query builder; fix isInList validators - DecisionRecords: remove unregistered DistilDecisionAction; fix hub resolution chain via candidateId→sourceWidgetId; BridgeResponse(..) - RequirementCandidates: BridgeResponse(..); remove @Widget type apps from fetchOneOrNothing; void ConfidenceAnnotation createRecord - AdaptiveThresholds: fix sqlQuery tuple param (Only hubId) - AgentDelegations, AgentRegistrations, Widgets: BridgeResponse(..) - Annotations, DeploymentRecords, GovernanceTemplates: minor type fixes - DecisionRecords/Edit view: extract formAction before HSX block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.2 KiB
Haskell
38 lines
1.2 KiB
Haskell
module Web.View.DecisionRecords.Edit where
|
|
|
|
import Web.Types
|
|
import Generated.Types
|
|
import IHP.Prelude
|
|
import IHP.ViewPrelude
|
|
import Web.Routes ()
|
|
import Web.View.DecisionRecords.New (renderForm)
|
|
|
|
data EditView = EditView
|
|
{ record :: !DecisionRecord
|
|
, requirements :: ![Requirement]
|
|
, candidates :: ![RequirementCandidate]
|
|
, users :: ![User]
|
|
}
|
|
|
|
instance View EditView where
|
|
html EditView { .. } =
|
|
let formAction = UpdateDecisionRecordAction { decisionRecordId = record.id }
|
|
in [hsx|
|
|
<div class="mb-6 flex items-center gap-2 text-sm text-gray-500">
|
|
<a href={DecisionRecordsAction} class="hover:text-gray-700">Decisions</a>
|
|
<span>/</span>
|
|
<a href={ShowDecisionRecordAction (record.id)}
|
|
class="hover:text-gray-700">{record.title}</a>
|
|
<span>/</span>
|
|
<span>Edit</span>
|
|
</div>
|
|
|
|
<div class="max-w-2xl">
|
|
<h1 class="text-2xl font-semibold mb-2">Edit Decision Record</h1>
|
|
<p class="text-sm text-amber-600 mb-6">
|
|
Note: outcome is immutable and cannot be changed here.
|
|
</p>
|
|
{renderForm record requirements candidates users formAction}
|
|
</div>
|
|
|]
|