When creating new DMPs pre-set the visibility (restricted) and the contact (creator). They can be changed later in the draft phase.

This commit is contained in:
George Kalampokis 2020-07-08 18:26:07 +03:00
parent 3ba34e1e69
commit e428e8a5df
2 changed files with 4 additions and 0 deletions

View File

@ -101,6 +101,8 @@ public class DmpQuickWizardModel {
dataManagementPlanEntity.setAssociatedUsers(user);
dataManagementPlanEntity.setExtraProperties(new HashMap<>());
dataManagementPlanEntity.getExtraProperties().put("language", this.language);
dataManagementPlanEntity.getExtraProperties().put("visible", false);
dataManagementPlanEntity.getExtraProperties().put("contact", principal.getId().toString());
return dataManagementPlanEntity;
}

View File

@ -228,6 +228,8 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC
this.dmp.project = new ProjectFormModel();
this.dmp.funder = new FunderFormModel();
this.dmp.extraProperties = new ExtraPropertiesFormModel();
this.dmp.extraProperties.visible = false;
this.dmp.extraProperties.contact = this.authService.current().id;
this.formGroup = this.dmp.buildForm();
this.registerFormEventsForNewItem();
if (this.isAuthenticated) {