add ability to change assingee

This commit is contained in:
Robin Olsen
2026-02-25 13:20:30 +01:00
parent 6264f9dfc9
commit 44e894f025
12 changed files with 219 additions and 57 deletions

View File

@@ -50,3 +50,25 @@ func EditIssueFormModal(w http.ResponseWriter, r *http.Request) {
})
modal.Render(r.Context(), w)
}
func AssigneeFormModal(w http.ResponseWriter, r *http.Request) {
issue := r.Context().Value(issueKey).(*models.Issue)
if issue == nil {
http.Error(w, "Issue not found in context", http.StatusInternalServerError)
return
}
modalContent := components.AssigneeForm(components.AssigneeFormProps{
PatchAction: "/issues/" + issue.ID + "/assignee",
Assignee: issue.Assignee,
})
modal := components.Modal(components.ModalProps{
ID: "assignee-modal",
Title: "Change Assignee",
Content: modalContent,
Open: true,
})
modal.Render(r.Context(), w)
}