Merged PR 1398: #3515 Added Newsletter Text to webshop and fix navigation

#3515 Added Newsletter Text to webshop and fix navigation
This commit is contained in:
Lorenz Hilpert
2022-10-13 13:05:56 +00:00
committed by Andreas Schickinger
parent 68a2eab425
commit d713c787e6
3 changed files with 11 additions and 25 deletions

View File

@@ -25,6 +25,12 @@
>
</app-name-form-block>
<p class="info">
Wir werden Ihnen Werbung zu ähnlichen Produkten oder Dienstleistungen aus unserem Sortiment per E-Mail zusenden. Sie können der
Verwendung Ihrer Daten jederzeit z.B. mittels der in den E-Mails enthaltenen Abmeldelinks widersprechen, ohne dass hierfür andere als
die Übermittlungskosten nach den Basistarifen entstehen.
</p>
<app-email-form-block
#email
[tabIndexStart]="name.tabIndexEnd + 1"

View File

@@ -2,6 +2,7 @@ import { Component, ChangeDetectionStrategy } from '@angular/core';
import { ApplicationService } from '@core/application';
import { CustomerDTO } from '@swagger/crm';
import { UiModalRef } from '@ui/modal';
import { encodeFormData, mapCustomerDtoToCustomerCreateFormData } from '../../create-customer';
@Component({
selector: 'page-cant-select-guest-modal',
@@ -13,26 +14,8 @@ export class CantSelectGuestModalComponent {
constructor(public ref: UiModalRef<any, CustomerDTO>, public readonly applicationService: ApplicationService) {}
createCustomerDataQuery(customer: CustomerDTO): { [key: string]: string } {
const query: { [key: string]: string } = {
gender: String(customer.gender),
title: customer?.title,
firstName: customer?.firstName,
lastName: customer?.lastName,
email: customer?.communicationDetails?.email,
phone: customer?.communicationDetails?.phone,
mobile: customer?.communicationDetails?.mobile,
street: customer?.address?.street,
streetNumber: customer?.address?.streetNumber,
zipCode: customer?.address?.zipCode,
city: customer?.address?.city,
country: customer?.address?.country,
info: customer?.address?.info,
name: customer?.organisation?.name,
department: customer?.organisation?.department,
vatId: customer?.organisation?.vatId,
dateOfBirth: customer?.dateOfBirth,
};
const formData = encodeFormData(mapCustomerDtoToCustomerCreateFormData(customer));
return query;
return { formData };
}
}

View File

@@ -117,10 +117,6 @@ export class CustomerTypeSelectorComponent extends ComponentStore<CustomerTypeSe
});
}
if (!result.some((o) => o.value === customerType)) {
this.customerType = first(result)?.value;
}
if (customerType === 'b2b' && this.p4mUser) {
this.p4mUser = false;
}
@@ -216,7 +212,8 @@ export class CustomerTypeSelectorComponent extends ComponentStore<CustomerTypeSe
this.customerType = 'webshop';
} else {
this.p4mUser = false;
this.customerType = first(this.enabledOptions)?.value;
const includesGuest = this.enabledOptions.some((o) => o.value === 'guest');
this.customerType = includesGuest ? 'guest' : first(this.enabledOptions)?.value;
}
} else {
// wenn customerType nicht gesetzt wird und p4mUser false ist,