feat(views): show tasks on kanban board in saved filter
This commit is contained in:
parent
61e27ae3eb
commit
e1774cc49a
@ -306,7 +306,7 @@ import TaskPositionService from '@/services/taskPosition'
|
|||||||
import TaskPositionModel from '@/models/taskPosition'
|
import TaskPositionModel from '@/models/taskPosition'
|
||||||
|
|
||||||
const {
|
const {
|
||||||
projectId = undefined,
|
projectId,
|
||||||
view,
|
view,
|
||||||
} = defineProps<{
|
} = defineProps<{
|
||||||
projectId: number,
|
projectId: number,
|
||||||
|
@ -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
|
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
|
// Get all buckets for this project
|
||||||
buckets := []*Bucket{}
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -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) {
|
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 != nil {
|
||||||
if view.BucketConfigurationMode != BucketConfigurationModeNone {
|
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
|
return tasksInBuckets, len(tasksInBuckets), int64(len(tasksInBuckets)), err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user