Navigation and Styling to Edit Pages

This commit is contained in:
Nino
2023-10-09 15:15:23 +02:00
parent f923fdefa4
commit d6c52baf53
5 changed files with 98 additions and 16 deletions

View File

@@ -0,0 +1,14 @@
:host {
@apply box-border grid overflow-y-scroll h-split-screen-tablet desktop-small:h-split-screen-desktop;
}
::ng-deep page-pickup-shelf-in-edit shared-goods-in-out-order-edit {
padding: 0 !important;
}
::ng-deep page-pickup-shelf-in-edit shared-goods-in-out-order-edit .actions {
width: 100% !important;
position: sticky !important;
bottom: 1.5rem !important;
transform: none !important;
}

View File

@@ -0,0 +1,5 @@
<shared-goods-in-out-order-edit
*ngIf="store.orderItems$ | async; let items"
(navigation)="navigateToShelfInDetailsPage($event)"
[items]="items"
></shared-goods-in-out-order-edit>

View File

@@ -0,0 +1,49 @@
import { Component, ChangeDetectionStrategy, inject } from '@angular/core';
import { PickupShelfDetailsBaseComponent } from '../../pickup-shelf-details-base.component';
import { SharedGoodsInOutOrderEditModule } from '@shared/components/goods-in-out';
import { first } from 'rxjs/operators';
import { AsyncPipe, NgIf } from '@angular/common';
import { PickupShelfInNavigationService } from '@shared/services';
@Component({
selector: 'page-pickup-shelf-in-edit',
templateUrl: 'pickup-shelf-in-edit.component.html',
styleUrls: ['pickup-shelf-in-edit.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
host: { class: 'page-pickup-shelf-in-edit' },
standalone: true,
imports: [SharedGoodsInOutOrderEditModule, AsyncPipe, NgIf],
})
export class PickupShelfInEditComponent extends PickupShelfDetailsBaseComponent {
shelfInNavigation = inject(PickupShelfInNavigationService);
constructor() {
super();
this.listStore;
}
async navigateToShelfInDetailsPage({ options }: { options?: { processingStatus?: number } }) {
const orderId = (await this.store.orderItems$.pipe(first()).toPromise())?.find((_) => true)?.orderId;
const compartmentCode = this.activatedRoute?.snapshot?.params?.compartmentCode;
const orderNumber = this.activatedRoute?.snapshot?.params?.orderNumber;
const processingStatus = options?.processingStatus
? options.processingStatus
: this.activatedRoute.snapshot.params.orderItemProcessingStatus;
const compartmentInfo = this.activatedRoute.snapshot.params.compartmentInfo;
await this.router.navigate(
this.shelfInNavigation.detailRoute({
item: {
orderId: orderId ? Number(orderId) : undefined,
orderNumber,
compartmentCode,
processingStatus,
compartmentInfo,
orderItemSubsetId: this.store?.selectPreviousSelectedOrderItemSubsetId,
},
}).path,
{ queryParamsHandling: 'preserve' }
);
}
}

View File

@@ -7,6 +7,7 @@ import { PickUpShelfHistoryComponent } from '../shared/pickup-shelf-history/pick
import { PickUpShelfInMainSideViewComponent } from './pickup-shelf-in-main-side-view/pickup-shelf-in-main-side-view.component';
import { PickUpShelfInMainComponent } from './pickup-shelf-in-main/pickup-shelf-in-main.component';
import { PickUpShelfInListComponent } from './pickup-shelf-in-list/pickup-shelf-in-list.component';
import { PickupShelfInEditComponent } from './pickup-shelf-in-edit/pickup-shelf-in-edit.component';
export const routes: Routes = [
{
@@ -35,22 +36,6 @@ export const routes: Routes = [
component: PickupShelfInDetailsComponent,
data: { view: 'details' },
},
// TODO: Kopie von PickupShelfOutEdit erstellen
// {
// path: 'order/:orderId/:orderNumber/item/status/:orderItemProcessingStatus/:orderItemSubsetId/edit',
// component: PickUpShelfEditComponent,
// data: { view: 'edit' },
// },
// {
// path: 'order/:orderId/compartment/:compartmentCode/:orderItemSubsetId/edit',
// component: PickUpShelfEditComponent,
// data: { view: 'edit' },
// },
// {
// path: 'order/:orderId/compartment/:compartmentCode/:compartmentInfo/:orderItemSubsetId/edit',
// component: PickUpShelfEditComponent,
// data: { view: 'edit' },
// },
{
path: 'order/:orderId/:orderNumber/item/status/:orderItemProcessingStatus/:orderItemSubsetId/history',
component: PickUpShelfHistoryComponent,
@@ -66,6 +51,21 @@ export const routes: Routes = [
component: PickUpShelfHistoryComponent,
data: { view: 'history' },
},
{
path: 'order/:orderId/:orderNumber/item/status/:orderItemProcessingStatus/:orderItemSubsetId/edit',
component: PickupShelfInEditComponent,
data: { view: 'edit' },
},
{
path: 'order/:orderId/compartment/:compartmentCode/:orderItemSubsetId/edit',
component: PickupShelfInEditComponent,
data: { view: 'edit' },
},
{
path: 'order/:orderId/compartment/:compartmentCode/:compartmentInfo/:orderItemSubsetId/edit',
component: PickupShelfInEditComponent,
data: { view: 'edit' },
},
{ path: 'search', component: PickUpShelfInMainSideViewComponent, outlet: 'side' },
{ path: 'list', component: PickUpShelfInListComponent, data: { view: 'list' }, outlet: 'side' },
],

View File

@@ -0,0 +1,14 @@
:host {
@apply box-border grid overflow-y-scroll h-split-screen-tablet desktop-small:h-split-screen-desktop;
}
::ng-deep page-pickup-shelf-out-edit shared-goods-in-out-order-edit {
padding: 0 !important;
}
::ng-deep page-pickup-shelf-out-edit shared-goods-in-out-order-edit .actions {
width: 100% !important;
position: sticky !important;
bottom: 1.5rem !important;
transform: none !important;
}