Files
inter-hub/Web/View/DecisionRecords/Edit.hs
Bernd Worsch 7f9a8dd441 feat(P3): IHF Phase 3 complete — Governance and Decision Linkage
Implements the full governance layer:
- Schema: requirements, decision_records, policy_references,
  implementation_change_references; requirement_candidates gets
  requirement_id back-reference
- RequirementsController (index/show; promotion-only create)
- DecisionRecordsController (CRUD + policy/impl ref management)
- GovernanceDashboardAction on HubsController (AutoRefresh)
- PromoteToRequirementAction + LinkToDecisionAction on candidates
- Outcome immutability enforced at controller level (fill excludes outcome)
- Full six-outcome vocabulary with Tailwind color roles
- Integration tests for all Phase 3 paths
- FrontController: registers Phase 2 missing controllers + all Phase 3
- SCOPE.md + docs/phase3-summary.md updated

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 10:42:56 +00:00

35 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.View.DecisionRecords.New (renderForm)
data EditView = EditView
{ record :: !DecisionRecord
, requirements :: ![Requirement]
, candidates :: ![RequirementCandidate]
, users :: ![User]
}
instance View EditView where
html EditView { .. } = [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 { decisionRecordId = 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 (UpdateDecisionRecordAction { decisionRecordId = record.id })}
</div>
|]