Back Office: Fixes link to workspace root from breadcrumb trail (closes: #20455) (#20459)

Fixes link to workspace root from breadcrumb trail.
This commit is contained in:
Andy Butland
2025-10-15 10:06:00 +02:00
committed by GitHub
parent fdf759d08d
commit e71f36d816
2 changed files with 14 additions and 3 deletions

View File

@@ -78,7 +78,13 @@ export class UmbWorkspaceBreadcrumbElement extends UmbLitElement {
#getHref(structureItem: UmbStructureItemModel) {
if (structureItem.isFolder) return undefined;
return `section/${this.#sectionContext?.getPathname()}/workspace/${structureItem.entityType}/edit/${structureItem.unique}`;
let href = `section/${this.#sectionContext?.getPathname()}`;
if (structureItem.unique) {
href += `/workspace/${structureItem.entityType}/edit/${structureItem.unique}`;
}
return href;
}
override render() {

View File

@@ -115,8 +115,13 @@ export class UmbWorkspaceVariantMenuBreadcrumbElement extends UmbLitElement {
#getHref(structureItem: any) {
if (structureItem.isFolder) return undefined;
const workspaceBasePath = `section/${this.#sectionContext?.getPathname()}/workspace/${structureItem.entityType}/edit`;
return `${workspaceBasePath}/${structureItem.unique}/${this._workspaceActiveVariantId?.toCultureString()}`;
let href = `section/${this.#sectionContext?.getPathname()}`;
if (structureItem.unique) {
href += `/workspace/${structureItem.entityType}/edit/${structureItem.unique}/${this._workspaceActiveVariantId?.toCultureString()}`;
}
return href;
}
override render() {