Compare commits
2 Commits
8e2dcc855a
...
2d8217155c
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | 2d8217155c | |
Sofia Papacharalampous | 6aba26aa3e |
|
@ -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 => {
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue