ended up not needing this

This commit is contained in:
Robin Olsen
2026-02-24 15:18:56 +01:00
parent 38ae7905c1
commit f28ab4be78
3 changed files with 13 additions and 16 deletions

View File

@@ -7,8 +7,7 @@ import (
)
type IssueDetailProps struct {
Issue *models.Issue
ShowDetailsButton bool
Issue *models.Issue
}
templ IssueDetail(props IssueDetailProps) {

View File

@@ -15,8 +15,7 @@ import (
)
type IssueDetailProps struct {
Issue *models.Issue
ShowDetailsButton bool
Issue *models.Issue
}
func IssueDetail(props IssueDetailProps) templ.Component {
@@ -47,7 +46,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var2 string
templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs("/issues/" + props.Issue.ID)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 18, Col: 39}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 17, Col: 39}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2))
if templ_7745c5c3_Err != nil {
@@ -60,7 +59,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var3 string
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.Title)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 22, Col: 22}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 21, Col: 22}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
if templ_7745c5c3_Err != nil {
@@ -94,7 +93,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var4 string
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.Description)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 33, Col: 67}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 32, Col: 67}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
if templ_7745c5c3_Err != nil {
@@ -112,7 +111,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var5 string
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.CreatedAt.Format("Jan 2, 2006"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 40, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 39, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
if templ_7745c5c3_Err != nil {
@@ -125,7 +124,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.UpdatedAt.Format("Jan 2, 2006"))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 44, Col: 51}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 43, Col: 51}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
@@ -138,7 +137,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var7 string
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.Actor)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 48, Col: 25}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 47, Col: 25}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
if templ_7745c5c3_Err != nil {
@@ -151,7 +150,7 @@ func IssueDetail(props IssueDetailProps) templ.Component {
var templ_7745c5c3_Var8 string
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(props.Issue.Assignee)
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 52, Col: 28}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 51, Col: 28}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
if templ_7745c5c3_Err != nil {
@@ -220,7 +219,7 @@ func StatusBadge(status models.Status) templ.Component {
var templ_7745c5c3_Var10 string
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(string(status))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 70, Col: 60}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 69, Col: 60}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
if templ_7745c5c3_Err != nil {
@@ -290,7 +289,7 @@ func TypeBadge(issueType models.IssueType) templ.Component {
var templ_7745c5c3_Var12 string
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(string(issueType))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 87, Col: 65}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 86, Col: 65}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
@@ -360,7 +359,7 @@ func PriorityBadge(priority int) templ.Component {
var templ_7745c5c3_Var14 string
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(fmt.Sprintf("P%d", priority))
if templ_7745c5c3_Err != nil {
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 104, Col: 74}
return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/web/components/issue_detail_card.templ`, Line: 103, Col: 74}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
if templ_7745c5c3_Err != nil {

View File

@@ -55,12 +55,11 @@ func CreateIssue(w http.ResponseWriter, r *http.Request) {
}
if hx.IsHxRequest() {
// Success: close modal by triggering event, and refresh issue list
// Trigger issue list to refresh
w.Header().Set("HX-Trigger", `{"closeModal": "create-issue-modal", "issueCreated": "`+issue.ID+`"}`)
w.Header().Set("HX-Retarget", "#issue-list-container")
w.Header().Set("HX-Reswap", "innerHTML")
// Get updated issues list
filter := models.IssueFilter{Limit: 100}
issues, _ := app.Issues.SearchIssues(r.Context(), "", filter)
routes.DashboardIssueList(issues, "").Render(r.Context(), w)