mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1651: #4389 RD Added Pickup Shelf List In Item Loader and trackByGroupFn
#4389 RD Added Pickup Shelf List In Item Loader and trackByGroupFn
This commit is contained in:
committed by
Lorenz Hilpert
parent
6652c2f97e
commit
ecb5a77fdd
@@ -51,7 +51,10 @@
|
||||
[showScrollArrow]="false"
|
||||
[showSpacer]="(primaryOutletActive$ | async) || (isTablet$ | async) || (isDesktopSmall$ | async)"
|
||||
>
|
||||
<div class="page-pickup-shelf-in-list__items-list w-full" *ngFor="let bueryNumberGroup of list$ | async | groupBy: byBuyerNumberFn">
|
||||
<div
|
||||
class="page-pickup-shelf-in-list__items-list w-full"
|
||||
*ngFor="let bueryNumberGroup of list$ | async | groupBy: byBuyerNumberFn; trackBy: trackByGroupFn"
|
||||
>
|
||||
<ng-container *ngIf="bueryNumberGroup.items[0]; let firstItem">
|
||||
<div
|
||||
class="page-pickup-shelf-in-list__item-header-group w-full grid grid-flow-col gap-x-4 items-center justify-between bg-white text-xl rounded-t p-4 font-bold mb-px-2"
|
||||
@@ -65,9 +68,11 @@
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngFor="let orderNumberGroup of bueryNumberGroup.items | groupBy: byOrderNumberFn">
|
||||
<ng-container *ngFor="let processingStatusGroup of orderNumberGroup.items | groupBy: byProcessingStatusFn">
|
||||
<ng-container *ngFor="let compartmentCodeGroup of processingStatusGroup.items | groupBy: byCompartmentCodeFn">
|
||||
<ng-container *ngFor="let orderNumberGroup of bueryNumberGroup.items | groupBy: byOrderNumberFn; trackBy: trackByGroupFn">
|
||||
<ng-container *ngFor="let processingStatusGroup of orderNumberGroup.items | groupBy: byProcessingStatusFn; trackBy: trackByGroupFn">
|
||||
<ng-container
|
||||
*ngFor="let compartmentCodeGroup of processingStatusGroup.items | groupBy: byCompartmentCodeFn; trackBy: trackByGroupFn"
|
||||
>
|
||||
<page-pickup-shelf-list-item
|
||||
*ngFor="let item of compartmentCodeGroup.items; let firstItem = first; trackBy: trackByFn"
|
||||
class="page-pickup-shelf-in-list__result-item mb-[0.125rem]"
|
||||
@@ -79,6 +84,7 @@
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
</div>
|
||||
<page-pickup-shelf-list-item-loader *ngIf="fetching$ | async"></page-pickup-shelf-list-item-loader>
|
||||
</ui-scroll-container>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Filter, FilterModule } from '@shared/components/filter';
|
||||
import { IconModule } from '@shared/components/icon';
|
||||
import { PickUpShelfListItemComponent } from '../../shared/pickup-shelf-list-item/pickup-shelf-list-item.component';
|
||||
import { UiScrollContainerComponent, UiScrollContainerModule } from '@ui/scroll-container';
|
||||
import { GroupByPipe } from '@ui/common';
|
||||
import { Group, GroupByPipe } from '@ui/common';
|
||||
import { UiSpinnerModule } from '@ui/spinner';
|
||||
import { PickupShelfInNavigationService } from '@shared/services';
|
||||
import { debounceTime, map } from 'rxjs/operators';
|
||||
@@ -27,6 +27,7 @@ import { isEqual } from 'lodash';
|
||||
import { EnvironmentService } from '@core/environment';
|
||||
import { CacheService } from '@core/cache';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { PickupShelfListItemLoaderComponent } from '../../shared/pickup-shelf-list-item/pickup-shelf-list-item-loader.component';
|
||||
|
||||
@Component({
|
||||
selector: 'page-pickup-shelf-in-list',
|
||||
@@ -46,6 +47,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
UiScrollContainerModule,
|
||||
GroupByPipe,
|
||||
UiSpinnerModule,
|
||||
PickupShelfListItemLoaderComponent,
|
||||
],
|
||||
})
|
||||
export class PickUpShelfInListComponent implements OnInit, AfterViewInit {
|
||||
@@ -106,6 +108,8 @@ export class PickUpShelfInListComponent implements OnInit, AfterViewInit {
|
||||
|
||||
trackByFn: TrackByFunction<DBHOrderItemListItemDTO> = (index, item) => `${item.orderId}${item.orderItemId}${item.orderItemSubsetId}`;
|
||||
|
||||
trackByGroupFn: TrackByFunction<Group<string, DBHOrderItemListItemDTO>> = (index, group) => group.group;
|
||||
|
||||
private readonly SCROLL_POSITION_TOKEN = 'SHELF_IN_LIST_SCROLL_POSITION';
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user