set Default Project criteria Value And Add en.json the "NONE":"-"

This commit is contained in:
Diamantis Tziotzios 2019-03-06 16:19:08 +02:00
parent 6f6ba650ac
commit 9a14a73b86
4 changed files with 8 additions and 3 deletions

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">{{'CRITERIA.DATA-SETS.NONE'| translate}}</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

@ -28,7 +28,7 @@
<mat-select placeholder=" {{ 'CRITERIA.PROJECTS.PROJECT-STATE-TYPE' | translate}}" [(ngModel)]="criteria.projectStateType"
(ngModelChange)="controlModified()">
<mat-option [value]="null">
-
{{ 'CRITERIA.PROJECTS.TYPES.NONE' | translate}}
</mat-option>
<mat-option [value]="ProjectStateType.OnGoing">
{{ 'CRITERIA.PROJECTS.TYPES.ON-GOING' | translate}}

View File

@ -28,7 +28,10 @@ export class ProjectCriteriaComponent extends BaseCriteriaComponent implements O
ngOnInit() {
super.ngOnInit();
if (this.criteria == null) { this.criteria = new ProjectCriteria(); }
if (this.criteria == null) {
this.criteria = new ProjectCriteria();
this.criteria.projectStateType = ProjectStateType.OnGoing;
}
}
setCriteria(criteria: ProjectCriteria): void {

View File

@ -411,6 +411,7 @@
"PERIOD-TO": "Project End",
"PROJECT-STATE-TYPE": "Project Status",
"TYPES": {
"NONE": "-",
"ON-GOING": "On Going",
"FINISHED": "Finished"
}
@ -422,6 +423,7 @@
"PERIOD-FROM": "Start",
"PERIOD-TO": "End",
"STATUS": "Status",
"NONE":"-",
"TAGS": "Tags"
},
"DMP": {