mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
[ACS-3256] Add trigger / "when" section to rule details & edit rule dialog (#2603)
* Add triggers section with checkboxes * Add some unit tests * Changed Input property of rule details so that it takes a changeable value rather than just an initial value * Made separate component with control value accessor for triggers * Linting * Change trigger values to lowercase to be in sync with the API * Minor styling changes and add new rule button to manage rules screen * Add option for unknown field to be selected * Add read only to nested composite and simple conditions * Added unknown field tests for simple condition * Linting * Change how the triggers component displays when disabled
This commit is contained in:
@@ -57,6 +57,15 @@ export class RuleCompositeConditionUiComponent implements ControlValueAccessor,
|
||||
simpleConditions: new FormArray([])
|
||||
});
|
||||
|
||||
private _readOnly = false;
|
||||
@Input()
|
||||
get readOnly(): boolean {
|
||||
return this._readOnly;
|
||||
}
|
||||
set readOnly(isReadOnly: boolean) {
|
||||
this.setDisabledState(isReadOnly);
|
||||
}
|
||||
|
||||
private formSubscription = this.form.valueChanges.subscribe((value) => {
|
||||
this.onChange(value);
|
||||
this.onTouch();
|
||||
@@ -81,11 +90,6 @@ export class RuleCompositeConditionUiComponent implements ControlValueAccessor,
|
||||
return this.conditionFormControls.length === 0;
|
||||
}
|
||||
|
||||
private _readOnly = false;
|
||||
get readOnly(): boolean {
|
||||
return this._readOnly;
|
||||
}
|
||||
|
||||
onChange: (condition: RuleCompositeCondition) => void = () => undefined;
|
||||
onTouch: () => void = () => undefined;
|
||||
|
||||
|
Reference in New Issue
Block a user