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 20, 2023
1 parent 6c855b7 commit 3e73ff7
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,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 3e73ff7

Please sign in to comment.