Skip to content

Commit

Permalink
[ACS-4523] Display path for already linked categories
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas committed Apr 18, 2023
1 parent 305a5f5 commit ff6a67a
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,11 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
private loadCategoriesForNode(nodeId: string) {
this.assignedCategories = [];
this.categoryService.getCategoryLinksForNode(nodeId).subscribe((categoryPaging) => {
this.categories = categoryPaging.list.entries.map((categoryEntry) => categoryEntry.entry);
this.categories = categoryPaging.list.entries.map((categoryEntry) => {
const path = categoryEntry.entry.path ? categoryEntry.entry.path.split('/').splice(3).join('/') : null;
categoryEntry.entry.name = path ? `${path}/${categoryEntry.entry.name}` : categoryEntry.entry.name;
return categoryEntry.entry;
});
this.assignedCategories = [...this.categories];
});
}
Expand Down

0 comments on commit ff6a67a

Please sign in to comment.