fix(catalog): refresh after expired cart replacement

This commit is contained in:
2026-08-27 09:54:21 -03:00
parent 679342ec8d
commit a825b3693b
8 changed files with 27 additions and 8 deletions

View File

@@ -180,7 +180,7 @@ export class CategoryItemsPageComponent {
this.toastService.danger(message);
if (error instanceof HttpErrorResponse && isExpiredStockReservationResponse(error.error)) {
this.cartService.loadCart().subscribe({
this.cartService.loadCart(true).subscribe({
error: (refreshError) => console.error('Error refreshing expired cart', refreshError),
});
}

View File

@@ -326,7 +326,7 @@ export class CheckoutPageComponent implements OnInit, OnDestroy {
if (this.isStockReservationExpiredError(error)) {
this.showRequestError(error, 'La reserva de stock venció.');
this.cartService.loadCart().subscribe({
this.cartService.loadCart(true).subscribe({
error: (refreshError) => console.error('Error refreshing expired cart', refreshError),
});
this.createdPurchaseId.set(null);

View File

@@ -212,7 +212,7 @@ export class SearchPageComponent {
this.toastService.danger(message);
if (error instanceof HttpErrorResponse && isExpiredStockReservationResponse(error.error)) {
this.cartService.loadCart().subscribe({
this.cartService.loadCart(true).subscribe({
error: (refreshError) => console.error('Error refreshing expired cart', refreshError),
});
}

View File

@@ -224,7 +224,7 @@ export class StoreHomePageComponent implements OnInit, OnDestroy {
if (error instanceof HttpErrorResponse && isExpiredStockReservationResponse(error.error)) {
this.toastService.danger(error.error.message);
this.cartService.loadCart().subscribe({
this.cartService.loadCart(true).subscribe({
error: (refreshError) => console.error('Error refreshing expired cart', refreshError),
});
return;