mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Connect Breadcrumb to Catalog Search
This commit is contained in:
@@ -56,15 +56,25 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
|
||||
const items = this.cache.get<ItemDTO[]>(params);
|
||||
if (items) {
|
||||
this.store.setItems({ items });
|
||||
} else {
|
||||
this.store.search({ reload: true });
|
||||
}
|
||||
this.store.search({ reload: true });
|
||||
|
||||
const scrollPos = Number(original?.scrollPos);
|
||||
if (scrollPos !== null) {
|
||||
this.scrollTop(scrollPos);
|
||||
}
|
||||
},
|
||||
connected: () => {
|
||||
const { query, queryParams, hits } = this.store;
|
||||
|
||||
this.breadcrumb.addOrUpdateBreadcrumbIfNotExists({
|
||||
key: this.application.activatedProcessId,
|
||||
name: `${query} (${hits ? hits : 'Lade'} Ergebnisse)`,
|
||||
path: '/product/search/results',
|
||||
params: queryParams,
|
||||
tags: ['catalog', 'filter', 'results'],
|
||||
});
|
||||
},
|
||||
disconnected: () => {
|
||||
this.cache.set(this.store.queryParams, this.store.items);
|
||||
this.updateBreadcrumbs(previousProcessId, {
|
||||
@@ -73,16 +83,6 @@ export class ArticleSearchResultsComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const { query, queryParams, hits } = this.store;
|
||||
|
||||
this.breadcrumb.addOrUpdateBreadcrumbIfNotExists({
|
||||
key: this.application.activatedProcessId,
|
||||
name: `${query} (${hits ? hits : 'Lade'} Ergebnisse)`,
|
||||
path: '/product/search/results',
|
||||
params: queryParams,
|
||||
tags: ['catalog', 'filter', 'results'],
|
||||
});
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user