mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#1407 Weiter einkaufen Action
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="actions" *ngIf="option$ | async; let option">
|
||||
<button class="cta-continue-shopping">Weiter einkaufen</button>
|
||||
<button class="cta-continue-shopping" [disabled]="(canAdd$ | async) === false" (click)="continue(true)">Weiter einkaufen</button>
|
||||
<button *ngIf="option === 'take-away'" class="cta-continue" [disabled]="(canAdd$ | async) === false" (click)="continue()">
|
||||
Reservieren
|
||||
</button>
|
||||
|
||||
@@ -49,12 +49,7 @@ export class PurchasingOptionsModalComponent {
|
||||
this.purchasingOptionsModalStore.setBranchNo(this.modalRef.data.branchNo);
|
||||
}
|
||||
|
||||
continueShopping() {
|
||||
this.router.navigate(['/product', 'search']);
|
||||
this.modalRef.close();
|
||||
}
|
||||
|
||||
async continue() {
|
||||
async continue(navigate: boolean = false) {
|
||||
try {
|
||||
const processId = await this.purchasingOptionsModalStore.selectProcessId.pipe(first()).toPromise();
|
||||
const item = await this.item$.pipe(first()).toPromise();
|
||||
@@ -118,6 +113,10 @@ export class PurchasingOptionsModalComponent {
|
||||
}
|
||||
|
||||
this.modalRef.close();
|
||||
|
||||
if (navigate) {
|
||||
this.router.navigate(['/product', 'search']);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('PurchasingOptionsModalComponent.continue', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user