Merge pull request #10305 from opf/fix/41413-fix-team-planner-crash

Fix team planner crash when adding a wp from the add existing pane
pull/10327/head
Henriette Darge 3 years ago committed by GitHub
commit 62ea88ea5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      frontend/src/app/shared/components/principal/principal.component.ts

@ -45,6 +45,7 @@ import {
import { PrincipalLike } from './principal-types';
import { DatasetInputs } from 'core-app/shared/components/dataset-inputs.decorator';
import { PrincipalType } from 'core-app/shared/components/principal/principal-helper';
import { PrincipalsResourceService } from 'core-app/core/state/principals/principals.service';
export const principalSelector = 'op-principal';
@ -70,16 +71,21 @@ export class OpPrincipalComponent implements OnInit {
@Input() size:AvatarSize = 'default';
public constructor(readonly elementRef:ElementRef,
public constructor(
readonly elementRef:ElementRef,
readonly PathHelper:PathHelperService,
readonly principalRenderer:PrincipalRendererService,
readonly principalResourceService:PrincipalsResourceService,
readonly I18n:I18nService,
readonly apiV3Service:ApiV3Service,
readonly timezoneService:TimezoneService) {
}
readonly timezoneService:TimezoneService,
) { }
ngOnInit() {
if (!this.principal.name) {
return;
}
this.principalRenderer.render(
this.elementRef.nativeElement as HTMLElement,
this.principal,

Loading…
Cancel
Save