+ [translations]="translations" >
-
-
+
+
+
+
+
+ Actions
+
+
+
+
+
+
+
+ Edit
+
+
+
+
+
-
+
@@ -44,23 +60,19 @@
-
-
-
+
+
-
diff --git a/dmp-frontend/src/app/dmps/dmp.component.ts b/dmp-frontend/src/app/dmps/dmp.component.ts
index ad6ce707d..96cf185fd 100644
--- a/dmp-frontend/src/app/dmps/dmp.component.ts
+++ b/dmp-frontend/src/app/dmps/dmp.component.ts
@@ -48,10 +48,10 @@ export class DmpComponent implements OnInit{
this.dataSetVisibe = false;
this.dmp = {
label: '',
- abbreviation:'',
- reference:'',
- uri:'',
- definition:''
+ previous:'',
+ version:'',
+ profileData:'',
+ profile:''
}
}
@@ -71,27 +71,30 @@ console.log(response);
dmp.version = resp.version;
dmp.dataset = resp.dataset;
dmp.projectLabel = resp.project.label;
+ dmp.projectid = resp.project.id;
+ dmp.previous = resp.previous;
+ dmp.profile = resp.profile;
+ dmp.profileData = resp.profileData;
this.dmps.push(dmp);
var params = {limit:8,offset:0, sortAsc:false}
this.afterLoad();
this.dmpResource.query(params).then(dmps => this.dmps = dmps);
}
);
- }
- // (err: HttpErrorResponse) => {
- // if (err.error instanceof Error) {
- // // A client-side or network error occurred. Handle it accordingly.
- // console.log('An error occurred:', err.error.message);
- // } else {
- // // The backend returned an unsuccessful response code.
- // // The response body may contain clues as to what went wrong,
- // if(err.status == 401){
- // this.isignOutBtn.nativeElement.click();
- // }
- // console.log(`Backend returned code ${err.status}, body was: ${err.error}`);
- // }
- // }
- );
+ (err: HttpErrorResponse) => {
+ if (err.error instanceof Error) {
+ // A client-side or network error occurred. Handle it accordingly.
+ console.log('An error occurred:', err.error.message);
+ } else {
+ // The backend returned an unsuccessful response code.
+ // The response body may contain clues as to what went wrong,
+ if(err.status == 401){
+ this.isignOutBtn.nativeElement.click();
+ }
+ console.log(`Backend returned code ${err.status}, body was: ${err.error}`);
+ }
+ }
+ });
this.serverService.getAllProjects().subscribe(
response => {
@@ -186,7 +189,7 @@ signOut() {
this.serverService.logOut();
}
-selectDmp(rowEvent){debugger;
+selectDmp(rowEvent){
this.dmpIdforDatasets = rowEvent.row.item.id;
if(this.dataSetVisibe == false)
this.dataSetVisibe = true;
@@ -194,12 +197,25 @@ selectDmp(rowEvent){debugger;
this.datasetsComponent.getDatasetForDmpMethod(rowEvent.row.item.id);
}
-editRow(item){debugger;
+editRow(item){
this.dmp.label = item.label;
- this.dmp.abbreviation = item.abbreviation;
- this.dmp.uri = item.uri;
+ this.dmp.previous = item.previous;
+ this.dmp.version = item.version;
+ this.dmp.profile = item.profile;
+ this.dmp.profileData = item.profileData;
this.dmp.id = item.id;
- this.dmp.project = item.project;
+ this.dmp.project = item.projectid;
+ this.dmp.projectid = item.projectid;
+ $("#newDmpModal").modal("show");
+}
+
+newDmp(item){
+ this.dmp.label = "";
+ this.dmp.previous = "";
+ this.dmp.version = "";
+ this.dmp.profile = "";
+ this.dmp.profileData = "";
+ this.dmp.project = "";
$("#newDmpModal").modal("show");
}
diff --git a/dmp-frontend/src/app/dmps/dmps.html b/dmp-frontend/src/app/dmps/dmps.html
index 93f5b2987..2e38113cb 100644
--- a/dmp-frontend/src/app/dmps/dmps.html
+++ b/dmp-frontend/src/app/dmps/dmps.html
@@ -46,7 +46,7 @@
-