Admin template Editor. Temporary patch. Make value unrequired in visibility rules.
This commit is contained in:
parent
ae2168b2d7
commit
9ccae4d2c7
|
@ -23,7 +23,7 @@ export class RuleEditorModel extends BaseFormModel {
|
||||||
// sourceField: [this.sourceField],
|
// sourceField: [this.sourceField],
|
||||||
target: [{ value: this.target, disabled: (disabled && !skipDisable.includes('RuleEditorModel.target')) }, [Validators.required]],
|
target: [{ value: this.target, disabled: (disabled && !skipDisable.includes('RuleEditorModel.target')) }, [Validators.required]],
|
||||||
ruleStyle: [{ value: this.ruleStyle, disabled: (disabled && !skipDisable.includes('RuleEditorModel.ruleStyle')) }],
|
ruleStyle: [{ value: this.ruleStyle, disabled: (disabled && !skipDisable.includes('RuleEditorModel.ruleStyle')) }],
|
||||||
value: [{ value: this.value, disabled: (disabled && !skipDisable.includes('RuleEditorModel.value')) }, [Validators.required]],
|
value: [{ value: this.value, disabled: (disabled && !skipDisable.includes('RuleEditorModel.value')) }],
|
||||||
ruleType: [{ value: this.ruleType, disabled: (disabled && !skipDisable.includes('RuleEditorModel.ruleType')) }],
|
ruleType: [{ value: this.ruleType, disabled: (disabled && !skipDisable.includes('RuleEditorModel.ruleType')) }],
|
||||||
valueType: [{ value: this.valueType, disabled: (disabled && !skipDisable.includes('RuleEditorModel.valueType')) }]
|
valueType: [{ value: this.valueType, disabled: (disabled && !skipDisable.includes('RuleEditorModel.valueType')) }]
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ChangeDetectorRef, Component, Input, OnChanges, OnInit } from '@angular/core';
|
import { Component, Input, OnChanges, OnInit } from '@angular/core';
|
||||||
import { AbstractControl, FormArray, FormControl, FormGroup, ValidationErrors, ValidatorFn, Validators } from '@angular/forms';
|
import { FormArray, FormControl, FormGroup} from '@angular/forms';
|
||||||
import { FieldEditorModel } from '../../../admin/field-editor-model';
|
import { FieldEditorModel } from '../../../admin/field-editor-model';
|
||||||
import { Guid } from '@common/types/guid';
|
import { Guid } from '@common/types/guid';
|
||||||
import { RuleEditorModel } from '../../../admin/rule-editor-model';
|
import { RuleEditorModel } from '../../../admin/rule-editor-model';
|
||||||
|
@ -12,26 +12,7 @@ import { ConfirmationDialogComponent } from '@common/modules/confirmation-dialog
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { ViewStyleType } from '../field/view-style-enum';
|
import { ViewStyleType } from '../field/view-style-enum';
|
||||||
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
import { EnumUtils } from '@app/core/services/utilities/enum-utils.service';
|
||||||
import { BooleanDecisionFieldDataEditorModel } from '../../../admin/field-data/boolean-decision-field-data-editor-model';
|
|
||||||
import { CheckBoxFieldDataEditorModel } from '../../../admin/field-data/check-box-field-data-editor-model';
|
|
||||||
import { WordListFieldDataEditorModel } from '../../../admin/field-data/word-list-field-data-editor-model';
|
|
||||||
import { AutoCompleteFieldDataEditorModel } from '../../../admin/field-data/auto-complete-field-data-editor-model';
|
|
||||||
import { ResearchersAutoCompleteFieldDataEditorModel } from '../../../admin/field-data/researchers-auto-complete-field-data-editor-model';
|
|
||||||
import { FreeTextFieldDataEditorModel } from '../../../admin/field-data/free-text-field-data-editor-model';
|
|
||||||
import { RadioBoxFieldDataEditorModel } from '../../../admin/field-data/radio-box-field-data-editor-model';
|
|
||||||
import { TextAreaFieldDataEditorModel } from '../../../admin/field-data/text-area-field-data-editor-model';
|
|
||||||
import { DatePickerDataEditorModel } from '../../../admin/field-data/date-picker-data-editor-models';
|
|
||||||
import { ExternalDatasetsDataEditorModel } from '../../../admin/field-data/external-datasets-data-editor-models';
|
|
||||||
import { DataRepositoriesDataEditorModel } from '../../../admin/field-data/data-repositories-data-editor-models';
|
|
||||||
import { RegistriesDataEditorModel } from '../../../admin/field-data/registries-data-editor-models';
|
|
||||||
import { ServicesDataEditorModel } from '../../../admin/field-data/services-data-editor-models';
|
|
||||||
import { TagsDataEditorModel } from '../../../admin/field-data/tags-data-editor-models';
|
|
||||||
import { DatasetsAutoCompleteFieldDataEditorModel } from '../../../admin/field-data/datasets-autocomplete-field-data-editor-mode';
|
|
||||||
import { DatasetIdentifierDataEditorModel } from '../../../admin/field-data/dataset-identifier-data-editor-models';
|
|
||||||
import { CurrencyDataEditorModel } from '../../../admin/field-data/currency-data-editor-models';
|
|
||||||
import { ValidationDataEditorModel } from '../../../admin/field-data/validation-data-editor-models';
|
|
||||||
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
|
import { DatasetProfileService } from '@app/core/services/dataset-profile/dataset-profile.service';
|
||||||
import { OrganizationsDataEditorModel } from '../../../admin/field-data/organizations-data-editor-models';
|
|
||||||
import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
|
import { EditorCustomValidators } from '../../custom-validators/editor-custom-validators';
|
||||||
import { Field, FieldSet } from '@app/core/model/admin/dataset-profile/dataset-profile';
|
import { Field, FieldSet } from '@app/core/model/admin/dataset-profile/dataset-profile';
|
||||||
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
|
import { DatasetProfileComboBoxType } from '@app/core/common/enum/dataset-profile-combo-box-type';
|
||||||
|
@ -40,8 +21,7 @@ import { AutoCompleteFieldData, BooleanDecisionFieldData, CheckBoxFieldData, Cur
|
||||||
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
|
import { CompositeField } from '@app/core/model/dataset-profile-definition/composite-field';
|
||||||
import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definition/field';
|
import {Field as FieldDefinition} from '@app/core/model/dataset-profile-definition/field';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { debounce, debounceTime } from 'rxjs/operators';
|
import { debounceTime } from 'rxjs/operators';
|
||||||
import { setUncaughtExceptionCaptureCallback } from 'process';
|
|
||||||
import { GENERAL_ANIMATIONS } from '../../animations/animations';
|
import { GENERAL_ANIMATIONS } from '../../animations/animations';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -390,6 +390,8 @@ export class DatasetProfileEditorFieldComponent extends BaseComponent implements
|
||||||
case this.viewTypeEnum.Select:
|
case this.viewTypeEnum.Select:
|
||||||
case this.viewTypeEnum.CheckBox:
|
case this.viewTypeEnum.CheckBox:
|
||||||
case this.viewTypeEnum.DatePicker:
|
case this.viewTypeEnum.DatePicker:
|
||||||
|
case this.viewTypeEnum.DataRepositories://TODO FURTHER NOTICE
|
||||||
|
case this.viewTypeEnum.ExternalDatasets://TODO FURTHER NOTICE
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue