feat(T02-T11): IHF Phase 1 schema, controllers, views, and helpers
- Schema: hubs, widgets, widget_versions, interaction_events (append-only
trigger), annotations, users — single migration file
- Web layer: Types, Routes, FrontController with auth + AutoRefresh layout
- Controllers: Hubs (CRUD), Widgets (CRUD + versioning), InteractionEvents
(JSON capture, canonical event_type validation), Annotations (threaded,
append-only)
- Sessions controller for IHP auth
- Views: Hubs (index/show/new/edit), Widgets (index/show/new/edit),
Annotations (index/new), Sessions (login)
- widgetEnvelope helper with full data-* governance attributes
- Integration tests: Hub CRUD, Widget versioning, event capture, append-only
guard, annotation threading, validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:42:43 +00:00
|
|
|
module Web.View.Widgets.Edit where
|
|
|
|
|
|
|
|
|
|
import Web.Types
|
|
|
|
|
import Generated.Types
|
|
|
|
|
import IHP.Prelude
|
|
|
|
|
import IHP.ViewPrelude
|
|
|
|
|
import Web.View.Widgets.New (renderForm)
|
|
|
|
|
|
|
|
|
|
data EditView = EditView
|
2026-03-29 21:14:57 +00:00
|
|
|
{ widget :: !Widget
|
|
|
|
|
, hubs :: ![Hub]
|
|
|
|
|
, adapterSpecs :: ![WidgetAdapterSpec]
|
feat(T02-T11): IHF Phase 1 schema, controllers, views, and helpers
- Schema: hubs, widgets, widget_versions, interaction_events (append-only
trigger), annotations, users — single migration file
- Web layer: Types, Routes, FrontController with auth + AutoRefresh layout
- Controllers: Hubs (CRUD), Widgets (CRUD + versioning), InteractionEvents
(JSON capture, canonical event_type validation), Annotations (threaded,
append-only)
- Sessions controller for IHP auth
- Views: Hubs (index/show/new/edit), Widgets (index/show/new/edit),
Annotations (index/new), Sessions (login)
- widgetEnvelope helper with full data-* governance attributes
- Integration tests: Hub CRUD, Widget versioning, event capture, append-only
guard, annotation threading, validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:42:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
instance View EditView where
|
|
|
|
|
html EditView { .. } = [hsx|
|
|
|
|
|
<div class="max-w-lg">
|
|
|
|
|
<div class="flex items-center gap-2 text-sm text-gray-500 mb-4">
|
|
|
|
|
<a href={WidgetsAction} class="hover:text-gray-700">Widgets</a>
|
|
|
|
|
<span>/</span>
|
|
|
|
|
<a href={ShowWidgetAction { widgetId = widget.id }} class="hover:text-gray-700">{widget.name}</a>
|
|
|
|
|
<span>/</span>
|
|
|
|
|
<span>Edit</span>
|
|
|
|
|
</div>
|
|
|
|
|
<h1 class="text-2xl font-semibold mb-6">Edit Widget</h1>
|
2026-03-29 21:14:57 +00:00
|
|
|
{renderForm widget hubs adapterSpecs}
|
feat(T02-T11): IHF Phase 1 schema, controllers, views, and helpers
- Schema: hubs, widgets, widget_versions, interaction_events (append-only
trigger), annotations, users — single migration file
- Web layer: Types, Routes, FrontController with auth + AutoRefresh layout
- Controllers: Hubs (CRUD), Widgets (CRUD + versioning), InteractionEvents
(JSON capture, canonical event_type validation), Annotations (threaded,
append-only)
- Sessions controller for IHP auth
- Views: Hubs (index/show/new/edit), Widgets (index/show/new/edit),
Annotations (index/new), Sessions (login)
- widgetEnvelope helper with full data-* governance attributes
- Integration tests: Hub CRUD, Widget versioning, event capture, append-only
guard, annotation threading, validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 01:42:43 +00:00
|
|
|
</div>
|
|
|
|
|
|]
|