make issue list and issue form

This commit is contained in:
Robin Olsen
2026-02-03 13:15:12 +01:00
parent 82e9ac4df5
commit 8c9a0035e7
8 changed files with 460 additions and 155 deletions

View File

@@ -1,19 +1,28 @@
package routes
import (
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/pkg/web/components"
)
type IndexProps struct {
Issues []*models.Issue
IssueList components.IssueListProps
IssueTable components.IssueTableProps
}
templ Index(props IndexProps) {
@BaseLayout() {
<h1>Welcome to the Beads Test Application</h1>
<p>Here are current issues:</p>
@components.IssueList(props.IssueList)
<div class="flex flex-col justify-center items-center gap-6 mb-12">
<h1>Create New Issue</h1>
@components.IssueForm(
components.IssueFormProps{
Action: "/create-issue",
Class: "mb-4",
Title: "",
Description: "",
Status: "open",
Priority: 0,
IssueType: "task",
})
</div>
@components.IssueTable(props.IssueTable)
}
}