This commit is contained in:
parent
7ed1b62fff
commit
0c424db7cf
|
@ -140,8 +140,11 @@ export class DatasetsComponent implements OnInit {
|
|||
|
||||
}
|
||||
else{
|
||||
this.dataset.dmp = { "id": this.dmpIdforDatasets }
|
||||
this.dataset.profile = { "id": this.dataset.profile }
|
||||
|
||||
this.dataset.dmp = { "id": this.dmpIdforDatasets };
|
||||
this.dataset.profile = { "id": this.dataset.profile };
|
||||
this.dataset.creator = {"id" : this.dataset.creator };
|
||||
|
||||
this.serverService.updateDatsetsProfile(this.dataset).subscribe(
|
||||
response => {
|
||||
simple_notifier("success",null,"Dataset edited");
|
||||
|
@ -203,6 +206,7 @@ export class DatasetsComponent implements OnInit {
|
|||
//this.dataset.dmp = item.dmp;
|
||||
this.dataset.profile = item.profile==null ? null : item.profile.id;
|
||||
this.dataset.id = item.id;
|
||||
this.dataset.creator = item.creator;
|
||||
$("#newDatasetModal").modal("show");
|
||||
}
|
||||
else if(event.toElement.id == "describeDataset"){
|
||||
|
@ -245,7 +249,13 @@ export class DatasetsComponent implements OnInit {
|
|||
this.getDatasets();
|
||||
},
|
||||
err => {
|
||||
simple_notifier("danger",null,"Could not delete the dataset");
|
||||
|
||||
if(err.status>=200 && err.status<300)
|
||||
simple_notifier("success",null,"Deleted dataset");
|
||||
else
|
||||
simple_notifier("danger",null,"Could not delete the dataset");
|
||||
this.getDatasets();
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ export class DmpComponent implements OnInit{
|
|||
label: '',
|
||||
previous:'',
|
||||
version:'',
|
||||
profileData:'',
|
||||
//profileData:'',
|
||||
//project: '',
|
||||
//profile:{}
|
||||
}
|
||||
|
@ -140,6 +140,7 @@ export class DmpComponent implements OnInit{
|
|||
updateDMP(){
|
||||
|
||||
this.dmp.project = {"id":this.dmp.project};
|
||||
this.dmp.creator = {"id": this.dmp.creator};
|
||||
|
||||
this.serverService.updateDmp(this.dmp)
|
||||
.subscribe(
|
||||
|
@ -216,7 +217,11 @@ export class DmpComponent implements OnInit{
|
|||
this.getDmps();
|
||||
},
|
||||
(err: HttpErrorResponse) => {
|
||||
simple_notifier("danger",null,"Failed to delete the DMP");
|
||||
if(err.status>=200 && err.status<300)
|
||||
simple_notifier("success",null,"Successfully deleted the DMP");
|
||||
else
|
||||
simple_notifier("danger",null,"Failed to delete the DMP");
|
||||
this.getDmps();
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ProjectTableFilterPipe implements PipeTransform {
|
|||
return _.filter(array, row => {
|
||||
|
||||
if(onlyMyProjects){
|
||||
return (row.label.indexOf(query) > -1) && (row.creationUser==userid);
|
||||
return (row.label.indexOf(query) > -1) && (row.creationUser.id==userid);
|
||||
}
|
||||
else{
|
||||
return row.label.indexOf(query) > -1;
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
<td>{{project?.status | statusToString}}</td>
|
||||
<td>{{(project?.description?.length > 40) ? (project?.description | slice:0:40)+'...':(project?.description) }}</td>
|
||||
<td>
|
||||
<a [ngClass]="{'not-active': whoami?.id!=project?.creationUser }" class="editGridColumn" (click)="editRow(project, $event)">
|
||||
<a [ngClass]="{'not-active': whoami?.id!=project?.creationUser?.id }" class="editGridColumn" (click)="editRow(project, $event)">
|
||||
<i class="fa fa-pencil fa-fw" data-toggle="tooltip" title="edit properties" id="editDMP" ></i>
|
||||
</a>
|
||||
<!--
|
||||
|
|
|
@ -17,19 +17,24 @@ export class RestBase {
|
|||
|
||||
|
||||
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string ="localhost"
|
||||
port: number = 8080;
|
||||
webappname: string = "dmp-backend";
|
||||
|
||||
/*
|
||||
protocol: string = "http";
|
||||
hostname: string ="dl010.madgik.di.uoa.gr"
|
||||
port: number = 8080;
|
||||
webappname: string = "dmp-backend";
|
||||
*/
|
||||
|
||||
|
||||
|
||||
protocol: string = "http";
|
||||
hostname: string = "dionysus.di.uoa.gr" ;
|
||||
port: number = 7070;
|
||||
webappname: string = "dmp-backend";
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue