Task filters #243

Merged
konrad merged 18 commits from feature/task-filter into master 2020-04-11 14:20:34 +00:00
2 changed files with 9 additions and 17 deletions
Showing only changes of commit 15138b8e30 - Show all commits

View File

@ -20,7 +20,6 @@ import (
"code.vikunja.io/api/pkg/timeutil"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"
"time"
)
// Label represents a label
@ -212,8 +211,6 @@ func getUserTaskIDs(u *user.User) (taskIDs []int64, err error) {
}
tasks, _, _, err := getRawTasksForLists(lists, &taskOptions{
startDate: time.Unix(0, 0),
endDate: time.Unix(0, 0),
page: -1,
perPage: 0,
})

View File

@ -20,14 +20,11 @@ package models
import (
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/web"
"time"
)
// TaskCollection is a struct used to hold filter details and not clutter the Task struct with information not related to actual tasks.
type TaskCollection struct {
ListID int64 `param:"list"`
StartDateSortUnix int64 `query:"startdate"`
EndDateSortUnix int64 `query:"enddate"`
Lists []*List
// The query parameter to sort by. This is for ex. done, priority, etc.
@ -164,8 +161,6 @@ func (tf *TaskCollection) ReadAll(a web.Auth, search string, page int, perPage i
taskopts := &taskOptions{
search: search,
startDate: time.Unix(tf.StartDateSortUnix, 0),
endDate: time.Unix(tf.EndDateSortUnix, 0),
page: page,
perPage: perPage,
sortby: sort,