mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
✨ Update routing and side menu interactions
Refactored routing structure and improved side menu functionality. - 🛠️ **Refactor**: Simplified route definitions for process handling - 🎨 **Style**: Cleaned up side menu HTML for better readability - 🛠️ **Refactor**: Enhanced side menu item click handling #5021
This commit is contained in:
@@ -108,16 +108,6 @@ const routes: Routes = [
|
||||
canActivate: [ActivateProcessIdGuard],
|
||||
loadChildren: () => import('@page/pickup-shelf').then((m) => m.PickupShelfOutModule),
|
||||
},
|
||||
{
|
||||
path: ':processId',
|
||||
resolve: { process: processResolverFn },
|
||||
children: [
|
||||
{
|
||||
path: 'return',
|
||||
loadChildren: () => import('@feature/return/pages').then((m) => m.routes),
|
||||
},
|
||||
],
|
||||
},
|
||||
{ path: '**', redirectTo: 'dashboard', pathMatch: 'full' },
|
||||
],
|
||||
resolve: { section: CustomerSectionResolver },
|
||||
@@ -162,7 +152,18 @@ const routes: Routes = [
|
||||
],
|
||||
resolve: { section: BranchSectionResolver },
|
||||
},
|
||||
{ path: '**', redirectTo: 'kunde', pathMatch: 'full' },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: ':processId',
|
||||
component: MainComponent,
|
||||
resolve: { process: processResolverFn },
|
||||
canActivate: [IsAuthenticatedGuard],
|
||||
children: [
|
||||
{
|
||||
path: 'return',
|
||||
loadChildren: () => import('@feature/return/pages').then((m) => m.routes),
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
class="side-menu-group-arrow"
|
||||
[class.side-menu-item-rotate]="customerExpanded"
|
||||
(click)="
|
||||
$event.stopPropagation();
|
||||
$event.preventDefault();
|
||||
customerExpanded = !customerExpanded
|
||||
$event.stopPropagation(); $event.preventDefault(); customerExpanded = !customerExpanded
|
||||
"
|
||||
>
|
||||
<shared-icon icon="keyboard-arrow-down"></shared-icon>
|
||||
@@ -90,7 +88,11 @@
|
||||
*ifRole="'Store'"
|
||||
class="side-menu-group-item"
|
||||
(click)="closeSideMenu(); focusSearchBox()"
|
||||
[routerLink]="[processService.nextId(), 'return']"
|
||||
[routerLink]="[
|
||||
'/',
|
||||
processService.activatedProcess()?.id || processService.nextId(),
|
||||
'return',
|
||||
]"
|
||||
(isActiveChange)="focusSearchBox()"
|
||||
>
|
||||
<span class="side-menu-group-item-icon w-[2.375rem] h-12">
|
||||
@@ -166,9 +168,7 @@
|
||||
class="side-menu-group-arrow"
|
||||
[class.side-menu-item-rotate]="shelfExpanded"
|
||||
(click)="
|
||||
$event.stopPropagation();
|
||||
$event.preventDefault();
|
||||
shelfExpanded = !shelfExpanded
|
||||
$event.stopPropagation(); $event.preventDefault(); shelfExpanded = !shelfExpanded
|
||||
"
|
||||
>
|
||||
<shared-icon icon="keyboard-arrow-down"></shared-icon>
|
||||
@@ -178,10 +178,7 @@
|
||||
<div class="side-menu-group-sub-items" [class.hidden]="!shelfExpanded">
|
||||
<a
|
||||
class="side-menu-group-item"
|
||||
*ngIf="
|
||||
pickUpShelfInRoutePath$ | async;
|
||||
let pickUpShelfInListNavigation
|
||||
"
|
||||
*ngIf="pickUpShelfInRoutePath$ | async; let pickUpShelfInListNavigation"
|
||||
(click)="closeSideMenu(); focusSearchBox()"
|
||||
[routerLink]="pickUpShelfInListNavigation.path"
|
||||
[queryParams]="pickUpShelfInListNavigation.queryParams"
|
||||
@@ -234,9 +231,7 @@
|
||||
(click)="closeSideMenu()"
|
||||
[routerLink]="['/filiale', 'goods', 'in', 'list']"
|
||||
[queryParams]="{ view: 'wareneingangsliste' }"
|
||||
[class.active-child]="
|
||||
(currentShelfView$ | async) === 'wareneingangsliste'
|
||||
"
|
||||
[class.active-child]="(currentShelfView$ | async) === 'wareneingangsliste'"
|
||||
routerLinkActive="active"
|
||||
(isActiveChange)="shelfActive($event)"
|
||||
>
|
||||
@@ -262,10 +257,7 @@
|
||||
|
||||
<a
|
||||
class="side-menu-group-item"
|
||||
*ngIf="
|
||||
packageInspectionNavigation$ | async;
|
||||
let packageInspectionNavigation
|
||||
"
|
||||
*ngIf="packageInspectionNavigation$ | async; let packageInspectionNavigation"
|
||||
(click)="closeSideMenu(); fetchAndOpenPackages()"
|
||||
[routerLink]="packageInspectionNavigation.path"
|
||||
[queryParams]="packageInspectionNavigation.queryParams"
|
||||
|
||||
Reference in New Issue
Block a user