Enhance status component and dashboard functionality

- Updated the status component template to include a new trigger for task status checks.
- Modified the status component's Go implementation to reflect the new trigger in the HTML output.
- Improved the UpdateIssue handler to conditionally set the assignee based on form input.
- Enhanced the dashboard template to include a new dependencies section for issues, allowing users to add dependencies dynamically.
- Refactored the dashboard's issue rows to utilize JavaScript functions for rendering status, type, and priority badges, improving maintainability and readability.
This commit is contained in:
Robin Olsen
2026-04-01 14:37:31 +02:00
parent f755e9f01e
commit 2f0426b58f
14 changed files with 335 additions and 53 deletions

View File

@@ -158,7 +158,9 @@ func UpdateIssue(w http.ResponseWriter, r *http.Request) {
}
a := strings.TrimSpace(r.FormValue("assignee"))
form.Assignee = &a
if r.Form.Has("assignee") {
form.Assignee = &a
}
changes := form.toChanges()
@@ -192,6 +194,7 @@ func UpdateIssue(w http.ResponseWriter, r *http.Request) {
}
if hx.IsHxRequest() {
w.Header().Set("HX-Trigger", "task-status-check")
from := r.URL.Query().Get("from")
referer := r.Header.Get("Referer")
boardView := from == "board" || strings.Contains(referer, "board=true")