clone dmp
This commit is contained in:
parent
7ca2ff9eb4
commit
ee71134a60
|
@ -158,6 +158,19 @@ updateDMP(){
|
|||
|
||||
}
|
||||
|
||||
cloneDMP(dmp){
|
||||
dmp = {"id": dmp.id};
|
||||
this.serverService.cloneDmp(dmp).subscribe(
|
||||
response => {
|
||||
this.getDmps();
|
||||
},
|
||||
error => {
|
||||
console.log("Failed to clone dmp");
|
||||
}
|
||||
);
|
||||
$("#newVersionDmpModal").modal("hide");
|
||||
}
|
||||
|
||||
SaveDmp(){
|
||||
if (this.dmp.id == null)
|
||||
this.newDMP();
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="SaveDmp();">Save Dmp</button>
|
||||
<button type="submit" class="btn btn-primary" (click)="cloneDMP(dmp);">Save Dmp</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -110,6 +110,10 @@ export class ServerService {
|
|||
return this.restBase.post("dmp/update", data);
|
||||
}
|
||||
|
||||
public cloneDmp(data: any){
|
||||
return this.restBase.post("dmp/cloneforuser", data);
|
||||
}
|
||||
|
||||
public deleteDmp(dmp: any){
|
||||
return this.restBase.post("dmp/softdelete", dmp);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue