mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1368: #3337 Hotfix E-Mail Adresse wird nur noch angehakt, wenn auch eine hinterlegt ist
#3337 E-Mail Adresse wird nur noch angehakt, wenn auch eine hinterlegt ist Related work items: #3337
This commit is contained in:
committed by
Lorenz Hilpert
parent
8cfb160989
commit
57bd8d4dd4
@@ -318,9 +318,22 @@ export class CheckoutReviewComponent extends ComponentStore<CheckoutReviewCompon
|
||||
const fb = this._fb;
|
||||
const notificationChannel = await this.notificationChannel$.pipe(first()).toPromise();
|
||||
const communicationDetails = await this.communicationDetails$.pipe(first()).toPromise();
|
||||
|
||||
let selectedNotificationChannel = 0;
|
||||
if ((notificationChannel & 1) === 1 && communicationDetails.email) {
|
||||
selectedNotificationChannel += 1;
|
||||
}
|
||||
if ((notificationChannel & 2) === 2 && communicationDetails.mobile) {
|
||||
selectedNotificationChannel += 2;
|
||||
}
|
||||
// #1967 Wenn E-Mail und SMS als NotificationChannel gesetzt sind, nur E-Mail anhaken
|
||||
if ((selectedNotificationChannel & 3) === 3) {
|
||||
selectedNotificationChannel = 1;
|
||||
}
|
||||
|
||||
this.control = fb.group({
|
||||
notificationChannel: new FormGroup({
|
||||
selected: new FormControl((notificationChannel & 3) === 3 || communicationDetails.email ? 1 : notificationChannel),
|
||||
selected: new FormControl(selectedNotificationChannel),
|
||||
email: new FormControl(communicationDetails ? communicationDetails.email : '', emailNotificationValidator),
|
||||
mobile: new FormControl(communicationDetails ? communicationDetails.mobile : '', mobileNotificationValidator),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user