Files
LazyPM/pkg/web/routes/issue_detail.templ
Moira Daniella A Sebastian 96291b7a94 Added issues dashboard
2026-02-23 19:48:10 +01:00

44 lines
1.0 KiB
Plaintext

package routes
import (
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/pkg/web/components"
)
type IssueDetailProps struct {
Issue models.Issue
DisplayOwner string
DisplayAssignee string
Comments []*models.Comment
}
templ IssueDetailContent(props IssueDetailProps) {
<div class="container mx-auto px-4 py-6">
<div class="mb-4">
<a
class="btn btn-ghost btn-sm"
hx-get="/"
hx-target="main"
hx-swap="innerHTML"
hx-push-url="true"
>
@components.IconBack()
Back to Issues
</a>
</div>
<div class="mb-6">
@components.IssueDetailCard(components.IssueDetailCardProps{Issue: props.Issue, DisplayOwner: props.DisplayOwner, DisplayAssignee: props.DisplayAssignee})
</div>
@components.CommentSection(components.CommentSectionProps{
IssueID: props.Issue.ID,
Comments: props.Comments,
})
</div>
}
templ IssueDetail(props IssueDetailProps) {
@BaseLayout(BaseLayoutProps{SearchQuery: ""}) {
@IssueDetailContent(props)
}
}