mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 02:20:38 +09:00
Merge branch 'master' of github.com-dotta:paperclipai/paperclip
* 'master' of github.com-dotta:paperclipai/paperclip: fix(ui): render sub-goals in goal detail tree fix: exclude terminated agents from list and org chart endpoints
This commit is contained in:
commit
084c0a19a2
3 changed files with 14 additions and 6 deletions
|
|
@ -92,7 +92,8 @@ function GoalNode({ goal, children, allGoals, depth, goalLink, onSelect }: GoalN
|
|||
}
|
||||
|
||||
export function GoalTree({ goals, goalLink, onSelect }: GoalTreeProps) {
|
||||
const roots = goals.filter((g) => !g.parentId);
|
||||
const goalIds = new Set(goals.map((g) => g.id));
|
||||
const roots = goals.filter((g) => !g.parentId || !goalIds.has(g.parentId));
|
||||
|
||||
if (goals.length === 0) {
|
||||
return <p className="text-sm text-muted-foreground">No goals.</p>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue