dmp advanced filters, project description, status

This commit is contained in:
annampak 2017-11-07 12:27:38 +02:00
parent ee71134a60
commit 63ec37f346
3 changed files with 18 additions and 6 deletions

View File

@ -18,7 +18,8 @@
<th class = "rowFilterTopBorder" colspan="3"> <th class = "rowFilterTopBorder" colspan="3">
<button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo">More filters</button> <button type="button" class="btn btn-info btnMoreFilters" data-toggle="collapse" data-target="#demo">More filters</button>
<div id="demo" class="collapse"> <div id="demo" class="collapse">
<input type="number" [(ngModel)]="versionFilter" placeholder='Version'/> <input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
<input class="form-control" type="number" [(ngModel)]="versionFilter" placeholder='Version'/>
</div> </div>
</th> </th>
</tr> </tr>

View File

@ -33,7 +33,7 @@
<mfDefaultSorter by="status">Status</mfDefaultSorter> <mfDefaultSorter by="status">Status</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter by="description">Definition</mfDefaultSorter> <mfDefaultSorter by="description">Description</mfDefaultSorter>
</th> </th>
<th> <th>
<mfDefaultSorter>Actions </mfDefaultSorter> <mfDefaultSorter>Actions </mfDefaultSorter>
@ -53,7 +53,7 @@
<td>{{project?.startdate | date:'yyyy-MM-dd HH:mm:ss Z' }}</td> <td>{{project?.startdate | date:'yyyy-MM-dd HH:mm:ss Z' }}</td>
<td>{{project?.enddate | date:'yyyy-MM-dd HH:mm:ss Z'}}</td> <td>{{project?.enddate | date:'yyyy-MM-dd HH:mm:ss Z'}}</td>
<td>{{project?.status | statusToString}}</td> <td>{{project?.status | statusToString}}</td>
<td>{{project?.definition}}</td> <td>{{project?.description}}</td>
<td><a class="editGridColumn" (click)="editRow(project, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i> <td><a class="editGridColumn" (click)="editRow(project, $event)"><i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP"></i>
<i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete project"></i></a></td> <i class="fa fa-eraser fa-fw" data-toggle="tooltip" title="delete project"></i></a></td>
@ -106,8 +106,14 @@
<input class="form-control" type='date' class="form-control" [(ngModel)]= "project.enddate" id='end-date' name = "enddate"/> <input class="form-control" type='date' class="form-control" [(ngModel)]= "project.enddate" id='end-date' name = "enddate"/>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="code-name" class="form-control-label">Definition:</label> <label for="status-name" class="col-form-label">Status:</label>
<textarea rows="3" class="form-control" name="desc" id="definition" [(ngModel)]= "project.definition"> </textarea> <select class="form-control" id="statusid" [(ngModel)]="project.status" name="statusDropDown">
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</div>
<div class="form-group">
<label for="code-name" class="form-control-label">Description:</label>
<textarea rows="3" class="form-control" name="desc" id="description" [(ngModel)]= "project.description"> </textarea>
</div> </div>
</form> </form>
</div> </div>

View File

@ -59,6 +59,7 @@ export class ProjectsComponent implements OnInit{
returnUrl: string; returnUrl: string;
@Input() projectCount = 0; @Input() projectCount = 0;
@Input() datasetDropDown:DropdownField; @Input() datasetDropDown:DropdownField;
@Input() statusDropDown: DropdownField;
//@Input() dataSetVisibe:boolean; //@Input() dataSetVisibe:boolean;
@Input() datasets: Dataset[]; @Input() datasets: Dataset[];
project: any; project: any;
@ -88,6 +89,9 @@ export class ProjectsComponent implements OnInit{
this.datasetDropDown = new DropdownField(); this.datasetDropDown = new DropdownField();
this.datasetDropDown.options = []; this.datasetDropDown.options = [];
this.datasets = []; this.datasets = [];
this.statusDropDown = new DropdownField();
this.statusDropDown.options= [{key:'0', value:"Active"},{key:'1', value:"Inactive"}]
//this.projects = [];
this.project = this.getEmptyProject(); this.project = this.getEmptyProject();
} }
@ -101,7 +105,7 @@ getEmptyProject(){
abbreviation:'', abbreviation:'',
reference:'', reference:'',
uri:'', uri:'',
definition:'', description:'',
enddate:'', enddate:'',
startdate:'' startdate:''
} }
@ -160,6 +164,7 @@ SaveProject(){
action = this.serverService.updateProject(this.project); action = this.serverService.updateProject(this.project);
action.subscribe( action.subscribe(
response =>{ response =>{
this.getProjects();
console.log("response"); console.log("response");
console.log(response); console.log(response);
} }