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