#1407 Weiter einkaufen Action

This commit is contained in:
Andreas Schickinger
2021-02-23 15:22:29 +01:00
parent 0348018575
commit 88cb1d9473
2 changed files with 6 additions and 7 deletions

View File

@@ -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>

View File

@@ -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);
}