added messages to project
This commit is contained in:
parent
ff856c6d14
commit
ce7e1c739b
|
@ -8,7 +8,7 @@
|
|||
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter' />
|
||||
</th>
|
||||
<th>
|
||||
<button class="btn btn-default" (click)="getProjects()">
|
||||
<button class="btn btn-default" (click)="getProjects('false')">
|
||||
<span class="glyphicon glyphicon-refresh"></span>
|
||||
</button>
|
||||
</th>
|
||||
|
|
|
@ -22,6 +22,8 @@ import { ProjectTableFilterPipe } from '../pipes/project-table-filter.pipe';
|
|||
|
||||
declare var $ :any;
|
||||
|
||||
import '../../assets/custom.js';
|
||||
declare function simple_notifier(type: string, title: string, message:string): any;
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -118,15 +120,16 @@ getEmptyProject(){
|
|||
}
|
||||
|
||||
|
||||
getProjects(){
|
||||
getProjects(muted? : boolean){
|
||||
this.serverService.getProjectsOfUser().subscribe(
|
||||
response => {
|
||||
this.tableData = response;
|
||||
console.log(this.tableData)
|
||||
if(muted && muted!=true)
|
||||
simple_notifier("success",null,"Updated projects table");
|
||||
},
|
||||
err => {
|
||||
|
||||
}
|
||||
simple_notifier("danger",null,"Could not retrieve projects");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -142,13 +145,17 @@ getDMPs(){
|
|||
params.key = dmp.id;
|
||||
params.value = dmp.label;
|
||||
this.datasetDropDown.options.push(params);
|
||||
});
|
||||
},
|
||||
error => {
|
||||
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
showDatasets(){debugger; //dmpId, event
|
||||
showDatasets(){ //dmpId, event
|
||||
//this.dataSetVisibe = true;
|
||||
|
||||
}
|
||||
|
@ -165,8 +172,10 @@ SaveProject(){
|
|||
action.subscribe(
|
||||
response =>{
|
||||
this.getProjects();
|
||||
console.log("response");
|
||||
console.log(response);
|
||||
simple_notifier("success",null, (this.project.id == null) ? "Created" : "Updated" +" projects table");
|
||||
},
|
||||
error => {
|
||||
simple_notifier("danger",null, "Could not "+ (this.project.id == null) ? "create" : "update" + " projects table");
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue