Use the parent filter

pull/6242/head
Oliver Günther 7 years ago
parent db7b747f2c
commit e9e8e52dee
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 2
      frontend/app/components/api/api-v3/api-v3-filter-builder.ts
  2. 6
      frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts
  3. 3
      frontend/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.template.html

@ -34,7 +34,7 @@ export interface ApiV3Filter {
export class ApiV3FilterBuilder { export class ApiV3FilterBuilder {
private filters:ApiV3Filter[] = []; public filters:ApiV3Filter[] = [];
public add(name:string, operator:FilterOperator, values:any):this { public add(name:string, operator:FilterOperator, values:any):this {
let newFilter:ApiV3Filter = {}; let newFilter:ApiV3Filter = {};

@ -40,6 +40,12 @@ export class WorkPackageRelationsHierarchyController {
public canModifyHierarchy = !!this.workPackage.changeParent; public canModifyHierarchy = !!this.workPackage.changeParent;
public canAddRelation = !!this.workPackage.addRelation; public canAddRelation = !!this.workPackage.addRelation;
public childrenQueryProps = {
filters: JSON.stringify([{ parent: { operator: '=', values: [this.workPackage.id] } }]),
'columns[]': ['id', 'type', 'subject'],
showHierarchies: false
};
constructor(protected $scope:ng.IScope, constructor(protected $scope:ng.IScope,
protected $rootScope:ng.IRootScopeService, protected $rootScope:ng.IRootScopeService,
protected $q:ng.IQService, protected $q:ng.IQService,

@ -21,8 +21,7 @@
</div> </div>
</div> </div>
<wp-embedded-table queryId="5" <wp-embedded-table [query-props]="$ctrl.childrenQueryProps"
[query-props]="{ 'columns[]': ['id', 'type', 'subject'], showHierarchies: false }"
[configuration]="{ splitViewEnabled: false, columnMenuEnabled: false, contextMenuEnabled: false }"> [configuration]="{ splitViewEnabled: false, columnMenuEnabled: false, contextMenuEnabled: false }">
</wp-embedded-table> </wp-embedded-table>

Loading…
Cancel
Save