Ctriteria Null Value Set Up DmpProfiles FixBug To show Values On StartUp

This commit is contained in:
Diamantis Tziotzios 2019-03-06 14:20:49 +02:00
parent 01d66e4393
commit 0b8313abd0
6 changed files with 11 additions and 12 deletions

View File

@ -1,12 +1,12 @@
<div class="confirmation-dialog">
<div class="row">
<div class="confirmation-message col">
<div class="confirmation-message col align-self-center">
<h4>{{ data.message }}</h4>
</div>
<div class="col-auto">
<input class="hidden" type="file" #imgFileInput (change)="selectXML($event)" accept="text/xml" />
<button mat-raised-button class="col-auto" color="{{btnColore}}" (click)="imgFileInput.click()"
type="button">{{ 'DATASET-WIZARD.UPLOAD.UPLOAD-XML-IMPORT' | translate }}</button>
type="button"><mat-icon>attach_file</mat-icon></button>
</div>
</div>
<div class="row">

View File

@ -11,7 +11,7 @@
</mat-form-field>
<mat-form-field class="col-md-4">
<mat-select placeholder=" {{'CRITERIA.DATA-SETS.STATUS'| translate}}" name="datasetCriteriastatus" [(ngModel)]="criteria.status" (ngModelChange)="controlModified()">
<mat-option [value]="null"></mat-option>
<mat-option [value]="null">-</mat-option>
<mat-option [value]="statuses.Draft">{{enumUtils.toDatasetStatusString(statuses.Draft)}}</mat-option>
<mat-option [value]="statuses.Finalized">{{enumUtils.toDatasetStatusString(statuses.Finalized)}}</mat-option>
</mat-select>

View File

@ -145,8 +145,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
.subscribe(async data => {
this.dmp = new DmpEditorModel().fromModel(data);
this.formGroup = this.dmp.buildForm();
this.registerFormEventsForDmpProfile();
this.selectedDmpProfileDefinition = this.dmp.definition;
this.registerFormEventsForDmpProfile(this.dmp.definition);
if (!this.editMode || this.dmp.status === Status.Inactive) { this.formGroup.disable(); }
this.breadCrumbs = Observable.of([
@ -187,7 +186,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
});
}
registerFormEventsForDmpProfile(): void {
registerFormEventsForDmpProfile( definitionPropertys?:DmpProfileDefinition): void {
this.formGroup.get('profile').valueChanges
.pipe(takeUntil(this._destroyed))
.subscribe(Option => {
@ -201,6 +200,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
} else {
this.selectedDmpProfileDefinition = null;
}
this.selectedDmpProfileDefinition=definitionPropertys;
})
}

View File

@ -90,8 +90,4 @@
</mat-error>
</mat-form-field>
</div>
</div>

View File

@ -27,6 +27,9 @@
<mat-form-field class="col-md-3">
<mat-select placeholder=" {{ 'CRITERIA.PROJECTS.PROJECT-STATE-TYPE' | translate}}" [(ngModel)]="criteria.projectStateType"
(ngModelChange)="controlModified()">
<mat-option [value]="null">
-
</mat-option>
<mat-option [value]="ProjectStateType.OnGoing">
{{ 'CRITERIA.PROJECTS.TYPES.ON-GOING' | translate}}
</mat-option>

View File

@ -259,7 +259,7 @@
"UPLOAD-XML-FILE-TITLE": "Select Xml file with Dataset Profile to Upload",
"UPLOAD-XML-NAME": "Name Of Dataset Profile",
"UPLOAD-XML-IMPORT": "File",
"UPLOAD-XML-FILE-CANCEL": "Cansel"
"UPLOAD-XML-FILE-CANCEL": "Cancel"
}
},
"DATASET-LISTING": {
@ -390,7 +390,7 @@
"UPLOAD-XML-FILE-TITLE": "Select Xml file with Dmp Profile to Upload",
"UPLOAD-XML-NAME": "Name Of Dmp Profile",
"UPLOAD-XML-IMPORT": "File",
"UPLOAD-XML-FILE-CANCEL": "Cansel"
"UPLOAD-XML-FILE-CANCEL": "Cancel"
}
},
"DYNAMIC-FORM": {