diff --git a/dmp-frontend/src/app/projects/project.html b/dmp-frontend/src/app/projects/project.html
index f91e15b03..8873fb763 100644
--- a/dmp-frontend/src/app/projects/project.html
+++ b/dmp-frontend/src/app/projects/project.html
@@ -8,7 +8,7 @@
- |
diff --git a/dmp-frontend/src/app/projects/projects.component.ts b/dmp-frontend/src/app/projects/projects.component.ts
index 33ae10f38..3b1c00eb2 100644
--- a/dmp-frontend/src/app/projects/projects.component.ts
+++ b/dmp-frontend/src/app/projects/projects.component.ts
@@ -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");
}
);