mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 2063: fix(domain-checkout): After refreshing cart availabilities always keep previo...
fix(domain-checkout): After refreshing cart availabilities always keep previous selected price from purchasing options modal Ref: #5488
This commit is contained in:
committed by
Lorenz Hilpert
parent
db4f30af86
commit
0670dbfdb1
@@ -1251,7 +1251,12 @@ export class DomainCheckoutService {
|
|||||||
|
|
||||||
await this.updateItemInShoppingCart({
|
await this.updateItemInShoppingCart({
|
||||||
processId,
|
processId,
|
||||||
update: { availability },
|
update: {
|
||||||
|
availability: {
|
||||||
|
...availability,
|
||||||
|
price: item?.availability?.price ?? availability?.price,
|
||||||
|
}, // #5488 After Refreshing Availabilities in Cart make sure to keep the original selected price from purchasing options modal
|
||||||
|
},
|
||||||
shoppingCartItemId: item.id,
|
shoppingCartItemId: item.id,
|
||||||
}).toPromise();
|
}).toPromise();
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
<page-shopping-cart-item
|
<page-shopping-cart-item
|
||||||
(changeItem)="changeItem($event)"
|
(changeItem)="showPurchasingListModal([$event.shoppingCartItem])"
|
||||||
(changeDummyItem)="changeDummyItem($event)"
|
(changeDummyItem)="changeDummyItem($event)"
|
||||||
(changeQuantity)="updateItemQuantity($event)"
|
(changeQuantity)="updateItemQuantity($event)"
|
||||||
[quantityError]="
|
[quantityError]="
|
||||||
|
|||||||
@@ -388,26 +388,6 @@ export class CheckoutReviewComponent
|
|||||||
this.openDummyModal({ data: shoppingCartItem, changeDataFromCart: true });
|
this.openDummyModal({ data: shoppingCartItem, changeDataFromCart: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
async changeItem({
|
|
||||||
shoppingCartItem,
|
|
||||||
}: {
|
|
||||||
shoppingCartItem: ShoppingCartItemDTO;
|
|
||||||
}) {
|
|
||||||
const shoppingCart = await firstValueFrom(this.shoppingCart$);
|
|
||||||
const modalRef = await this._purchaseOptionsModalService.open({
|
|
||||||
tabId: this.applicationService.activatedProcessId,
|
|
||||||
shoppingCartId: shoppingCart.id,
|
|
||||||
items: [shoppingCartItem],
|
|
||||||
type: 'update',
|
|
||||||
});
|
|
||||||
|
|
||||||
await firstValueFrom(modalRef.afterClosed$);
|
|
||||||
// Reload Shopping Cart after modal is closed to get updated items
|
|
||||||
this.#checkoutService.reloadShoppingCart({
|
|
||||||
processId: this.applicationService.activatedProcessId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async openPrintModal() {
|
async openPrintModal() {
|
||||||
const shoppingCart = await this.shoppingCart$.pipe(first()).toPromise();
|
const shoppingCart = await this.shoppingCart$.pipe(first()).toPromise();
|
||||||
this.uiModal.open({
|
this.uiModal.open({
|
||||||
|
|||||||
Reference in New Issue
Block a user