mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1289: #3212 Remission Stapel aktualisieren fix
#3212 Remission Stapel aktualisieren fix
This commit is contained in:
committed by
Lorenz Hilpert
parent
e228490812
commit
fa2838ea5c
@@ -169,15 +169,11 @@ export class RemissionListItemComponent implements OnDestroy {
|
||||
throw new Error('Item hat keinen passenden DTO Typ');
|
||||
}
|
||||
|
||||
this._store.removeItem(this.item);
|
||||
if (response && !!response?.item2) {
|
||||
response.item2.placementType = placementType;
|
||||
await this.addItem(response.item2);
|
||||
}
|
||||
|
||||
// Bei remittieren eines Stapels die StockInformation für alle anderen Stapel mit der selben EAN aktualisieren
|
||||
if (this.item.placementType === 'Stapel' && placementType !== 'Leistung') {
|
||||
const itemsByEan = await (await this._store.items$.pipe(first()).toPromise()).filter(
|
||||
if (placementType != 'Leistung') {
|
||||
const items = await this._store.items$.pipe(first()).toPromise();
|
||||
|
||||
const itemsByEan = items?.filter(
|
||||
(i) => i.dto.product.ean === this.item.dto.product.ean && i.dto.id !== this.item.dto.id && i.placementType === 'Stapel'
|
||||
);
|
||||
|
||||
@@ -187,6 +183,12 @@ export class RemissionListItemComponent implements OnDestroy {
|
||||
}
|
||||
}
|
||||
|
||||
this._store.removeItem(this.item);
|
||||
if (response && !!response?.item2) {
|
||||
response.item2.placementType = placementType;
|
||||
await this.addItem(response.item2);
|
||||
}
|
||||
|
||||
this._store.updateCache();
|
||||
} catch (err) {
|
||||
this._modal.open({
|
||||
|
||||
Reference in New Issue
Block a user