Compare commits

...

2 Commits

2 changed files with 11 additions and 2 deletions

View File

@ -168,8 +168,7 @@ export class DescriptionEditorResolver extends BaseEditorResolver {
} else if (dmpId != null && dmpSectionId != null && copyDmpId == null) {
return this.dmpService.getSingle(Guid.parse(dmpId), DescriptionEditorResolver.dmpLookupFields())
.pipe(tap(x => {
this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label);
this.breadcrumbService.addIdResolvedValue(dmpSectionId, this.language.instant("DESCRIPTION-EDITOR.TITLE-NEW"));
this.breadcrumbService.addIdResolvedValue(`${x.id}/${dmpSectionId}`, this.language.instant("DESCRIPTION-EDITOR.TITLE-NEW"));
}), takeUntil(this._destroyed), map(dmp => {

View File

@ -144,6 +144,16 @@ export class NavigationBreadcrumbComponent extends BaseComponent {
}
// replace whole pathParams
const paramText = Object.keys(pathParams)
.map(key => pathParams[key])
.join('/');
if (this.paramToStringDictionary[paramText]) {
return [this.paramToStringDictionary[paramText], null];
}
// replace path params segments
const title = Object.keys(pathParams)
.sort((a, b) => b.length - a.length) // avoid param overlapping => :id2 (length 3) should be replaced before :id (length 2)
.reduce(