diff --git a/client/src/app/infrastructure/definitions/tree.ts b/client/src/app/infrastructure/definitions/tree.ts index 03f19767c4..d950bacdac 100644 --- a/client/src/app/infrastructure/definitions/tree.ts +++ b/client/src/app/infrastructure/definitions/tree.ts @@ -21,6 +21,7 @@ export interface TreeNodeWithoutItem extends TreeIdNode { export interface OSTreeNode extends TreeNodeWithoutItem { item: T; children?: OSTreeNode[]; + toString: () => string; } /** @@ -46,6 +47,7 @@ export type FlatNode = T & { expandable: boolean; id: number; filtered?: boolean; + toString: () => string; }; function isIdentifiedItemNode(obj: any): boolean { diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-content/motion-content.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-content/motion-content.component.html index 74912c2ded..82cd9fdf1a 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-content/motion-content.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/components/motion-content/motion-content.component.html @@ -182,6 +182,7 @@ formControlName="category_id" placeholder="{{ 'Category' | translate }}" [repo]="categoryRepo" + [excludeIds]="true" > diff --git a/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree.service.ts b/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree.service.ts index 84fb1933bd..ea6f5d0135 100644 --- a/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree.service.ts +++ b/client/src/app/ui/modules/sorting/modules/sorting-tree/services/tree.service.ts @@ -31,7 +31,10 @@ export class TreeService { name: item.getTitle(), id: item.id, item, - children + children, + toString: function () { + return this.item.toString(); + } }; } @@ -352,7 +355,10 @@ export class TreeService { isSeen: true, expandable: false, id: item.id, - position: index + oldMaxPosition + 1 + position: index + oldMaxPosition + 1, + toString: function () { + return this.item.toString(); + } })); return tree.concat(items); } @@ -406,7 +412,10 @@ export class TreeService { expandable: !!children, isExpanded: !!children, level, - isSeen: true + isSeen: true, + toString: function () { + return this.item.toString(); + } }; return new Proxy(node, { get: (target: FlatNode, property: keyof Identifiable & Displayable & T) => {