Merged PR 1183: #3030 AHF Zubuchen mit Zusatz

#3030 AHF Zubuchen mit Zusatz

Related work items: #3030
This commit is contained in:
Andreas Schickinger
2022-04-19 13:32:04 +00:00
committed by Lorenz Hilpert
parent 9052fe25db
commit 25d5f183c5
2 changed files with 9 additions and 7 deletions

View File

@@ -11,7 +11,7 @@
<div class="goods-in-out-order-details-action-wrapper">
<button
[disabled]="(changeActionDisabled$ | async) || (addToPreviousCompartmentActionDisabled$ | async)"
[disabled]="changeActionDisabled$ | async"
*ngIf="addToPreviousCompartmentAction$ | async; let action"
class="cta-action shadow-action"
[class.cta-action-primary]="action.selected"

View File

@@ -133,8 +133,14 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
// Zubuchen von Bezahlte und unbezahlte Bestellungen nicht möglich
// Zubuchen bei Pay&Collect nur innerhalb der gleichen Bestellung möglich
if (
coverItems.find((i) => i.compartmentCode === latestCompartmentCode && i.orderNumber === orderItem.orderNumber)?.features
?.paid === orderItem?.features?.paid
coverItems.find((i) => {
let compartmentCode = i.compartmentCode;
if (!!i.compartmentInfo) {
compartmentCode = `${i.compartmentCode}_${i.compartmentInfo}`;
}
return compartmentCode === latestCompartmentCode && i.orderNumber === orderItem.orderNumber;
})?.features?.paid === orderItem?.features?.paid
) {
return orderItem.actions.find((a) => a.key === '128');
}
@@ -147,10 +153,6 @@ export abstract class SharedGoodsInOutOrderDetailsStore extends ComponentStore<S
})
);
addToPreviousCompartmentActionDisabled$ = combineLatest([this.compartmentInfo$, this.latestCompartmentInfo$]).pipe(
map(([compartmentInfo, latestCompartmentInfo]) => compartmentInfo !== latestCompartmentInfo)
);
constructor() {
super({
orderItems: [],