generated from coulomb/repo-seed
fix(WP-0017/E4): Layer 3 error fixes — round 2 (18 files)
Fixes 46 compile errors across 18 controllers and views: - BridgeResponse missing from explicit import lists (Widgets, RequirementCandidates, DecisionRecords, AgentDelegations) — dot-notation HasField resolution fails without the type in scope under DuplicateRecordFields - unId not in IHP v1.5 — replaced all fmap (Id . unId) with fmap coerce - respondWith not in IHP — replaced with plain redirectTo in 5 controllers - [hubId] list param to sqlQuery — replaced with (Only hubId) tuple - deleteWhere not in IHP — replaced with query/filterWhere/fetch/deleteRecords - fill @'["label"] mismatch — field is label_ in generated types, not label - PersistUUID/toUUID (persistent-style) — replaced with (Only id) - intercalate + jsonArrayTexts ambiguity in GovernanceTemplates — hid Index import, removed local duplicates, added Data.Text (intercalate) - Int16 not in scope in AntifragilityDashboard — changed to Int (score :: Int) - typeArraySection type mismatch in HubCapabilityManifests/Edit — unified to [Text] - renderForm arity mismatch — added action param to DecisionRecords/New.renderForm - Missing qualified Data.Aeson import in AdaptiveThresholds - Missing ?request::Request constraint in Api/V2/WidgetPatterns.renderJsonWithStatus Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ import IHP.ControllerPrelude
|
||||
import Data.Time.Clock (addUTCTime, NominalDiffTime)
|
||||
import Text.Read (readMaybe)
|
||||
import Data.String.Conversions (cs)
|
||||
import Data.Coerce (coerce)
|
||||
|
||||
instance Controller DeploymentRecordsController where
|
||||
beforeAction = ensureIsUser
|
||||
@@ -76,7 +77,7 @@ instance Controller DeploymentRecordsController where
|
||||
let record = newRecord @DeploymentRecord
|
||||
record
|
||||
|> fill @'["decisionId", "implRefId", "versionRef", "notes"]
|
||||
|> set #deployedBy (fmap (Id . unId) deployedBy)
|
||||
|> set #deployedBy (fmap coerce deployedBy)
|
||||
|> validateField #versionRef nonEmpty
|
||||
|> ifValid \case
|
||||
Left r -> render NewView { record = r, decisions, implRefs, users, mDecisionId = Just r.decisionId }
|
||||
@@ -145,7 +146,7 @@ instance Controller DeploymentRecordsController where
|
||||
|> set #decisionId (Just deployment.decisionId)
|
||||
|> set #score (fromIntegral s)
|
||||
|> set #rationale rationale
|
||||
|> set #evaluatedBy (fmap (Id . unId) evaluatedBy)
|
||||
|> set #evaluatedBy (fmap coerce evaluatedBy)
|
||||
|> createRecord
|
||||
setSuccessMessage "Change evaluated"
|
||||
redirectTo ShowDeploymentRecordAction { deploymentRecordId }
|
||||
|
||||
Reference in New Issue
Block a user