refactor: move include_subprojects to task collection filter
This commit is contained in:
parent
3caab51dab
commit
90ced65fc5
|
|
@ -153,13 +153,13 @@
|
|||
/>
|
||||
|
||||
<RouterLink
|
||||
v-if="showProjectSeparately && project"
|
||||
v-tooltip="$t('task.detail.belongsToProject', {project: project.title})"
|
||||
:to="{ name: 'project.index', params: { projectId: task.projectId } }"
|
||||
class="task-project"
|
||||
@click.stop
|
||||
v-if="showProjectSeparately && project"
|
||||
v-tooltip="$t('task.detail.belongsToProject', {project: project.title})"
|
||||
:to="{ name: 'project.index', params: { projectId: task.projectId } }"
|
||||
class="task-project"
|
||||
@click.stop
|
||||
>
|
||||
{{ project.title }}
|
||||
{{ project.title }}
|
||||
</RouterLink>
|
||||
<BaseButton
|
||||
:class="{'is-favorite': task.isFavorite}"
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
// Vikunja is a to-do list application to facilitate your life.
|
||||
// Copyright 2018-present Vikunja and contributors. All rights reserved.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package migration
|
||||
|
||||
import (
|
||||
"src.techknowlogick.com/xormigrate"
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
type projectViews20260302140100 struct {
|
||||
IncludeSubprojects bool `xorm:"default false not null" json:"include_subprojects"`
|
||||
}
|
||||
|
||||
func (projectViews20260302140100) TableName() string {
|
||||
return "project_views"
|
||||
}
|
||||
|
||||
func init() {
|
||||
migrations = append(migrations, &xormigrate.Migration{
|
||||
ID: "20260302140100",
|
||||
Description: "Add include_subprojects to project views",
|
||||
Migrate: func(tx *xorm.Engine) error {
|
||||
return tx.Sync(projectViews20260302140100{})
|
||||
},
|
||||
Rollback: func(tx *xorm.Engine) error {
|
||||
return nil
|
||||
},
|
||||
})
|
||||
}
|
||||
|
|
@ -163,8 +163,6 @@ type ProjectView struct {
|
|||
Filter *TaskCollection `xorm:"json null default null" query:"filter" json:"filter" doc:"The filter query used to match tasks shown in this view. See https://vikunja.io/docs/filters."`
|
||||
// The position of this view in the list. The list of all views will be sorted by this position.
|
||||
Position float64 `xorm:"double null" json:"position" doc:"The position of this view in the list. The list of all views will be sorted by this position."`
|
||||
// If enabled, this view also includes tasks from all descendant subprojects.
|
||||
IncludeSubprojects bool `xorm:"default false not null" json:"include_subprojects"`
|
||||
|
||||
// The bucket configuration mode. Can be `none`, `manual` or `filter`. `manual` allows to move tasks between buckets as you normally would. `filter` creates buckets based on a filter for each bucket.
|
||||
BucketConfigurationMode BucketConfigurationModeKind `xorm:"default 0" json:"bucket_configuration_mode" swaggertype:"string" enums:"none,manual,filter" doc:"The bucket configuration mode. One of none, manual or filter. manual lets you move tasks between buckets; filter creates a bucket per filter."`
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ type TaskCollection struct {
|
|||
ProjectID int64 `param:"project" json:"-"`
|
||||
ProjectViewID int64 `param:"view" json:"-"`
|
||||
// If set to true, tasks from all descendant subprojects will also be returned.
|
||||
IncludeSubprojects bool `query:"include_subprojects" json:"-"`
|
||||
IncludeSubprojects bool `json:"include_subprojects" query:"include_subprojects"`
|
||||
|
||||
Search string `query:"s" json:"s" doc:"A search term to match tasks by their title."`
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue