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

Archive Records

{if null records then [hsx|

No archived artifacts yet.

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