feat(back-end): fix order page
All checks were successful
Build, Test and Deploy / test-backend (push) Successful in 47s
Build, Test and Deploy / build-and-push (push) Successful in 25s
Build, Test and Deploy / deploy (push) Successful in 8s

This commit is contained in:
2026-02-27 20:22:18 +01:00
parent ed76b13e4c
commit 819e00e067
2 changed files with 15 additions and 4 deletions

View File

@@ -206,7 +206,13 @@ export class CheckoutComponent implements OnInit {
this.quoteService.createOrder(this.sessionId, orderRequest).subscribe({
next: (order) => {
this.router.navigate(['/order', order.id]);
const orderId = order?.id ?? order?.orderId;
if (!orderId) {
this.isSubmitting.set(false);
this.error = 'CHECKOUT.ERR_CREATE_ORDER';
return;
}
this.router.navigate(['/', this.languageService.selectedLang(), 'order', orderId]);
},
error: (err) => {
console.error('Order creation failed', err);