Merged PR 1403: #3518 Checkbox ist nicht abwählbar bei einer checkbox

#3518 Checkbox ist nicht abwählbar bei einer checkbox
This commit is contained in:
Lorenz Hilpert
2022-10-14 10:08:29 +00:00
committed by Andreas Schickinger
parent a598be069d
commit b2b5456400
2 changed files with 3 additions and 2 deletions

View File

@@ -789,7 +789,7 @@ export class DomainCheckoutService {
};
res.create?.options?.values?.forEach((option) => {
setableTypes[option.value] = true;
setableTypes[option.value] = option.enabled !== false;
});
// if (Object.keys(res.filter).length === 0) {

View File

@@ -196,6 +196,7 @@ export class CustomerTypeSelectorComponent extends ComponentStore<CustomerTypeSe
setValue(value: { p4mUser?: boolean; customerType?: string } | string) {
const initial = { p4mUser: this.p4mUser, customerType: this.customerType };
if (isString(value)) {
this.value = value;
} else {
@@ -224,7 +225,7 @@ export class CustomerTypeSelectorComponent extends ComponentStore<CustomerTypeSe
} else {
// wenn customerType nicht gesetzt wird und p4mUser false ist,
// dann customerType auf den ersten verfügbaren setzen der nicht mit dem aktuellen customerType übereinstimmt.
this.customerType = first(this.enabledOptions.filter((o) => o.value !== this.customerType))?.value;
this.customerType = first(this.enabledOptions.filter((o) => o.value !== this.customerType))?.value ?? this.customerType;
}
}