Breadcrumb Fix

This commit is contained in:
Lorenz Hilpert
2023-09-18 15:06:36 +02:00
parent aecc4a477f
commit fb8db78bbd
3 changed files with 18 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ export abstract class PickupShelfBaseComponent {
private async _checkAndUpdateListBreadcrumb(breadcrumb: string) {
let listBreadcrumb: Breadcrumb = await this._getBreadcrumbByTag('list');
const shouldHaveBreadcrumb = ['list', 'list-filter'].includes(breadcrumb);
const shouldHaveBreadcrumb = ['list', 'filter'].includes(breadcrumb);
if (shouldHaveBreadcrumb && !listBreadcrumb) {
const name = await this.getNameForListBreadcrumb();

View File

@@ -1,3 +1,11 @@
<a
class="btn btn-accent-1"
*ngIf="filterPath$ | async; let filterPath"
[routerLink]="filterPath.path"
[queryParams]="filterPath.queryParams"
queryParamsHandling="merge"
>Filter</a
>
<div>Hits {{ hits$ | async }}</div>
<div *ngFor="let item of list$ | async">
{{ item.orderNumber }}

View File

@@ -1,6 +1,9 @@
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { PickupShelfStore } from '../../store';
import { AsyncPipe, NgFor } from '@angular/common';
import { AsyncPipe, NgFor, NgIf } from '@angular/common';
import { map } from 'rxjs/operators';
import { PickupShelfOutNavigationService } from '@shared/services';
import { RouterLink } from '@angular/router';
@Component({
selector: 'page-pcikup-shelf-out-list',
@@ -9,14 +12,18 @@ import { AsyncPipe, NgFor } from '@angular/common';
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page-pcikup-shelf-out-list' },
standalone: true,
imports: [AsyncPipe, NgFor],
imports: [AsyncPipe, NgFor, RouterLink, NgIf],
})
export class PickupShelfOutListComponent {
private _pickupShelfOutNavigationService = inject(PickupShelfOutNavigationService);
store = inject(PickupShelfStore);
list$ = this.store.list$;
hits$ = this.store.listHits$;
filterPath$ = this.store.processId$.pipe(map((processId) => this._pickupShelfOutNavigationService.filterRoute({ processId })));
constructor() {}
}