Fix Dataset Profile Delete
This commit is contained in:
parent
d89aedebc6
commit
19d16072cd
|
@ -56,6 +56,7 @@ public class Admin extends BaseController {
|
|||
eu.eudat.data.entities.DatasetProfile datasetprofile = this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().find(UUID.fromString(id));
|
||||
datasetprofile.setDefinition(modelDefinition.getDefinition());
|
||||
datasetprofile.setStatus(modelDefinition.getStatus());
|
||||
datasetprofile.setLabel(modelDefinition.getLabel());
|
||||
this.getApiContext().getOperationsContext().getDatabaseRepository().getDatasetProfileDao().createOrUpdate(datasetprofile);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(new ResponseItem<UUID>().status(ApiMessageCode.NO_MESSAGE));
|
||||
}
|
||||
|
|
|
@ -42,8 +42,9 @@ export class DatasetProfileService {
|
|||
return this.http.post<DatasetProfile>(this.actionUrl + 'datasetprofile/clone/' + id, {});
|
||||
}
|
||||
|
||||
delete(id: string): Observable<DatasetProfile> {
|
||||
return this.http.delete<DatasetProfile>(this.actionUrl + id, {});
|
||||
delete(id: string, data): Observable<DatasetProfile> {
|
||||
return this.http.post<DatasetProfile>(this.actionUrl + 'addDmp/' + id, data);
|
||||
//return this.http.delete<DatasetProfile>(this.actionUrl + id, {});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -204,7 +204,8 @@ export class DatasetProfileEditorComponent extends BaseComponent implements OnIn
|
|||
});
|
||||
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(result => {
|
||||
if (result) {
|
||||
this.datasetProfileService.delete(this.datasetProfileId)
|
||||
this.form.get('status').setValue(DatasetProfileEnum.DELETED);
|
||||
this.datasetProfileService.delete(this.datasetProfileId,this.form.value)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(
|
||||
complete => {
|
||||
|
|
Loading…
Reference in New Issue