Merge branch 'Development' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
# Conflicts: # dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts
This commit is contained in:
commit
1d5342fc52
|
@ -70,14 +70,14 @@ public class DMPDaoImpl extends DatabaseAccess<DMP> implements DMPDao {
|
|||
query.where((builder, root) -> root.join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id").in(criteria.getCollaborators()));
|
||||
}
|
||||
if (criteria.getDatasetTemplates() != null && !criteria.getDatasetTemplates().isEmpty()) {
|
||||
query.where(((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("id").in(criteria.getDatasetTemplates())));
|
||||
query.where((builder, root) -> root.join("associatedDmps", JoinType.LEFT).get("id").in(criteria.getDatasetTemplates()));
|
||||
}
|
||||
query.where((builder, root) -> builder.notEqual(root.get("status"), DMP.DMPStatus.DELETED.getValue()));
|
||||
return query;
|
||||
}
|
||||
|
||||
public QueryableList<DMP> getAuthenticated(QueryableList<DMP> query, UUID principal) {
|
||||
query.where((builder, root) -> builder.equal(root.join("users", JoinType.LEFT).join("user").get("id"), principal));
|
||||
query.where((builder, root) -> builder.equal(root.join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id"), principal));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -52,9 +52,9 @@ public class DatasetDaoImpl extends DatabaseAccess<Dataset> implements DatasetDa
|
|||
if (criteria.getCollaborators() != null && !criteria.getCollaborators().isEmpty())
|
||||
query.where((builder, root) -> root.join("dmp", JoinType.LEFT).join("users", JoinType.LEFT).join("user", JoinType.LEFT).get("id").in(criteria.getCollaborators()));
|
||||
if (criteria.getDatasetTemplates() != null && !criteria.getDatasetTemplates().isEmpty())
|
||||
query.where(((builder, root) -> root.get("profile").get("id").in(criteria.getDatasetTemplates())));
|
||||
query.where(((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.DELETED.getValue())));
|
||||
query.where(((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.CANCELED.getValue())));
|
||||
query.where((builder, root) -> root.get("profile").get("id").in(criteria.getDatasetTemplates()));
|
||||
query.where((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.DELETED.getValue()));
|
||||
query.where((builder, root) -> builder.notEqual(root.get("status"), Dataset.Status.CANCELED.getValue()));
|
||||
return query;
|
||||
}
|
||||
|
||||
|
|
|
@ -226,11 +226,11 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
this.isNew = false;
|
||||
this.datasetWizardService.getSinglePublic(this.publicId)
|
||||
.pipe(takeUntil(this._destroyed)).pipe(
|
||||
catchError((error: any) => {
|
||||
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
|
||||
this.router.navigate(['/explore']);
|
||||
return observableOf(null);
|
||||
}))
|
||||
catchError((error: any) => {
|
||||
this.uiNotificationService.snackBarNotification(error.error.message, SnackBarNotificationLevel.Error);
|
||||
this.router.navigate(['/explore']);
|
||||
return observableOf(null);
|
||||
}))
|
||||
.subscribe(data => {
|
||||
if (data) {
|
||||
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(data);
|
||||
|
@ -402,17 +402,17 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
this.datasetWizardService.createDataset(this.formGroup.value)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(
|
||||
complete => {
|
||||
this.datasetWizardService.getSingle(complete.id)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(
|
||||
result => {
|
||||
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(result);
|
||||
}
|
||||
);
|
||||
this.onCallbackSuccess();
|
||||
},
|
||||
error => this.onCallbackError(error)
|
||||
complete => {
|
||||
this.datasetWizardService.getSingle(complete.id)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(
|
||||
result => {
|
||||
this.datasetWizardModel = new DatasetWizardEditorModel().fromModel(result);
|
||||
}
|
||||
);
|
||||
this.onCallbackSuccess();
|
||||
},
|
||||
error => this.onCallbackError(error)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -603,8 +603,8 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
|||
this.datasetWizardService.delete(id)
|
||||
.pipe(takeUntil(this._destroyed))
|
||||
.subscribe(
|
||||
complete => { this.onCallbackSuccess(); this.router.navigateByUrl('/datasets') },
|
||||
error => this.onCallbackError(error)
|
||||
complete => { this.onCallbackSuccess(); this.router.navigateByUrl('/datasets') },
|
||||
error => this.onCallbackError(error)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue