mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-31 09:37:15 +01:00
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:
committed by
Andreas Schickinger
parent
a598be069d
commit
b2b5456400
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user