mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 1649: #4340 Expand Dropdown on Click if menu is on assigned Section
#4340 Expand Dropdown on Click if menu is on assigned Section
This commit is contained in:
committed by
Lorenz Hilpert
parent
a687b1771f
commit
e9f16f72cb
@@ -19,7 +19,7 @@
|
|||||||
<a
|
<a
|
||||||
*ngIf="customerSearchRoute$ | async; let customerSearchRoute"
|
*ngIf="customerSearchRoute$ | async; let customerSearchRoute"
|
||||||
class="side-menu-group-item"
|
class="side-menu-group-item"
|
||||||
(click)="closeSideMenu(); focusSearchBox()"
|
(click)="expandCustomer(); closeSideMenu(); focusSearchBox()"
|
||||||
[routerLink]="customerSearchRoute.path"
|
[routerLink]="customerSearchRoute.path"
|
||||||
[queryParams]="customerSearchRoute.queryParams"
|
[queryParams]="customerSearchRoute.queryParams"
|
||||||
routerLinkActive="active"
|
routerLinkActive="active"
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
<div class="side-menu-group-sub-item-wrapper">
|
<div class="side-menu-group-sub-item-wrapper">
|
||||||
<a
|
<a
|
||||||
class="side-menu-group-item"
|
class="side-menu-group-item"
|
||||||
(click)="closeSideMenu(); focusSearchBox()"
|
(click)="expandShelf(); closeSideMenu(); focusSearchBox()"
|
||||||
*ngIf="pickUpShelfInRoutePath$ | async; let pickUpShelfInNavigation"
|
*ngIf="pickUpShelfInRoutePath$ | async; let pickUpShelfInNavigation"
|
||||||
[routerLink]="pickUpShelfInNavigation.path"
|
[routerLink]="pickUpShelfInNavigation.path"
|
||||||
[queryParams]="pickUpShelfInNavigation.queryParams"
|
[queryParams]="pickUpShelfInNavigation.queryParams"
|
||||||
@@ -154,14 +154,14 @@
|
|||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
class="side-menu-group-arrow"
|
class="side-menu-group-arrow"
|
||||||
[class.side-menu-item-rotate]="goodsInExpanded"
|
[class.side-menu-item-rotate]="shelfExpanded"
|
||||||
(click)="$event.stopPropagation(); $event.preventDefault(); goodsInExpanded = !goodsInExpanded"
|
(click)="$event.stopPropagation(); $event.preventDefault(); shelfExpanded = !shelfExpanded"
|
||||||
>
|
>
|
||||||
<shared-icon icon="keyboard-arrow-down"></shared-icon>
|
<shared-icon icon="keyboard-arrow-down"></shared-icon>
|
||||||
</button>
|
</button>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="side-menu-group-sub-items" [class.hidden]="!goodsInExpanded">
|
<div class="side-menu-group-sub-items" [class.hidden]="!shelfExpanded">
|
||||||
<a
|
<a
|
||||||
class="side-menu-group-item"
|
class="side-menu-group-item"
|
||||||
*ngIf="pickUpShelfInListRoutePath$ | async; let pickUpShelfInListNavigation"
|
*ngIf="pickUpShelfInListRoutePath$ | async; let pickUpShelfInListNavigation"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
|
import { Component, ChangeDetectionStrategy, Inject, ChangeDetectorRef } from '@angular/core';
|
||||||
import { AuthModule, AuthService } from '@core/auth';
|
import { AuthModule, AuthService } from '@core/auth';
|
||||||
import { StockService } from '@swagger/wws';
|
import { StockService } from '@swagger/wws';
|
||||||
import { first, map, retry, switchMap, take } from 'rxjs/operators';
|
import { first, map, retry, switchMap, take } from 'rxjs/operators';
|
||||||
@@ -136,8 +136,8 @@ export class ShellSideMenuComponent {
|
|||||||
queryParams: {},
|
queryParams: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
goodsInExpanded: boolean;
|
shelfExpanded: boolean = false;
|
||||||
customerExpanded: boolean;
|
customerExpanded: boolean = false;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private _shellService: ShellService,
|
private _shellService: ShellService,
|
||||||
@@ -155,9 +155,20 @@ export class ShellSideMenuComponent {
|
|||||||
private _customerCreateNavigation: CustomerCreateNavigation,
|
private _customerCreateNavigation: CustomerCreateNavigation,
|
||||||
private _pickUpShelfOutNavigation: PickUpShelfOutNavigationService,
|
private _pickUpShelfOutNavigation: PickUpShelfOutNavigationService,
|
||||||
private _pickUpShelfInNavigation: PickupShelfInNavigationService,
|
private _pickUpShelfInNavigation: PickupShelfInNavigationService,
|
||||||
|
private _cdr: ChangeDetectorRef,
|
||||||
@Inject(DOCUMENT) private readonly _document: Document
|
@Inject(DOCUMENT) private readonly _document: Document
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
|
expandCustomer() {
|
||||||
|
this.customerExpanded = true;
|
||||||
|
this._cdr.markForCheck();
|
||||||
|
}
|
||||||
|
|
||||||
|
expandShelf() {
|
||||||
|
this.shelfExpanded = true;
|
||||||
|
this._cdr.markForCheck();
|
||||||
|
}
|
||||||
|
|
||||||
getLastNavigationByProcessId(id: number, fallback?: { path: string[]; queryParams: any }) {
|
getLastNavigationByProcessId(id: number, fallback?: { path: string[]; queryParams: any }) {
|
||||||
return this._breadcrumbService.getBreadcrumbByKey$(id)?.pipe(
|
return this._breadcrumbService.getBreadcrumbByKey$(id)?.pipe(
|
||||||
map((breadcrumbs) => {
|
map((breadcrumbs) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user