mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 505: Warenausgabe - bugfix bei leeren Actions und Toggle Button ausblenden
Warenausgabe - bugfix bei leeren Actions und Toggle Button ausblenden Related work items: #1209
This commit is contained in:
@@ -39,7 +39,11 @@
|
||||
<div class="detail">
|
||||
<div class="name">Status</div>
|
||||
<div class="value">
|
||||
<button class="isa-btn isa-p-0 isa-btn-block isa-text-right isa-white-space-nowrap" (click)="statusDropdown.toggle()">
|
||||
<button
|
||||
*ngIf="processingKeys && processingKeys.size > 0"
|
||||
class="isa-btn isa-p-0 isa-btn-block isa-text-right isa-white-space-nowrap"
|
||||
(click)="statusDropdown.toggle()"
|
||||
>
|
||||
<lib-icon
|
||||
class="isa-mr-8"
|
||||
[ngClass]="icon"
|
||||
@@ -56,6 +60,9 @@
|
||||
[height]="'16px'"
|
||||
></lib-icon>
|
||||
</button>
|
||||
<div *ngIf="processingKeys && processingKeys.size === 0" class="value align-right">
|
||||
<strong>{{ orderDetails?.processingStatus | processingStatus }}</strong>
|
||||
</div>
|
||||
<app-ui-dropdown #statusDropdown [value]="orderDetails?.processingStatus" (valueChange)="changeProcessingStatus.emit($event)">
|
||||
<ng-container *ngFor="let status of processingKeys | keyvalue | processingStatusOptionsKeyValuePipe">
|
||||
<button
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
font-weight: $font-weight-bold;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
.transistion {
|
||||
|
||||
@@ -14,7 +14,10 @@ export class ShelfOrderDetailsCardComponent {
|
||||
minDate = this.dateAdapter.addCalendarDays(new Date(), -1);
|
||||
|
||||
get processingKeys() {
|
||||
return this.orderDetailsService.getAvailableProcessStatusRefact(this.actions.filter((a) => a.enabled === false));
|
||||
if (this.actions && this.actions.length > 0) {
|
||||
return this.orderDetailsService.getAvailableProcessStatusRefact(this.actions.filter((a) => a.enabled === false));
|
||||
}
|
||||
return new Map<number, { value: string; disabled: boolean }>();
|
||||
}
|
||||
|
||||
get actions(): KeyValueDTOOfStringAndString[] {
|
||||
|
||||
@@ -129,7 +129,9 @@ export class ShelfOrderDetailsComponent {
|
||||
}
|
||||
|
||||
filterEnabledActions(actions: KeyValueDTOOfStringAndString[]): KeyValueDTOOfStringAndString[] {
|
||||
return actions.filter((a) => !a.hasOwnProperty('enabled'));
|
||||
if (actions && actions.length > 0) {
|
||||
return actions.filter((a) => !a.hasOwnProperty('enabled'));
|
||||
}
|
||||
}
|
||||
|
||||
async changeProcessingStatus(
|
||||
|
||||
Reference in New Issue
Block a user