44 lines
1.0 KiB
Plaintext
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)
|
|
}
|
|
}
|