Merge pull request #75 from LazyBachelor/LPM-140
LPM-140 The Sprinting Update Adds sprint support across the web UI (board + issue detail), TUI kanban, CLI/REPL, and the Beads-backed storage layer. Changes: Introduces sprint entities in storage and exposes sprint operations via IssueService. Updates web board to support backlog vs. sprint columns, sprint selection, and sprint creation routes. Updates TUI kanban to show backlog + sprint columns and adds sprint selection/creation actions.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package modal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
tea "charm.land/bubbletea/v2"
|
||||
"charm.land/lipgloss/v2"
|
||||
"github.com/LazyBachelor/LazyPM/internal/style"
|
||||
@@ -176,7 +178,6 @@ func StatusOptions() []SelectOption {
|
||||
{Key: "o", Label: "open", Value: "open"},
|
||||
{Key: "i", Label: "in_progress", Value: "in_progress"},
|
||||
{Key: "b", Label: "blocked", Value: "blocked"},
|
||||
{Key: "r", Label: "ready_to_sprint", Value: "ready_to_sprint"},
|
||||
{Key: "c", Label: "closing", Value: "closing"},
|
||||
}
|
||||
}
|
||||
@@ -213,3 +214,27 @@ func CloseReasonOptions() []SelectOption {
|
||||
{Key: "h", Label: "Other", Value: "other"},
|
||||
}
|
||||
}
|
||||
|
||||
// SprintOptions generates sprint selection options from available sprints
|
||||
func SprintOptions(sprints []int, backlogNum int) []SelectOption {
|
||||
options := make([]SelectOption, 0, len(sprints))
|
||||
for _, sprintNum := range sprints {
|
||||
label := fmt.Sprintf("Sprint %d", sprintNum)
|
||||
if sprintNum == backlogNum {
|
||||
label = "Backlog"
|
||||
}
|
||||
|
||||
key := fmt.Sprintf("%d", sprintNum)
|
||||
if sprintNum <= 9 {
|
||||
key = fmt.Sprintf("%d", sprintNum)
|
||||
} else {
|
||||
continue
|
||||
}
|
||||
options = append(options, SelectOption{
|
||||
Key: key,
|
||||
Label: label,
|
||||
Value: fmt.Sprintf("%d", sprintNum),
|
||||
})
|
||||
}
|
||||
return options
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user