mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
#835 Fix Disabled Guest Button In Create Customer Component
This commit is contained in:
@@ -132,8 +132,8 @@ export class CreateCustomerCardComponent implements OnInit, OnDestroy {
|
||||
cartHasItemsForTakeNow = false;
|
||||
cartHasItemsForDownload = false;
|
||||
guestChecked = false;
|
||||
onlineChecked = false;
|
||||
guestDisabled = true;
|
||||
onlineChecked = true;
|
||||
guestDisabled = false;
|
||||
customerCardChecked = false;
|
||||
deliveryAndGuestOrOnline = false;
|
||||
pickUpOrTakeNowAndOnline = false;
|
||||
@@ -261,24 +261,30 @@ export class CreateCustomerCardComponent implements OnInit, OnDestroy {
|
||||
this.cartHasItemsForTakeNow = cartHasItemsFor(DeliveryOption.TAKE_NOW);
|
||||
this.cartHasItemsForDownload = cartHasItemsFor(DeliveryOption.DOWNLOAD);
|
||||
|
||||
(this.cartHasItemsForDownload || this.cartHasItemsForDelivery).ifTrue(
|
||||
() => {
|
||||
this.onlineChecked = true;
|
||||
this.guestChecked = false;
|
||||
this.flagsSetByConditions = true;
|
||||
this.cartHasItemsForDownload.ifTrue(() => {
|
||||
this.onlineChecked = true;
|
||||
this.guestDisabled = true;
|
||||
this.guestChecked = false;
|
||||
this.flagsSetByConditions = true;
|
||||
|
||||
if (this.cartHasItemsForDownload) {
|
||||
this.headerText =
|
||||
'Um Ihnen das ebook bereitstellen zu können, brauchen Sie ein Onlinekonto bei Hugendubel. Wir richten es Ihnen gerne sofort ein.';
|
||||
}
|
||||
if (this.cartHasItemsForDownload) {
|
||||
this.headerText =
|
||||
'Um Ihnen das ebook bereitstellen zu können, brauchen Sie ein Onlinekonto bei Hugendubel. Wir richten es Ihnen gerne sofort ein.';
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
if (!this.cartHasItemsForDownload) {
|
||||
this.guestDisabled = false;
|
||||
this.flagsSetByConditions = true;
|
||||
}
|
||||
|
||||
(
|
||||
this.cartHasItemsForDelivery &&
|
||||
!this.cartHasItemsForDownload &&
|
||||
!this.onlineChecked
|
||||
).ifTrue(this.guestCheckboxInitialization);
|
||||
|
||||
this.detectChanges();
|
||||
};
|
||||
|
||||
guestCheckboxInitialization = () => {
|
||||
|
||||
Reference in New Issue
Block a user