submission

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterSubmissionsByStatus added in v1.0.0

func FilterSubmissionsByStatus(submissions []model.Submission, status string) []model.Submission

FilterSubmissionsByStatus filters submissions to those matching the given status key.

func NewBulkApproveCommand added in v1.0.0

func NewBulkApproveCommand(c client.API, w io.Writer) *cobra.Command

NewBulkApproveCommand creates a new `submission bulk-approve` command.

func NewListCommand

func NewListCommand(c client.API, w io.Writer) *cobra.Command

NewListCommand creates a new `submission list` command to give you details about your submissions for a study.

func NewRequestReturnCommand added in v0.0.62

func NewRequestReturnCommand(client client.API, w io.Writer) *cobra.Command

NewRequestReturnCommand creates a new `submission request-return` command to request a participant to return a submission.

func NewSubmissionCommand

func NewSubmissionCommand(client client.API, w io.Writer) *cobra.Command

NewSubmissionCommand creates a new `submission` command

func NewTransitionCommand added in v1.0.0

func NewTransitionCommand(c client.API, w io.Writer) *cobra.Command

NewTransitionCommand creates a new `submission transition` command.

func RenderSubmission added in v1.0.0

func RenderSubmission(sub model.Submission) string

RenderSubmission produces a detailed view of a submission.

Types

type BulkApproveOptions added in v1.0.0

type BulkApproveOptions struct {
	SubmissionIDs  []string
	StudyID        string
	ParticipantIDs []string
	File           string
}

BulkApproveOptions is the options for bulk approving submissions.

type CountsView added in v1.0.0

type CountsView struct {
	// contains filtered or unexported fields
}

CountsView is a two-level bubbletea model for submission counts drill-down. Level 1 shows submission counts by status; Level 2 shows submissions filtered to the selected status.

func NewCountsView added in v1.0.0

func NewCountsView(items []list.Item, studyID string, c client.API) CountsView

NewCountsView creates a new CountsView from submission count items.

func (CountsView) Init added in v1.0.0

func (cv CountsView) Init() tea.Cmd

Init implements tea.Model.

func (CountsView) Update added in v1.0.0

func (cv CountsView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (CountsView) View added in v1.0.0

func (cv CountsView) View() string

View implements tea.Model.

type InteractiveRenderer added in v1.0.0

type InteractiveRenderer struct{}

InteractiveRenderer runs the Bubbletea UI framework to provide a rich UI experience for the user.

func (*InteractiveRenderer) Render added in v1.0.0

Render builds the item list and launches the interactive TUI.

type ListOptions

type ListOptions struct {
	Args   []string
	Fields string
	Output shared.OutputOptions
	Study  string
	Limit  int
	Offset int
}

ListOptions is the options for the listing submissions command.

type ListView added in v1.0.0

type ListView struct {
	List        list.Model
	Submissions map[string]model.Submission
	Submission  *model.Submission
}

ListView presents an interactive list of submissions using the Bubbletea TUI.

func (ListView) Init added in v1.0.0

func (lv ListView) Init() tea.Cmd

Init initialises the view.

func (ListView) Update added in v1.0.0

func (lv ListView) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update handles TUI messages and key events.

func (ListView) View added in v1.0.0

func (lv ListView) View() string

View renders the current state of the TUI.

type RequestReturnOptions added in v0.0.62

type RequestReturnOptions struct {
	SubmissionID string
	Reasons      []string
}

RequestReturnOptions is the options for the request return command.

type TransitionOptions added in v1.0.0

type TransitionOptions struct {
	SubmissionID         string
	Action               string
	Message              string
	RejectionCategory    string
	CompletionCode       string
	PercentageOfReward   float64
	MessageToParticipant string
}

TransitionOptions is the options for transitioning a submission.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL