mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
Merged PR 1264: #3145 Updated Order Checkout Process
#3145 Updated Order Checkout Process
This commit is contained in:
committed by
Lorenz Hilpert
parent
24a008b20d
commit
68d331864d
@@ -751,8 +751,8 @@ export class CheckoutReviewComponent extends ComponentStore<CheckoutReviewCompon
|
||||
this.showOrderButtonSpinner = true;
|
||||
await this.domainCheckoutService.completeCheckout({ processId }).toPromise();
|
||||
this._orderCompleted.next();
|
||||
this.patchProcess();
|
||||
await this.router.navigate(['/kunde', this.applicationService.activatedProcessId, 'cart', 'summary']);
|
||||
this.applicationService.removeProcess(this.applicationService.activatedProcessId);
|
||||
} catch (error) {
|
||||
const response = error?.error;
|
||||
let message: string = response?.message ?? '';
|
||||
@@ -771,8 +771,8 @@ export class CheckoutReviewComponent extends ComponentStore<CheckoutReviewCompon
|
||||
|
||||
if (error.status === 409) {
|
||||
this._orderCompleted.next();
|
||||
this.patchProcess();
|
||||
await this.router.navigate(['/kunde', this.applicationService.activatedProcessId, 'cart', 'summary']);
|
||||
this.applicationService.removeProcess(this.applicationService.activatedProcessId);
|
||||
}
|
||||
} finally {
|
||||
this.showOrderButtonSpinner = false;
|
||||
@@ -780,4 +780,10 @@ export class CheckoutReviewComponent extends ComponentStore<CheckoutReviewCompon
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
patchProcess() {
|
||||
this.applicationService.patchProcess(this.applicationService.activatedProcessId, {
|
||||
type: 'cart-checkout',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
<ui-icon icon="cart" size="18px"></ui-icon>
|
||||
<span>{{ process?.data?.count || 0 }}</span>
|
||||
</button>
|
||||
<button *ngIf="process.type === 'cart-checkout'">
|
||||
<span class="font-bold ml-2 text-lg">Bestellbestätigung</span>
|
||||
</button>
|
||||
</ng-container>
|
||||
<button *ngIf="isActive && process.closeable" (click)="checkCloseProcess()" class="close">
|
||||
<ui-icon icon="close" size="16px"></ui-icon>
|
||||
|
||||
Reference in New Issue
Block a user