From c9996976455b82ccb550b657b2229d6a8df47517 Mon Sep 17 00:00:00 2001 From: Lorenz Hilpert Date: Mon, 25 Jan 2021 13:39:42 +0100 Subject: [PATCH] #1323 Dialog um Hindernismeldung erweitern Co-authored-by: n.righi@paragon-data.de --- apps/domain/cart/src/lib/cart.service.ts | 2 +- .../customer-details.component.ts | 6 +-- .../product-checkout.component.html | 9 ++-- .../product-checkout.component.scss | 13 +++-- .../product-checkout.component.ts | 44 +++++++++++++--- .../src/app/refact-imp/cart.refact-imp.ts | 50 ++++++++++++------- .../src/app/refact-imp/checkout.refact-imp.ts | 19 +++++-- .../ui/modal/src/lib/debug-modal.component.ts | 2 +- tailwind.config.js | 1 + 9 files changed, 108 insertions(+), 38 deletions(-) diff --git a/apps/domain/cart/src/lib/cart.service.ts b/apps/domain/cart/src/lib/cart.service.ts index b074ed31a..9443de450 100644 --- a/apps/domain/cart/src/lib/cart.service.ts +++ b/apps/domain/cart/src/lib/cart.service.ts @@ -13,7 +13,7 @@ export class CartService { throw new Error('Not Implemented'); } - getCardId(processId: number): Observable { + getCartId(processId: number): Observable { throw new Error('Not Implemented'); } diff --git a/apps/page/customer/src/lib/customer-details/customer-details.component.ts b/apps/page/customer/src/lib/customer-details/customer-details.component.ts index dd5551945..06f23f6c7 100644 --- a/apps/page/customer/src/lib/customer-details/customer-details.component.ts +++ b/apps/page/customer/src/lib/customer-details/customer-details.component.ts @@ -133,9 +133,9 @@ export class CustomerDetailsComponent implements OnInit { this.process.updateName(this.application.activatedProcessId, customer.lastName); // Set Customer For Process - const customerAdded: any = await this.checkoutService.setCustomer(this.application.activatedProcessId, customer); - if (!customerAdded.ok) { - this.modal.open({ content: UiDebugModalComponent, data: customerAdded }); + const canAdd = await this.checkoutService.setCustomer(this.application.activatedProcessId, customer); + + if (!canAdd) { return; } diff --git a/apps/sales/src/app/modules/product/components/product-checkout/product-checkout.component.html b/apps/sales/src/app/modules/product/components/product-checkout/product-checkout.component.html index 712e1d464..439089469 100644 --- a/apps/sales/src/app/modules/product/components/product-checkout/product-checkout.component.html +++ b/apps/sales/src/app/modules/product/components/product-checkout/product-checkout.component.html @@ -98,7 +98,8 @@