add create issue modal

This commit is contained in:
Robin Olsen
2026-02-24 15:11:10 +01:00
parent 451125903c
commit 6c3e6a5815
3 changed files with 215 additions and 0 deletions

25
pkg/web/handler/modals.go Normal file
View File

@@ -0,0 +1,25 @@
package handler
import (
"net/http"
"github.com/LazyBachelor/LazyPM/pkg/web/components"
)
func CreateIssueFormModal(w http.ResponseWriter, r *http.Request) {
modalContent := components.IssueForm(components.IssueFormProps{
Action: "/issues",
Status: "open",
IssueType: "task",
Priority: 0,
})
modal := components.Modal(components.ModalProps{
ID: "create-issue-modal",
Title: "Create New Issue",
Content: modalContent,
Open: true,
})
modal.Render(r.Context(), w)
}