WEB - ADD COMMENTS ON ISSUES

This commit is contained in:
Ine Maria Nilssen Aanonsen
2026-02-20 11:25:08 +01:00
parent 890c57dd74
commit bb059ad8d8
10 changed files with 1145 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
package components
import (
"fmt"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/pkg/web/components/base"
)
@@ -101,12 +102,16 @@ templ IssueTable(props IssueTableProps) {
templ IssueRows(issues []models.Issue) {
for _, issue := range issues {
<tr>
<td class="px-4 py-2 border">{ issue.ID }</td>
<td class="px-4 py-2 border">{ issue.Title }</td>
<td class="px-4 py-2 border">{ issue.Status }</td>
<td class="px-4 py-2 border">{ issue.IssueType }</td>
<td class="px-4 py-2 border">{ issue.Priority }</td>
<tr class="hover">
<td class="px-4 py-2 border">
<a href={ templ.SafeURL("/issues/" + issue.ID) } class="link link-primary font-mono">{ issue.ID }</a>
</td>
<td class="px-4 py-2 border">
<a href={ templ.SafeURL("/issues/" + issue.ID) } class="hover:text-primary">{ issue.Title }</a>
</td>
<td class="px-4 py-2 border">{ string(issue.Status) }</td>
<td class="px-4 py-2 border">{ string(issue.IssueType) }</td>
<td class="px-4 py-2 border">{ fmt.Sprintf("P%d", issue.Priority) }</td>
</tr>
}
}