module Web.View.ArchiveRecords.Index where import Web.Types import Generated.Types import IHP.Prelude import IHP.ViewPrelude import Web.Routes () data IndexView = IndexView { records :: ![ArchiveRecord] } instance View IndexView where html IndexView { .. } = [hsx|

Archive Records

{renderArchiveList records} |] renderArchiveList :: [ArchiveRecord] -> Html renderArchiveList [] = [hsx|

No archived artifacts yet.

|] renderArchiveList records = [hsx|
{forEach records renderArchiveRow}
Subject Type Subject ID Reason Archived By Archived At
|] renderArchiveRow :: ArchiveRecord -> Html renderArchiveRow r = [hsx| {r.subjectType} {show r.subjectId} {r.reason} {r.archivedBy} {show r.archivedAt} View |]