generated from coulomb/repo-seed
Phase 2 — Structured Feedback and Triage (IHUB-WP-0002): - Schema: annotation_threads, requirement_candidates, triage_states, reviewer_assignments; annotations extended with severity + thread_id - AnnotationThreadsController: create threads, assign annotations - RequirementCandidatesController: CRUD, escalation, triage lifecycle, reviewer assignment, my-queue - Annotation severity (low/medium/high/critical) with Tailwind color cues - TriageDashboardAction on HubsController with autoRefresh - Integration tests (T01–T09), SCOPE.md updated, docs/phase2-summary.md Phase 3 — Governance and Decision Linkage (IHUB-WP-0003): - Workplan registered: 9 tasks, State Hub workstream 5f201ee3 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
75 lines
2.7 KiB
Haskell
75 lines
2.7 KiB
Haskell
module Web.Types where
|
|
|
|
import IHP.Prelude
|
|
import IHP.ModelSupport
|
|
import IHP.LoginSupport.Types
|
|
import Generated.Types
|
|
|
|
-- | Authentication type alias
|
|
type CurrentUserRecord = User
|
|
|
|
instance HasNewSessionUrl User where
|
|
newSessionUrl _ = "/NewSession"
|
|
|
|
-- Controllers
|
|
|
|
data WebApplication = WebApplication deriving (Eq, Show)
|
|
|
|
data HubsController
|
|
= HubsAction
|
|
| NewHubAction
|
|
| ShowHubAction { hubId :: !(Id Hub) }
|
|
| CreateHubAction
|
|
| EditHubAction { hubId :: !(Id Hub) }
|
|
| UpdateHubAction { hubId :: !(Id Hub) }
|
|
| DeleteHubAction { hubId :: !(Id Hub) }
|
|
| TriageDashboardAction { hubId :: !(Id Hub) }
|
|
deriving (Eq, Show, Data)
|
|
|
|
data WidgetsController
|
|
= WidgetsAction
|
|
| NewWidgetAction
|
|
| ShowWidgetAction { widgetId :: !(Id Widget) }
|
|
| CreateWidgetAction
|
|
| EditWidgetAction { widgetId :: !(Id Widget) }
|
|
| UpdateWidgetAction { widgetId :: !(Id Widget) }
|
|
deriving (Eq, Show, Data)
|
|
|
|
data InteractionEventsController
|
|
= CreateInteractionEventAction { widgetId :: !(Id Widget) }
|
|
deriving (Eq, Show, Data)
|
|
|
|
data AnnotationsController
|
|
= WidgetAnnotationsAction { widgetId :: !(Id Widget) }
|
|
| ShowAnnotationAction { annotationId :: !(Id Annotation) }
|
|
| NewAnnotationAction { widgetId :: !(Id Widget) }
|
|
| CreateAnnotationAction { widgetId :: !(Id Widget) }
|
|
| EscalateAnnotationAction { annotationId :: !(Id Annotation) }
|
|
deriving (Eq, Show, Data)
|
|
|
|
data AnnotationThreadsController
|
|
= WidgetAnnotationThreadsAction { widgetId :: !(Id Widget) }
|
|
| ShowAnnotationThreadAction { annotationThreadId :: !(Id AnnotationThread) }
|
|
| NewAnnotationThreadAction { widgetId :: !(Id Widget) }
|
|
| CreateAnnotationThreadAction { widgetId :: !(Id Widget) }
|
|
| AssignAnnotationToThreadAction { annotationId :: !(Id Annotation) }
|
|
deriving (Eq, Show, Data)
|
|
|
|
data RequirementCandidatesController
|
|
= RequirementCandidatesAction
|
|
| ShowRequirementCandidateAction { requirementCandidateId :: !(Id RequirementCandidate) }
|
|
| NewRequirementCandidateAction
|
|
| CreateRequirementCandidateAction
|
|
| EditRequirementCandidateAction { requirementCandidateId :: !(Id RequirementCandidate) }
|
|
| UpdateRequirementCandidateAction { requirementCandidateId :: !(Id RequirementCandidate) }
|
|
| UpdateTriageStatusAction { requirementCandidateId :: !(Id RequirementCandidate) }
|
|
| AssignReviewerAction { requirementCandidateId :: !(Id RequirementCandidate) }
|
|
| MyQueueAction
|
|
deriving (Eq, Show, Data)
|
|
|
|
data SessionsController
|
|
= NewSessionAction
|
|
| CreateSessionAction
|
|
| DeleteSessionAction
|
|
deriving (Eq, Show, Data)
|