Profile EditorFieldDefaultValue
Finalize Dialog DMP Fix Style Put Error On Required Fields Fix Parse DefaulValue false!="false"
This commit is contained in:
parent
17ce0ef455
commit
6620c6625a
|
@ -2,9 +2,11 @@
|
|||
<!-- BooleanDecision -->
|
||||
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.BooleanDecision">
|
||||
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required">
|
||||
<mat-option value="true">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' |
|
||||
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' |
|
||||
translate}}</mat-option>
|
||||
<mat-option value="false">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.NO' |
|
||||
<mat-option [value]="true">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.YES' |
|
||||
translate}}</mat-option>
|
||||
<mat-option [value]="false">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.BOOLEAN-DECISION.NO' |
|
||||
translate}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
|
@ -13,9 +15,9 @@
|
|||
<!-- CheckBox -->
|
||||
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.CheckBox">
|
||||
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required">
|
||||
<mat-option value="true">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' |
|
||||
<mat-option [value]="true">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.CHECKED' |
|
||||
translate}}</mat-option>
|
||||
<mat-option value="false">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' |
|
||||
<mat-option [value]="false">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.CHECK-BOX.UNCHECKED' |
|
||||
translate}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
|
@ -27,6 +29,7 @@
|
|||
</mat-form-field>
|
||||
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.ComboBox && comboBoxType === comboBoxTypeEnum.WordList">
|
||||
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required">
|
||||
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate }}</mat-option>
|
||||
<mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
|
@ -42,6 +45,7 @@
|
|||
<!-- RadioBox -->
|
||||
<mat-form-field class="col-md-12" *ngIf="viewStyle === viewStyleEnum.RadioBox">
|
||||
<mat-select [formControl]="form" [placeholder]="placeHolder" [required]="required">
|
||||
<mat-option [value]="null">{{'DATASET-PROFILE-EDITOR.STEPS.FORM.FIELD.DEFAULT-VALUES.NONE' | translate}}</mat-option>
|
||||
<mat-option *ngFor="let opt of formArrayOptions['controls']" [value]="opt.get('value').value">{{opt.get('label').value}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="form.hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
|
|
|
@ -13,9 +13,11 @@
|
|||
<div *ngIf="datasetsDraft.length > 0">
|
||||
<h4>{{'DMP-FINALISE-DIALOG.FINALISE-TITLE' | translate}}</h4>
|
||||
<mat-selection-list #datasetsDraftSelectionList [formControl]="this.formGroup.get('datasets')">
|
||||
<mat-list-option class="styleBorder" *ngFor="let dataset of datasetsDraft; let len = length" [value]='dataset'>
|
||||
<div class="styleBorder" *ngFor="let dataset of datasetsDraft; let len = length">
|
||||
<mat-list-option [value]='dataset'>
|
||||
{{ dataset.label }}
|
||||
</mat-list-option>
|
||||
</div>
|
||||
</mat-selection-list>
|
||||
</div>
|
||||
<mat-error *ngIf="formGroup.get('datasets').errors?.minLengthArray">{{'DMP-FINALISE-DIALOG.VALIDATION.AT-LEAST-ONE-DATASET-FINALISED'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
.styleBorder {
|
||||
border: 1px solid lightgray;
|
||||
border: 0.2em solid lightgray;
|
||||
border-radius: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
|
@ -14,7 +14,7 @@ import { DatasetService } from '../../../../core/services/dataset/dataset.servic
|
|||
@Component({
|
||||
selector: 'app-dmp-finalize-dialog-component',
|
||||
templateUrl: 'dmp-finalize-dialog.component.html',
|
||||
|
||||
styleUrls: ['./dmp-finalize-dialog.component.scss']
|
||||
})
|
||||
export class DmpFinalizeDialogComponent extends BaseComponent implements OnInit {
|
||||
|
||||
|
|
|
@ -48,17 +48,16 @@
|
|||
<div *ngSwitchCase="datasetProfileFieldViewStyleEnum.BooleanDecision" class="col-12">
|
||||
<mat-radio-group [formControl]="form.get('value')" [required]="form.get('validationRequired').value">
|
||||
<mat-radio-button class="radio-button-item" name="{{form.get('id').value}}" value="true">Yes</mat-radio-button>
|
||||
<!-- <br> -->
|
||||
<mat-radio-button class="radio-button-item" name="{{form.get('id').value}}" value="false">No</mat-radio-button>
|
||||
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-radio-group>
|
||||
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="datasetProfileFieldViewStyleEnum.RadioBox" class="col-12">
|
||||
<mat-radio-group [formControl]="form.get('value')" [required]="form.get('validationRequired').value">
|
||||
<mat-radio-button *ngFor="let option of form.get('data').value.options let index = index" class="radio-button-item"
|
||||
[value]="option.value">{{option.label}}</mat-radio-button>
|
||||
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</mat-radio-group>
|
||||
<mat-error *ngIf="form.get('value').hasError('required')">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
||||
</div>
|
||||
</div>
|
|
@ -4,7 +4,7 @@
|
|||
}
|
||||
}
|
||||
.styleBorder{
|
||||
border: 1px solid lightgray;
|
||||
border: 0.2em solid lightgray;
|
||||
border-radius: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ export class VisibilityRulesService {
|
|||
}
|
||||
|
||||
private resetFieldFormGroup(formGroup: FormGroup) {
|
||||
formGroup.get('value').setValue(formGroup.get('defaultValue').value ? formGroup.get('defaultValue').value.value : undefined);
|
||||
formGroup.get('value').setValue(formGroup.get('defaultValue').value ? this.parseValue(formGroup.get('defaultValue').value.value) : undefined);
|
||||
}
|
||||
|
||||
private resetCompositeFieldFormGroup(formGroup: FormGroup) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"VALIDATION": {
|
||||
"REQUIRED": "Required",
|
||||
"PROJECT-START-AFTER-END": "Project start date cannot be after the end date",
|
||||
"PATTERN-_":"Caracter \"_\" is not allowed"
|
||||
"PATTERN-_": "Caracter \"_\" is not allowed"
|
||||
},
|
||||
"DELETE-CONFIRMATION": {
|
||||
"TITLE": "Warning",
|
||||
|
@ -18,8 +18,8 @@
|
|||
"SUCCESSFUL-LOGOUT": "Successful Logout",
|
||||
"UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout",
|
||||
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login",
|
||||
"SUCCESSFUL-DATASET-PROFILE-DELETE":"Successful Delete",
|
||||
"UNSUCCESSFUL-DATASET-PROFILE-DELETE":"This profile can not deleted, because Datasets are associated with it"
|
||||
"SUCCESSFUL-DATASET-PROFILE-DELETE": "Successful Delete",
|
||||
"UNSUCCESSFUL-DATASET-PROFILE-DELETE": "This profile can not deleted, because Datasets are associated with it"
|
||||
},
|
||||
"ERRORS": {
|
||||
"HTTP-REQUEST-ERROR": "An Unexpected Error Has Occured"
|
||||
|
@ -138,9 +138,10 @@
|
|||
"FIELD-AUTOCOMPLETE-OPTIONS-ROOT": "Options Root"
|
||||
},
|
||||
"DEFAULT-VALUES": {
|
||||
"NONE": "None",
|
||||
"BOOLEAN-DECISION": {
|
||||
"YES": "YES",
|
||||
"NO": "NO"
|
||||
"YES": "Yes",
|
||||
"NO": "No"
|
||||
},
|
||||
"CHECK-BOX": {
|
||||
"CHECKED": "Checked",
|
||||
|
|
Loading…
Reference in New Issue