feat: saved views of my work, across my projects
A person saves named views of «my work»: projects, assigned to me, that I follow, status categories, priorities, bugs only, overdue and text. They are private (Mongo my_views, no history), listed and deleted by their owner (GraphQL myViews / saveMyView / deleteMyView, REST /api/me/views), and run as the cross-project search, which gains project, priority, bugsOnly and overdue filters (also in MCP my_issues). The home page shows them as a bar above «my work», with a drawer to save a new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,6 +102,12 @@ export class GraphqlIssuesGateway extends IssuesGateway {
|
||||
categories: filter.categories as never,
|
||||
limit: filter.limit,
|
||||
search: filter.search?.trim() || null,
|
||||
projectIds: filter.projectIds?.length ? filter.projectIds : null,
|
||||
priorities: filter.priorities?.length
|
||||
? (filter.priorities as never)
|
||||
: null,
|
||||
bugsOnly: filter.bugsOnly ?? null,
|
||||
overdue: filter.overdue ?? null,
|
||||
})
|
||||
.pipe(
|
||||
map((d) => ({
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { inject, Injectable } from '@angular/core';
|
||||
import {
|
||||
MyView,
|
||||
MyViewCriteria,
|
||||
SavedFilter,
|
||||
SavedFilterCriteria,
|
||||
SavedFiltersGateway,
|
||||
} from '@task-stream/web/tracker/domain';
|
||||
import { map, Observable } from 'rxjs';
|
||||
import {
|
||||
DeleteMyViewDocument,
|
||||
MyViewsDocument,
|
||||
SaveMyViewDocument,
|
||||
DeleteSavedFilterDocument,
|
||||
SavedFiltersDocument,
|
||||
SaveFilterDocument,
|
||||
@@ -38,4 +43,25 @@ export class GraphqlSavedFiltersGateway extends SavedFiltersGateway {
|
||||
.mutate(DeleteSavedFilterDocument, { id })
|
||||
.pipe(map(() => undefined));
|
||||
}
|
||||
|
||||
myViews(): Observable<MyView[]> {
|
||||
return this.gql
|
||||
.query(MyViewsDocument, {})
|
||||
.pipe(map((d) => d.myViews as MyView[]));
|
||||
}
|
||||
|
||||
saveMyView(input: {
|
||||
name: string;
|
||||
criteria: MyViewCriteria;
|
||||
}): Observable<string> {
|
||||
return this.gql
|
||||
.mutate(SaveMyViewDocument, { input: input as never })
|
||||
.pipe(map((d) => d.saveMyView));
|
||||
}
|
||||
|
||||
removeMyView(id: string): Observable<void> {
|
||||
return this.gql
|
||||
.mutate(DeleteMyViewDocument, { id })
|
||||
.pipe(map(() => undefined));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user