Merged PR 1191: #3030 AHF Zubuchen - letzter Zusatz wird übernommen

#3030 AHF Zubuchen - letzter Zusatz wird übernommen

Related work items: #3030
This commit is contained in:
Andreas Schickinger
2022-04-21 13:35:28 +00:00
committed by Nino Righi
parent 7e6f5a7837
commit ee02e89fa7
2 changed files with 6 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
class="cta-action shadow-action"
[class.cta-action-primary]="action.selected"
[class.cta-action-secondary]="!action.selected"
(click)="handleAction(action, { compartmentCode: latestCompartmentCode })"
(click)="handleAction(action, { compartmentCode: latestCompartmentCode, compartmentInfo: latestCompartmentInfo })"
>
<ui-spinner [show]="(changeActionLoader$ | async) === action.command"
>{{ latestCompartmentCode$ | async | addToPreviousCompartmentCodeLabelPipe }} zubuchen</ui-spinner

View File

@@ -133,7 +133,10 @@ export class SharedGoodsInOutOrderDetailsComponent extends SharedGoodsInOutOrder
}
}
async handleAction(action: KeyValueDTOOfStringAndString, { compartmentCode }: { compartmentCode?: string } = {}) {
async handleAction(
action: KeyValueDTOOfStringAndString,
{ compartmentCode, compartmentInfo }: { compartmentCode?: string; compartmentInfo?: string } = {}
) {
if (action.command.includes('FETCHED_PARTIAL')) {
this.patchState({ fetchPartial: true });
return;
@@ -144,7 +147,7 @@ export class SharedGoodsInOutOrderDetailsComponent extends SharedGoodsInOutOrder
let commandData: OrderItemsContext = {
items: this.getitemsToUpdate(),
compartmentInfo: this.compartmentInfo,
compartmentInfo: compartmentInfo || this.compartmentInfo,
compartmentCode,
itemQuantity: this.getItemQuantityMap(),
receipts: this.receipts,