|
|
|
@ -14,7 +14,7 @@ |
|
|
|
/// limitations under the License.
|
|
|
|
///
|
|
|
|
|
|
|
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild } from '@angular/core'; |
|
|
|
import { Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChange, SimpleChanges, ViewChild } from '@angular/core'; |
|
|
|
import { PageComponent } from '@shared/components/page.component'; |
|
|
|
import { Store } from '@ngrx/store'; |
|
|
|
import { AppState } from '@core/core.state'; |
|
|
|
@ -119,6 +119,17 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.disableControl(changes.isEdit, changes.isReadOnly); |
|
|
|
} |
|
|
|
|
|
|
|
private disableControl(isEdit: SimpleChange, isReadOnly: SimpleChange) { |
|
|
|
if (isEdit.currentValue !== isEdit.previousValue || isReadOnly.currentValue !== isReadOnly.previousValue) { |
|
|
|
if (!isEdit.currentValue || isReadOnly.currentValue) { |
|
|
|
this.ruleNodeFormGroup.disable({emitEvent: false}); |
|
|
|
} else { |
|
|
|
this.ruleNodeFormGroup.enable({emitEvent: false}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
validate() { |
|
|
|
|