generated from coulomb/repo-seed
fix(WP-0016): Layer 3 compilation fixes — Sessions auth, Widgets import consolidation, Scientific type
- Sessions: replace raw authenticate/unsetSession with IHP login/logout/verifyPassword - Widgets/New, Widgets/Show: consolidate imports to Web.View.Prelude - Widgets/Show: unwrap Id newtype for childrenOf comparison, Double → Scientific in renderSignalValue Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
module Web.View.Widgets.New where
|
||||
|
||||
import Web.Types
|
||||
import Generated.Types
|
||||
import IHP.Prelude
|
||||
import IHP.ViewPrelude
|
||||
import Web.Routes ()
|
||||
import Web.View.Prelude
|
||||
|
||||
data NewView = NewView
|
||||
{ widget :: !Widget
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
module Web.View.Widgets.Show where
|
||||
|
||||
import Web.Types
|
||||
import Generated.Types
|
||||
import IHP.Prelude
|
||||
import IHP.ViewPrelude
|
||||
import Web.Routes ()
|
||||
import Web.View.Prelude
|
||||
import Data.Scientific (Scientific)
|
||||
import Application.Helper.View (widgetEnvelope)
|
||||
|
||||
data ShowView = ShowView
|
||||
@@ -135,7 +132,7 @@ instance View ShowView where
|
||||
</div>
|
||||
|]
|
||||
rootAnnotations = filter (\a -> isNothing a.parentId) annotations
|
||||
childrenOf parent = filter (\a -> a.parentId == Just parent.id) annotations
|
||||
childrenOf parent = filter (\a -> a.parentId == Just (let Id uuid = parent.id in uuid)) annotations
|
||||
categoryBreakdown =
|
||||
[ (cat, length (filter (\a -> a.category == cat) annotations))
|
||||
| cat <- ["friction","defect","wish","policy_concern","doc_gap","trust","other"]
|
||||
@@ -241,7 +238,7 @@ renderSignalsSection sigs = [hsx|
|
||||
</section>
|
||||
|]
|
||||
|
||||
renderSignalValue :: Double -> Html
|
||||
renderSignalValue :: Scientific -> Html
|
||||
renderSignalValue v = [hsx|<span class="font-mono text-gray-700">{show v}</span>|]
|
||||
|
||||
renderAdapterBadge :: Maybe WidgetAdapterSpec -> Html
|
||||
|
||||
Reference in New Issue
Block a user