Merge pull request #7313 from opf/fix/30230/injector-in-nested-view

[30230] Don't pass injector in isolated query

[ci skip]
pull/7270/head
Oliver Günther 6 years ago committed by GitHub
commit 68a344abf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      frontend/src/app/components/work-packages/wp-single-view/wp-single-view.component.ts
  2. 10
      frontend/src/app/components/work-packages/wp-single-view/wp-single-view.html

@ -62,6 +62,7 @@ export interface GroupDescriptor {
id:string;
members:FieldDescriptor[];
query?:QueryResource;
isolated:boolean;
type:string;
}
@ -275,7 +276,8 @@ export class WorkPackageSingleViewComponent implements OnInit, OnDestroy {
name: group.name,
id: groupId || randomString(16),
members: this.getFields(resource, group.attributes),
type: group._type
type: group._type,
isolated: false
};
} else {
return {
@ -284,7 +286,8 @@ export class WorkPackageSingleViewComponent implements OnInit, OnDestroy {
query: group._embedded.query,
relationType: group.relationType,
members: [group._embedded.query],
type: group._type
type: group._type,
isolated: true
};
}
});

@ -109,14 +109,20 @@
</div>
</div>
<ng-container wp-isolated-query-space>
<ng-container wp-isolated-query-space *ngIf="group.isolated">
<ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
[ndcDynamicInjector]="injector"
[ndcDynamicInputs]="{ workPackage: workPackage,
group: group,
query: group.query }" >
</ndc-dynamic>
</ng-container>
<ng-container *ngIf="!group.isolated">
<ndc-dynamic [ndcDynamicComponent]="attributeGroupComponent(group)"
[ndcDynamicInjector]="injector"
[ndcDynamicInputs]="{ workPackage: workPackage, group: group }">
</ndc-dynamic>
</ng-container>
</div>
</div>

Loading…
Cancel
Save