diff options
author | T <t@tjp.lol> | 2025-08-05 12:36:30 -0600 |
---|---|---|
committer | T <t@tjp.lol> | 2025-08-06 12:13:11 -0600 |
commit | 65e2ed65775d64afbc6065a3b4ac1069020093ca (patch) | |
tree | f94fabfed5be2d2622429ebc7c8af1bf51085824 /internal/actions/timer.go | |
parent | 665bd389a0a1c8adadcaa1122e846cc81f5ead31 (diff) |
most features in TUI working, remaining unimplemented keybinds need a modal view
Diffstat (limited to 'internal/actions/timer.go')
-rw-r--r-- | internal/actions/timer.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/actions/timer.go b/internal/actions/timer.go index 58dbba2..5235a0a 100644 --- a/internal/actions/timer.go +++ b/internal/actions/timer.go @@ -11,7 +11,7 @@ import ( // PunchIn starts a timer for the specified client/project // Use empty strings for client/project to use most recent entry -func (a *actionsImpl) PunchIn(ctx context.Context, client, project, description string, billableRate *float64) (*TimerSession, error) { +func (a *actions) PunchIn(ctx context.Context, client, project, description string, billableRate *float64) (*TimerSession, error) { // If no client specified, delegate to PunchInMostRecent if client == "" && project == "" { session, err := a.PunchInMostRecent(ctx, description, billableRate) @@ -119,7 +119,7 @@ func (a *actionsImpl) PunchIn(ctx context.Context, client, project, description } // PunchInMostRecent starts a timer copying the most recent time entry -func (a *actionsImpl) PunchInMostRecent(ctx context.Context, description string, billableRate *float64) (*TimerSession, error) { +func (a *actions) PunchInMostRecent(ctx context.Context, description string, billableRate *float64) (*TimerSession, error) { // Get most recent entry mostRecent, err := a.queries.GetMostRecentTimeEntry(ctx) if err != nil { @@ -219,7 +219,7 @@ func (a *actionsImpl) PunchInMostRecent(ctx context.Context, description string, } // PunchOut stops the active timer -func (a *actionsImpl) PunchOut(ctx context.Context) (*TimerSession, error) { +func (a *actions) PunchOut(ctx context.Context) (*TimerSession, error) { stoppedEntry, err := a.queries.StopTimeEntry(ctx) if err != nil { if errors.Is(err, sql.ErrNoRows) { @@ -264,7 +264,7 @@ func (a *actionsImpl) PunchOut(ctx context.Context) (*TimerSession, error) { // Helper functions -func (a *actionsImpl) createTimeEntry(ctx context.Context, clientID int64, projectID sql.NullInt64, description string, billableRate *float64) (*queries.TimeEntry, error) { +func (a *actions) createTimeEntry(ctx context.Context, clientID int64, projectID sql.NullInt64, description string, billableRate *float64) (*queries.TimeEntry, error) { var descParam sql.NullString if description != "" { descParam = sql.NullString{String: description, Valid: true} @@ -339,4 +339,4 @@ func timeEntriesMatch(clientID int64, projectID sql.NullInt64, description strin // regardless of what coalesced rate the active entry might have return true -}
\ No newline at end of file +} |