pelican/internal/ui/statusselection.go

28 lines
514 B
Go
Raw Normal View History

package ui
import (
"fmt"
"codeflow.dananglin.me.uk/apollo/pelican/internal/board"
)
type statusSelection struct {
cardID int
currentStatusID int
nextStatusID int
}
func (s statusSelection) moveCard(kanban board.Board) error {
moveArgs := board.MoveToStatusArgs{
CardID: s.cardID,
CurrentStatusID: s.currentStatusID,
NextStatusID: s.nextStatusID,
}
if err := kanban.MoveToStatus(moveArgs); err != nil {
return fmt.Errorf("error moving card; %w", err)
}
return nil
}