diff --git a/src/app/core/teams/team.model.ts b/src/app/core/teams/team.model.ts index e359b31e..f7539db3 100644 --- a/src/app/core/teams/team.model.ts +++ b/src/app/core/teams/team.model.ts @@ -7,6 +7,9 @@ export class Team { requiresExternalRoles: string[] = []; requiresExternalTeams: string[] = []; parent?: Team; + parentObj: Team; + ancestors: string[] = []; + ancestorObjs: Team[] = []; constructor(model?: unknown) { this.setFromModel(model); @@ -23,8 +26,9 @@ export class Team { this.requiresExternalTeams ??= []; // Replace raw objects (from Object.assign) with class instances - if (this.parent) { - this.parent = new Team(this.parent); + if (this.parentObj) { + this.parentObj = new Team(this.parentObj); } + this.ancestorObjs = this.ancestorObjs.map((team) => new Team(team)); } } diff --git a/src/app/core/teams/view-team/general-details/general-details.component.html b/src/app/core/teams/view-team/general-details/general-details.component.html index dd76cbb0..f735608e 100644 --- a/src/app/core/teams/view-team/general-details/general-details.component.html +++ b/src/app/core/teams/view-team/general-details/general-details.component.html @@ -149,18 +149,13 @@