minor fixes
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
2026-09-28 17:33:06 +02:00
parent e02631544f
commit f757692a19
3 changed files with 11 additions and 16 deletions
@@ -305,16 +305,16 @@ export class ClassifiedPagesComponent implements OnInit {
const category = this.selectedCategory() === key ? null : key;
this.selectedCategory.set(category);
this.page.set(0);
this.syncUrl(category, 0);
// this.updateQueryParams(category, 0);
}
clearCategoryFilter(): void {
this.selectedCategory.set(null);
this.page.set(0);
this.syncUrl(null, 0);
// this.updateQueryParams(null, 0);
}
private syncUrl(category: string | null, page: number): void {
private updateQueryParams(category: string | null, page: number): void {
this.isOwnNavigation = true;
this.router
.navigate([], {
@@ -11,7 +11,7 @@
<mat-chip-set
class="uh-breadcrumb"
aria-label="Pfad durch die Hierarchie">
@for (level of levels(); track level.id; let i = $index) {
@for (level of levels(); track $index; let i = $index) {
<mat-chip
(click)="jumpToLevel(i)"
[class.uh-chip-active]="i === levels().length - 1">
@@ -39,12 +39,7 @@
</div>
</div>
<div class="uh-row">
@for (
level of levels();
track level.id;
let i = $index;
let last = $last
) {
@for (level of levels(); track $index; let i = $index; let last = $last) {
@if (!last) {
<button
type="button"
@@ -147,11 +147,11 @@ export class HierarchyChartComponent implements OnInit {
);
// normalize the URL (fills in defaults / drops invalid trailing ids)
this.syncUrl();
this.updateQueryParams();
}
/** Writes the current levels path + language into the URL as query params. */
private syncUrl(): void {
private updateQueryParams(): void {
const path = this.levels()
.map((l) => l.id)
.join(',');
@@ -182,20 +182,20 @@ export class HierarchyChartComponent implements OnInit {
return raw ? this.buildLevel(raw) : level;
});
this.levels.set(rebuilt);
this.syncUrl();
this.updateQueryParams();
}
resetToRoot(): void {
if (this.universityRoot) {
this.levels.set([this.buildLevel(this.universityRoot)]);
this.syncUrl();
this.updateQueryParams();
}
}
/** closes the given level and everything opened below it */
removeLevelsFrom(index: number): void {
this.levels.set(this.levels().slice(0, index));
this.syncUrl();
this.updateQueryParams();
}
/** collapsed strip / breadcrumb chip clicked -> make that level active again */
@@ -224,7 +224,7 @@ export class HierarchyChartComponent implements OnInit {
// if the user clicks a different branch, drop any deeper levels first
const truncated = this.levels().slice(0, levelIndex + 1);
this.levels.set([...truncated, newLevel]);
this.syncUrl();
this.updateQueryParams();
} else {
this.onLeafSelect(raw);
}