package views import ( "strconv" "mocksnow/components/core" tpl "github.com/a-h/templ" ) type IncidentRow struct { ID int64 ExternalID string CreatedAt string IncidentNumber string Description string ShortDescription string Urgency int64 Impact int64 State int64 AllNotes string AssignmentGroup string AssignedTo string Category string Subcategory string SysID string } templ IncidentsTable(rows []IncidentRow) { @core.Header()

Incidents

for _, row := range rows { }
ID Created At Incident # SysId Description Short Description Urgency Impact State External ID Work Notes Assignment Group Assigned To Category Subcategory
{ strconv.FormatInt(row.ID, 10) } { row.CreatedAt } { row.IncidentNumber } { row.SysID } { row.Description } { row.ShortDescription } { strconv.FormatInt(row.Urgency, 10) } { strconv.FormatInt(row.Impact, 10) } { strconv.FormatInt(row.State, 10) } { row.ExternalID } @tpl.Raw(row.AllNotes) { row.AssignmentGroup } { row.AssignedTo } { row.Category } { row.Subcategory }
@core.Footer() }