split recur list

This commit is contained in:
Erik Winter 2024-12-31 09:00:35 +01:00
parent bcce505934
commit bf8c2b1f5d
2 changed files with 2 additions and 2 deletions

BIN
dist/plan vendored

Binary file not shown.

View File

@ -67,10 +67,10 @@ WHERE id = ?`, id).Scan(&tsk.ID, &tsk.Title, &tsk.Project, &dateStr, &timeStr, &
func (t *SqliteTask) FindMany(params storage.TaskListParams) ([]item.Task, error) { func (t *SqliteTask) FindMany(params storage.TaskListParams) ([]item.Task, error) {
query := `SELECT id, title, project, date, time, duration, recurrer FROM tasks` query := `SELECT id, title, project, date, time, duration, recurrer FROM tasks`
args := []interface{}{} args := []interface{}{}
where := []string{}
where := []string{`recurrer = ''`}
if params.Recurrer { if params.Recurrer {
where = append(where, `recurrer IS NOT NULL AND recurrer != ''`) where[0] = `recurrer != ''`
} }
if !params.Date.IsZero() && !params.IncludeBefore { if !params.Date.IsZero() && !params.IncludeBefore {
where = append(where, `date = ?`) where = append(where, `date = ?`)