feat(views): show tasks on kanban board in saved filter

This commit is contained in:
kolaente 2024-03-16 14:24:04 +01:00
parent 61e27ae3eb
commit e1774cc49a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
3 changed files with 4 additions and 4 deletions

View File

@ -306,7 +306,7 @@ import TaskPositionService from '@/services/taskPosition'
import TaskPositionModel from '@/models/taskPosition'
const {
projectId = undefined,
projectId,
view,
} = defineProps<{
projectId: number,

View File

@ -163,7 +163,7 @@ func (b *Bucket) ReadAll(s *xorm.Session, auth web.Auth, search string, page int
return buckets, len(buckets), int64(len(buckets)), nil
}
func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, opts *taskSearchOptions, auth web.Auth) (bucketsWithTasks []*Bucket, err error) {
func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, projects []*Project, opts *taskSearchOptions, auth web.Auth) (bucketsWithTasks []*Bucket, err error) {
// Get all buckets for this project
buckets := []*Bucket{}
@ -255,7 +255,7 @@ func GetTasksInBucketsForView(s *xorm.Session, view *ProjectView, opts *taskSear
}
}
ts, _, total, err := getRawTasksForProjects(s, []*Project{{ID: view.ProjectID}}, auth, opts)
ts, _, total, err := getRawTasksForProjects(s, projects, auth, opts)
if err != nil {
return nil, err
}

View File

@ -122,7 +122,7 @@ func getTaskFilterOptsFromCollection(tf *TaskCollection, projectView *ProjectVie
func getTaskOrTasksInBuckets(s *xorm.Session, a web.Auth, projects []*Project, view *ProjectView, opts *taskSearchOptions) (tasks interface{}, resultCount int, totalItems int64, err error) {
if view != nil {
if view.BucketConfigurationMode != BucketConfigurationModeNone {
tasksInBuckets, err := GetTasksInBucketsForView(s, view, opts, a)
tasksInBuckets, err := GetTasksInBucketsForView(s, view, projects, opts, a)
return tasksInBuckets, len(tasksInBuckets), int64(len(tasksInBuckets)), err
}
}