adding functionality for editing priority; adding priority to the list of displayed issues; sorting the list of issues by their priority

This commit is contained in:
viljarb
2026-02-23 15:56:16 +01:00
parent 7674ae3690
commit 970c735fa4
7 changed files with 103 additions and 12 deletions

View File

@@ -1,6 +1,8 @@
package dashboard
import (
"fmt"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/pkg/tui/styles"
"github.com/charmbracelet/bubbles/viewport"
@@ -53,6 +55,10 @@ func (i *IssueDetail) refreshContent() {
styles.LabelStyle.Render("Status:") + styles.StatusStyle(string(i.issue.Status)).Render(string(i.issue.Status)),
)
priorityRow := styles.RowStyle.Render(
styles.LabelStyle.Render("Priority:") + styles.ValueStyle.Render(fmt.Sprintf("%d", i.issue.Priority)),
)
descLabel := styles.LabelStyle.Render("Description:")
descContent := styles.ValueStyle.Render(i.issue.Description)
@@ -61,6 +67,7 @@ func (i *IssueDetail) refreshContent() {
idRow,
typeRow,
statusRow,
priorityRow,
descLabel,
descContent,
)