fix(home): explicitly use filter for tasks on home page when one is set
Resolves https://github.com/go-vikunja/vikunja/issues/289 Resolves https://community.vikunja.io/t/various-sorting-filtering-issues/2781/5 (cherry picked from commit 97e030a1fc032c73ca6144139a488c18979fb310)
This commit is contained in:
@ -31,9 +31,17 @@ export default class TaskCollectionService extends AbstractService<ITask> {
|
||||
constructor() {
|
||||
super({
|
||||
getAll: '/projects/{projectId}/views/{viewId}/tasks',
|
||||
// /projects/{projectId}/tasks when viewId is not provided
|
||||
})
|
||||
}
|
||||
|
||||
getReplacedRoute(path: string, pathparams: Record<string, unknown>): string {
|
||||
if (!pathparams.viewId) {
|
||||
return super.getReplacedRoute('/projects/{projectId}/tasks', pathparams)
|
||||
}
|
||||
return super.getReplacedRoute(path, pathparams)
|
||||
}
|
||||
|
||||
modelFactory(data) {
|
||||
// FIXME: There must be a better way for this…
|
||||
if (typeof data.project_view_id !== 'undefined') {
|
||||
|
Reference in New Issue
Block a user