diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/DescriptionPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/DescriptionPersist.java index 5fceccdf4..da053e457 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/DescriptionPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/DescriptionPersist.java @@ -228,7 +228,7 @@ public class DescriptionPersist { .iff(() -> item.getStatus() == DescriptionStatus.Finalized) .on(DescriptionPersist._properties) .over(item.getProperties()) - .using(() -> this.validatorFactory.validator(PropertyDefinitionPersist.PropertyDefinitionPersistValidator.class).setStatus(item.getStatus()).withDefinition(definition)) + .using(() -> this.validatorFactory.validator(PropertyDefinitionPersist.PropertyDefinitionPersistValidator.class).setStatus(item.getStatus()).withDefinition(definition).withRules(definition)) // this.navSpec() // .iff(() -> !this.isNull(item.getTags())) // .on(DescriptionPersist._tags) diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/FieldPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/FieldPersist.java index bf5506efa..461857b2e 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/FieldPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/FieldPersist.java @@ -4,6 +4,7 @@ import eu.eudat.commons.enums.DescriptionStatus; import eu.eudat.commons.enums.FieldType; import eu.eudat.commons.enums.FieldValidationType; import eu.eudat.commons.types.descriptiontemplate.FieldEntity; +import eu.eudat.commons.types.descriptiontemplate.RuleEntity; import eu.eudat.commons.validation.BaseValidator; import eu.eudat.model.persist.ReferencePersist; import gr.cite.tools.validation.ValidatorFactory; @@ -95,6 +96,8 @@ public class FieldPersist { private final MessageSource messageSource; private FieldEntity fieldEntity; private DescriptionStatus status; + private List> rules; + private Boolean fieldSetIsRuleTarget; protected PersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors, ValidatorFactory validatorFactory, MessageSource messageSource) { super(conventionService, errors); @@ -111,33 +114,34 @@ public class FieldPersist { protected List specifications(FieldPersist item) { FieldType fieldType = this.fieldEntity != null && this.fieldEntity.getData() != null ? this.fieldEntity.getData().getFieldType() : FieldType.FREE_TEXT; boolean required = this.fieldEntity != null && this.fieldEntity.getValidations() != null ? this.fieldEntity.getValidations().contains(FieldValidationType.Required) : false; + boolean isRuleTarget = this.checkIfFieldIsRuleTarget(); return Arrays.asList( this.spec() - .iff(()-> FieldType.isTextType(fieldType) && !fieldType.equals(FieldType.CHECK_BOX) && DescriptionStatus.Finalized.equals(this.status) && required) + .iff(()-> FieldType.isTextType(fieldType) && !fieldType.equals(FieldType.CHECK_BOX) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required) .must(() -> !this.isEmpty(item.getTextValue())) .failOn(FieldPersist._textValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textValue}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> FieldType.isDateType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required) + .iff(()-> FieldType.isDateType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required) .must(() -> !this.isNull(item.getDateValue())) .failOn(FieldPersist._dateValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._dateValue}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> FieldType.isExternalIdentifierType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required) + .iff(()-> FieldType.isExternalIdentifierType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required) .must(() -> !this.isNull(item.getExternalIdentifier())) .failOn(FieldPersist._externalIdentifier).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._externalIdentifier}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> FieldType.isTextListType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required && !fieldType.equals(FieldType.TAGS)) + .iff(()-> FieldType.isTextListType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required && !fieldType.equals(FieldType.TAGS)) .must(() -> !this.isListNullOrEmpty(item.getTextListValue()) || !this.isEmpty(item.getTextValue())) .failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> fieldType.equals(FieldType.TAGS) && DescriptionStatus.Finalized.equals(this.status) && required) + .iff(()-> fieldType.equals(FieldType.TAGS) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required) .must(() -> !this.isListNullOrEmpty(item.getTextListValue())) .failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> FieldType.isReferenceType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && required) + .iff(()-> FieldType.isReferenceType(fieldType) && DescriptionStatus.Finalized.equals(this.status) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget && required) .must(() -> !this.isListNullOrEmpty(item.getReferences()) || !this.isNull(item.getReference())) .failOn(FieldPersist._textListValue).failWith(messageSource.getMessage("Validation_Required", new Object[]{FieldPersist._textListValue}, LocaleContextHolder.getLocale())), this.spec() - .iff(()-> !this.isEmpty(item.getTextValue()) && (fieldType.equals(FieldType.CHECK_BOX) || fieldType.equals(FieldType.BOOLEAN_DECISION)) ) + .iff(()-> !this.isEmpty(item.getTextValue()) && (fieldType.equals(FieldType.CHECK_BOX) || fieldType.equals(FieldType.BOOLEAN_DECISION)) && this.isListNullOrEmpty(fieldEntity.getVisibilityRules()) && !isRuleTarget && !fieldSetIsRuleTarget) .must(() -> this.isBoolean(item.getTextValue())) .failOn(FieldPersist._textValue).failWith(messageSource.getMessage("Validation_UnexpectedValue", new Object[]{FieldPersist._textValue}, LocaleContextHolder.getLocale())), this.spec() @@ -167,10 +171,31 @@ public class FieldPersist { return this; } + public PersistValidator withRules(List> rules) { + this.rules = rules; + return this; + } + public PersistValidator setStatus(DescriptionStatus status) { this.status = status; return this; } + + public PersistValidator ifFieldSetIsRuleTarget(Boolean fieldSetIsRuleTarget){ + this.fieldSetIsRuleTarget = fieldSetIsRuleTarget; + return this; + } + private boolean checkIfFieldIsRuleTarget(){ + if (this.isListNullOrEmpty(rules)) return false; + for (List rulesBySection: rules) { + if (!this.isListNullOrEmpty(rulesBySection)){ + for (RuleEntity rule :rulesBySection) { + if (rule.getTarget().equals(this.fieldEntity.getId())) return true; + } + } + } + return false; + } } } diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java index 804348fdb..673b7d774 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetItemPersist.java @@ -3,6 +3,7 @@ package eu.eudat.model.persist.descriptionproperties; import eu.eudat.commons.enums.DescriptionStatus; import eu.eudat.commons.types.descriptiontemplate.FieldEntity; import eu.eudat.commons.types.descriptiontemplate.FieldSetEntity; +import eu.eudat.commons.types.descriptiontemplate.RuleEntity; import eu.eudat.commons.validation.BaseValidator; import eu.eudat.convention.ConventionService; import eu.eudat.errorcode.ErrorThesaurusProperties; @@ -60,6 +61,7 @@ public class PropertyDefinitionFieldSetItemPersist { private final MessageSource messageSource; private FieldSetEntity fieldSetEntity; + private List> rules; private DescriptionStatus status; protected PersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors, ValidatorFactory validatorFactory, MessageSource messageSource) { super(conventionService, errors); @@ -86,7 +88,7 @@ public class PropertyDefinitionFieldSetItemPersist { .using((itm) -> { FieldEntity fieldEntity = fieldSetEntity != null ? fieldSetEntity.getFieldById((String)itm.getKey()).stream().findFirst().orElse(null) : null; - return this.validatorFactory.validator(FieldPersist.PersistValidator.class).withFieldEntity(fieldEntity).setStatus(this.status); + return this.validatorFactory.validator(FieldPersist.PersistValidator.class).withFieldEntity(fieldEntity).withRules(rules).ifFieldSetIsRuleTarget(this.checkIfFieldSetIsRuleTarget()).setStatus(this.status); }) ); @@ -97,10 +99,27 @@ public class PropertyDefinitionFieldSetItemPersist { return this; } + public PersistValidator withRules(List> rules) { + this.rules = rules; + return this; + } + public PersistValidator setStatus(DescriptionStatus status) { this.status = status; return this; } + + private Boolean checkIfFieldSetIsRuleTarget(){ + if (this.isListNullOrEmpty(rules)) return false; + for (List rulesBySection: rules) { + if (!this.isListNullOrEmpty(rulesBySection)){ + for (RuleEntity rule :rulesBySection) { + if (rule.getTarget().equals(this.fieldSetEntity.getId())) return true; + } + } + } + return false; + } } } diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java index e35a48765..b1dac4caa 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionFieldSetPersist.java @@ -2,6 +2,7 @@ package eu.eudat.model.persist.descriptionproperties; import eu.eudat.commons.enums.DescriptionStatus; import eu.eudat.commons.types.descriptiontemplate.FieldSetEntity; +import eu.eudat.commons.types.descriptiontemplate.RuleEntity; import eu.eudat.commons.validation.BaseValidator; import eu.eudat.convention.ConventionService; import eu.eudat.errorcode.ErrorThesaurusProperties; @@ -35,6 +36,7 @@ public class PropertyDefinitionFieldSetPersist { private final MessageSource messageSource; private FieldSetEntity fieldSetEntity; private DescriptionStatus status; + private List> rules; protected PersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors, ValidatorFactory validatorFactory, MessageSource messageSource, MessageSource messageSource1) { super(conventionService, errors); this.validatorFactory = validatorFactory; @@ -56,7 +58,7 @@ public class PropertyDefinitionFieldSetPersist { .iff(() -> !this.isNull(item.getItems())) .on(PropertyDefinitionFieldSetPersist._items) .over(item.getItems()) - .using((itm) -> this.validatorFactory.validator(PropertyDefinitionFieldSetItemPersist.PersistValidator.class).withFieldSetEntity(this.fieldSetEntity).setStatus(this.status)), + .using((itm) -> this.validatorFactory.validator(PropertyDefinitionFieldSetItemPersist.PersistValidator.class).withFieldSetEntity(this.fieldSetEntity).withRules(this.rules).setStatus(this.status)), this.spec() .iff(() -> DescriptionStatus.Finalized.equals(this.status) && fieldSetEntity.getHasMultiplicity()) .must(() -> !this.isListNullOrEmpty(item.getItems()) && min <= item.getItems().size()) @@ -73,6 +75,11 @@ public class PropertyDefinitionFieldSetPersist { return this; } + public PersistValidator withRules(List> rules) { + this.rules = rules; + return this; + } + public PropertyDefinitionFieldSetPersist.PersistValidator setStatus(DescriptionStatus status) { this.status = status; return this; diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionPersist.java index 6ab00fbf0..77119c4d4 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/descriptionproperties/PropertyDefinitionPersist.java @@ -5,6 +5,7 @@ import eu.eudat.commons.enums.FieldValidationType; import eu.eudat.commons.types.descriptiontemplate.DefinitionEntity; import eu.eudat.commons.types.descriptiontemplate.FieldEntity; import eu.eudat.commons.types.descriptiontemplate.FieldSetEntity; +import eu.eudat.commons.types.descriptiontemplate.RuleEntity; import eu.eudat.commons.validation.BaseValidator; import eu.eudat.convention.ConventionService; import eu.eudat.errorcode.ErrorThesaurusProperties; @@ -47,6 +48,8 @@ public class PropertyDefinitionPersist { private DescriptionStatus status; private DefinitionEntity definition; + private List> rules; + protected PropertyDefinitionPersistValidator(ConventionService conventionService, ErrorThesaurusProperties errors, MessageSource messageSource, ValidatorFactory validatorFactory) { super(conventionService, errors); this.messageSource = messageSource; @@ -78,7 +81,7 @@ public class PropertyDefinitionPersist { .mapKey((k) -> ((String)k)) .using((itm) -> { FieldSetEntity fieldSetEntity = definition != null ? definition.getFieldSetById((String)itm.getKey()).stream().findFirst().orElse(null) : null; - return this.validatorFactory.validator(PropertyDefinitionFieldSetPersist.PersistValidator.class).withFieldSetEntity(fieldSetEntity).setStatus(this.status); + return this.validatorFactory.validator(PropertyDefinitionFieldSetPersist.PersistValidator.class).withFieldSetEntity(fieldSetEntity).withRules(rules).setStatus(this.status); }) ); } @@ -94,6 +97,12 @@ public class PropertyDefinitionPersist { return this; } + public PropertyDefinitionPersistValidator withRules(DefinitionEntity definition) { + List fields = definition.getAllField(); + this.rules = fields.stream().filter(x -> x.getVisibilityRules() != null).map(FieldEntity::getVisibilityRules).collect(Collectors.toList()); + return this; + } + private List getMissingFieldSetEntity(PropertyDefinitionPersist item){ List missingMultipleFieldSets = new ArrayList<>(); diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/description/DescriptionServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/description/DescriptionServiceImpl.java index ac508aa75..d11c87a4f 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/description/DescriptionServiceImpl.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/description/DescriptionServiceImpl.java @@ -497,24 +497,20 @@ public class DescriptionServiceImpl implements DescriptionService { if (FieldType.isTextType(fieldType)) { if (FieldType.UPLOAD.equals(fieldType)){ UUID newFileId = this.conventionService.isValidUUID(persist.getTextValue()) ? UUID.fromString(persist.getTextValue()) : null; - UUID existingFileId = this.conventionService.isValidUUID(data.getTextValue()) ? UUID.fromString(data.getTextValue()) : null; if (newFileId != null){ - if (!newFileId.equals(existingFileId)) { + StorageFileEntity existingFile = this.queryFactory.query(StorageFileQuery.class).authorize(AuthorizationFlags.OwnerOrDmpAssociatedOrPermission).ids(newFileId).firstAs(new BaseFieldSet().ensure(StorageFile._id)); + if (existingFile == null){ StorageFile storageFile = this.storageFileService.copyToStorage(newFileId, StorageType.Main, true, new BaseFieldSet().ensure(StorageFile._id)); this.storageFileService.updatePurgeAt(storageFile.getId(), null); - if (existingFileId != null){ + data.setTextValue(storageFile.getId().toString()); + } else { + if (existingFile.getId() != null){ //DO NOT Remove we can not be sure uf the description is copied //this.storageFileService.updatePurgeAt(existingFileId, Instant.now().minusSeconds(60)); } - data.setTextValue(storageFile.getId().toString()); - } else { data.setTextValue(newFileId.toString()); } } else { - if (existingFileId != null){ - //DO NOT Remove we can not be sure uf the description is copied - //this.storageFileService.updatePurgeAt(existingFileId, Instant.now().minusSeconds(60)); - } data.setTextValue(null); } } else { diff --git a/dmp-backend/web/pom.xml.rej b/dmp-backend/web/pom.xml.rej new file mode 100644 index 000000000..a77bee1dd --- /dev/null +++ b/dmp-backend/web/pom.xml.rej @@ -0,0 +1,9 @@ +diff a/dmp-backend/web/pom.xml b/dmp-backend/web/pom.xml (rejected hunks) +@@ -13,6 +13,7 @@ + eu.eudat + dmp-backend + ${revision} ++ ../pom.xml + + + diff --git a/dmp-db-scema/updates/00.01.060_Insert_values.sql b/dmp-db-scema/updates/00.01.060_Insert_values.sql index 9eac8d7e0..cbfb7ed04 100644 --- a/dmp-db-scema/updates/00.01.060_Insert_values.sql +++ b/dmp-db-scema/updates/00.01.060_Insert_values.sql @@ -16,22 +16,22 @@ BEGIN INSERT INTO public."Language" VALUES ('110d2e49-1580-4ee3-b1df-84da966f97a8', 'pt', null, '2024-02-29 16:35:18.114652', '2024-02-29 16:35:18.114652', 1, 9, null); INSERT INTO public."Language" VALUES ('3b865f61-a863-43de-98cd-da86fc3f5940', 'pl', null, '2024-02-29 16:35:18.114652', '2024-02-29 16:35:18.114652', 1, 10, null); - INSERT INTO public."PrefillingSource" VALUES ('7a1ef5db-8833-45e1-85d8-476cea3d4f7a', 'Openaire', 'openaire10falseapplication/jsonremote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabeltitledescriptiondescriptiontitle.content[''title''][''content'']children.instance.license[''children''][''instance''][''license'']subject.content[''subject''][''content'']publisherpublisherlanguage.classid[''language''][''classid'']issued.content[''issued''][''content'']bestaccessright.classid[''bestaccessright''][''classid'']pid.content[''pid''][''content'']pid.classid[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/datasets/?q={like}&page={page}&size={pageSize}&format=jsontitle.contentrda.dataset.distribution.titlelabeldescriptionrda.dataset.distribution.descriptiondescriptionchildren.instance.licenserda.dataset.distribution.license.license_refsubject.contentrda.dataset.keywordtagspublisherrda.dataset.distribution.host.titlelanguage.classidrda.dataset.metadata.languageissued.contentrda.dataset.issuedbestaccessright.classidrda.dataset.distribution.data_accesspid.contentrda.dataset.dataset_idpid.contentrda.dataset.dataset_id.identifierpid.classidrda.dataset.dataset_id.type', 1, '2024-02-28 09:12:41.051733', '2024-04-18 10:32:24.812946', NULL); + INSERT INTO public."PrefillingSource" VALUES ('7a1ef5db-8833-45e1-85d8-476cea3d4f7a', 'OpenAIRE', 'openaire10falseapplication/jsonremote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabeltitledescriptiondescriptiontitle.content[''title''][''content'']children.instance.license[''children''][''instance''][''license'']subject.content[''subject''][''content'']publisherpublisherlanguage.classid[''language''][''classid'']issued.content[''issued''][''content'']bestaccessright.classid[''bestaccessright''][''classid'']pid.content[''pid''][''content'']pid.classid[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/datasets/?q={like}&page={page}&size={pageSize}&format=jsontitle.contentrda.dataset.distribution.titlelabeldescriptionrda.dataset.distribution.descriptiondescriptionchildren.instance.licenserda.dataset.distribution.license.license_refsubject.contentrda.dataset.keywordtagspublisherrda.dataset.distribution.host.titlelanguage.classidrda.dataset.metadata.languageissued.contentrda.dataset.issuedbestaccessright.classidrda.dataset.distribution.data_accesspid.contentrda.dataset.dataset_idpid.contentrda.dataset.dataset_id.identifierpid.classidrda.dataset.dataset_id.type', 1, '2024-02-28 09:12:41.051733', '2024-04-18 10:32:24.812946', NULL); INSERT INTO public."PrefillingSource" VALUES ('d79952bf-cfd9-4af4-b7b4-5a83d68890a5', 'Zenodo', 'zenodo search20falseapplication/jsonremote10$[''hits''][''total'']{like}likereference_ididlabeltitledescriptiondescription$[''hits''][''hits'']https://zenodo.org/api/records/?page={page}&size={pageSize}&q=title:"{like}" doi:"{like}" conceptdoi:"{like}"zenodo get10falseapplication/jsonremote0${like}likemetadata.title[''metadata''][''title'']metadata.description[''metadata''][''description'']metadata.license.id[''metadata''][''license''][''id'']metadata.keywords[''metadata''][''keywords'']metadata.filesize[''metadata''][''files''][''size'']metadata.language[''metadata''][''language'']metadata.dates.valid[''metadata''][''dates''][''type'']metadata.license.created[''metadata''][''license''][''created'']metadata.embargo_date[''metadata''][''embargo_date'']metadata.publication_date[''metadata''][''publication_date'']metadata.access_right[''metadata''][''access_right'']files[''files''][''key'']doidoi$https://zenodo.org/api/records/{like}metadata.titlerda.dataset.distribution.titlelabelmetadata.descriptionrda.dataset.distribution.descriptiondescriptionmetadata.license.idrda.dataset.distribution.license.license_refmetadata.keywordsrda.dataset.keywordtagsmetadata.filesizerda.dataset.distribution.byte_sizemetadata.languagerda.dataset.metadata.languagemetadata.dates.validrda.dataset.distribution.available_untilmetadata.license.createdrda.dataset.distribution.license.start_datemetadata.embargo_daterda.dataset.distribution.license.start_datemetadata.publication_daterda.dataset.issuedmetadata.access_rightrda.dataset.distribution.data_accessfilesrda.dataset.distribution.format^.*\.doirda.dataset.dataset_iddoirda.dataset.dataset_id.identifierZenodorda.dataset.distribution.host.titleMore than 99% uptime yearlyrda.dataset.distribution.host.availabilityCHrda.dataset.distribution.host.geo_locationAll files uploaded to Zenodo are stored in CERN’s EOS service in an 18 petabytes disk cluster.rda.dataset.distribution.host.storage_typedoirda.dataset.dataset_id.typehttps://schema.datacite.org/meta/kernel-4.4/rda.dataset.metadata.metadata_standard_id.identifierurlrda.dataset.metadata.metadata_standard_id.typeengrda.dataset.metadata.languageDataCite Metadata Schemarda.dataset.metadata.descriptionHourlyrda.dataset.distribution.host.backup_frequencyIncremental backuprda.dataset.distribution.host.backup_typeRepository hosted by Zenodorda.dataset.distribution.host.descriptionhttps://zenodo.orgrda.dataset.distribution.host.urldoirda.dataset.distribution.host.pid_system', 1, '2024-02-28 10:20:50.570055', '2024-04-17 07:11:52.483139', NULL); - INSERT INTO public."ReferenceType" VALUES ('2baab1e8-561f-4c15-84c3-571b811c52f6', 'licenses', 'licenses', 'opendefinition100falseapplication/vnd.api+json; charset=utf-8remote10$[*]reference_ididlabeltitledescriptionmaintaineruriurl$[*]https://licenses.opendefinition.org/licenses/groups/all.json', 1, '2023-11-16 16:24:12.162675', '2024-02-16 09:14:22.723311', NULL); - INSERT INTO public."ReferenceType" VALUES ('2beacaad-3223-43ad-ad99-1e5f21328e7b', 'registries', 'registries', 'rda-metadata-schemes100falseapplication/json; charset=utf-8remote10$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idmscidlabeltitledescriptiondescriptionurluri$[''data''][''items''][*]https://rdamsc.bath.ac.uk/api2/m?q={like}&start=1&pageSize={pageSize}', 1, '2023-11-16 10:08:21.240804', '2024-02-16 09:16:50.456347', NULL); - INSERT INTO public."ReferenceType" VALUES ('3d372db5-a456-45e6-a845-e41e1a8311f8', 'projects', 'projects', 'project11', 1, '2023-11-17 08:55:05.190807', '2023-11-17 08:56:23.012619', NULL); - INSERT INTO public."ReferenceType" VALUES ('51225b6a-86a6-48ac-9192-f15096dbcb8a', 'publications', 'publications', 'openaire100falseapplication/json;charset=UTF-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}*likereference_idoriginalIdlabeltitledescriptiontitlepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/resources?query=oaftype exact result and {like}&page={page}&size={pageSize}&format=json', 1, '2023-11-16 13:07:20.591433', '2024-02-19 08:23:49.91191', NULL); - INSERT INTO public."ReferenceType" VALUES ('538928bb-c7c6-452e-b66d-08e539f5f082', 'funders', 'funders', 'openaire101falseapplication/json; charset=utf-8local00$[*]reference_ididlabelnamedescriptionname$[''refineResults''][''relfunder''][*]https://services.openaire.eu/search/v2/api/publications?&refine=true&fields=relfunder&page={page}&size=0&format=json', 1, '2023-11-16 11:22:57.942097', '2024-02-16 09:16:19.195353', NULL); - INSERT INTO public."ReferenceType" VALUES ('5a2112e7-ea99-4cfe-98a1-68665e26726e', 'researchers', 'researchers', 'orcid100falseapplication/json; charset=UTF-8remote00$[''num-found'']^[A-Za-z0-9]+ [A-Za-z0-9]+$ ((given-names:{like1}+AND+family-name:{like2})+OR+(given-names:{like2}+AND+family-name:{like1}))\d{4}-\d{4}-\d{4}-\d{4}orcid:{like}.+given-names:{like}+OR+family-name:{like}*likereference_idorcid-idlabel@{{given-names}} @{{family-names}} (@{{orcid-id}})descriptioninstitution-namefistNamegiven-nameslastNamefamily-names$[''expanded-result''][*]https://pub.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}', 1, '2023-11-16 18:21:43.272982', '2024-04-17 09:44:53.656849', NULL); - INSERT INTO public."ReferenceType" VALUES ('5b9c284f-f041-4995-96cc-fad7ad13289c', 'grants', 'grants', 'openaire1538928bb-c7c6-452e-b66d-08e539f5f08200falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}*like&fq=(funder exact "{reference}")538928bb-c7c6-452e-b66d-08e539f5f082openairefunderQueryreference_idoriginalIdlabeltitledescriptiontitle$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:project'']https://services.openaire.eu/search/v2/api/resources?query=((oaftype exact project) and ((projectcode_nt exact "{like}")or({like}))){funderQuery}&page={page}&size={pageSize}&format=json', 1, '2023-11-16 16:41:53.106646', '2024-04-17 13:13:30.853978', NULL); - INSERT INTO public."ReferenceType" VALUES ('7eeffb98-58fb-4921-82ec-e27f32f8e738', 'organisations', 'organisations', 'openaire100falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabellegalnamedescriptionlegalnamepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:organization'']https://services.openaire.eu/search/v2/api/organizations/?q={like}&page={page}&size={pageSize}&format=json', 1, '2023-11-17 10:13:15.873808', '2024-02-16 15:35:47.874131', NULL); - INSERT INTO public."ReferenceType" VALUES ('8ec7556b-749d-4c4a-a4b9-43d064693795', 'journals', 'journals', 'openaire100falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"journal"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDING', 1, '2023-11-16 17:40:12.811667', '2024-02-16 09:09:22.816978', NULL); - INSERT INTO public."ReferenceType" VALUES ('9ec2000d-95c7-452e-b356-755fc8e2574c', 'services', 'services', 'eosc100falseapplication/json; charset=utf-8remote00$[''from'',''to'',''total'']{like}likereference_ididlabelnamedescriptiondescriptionuriwebpage$[''results''][*]https://providers.eosc-portal.eu/api/service/all?query={like}&from={page}&quantity={pageSize}', 1, '2023-11-16 17:57:22.081053', '2024-02-16 09:07:13.944104', NULL); - INSERT INTO public."ReferenceType" VALUES ('a3ce0fb2-d72c-48bb-b322-7401940cb802', 'datasets', 'datasets', 'openaire100falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabeltitledescriptiontitlepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/datasets/?q={like}&page={page}&size={pageSize}&format=json', 1, '2023-11-17 10:26:55.332111', '2024-02-16 15:33:35.025025', NULL); - INSERT INTO public."ReferenceType" VALUES ('ab7cdd93-bea2-440d-880d-3846dad80b21', 'taxonomies', 'taxonomies', 'taxonomy11', 1, '2023-11-16 17:48:09.769599', '2023-11-16 17:48:09.780609', NULL); - INSERT INTO public."ReferenceType" VALUES ('d26b64ba-fda0-4b14-b3ef-9856a492d55a', 'repositories', 'repositories', 'openaire100falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"data"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDING', 1, '2023-11-16 17:10:33.849688', '2024-02-16 12:45:18.66016', NULL); + INSERT INTO public."ReferenceType" VALUES ('2baab1e8-561f-4c15-84c3-571b811c52f6', 'Licenses', 'licenses', 'opendefinition100falseapplication/vnd.api+json; charset=utf-8remote10$[*]reference_ididlabeltitledescriptionmaintaineruriurl$[*]https://licenses.opendefinition.org/licenses/groups/all.json', 1, '2023-11-16 16:24:12.162675', '2024-02-16 09:14:22.723311', NULL); + INSERT INTO public."ReferenceType" VALUES ('2beacaad-3223-43ad-ad99-1e5f21328e7b', 'Registries', 'registries', 'rda-metadata-schemes100falseapplication/json; charset=utf-8remote10$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idmscidlabeltitledescriptiondescriptionurluri$[''data''][''items''][*]https://rdamsc.bath.ac.uk/api2/m?q={like}&start=1&pageSize={pageSize}', 1, '2023-11-16 10:08:21.240804', '2024-02-16 09:16:50.456347', NULL); + INSERT INTO public."ReferenceType" VALUES ('3d372db5-a456-45e6-a845-e41e1a8311f8', 'Projects', 'projects', 'project11', 1, '2023-11-17 08:55:05.190807', '2023-11-17 08:56:23.012619', NULL); + INSERT INTO public."ReferenceType" VALUES ('51225b6a-86a6-48ac-9192-f15096dbcb8a', 'Publications', 'publications', 'openaire100falseapplication/json;charset=UTF-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}*likereference_idoriginalIdlabeltitledescriptiontitlepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/resources?query=oaftype exact result and {like}&page={page}&size={pageSize}&format=json', 1, '2023-11-16 13:07:20.591433', '2024-02-19 08:23:49.91191', NULL); + INSERT INTO public."ReferenceType" VALUES ('538928bb-c7c6-452e-b66d-08e539f5f082', 'Funders', 'funders', 'openaire101falseapplication/json; charset=utf-8local00$[*]reference_ididlabelnamedescriptionname$[''refineResults''][''relfunder''][*]https://services.openaire.eu/search/v2/api/results?&refine=true&fields=relfunder&page={page}&size=0&format=json&sf=relfunder', 1, '2023-11-16 11:22:57.942097', '2024-02-16 09:16:19.195353', NULL); + INSERT INTO public."ReferenceType" VALUES ('5a2112e7-ea99-4cfe-98a1-68665e26726e', 'Researchers', 'researchers', 'orcid100falseapplication/json; charset=UTF-8remote00$[''num-found'']^[A-Za-z0-9]+ [A-Za-z0-9]+$ ((given-names:{like1}+AND+family-name:{like2})+OR+(given-names:{like2}+AND+family-name:{like1}))\d{4}-\d{4}-\d{4}-\d{4}orcid:{like}.+given-names:{like}+OR+family-name:{like}*likereference_idorcid-idlabel@{{given-names}} @{{family-names}} (@{{orcid-id}})descriptioninstitution-namefistNamegiven-nameslastNamefamily-names$[''expanded-result''][*]https://pub.orcid.org/v3.0/expanded-search/?q={like}&start={page}&rows={pageSize}', 1, '2023-11-16 18:21:43.272982', '2024-04-17 09:44:53.656849', NULL); + INSERT INTO public."ReferenceType" VALUES ('5b9c284f-f041-4995-96cc-fad7ad13289c', 'Grants', 'grants', 'openaire1538928bb-c7c6-452e-b66d-08e539f5f08200falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}*like&fq=(funder exact "{reference}")538928bb-c7c6-452e-b66d-08e539f5f082openairefunderQueryreference_idoriginalIdlabeltitledescriptiontitle$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:project'']https://services.openaire.eu/search/v2/api/resources?query=((oaftype exact project) and ((projectcode_nt exact "{like}")or({like}))){funderQuery}&page={page}&size={pageSize}&format=json', 1, '2023-11-16 16:41:53.106646', '2024-04-17 13:13:30.853978', NULL); + INSERT INTO public."ReferenceType" VALUES ('7eeffb98-58fb-4921-82ec-e27f32f8e738', 'Organisations', 'organisations', 'openaire100falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabellegalnamedescriptionlegalnamepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:organization'']https://services.openaire.eu/search/v2/api/organizations/?q={like}&page={page}&size={pageSize}&format=json', 1, '2023-11-17 10:13:15.873808', '2024-02-16 15:35:47.874131', NULL); + INSERT INTO public."ReferenceType" VALUES ('8ec7556b-749d-4c4a-a4b9-43d064693795', 'Journals', 'journals', 'openaire100falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"journal"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDING', 1, '2023-11-16 17:40:12.811667', '2024-02-16 09:09:22.816978', NULL); + INSERT INTO public."ReferenceType" VALUES ('9ec2000d-95c7-452e-b356-755fc8e2574c', 'Services', 'services', 'eosc100falseapplication/json; charset=utf-8remote00$[''from'',''to'',''total'']{like}likereference_ididlabelnamedescriptiondescriptionuriwebpage$[''results''][*]https://providers.eosc-portal.eu/api/service/all?query={like}&from={page}&quantity={pageSize}', 1, '2023-11-16 17:57:22.081053', '2024-02-16 09:07:13.944104', NULL); + INSERT INTO public."ReferenceType" VALUES ('a3ce0fb2-d72c-48bb-b322-7401940cb802', 'Datasets', 'datasets', 'openaire100falseapplication/json; charset=utf-8remote00$[''meta''][''pagination''][''page'',''pages'',''count'']{like}likereference_idoriginalIdlabeltitledescriptiontitlepid[''pid''][''content'']pidTypeField[''pid''][''classid'']$[''results''][*][''result''][''metadata''][''oaf:entity''][''oaf:result'']https://services.openaire.eu/search/v2/api/datasets/?q={like}&page={page}&size={pageSize}&format=json', 1, '2023-11-17 10:26:55.332111', '2024-02-16 15:33:35.025025', NULL); + INSERT INTO public."ReferenceType" VALUES ('ab7cdd93-bea2-440d-880d-3846dad80b21', 'Taxonomies', 'taxonomies', 'taxonomy11', 1, '2023-11-16 17:48:09.769599', '2023-11-16 17:48:09.780609', NULL); + INSERT INTO public."ReferenceType" VALUES ('d26b64ba-fda0-4b14-b3ef-9856a492d55a', 'Repositories', 'repositories', 'openaire100falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"data"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDING', 1, '2023-11-16 17:10:33.849688', '2024-02-16 12:45:18.66016', NULL); INSERT INTO public."ReferenceType" VALUES ('1e927daa-b856-443f-96da-22f325f7322f', 'Publication Repositories', 'pubRepositories', 'openaire100falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"pubsrepository::institutional"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDINGopenaire200falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"pubsrepository::thematic"}reference_ididlabelofficialnamedescriptioncount$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDINGopenaire300falseapplication/jsonremote01$[''meta''][''pagination''][''page'',''pages'',''count'']{like}like{"officialname": "{like}", "typology":"pubsrepository::unknown"}reference_ididlabelofficialnamedescriptionofficialname$[''datasourceInfo''][*]https://services.openaire.eu/openaire/ds/searchdetails/{page}/{pageSize}?requestSortBy=id&order=ASCENDING', 1, '2023-11-16 17:17:40.882679', '2024-02-19 09:53:35.61152', NULL); INSERT INTO public."DBVersion" VALUES ('DMPDB', '00.01.060', '2024-03-26 12:00:00.000000+02', now(), 'Add Language, Prefilling Source, Reference Type values.'); diff --git a/dmp-frontend/src/app/app-routing.module.ts b/dmp-frontend/src/app/app-routing.module.ts index 713f61220..928379264 100644 --- a/dmp-frontend/src/app/app-routing.module.ts +++ b/dmp-frontend/src/app/app-routing.module.ts @@ -16,7 +16,8 @@ const appRoutes: Routes = [ path: 'home', loadChildren: () => import('./ui/dashboard/dashboard.module').then(m => m.DashboardModule), data: { - breadcrumb: true + breadcrumb: true, + title: 'GENERAL.TITLES.HOME' } }, { diff --git a/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.html b/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.html index da1db5be5..69e9fb675 100644 --- a/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.html +++ b/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.html @@ -4,14 +4,14 @@
- + {{_displayFn(selectedItem)}} - diff --git a/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.ts b/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.ts index abad96f88..ee85651df 100644 --- a/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.ts +++ b/dmp-frontend/src/app/library/auto-complete/multiple/multiple-auto-complete.component.ts @@ -333,6 +333,7 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp writeValue(value: any): void { this.value = Array.isArray(value) ? value : null; // Update chips observable + this.autocompleteInput.nativeElement.value = ''; this._items = null; this.getSelectedItems(this.value); } @@ -434,16 +435,16 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp } _canRemoveItem(item: any): boolean { - if(this.configuration.canRemoveItem != null) { - return this.configuration.canRemoveItem(item).canRemove; + if(item != null && this.configuration.canRemoveItem != null) { + return this.configuration.canRemoveItem(item)?.canRemove; } return true; } _canRemoveItemMessage(item: any): string { - if(this.configuration.canRemoveItem != null) { + if(item != null && this.configuration.canRemoveItem != null) { const canRemoveResuslt = this.configuration.canRemoveItem(item); - if (canRemoveResuslt.canRemove) return canRemoveResuslt.message; + if (!canRemoveResuslt?.canRemove) return canRemoveResuslt.message; } return null; } @@ -491,3 +492,8 @@ export class MultipleAutoCompleteComponent extends _CustomComponentMixinBase imp } } + +export interface MultipleAutoCompleteCanRemoveItem { + canRemove: boolean; + message: string; +} diff --git a/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts b/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts index dcd42c862..4097f708a 100644 --- a/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts +++ b/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts @@ -8,7 +8,7 @@ import { Subscription } from "rxjs"; template: `
close diff --git a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html index 67fb2503c..b1aca34fa 100644 --- a/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/description-template/editor/components/composite-field/description-template-editor-composite-field.component.html @@ -205,7 +205,7 @@ diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.html index 243cc1be5..6c0dca99b 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.html @@ -3,20 +3,21 @@
- + {{'TENANT-CONFIGURATION-EDITOR.FIELDS.PRIMARY-COLOR' | translate}} {{formGroup.get('cssColors')?.get('primaryColor')?.getError('backendError').message}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'GENERAL.VALIDATION.INVALID-COLOR' | translate}} - + {{'TENANT-CONFIGURATION-EDITOR.FIELDS.PRIMARY-COLOR-2' | translate}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'GENERAL.VALIDATION.INVALID-COLOR' | translate}} - + {{'TENANT-CONFIGURATION-EDITOR.FIELDS.PRIMARY-COLOR-3' | translate}} {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{'GENERAL.VALIDATION.INVALID-COLOR' | translate}} - + {{'TENANT-CONFIGURATION-EDITOR.FIELDS.SECONDARY-COLOR' | translate}}
-
-
-
diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.scss b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.scss index 33cd57c15..e6b81ab51 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/css-colors/css-colors-editor.component.scss @@ -1,3 +1,7 @@ .css-colors { } + +::ng-deep .mat-mdc-form-field-icon-suffix { + margin-right: 0.2em; +} diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/default-user-locale/default-user-locale-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/default-user-locale/default-user-locale-editor.component.html index 1e9fa8a8f..aa794485a 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/default-user-locale/default-user-locale-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/default-user-locale/default-user-locale-editor.component.html @@ -1,6 +1,6 @@
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.TIMEZONE' | translate}} @@ -11,6 +11,8 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{formGroup.get('defaultUserLocale')?.get('timezone')?.getError('backendError').message}} +
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.CULTURE' | translate}} @@ -21,6 +23,8 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}} {{formGroup.get('defaultUserLocale')?.get('culture')?.getError('backendError').message}} +
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.LANGUAGE' | translate}} @@ -34,12 +38,11 @@
-
-
-
diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html index 584504544..d6ca45174 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.html @@ -24,7 +24,7 @@
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.REPOSITORY-ID' | translate}} @@ -32,7 +32,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.URL' | translate}} @@ -40,7 +40,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.ISSUER-URL' | translate}} @@ -48,7 +48,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.CLIENT-ID' | translate}} @@ -56,7 +56,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.CLIENT-SECRET' | translate}} @@ -64,7 +64,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.SCOPE' | translate}} @@ -72,7 +72,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.PDF-TRANSFORMER-ID' | translate}} @@ -80,7 +80,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.RDA-TRANSFORMER-ID' | translate}} @@ -94,12 +94,11 @@
-
-
-
diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.scss b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.scss index 475061b20..cb290cffc 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/deposit/deposit-editor.component.scss @@ -18,3 +18,7 @@ } } } + +::ng-deep label { + margin: 0; +} diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html index c487e5650..f8fc73602 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.html @@ -23,7 +23,7 @@
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.TRANSFORMER-ID' | translate}} @@ -31,7 +31,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.URL' | translate}} @@ -39,7 +39,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.ISSUER-URL' | translate}} @@ -47,7 +47,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.CLIENT-ID' | translate}} @@ -55,7 +55,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.CLIENT-SECRET' | translate}} @@ -63,7 +63,7 @@ {{'GENERAL.VALIDATION.REQUIRED' | translate}}
-
+
{{'TENANT-CONFIGURATION-EDITOR.FIELDS.SCOPE' | translate}} @@ -78,11 +78,11 @@
-
-
diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.scss b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.scss index 998033d7a..eb0012996 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/file-transformer/file-transformer-editor.component.scss @@ -18,3 +18,7 @@ } } } + +::ng-deep label { + margin: 0; +} diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.html index 5b8961563..ccc3b3d45 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.html @@ -7,25 +7,25 @@
- -
-
-
diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.scss b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.scss index 120e11069..67a64bbdd 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.scss +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/logo/logo-editor.component.scss @@ -1,3 +1,19 @@ -.logo { +.attach-btn { + top: -20px; +} + +.attach-file { + width: 156px; + height: 44px; + color: #ffffff; + background: var(--primary-color) 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #1e202029; + border-radius: 30px; +} + +.attach-file:hover { + background-color: #ffffff; + border: 1px solid var(--primary-color); + color: var(--primary-color); } diff --git a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/tenant-configuration-editor.component.html b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/tenant-configuration-editor.component.html index b6dce98d4..25c9dd65d 100644 --- a/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/tenant-configuration-editor.component.html +++ b/dmp-frontend/src/app/ui/admin/tenant-configuration/editor/tenant-configuration-editor.component.html @@ -8,63 +8,71 @@
- - - {{'TENANT-CONFIGURATION-EDITOR.TITLE' | translate}} - - -
- - - - {{'TENANT-CONFIGURATION-EDITOR.DEFAULT-USER-LOCALE.TITLE' | translate}} - {{'TENANT-CONFIGURATION-EDITOR.DEFAULT-USER-LOCALE.HINT' | translate}} - - - - - - - - {{'TENANT-CONFIGURATION-EDITOR.CSS-COLORS.TITLE' | translate}} - {{'TENANT-CONFIGURATION-EDITOR.CSS-COLORS.HINT' | translate}} - - - - - - - - {{'TENANT-CONFIGURATION-EDITOR.DEPOSIT-PLUGINS.TITLE' | translate}} - {{'TENANT-CONFIGURATION-EDITOR.DEPOSIT-PLUGINS.HINT' | translate}} - - - - - - - - {{'TENANT-CONFIGURATION-EDITOR.FILE-TRANSFORMER-PLUGINS.TITLE' | translate}} - {{'TENANT-CONFIGURATION-EDITOR.FILE-TRANSFORMER-PLUGINS.HINT' | translate}} - - - - - - - - {{'TENANT-CONFIGURATION-EDITOR.LOGO.TITLE' | translate}} - {{'TENANT-CONFIGURATION-EDITOR.LOGO.HINT' | translate}} - - - - - +
+
+ + + {{'TENANT-CONFIGURATION-EDITOR.TITLE' | translate}} + + +
+
+ + + + {{'TENANT-CONFIGURATION-EDITOR.DEFAULT-USER-LOCALE.TITLE' | translate}} + {{'TENANT-CONFIGURATION-EDITOR.DEFAULT-USER-LOCALE.HINT' | translate}} + + +
+ +
+
+
+ + + {{'TENANT-CONFIGURATION-EDITOR.CSS-COLORS.TITLE' | translate}} + {{'TENANT-CONFIGURATION-EDITOR.CSS-COLORS.HINT' | translate}} + + + + + + + + {{'TENANT-CONFIGURATION-EDITOR.DEPOSIT-PLUGINS.TITLE' | translate}} + {{'TENANT-CONFIGURATION-EDITOR.DEPOSIT-PLUGINS.HINT' | translate}} + + + + + + + + {{'TENANT-CONFIGURATION-EDITOR.FILE-TRANSFORMER-PLUGINS.TITLE' | translate}} + {{'TENANT-CONFIGURATION-EDITOR.FILE-TRANSFORMER-PLUGINS.HINT' | translate}} + + + + + + + + {{'TENANT-CONFIGURATION-EDITOR.LOGO.TITLE' | translate}} + {{'TENANT-CONFIGURATION-EDITOR.LOGO.HINT' | translate}} + + + + + -
-
- - + +
+
+ + +
+
diff --git a/dmp-frontend/src/app/ui/auth/login/login.component.html b/dmp-frontend/src/app/ui/auth/login/login.component.html index cdaf7d3d6..3a6cce8d1 100644 --- a/dmp-frontend/src/app/ui/auth/login/login.component.html +++ b/dmp-frontend/src/app/ui/auth/login/login.component.html @@ -1,81 +1,3 @@ - \ No newline at end of file diff --git a/dmp-frontend/src/app/ui/auth/login/login.component.scss b/dmp-frontend/src/app/ui/auth/login/login.component.scss index e78cd7a8c..e69de29bb 100644 --- a/dmp-frontend/src/app/ui/auth/login/login.component.scss +++ b/dmp-frontend/src/app/ui/auth/login/login.component.scss @@ -1,401 +0,0 @@ -.login-screen { - // margin-top: 70px; - min-height: calc(100vh - 10px); -} - -.login-card { - // width: auto; - width: 510.92px; - height: 517.44px; - margin-top: 0; -} - -.card { - // box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14); - box-shadow: 0px 1px 3px #00000038; - border-radius: 6px; - color: rgba(0, 0, 0, 0.87); - background: #fff; -} - -.card-raised { - box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.42), 0 4px 25px 0px rgba(0, 0, 0, 0.12), - 0 8px 10px -5px rgba(0, 0, 0, 0.2); -} - -.page-title { - margin-top: 40px; -} - -.title { - text-align: center; - font: Bold 38px/82px Roboto; - height: 60px; - letter-spacing: -0.95px; - color: var(--primary-color-2); - margin-top: 11px; - margin-bottom: 21px; -} - -.line { - border-top: 5px solid var(--primary-color-2); - width: 116px; - margin-bottom: 97px; -} - -.container { - height: 100%; - position: relative; - z-index: 1; - padding: 15px 30px; -} - -@-webkit-keyframes card { - from { - top: -40px; - } - - to { - top: 0; - } -} - -@keyframes card { - from { - top: -40px; - } - - to { - top: 0; - } -} - -.card { - position: relative; - padding: 20px; - display: flex; - flex-direction: column; - align-items: center; - margin-top: 50px; - top: -50px; - -webkit-animation-name: card; - -moz-animation-name: card; - -o-animation-name: card; - animation-name: card; - -webkit-animation-duration: 600ms; - -moz-animation-duration: 600ms; - -o-animation-duration: 600ms; - animation-duration: 600ms; - -webkit-animation-fill-mode: forwards; - -moz-animation-fill-mode: forwards; - -o-animation-fill-mode: forwards; - animation-fill-mode: forwards; -} - -.card-header { - position: relative; - overflow: hidden; - top: -50px; - width: 100%; - min-height: 200px; - padding: 25px; - border-radius: 3px; - background: #0c7489; - // background: rgb(0, 112, 192); - display: flex; - flex-direction: column; - align-items: center; -} - -.card-header h4 { - font-weight: 400; - color: #fff; - margin-bottom: 25px; - margin-top: 5px; -} - -// .social-btns { -// height: 6em; -// justify-content: center; -// } - -// .social-btns i { -// font-size: 2.5em; -// padding: 0.8em; -// color: #fff; -// } - -// .social-btns .col { -// flex-grow: 0; -// } - -// .social-btns i:hover { -// background-color: #f5f5f51c; -// border-radius: 60%; -// } - -.accesss-methods { - height: 5em; - justify-content: center; -} - -.accesss-methods .col-auto:hover { - background-color: #f5f5f51c; - border-radius: 100%; -} - -.accesss-methods .logo { - flex-grow: 0; - padding-top: 21px; - padding-bottom: 21px; -} - -.accesss-methods .openaire-logo { - flex-grow: 0; - padding-top: 21px; - padding-bottom: 21px; - margin-top: 5px; - height: 90px; -} - -.accesss-methods .orcid-logo { - height: 75px; - padding-top: 8px; - margin-top: 13px; -} - -.accesss-methods .configurable-logo { - flex-grow: 0; - padding-top: 21px; - padding-bottom: 21px; - margin-top: 5px; - height: 90px; -} - -.accesss-methods .zenodo-logo { - height: 75px; - padding-top: 8px; - margin-top: 13px; -} - -.tip { - margin-top: -20px; -} - -.form-row, -.card-form, -.mat-form-field { - width: 100%; -} - -.card-form { - padding: 5px; -} - -.form-row { - position: relative; - display: flex; - align-items: center; - margin-top: 13px; -} - -.form-row i { - position: relative; - top: -5px; - margin-right: 15px; - color: #555; -} - -.card-footer { - padding: 0; - border-radius: 0; - align-items: start; - flex-direction: column; -} - -.card-footer button { - color: #e91e63; -} - -.btn span.icon { - background: url(img/b2access_small.png) no-repeat; - float: left; - width: 45px; - height: 25px; -} - -span.googleIcon { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy\ \(2\).png") no-repeat; -} - -span.facebookIcon { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy\ \(4\).png") no-repeat; -} - -span.twitterIcon { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy\ \(5\).png") no-repeat; -} - -span.googleIcon, -span.facebookIcon, -span.twitterIcon { - float: left; - transform: scale(0.8); - width: 45px; - height: 45px; -} - -#googleSignInButton, -.facebookIconButton, -.twitterIconButton, -.openaireIconButton, -.orcidIconMediumButton, -.iconmediumButton { - width: 60px !important; - height: 60px !important; -} - -#googleSignInButton:hover, -.facebookIconButton:hover, -.twitterIconButton:hover, -.openaireIconButton:hover, -.orcidIconMediumButton:hover, -.iconmediumButton:hover { - // background-color: var(--primary-color)3b; - background-color: #ececec; - border-radius: 60%; -} - -span.openaireIcon { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy\ \(6\).png") no-repeat; - background-position: center; - float: right; - transform: scale(0.8); - width: 50px; - height: 45px; -} - -span.orcidIconMedium { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy.png") no-repeat; - background-position: center; - float: left; - transform: scale(0.8); - width: 50px; - height: 45px; -} - -span.iconmedium { - background: url("../../../../assets/images/argos-login/NoPath\ -\ Copy\ \(7\).png") no-repeat; - float: left; - transform: scale(0.85); - width: 67px; - height: 40px; -} - -span.configurableIcon { - float: right; - transform: scale(0.85); - width: 50px; - height: 50px; -} - -span.zenodoIcon { - background: url("../../../../assets/images/argos-login/zenodo-gradient-200.png") no-repeat; - background-position: center; - float: right; - transform: scale(0.7); - width: 200px; - height: 80px; -} - -.b2access-button { - margin-top: 10px; - width: fit-content; -} - -.orcid-button { - margin-top: 10px; - width: fit-content; -} - -.openaire-button { - margin-top: 10px; - width: fit-content; -} - -.configurable-button { - margin-top: 10px; - width: fit-content; -} - -.zenodo-button { - margin-top: 10px; - width: fit-content; -} - -// .login-logo { -// background: url(img/open-dmp.png) no-repeat; -// width: 273px; -// height: 300px; -// background-size: cover; -// } - -.laptop-img { - background: url("../../../../assets/images/login-bottom-image.png") no-repeat; - width: 164px; - height: 200px; - position: relative; - top: -140px; - margin-bottom: -140px; - left: 243px; - border-top: none; -} - -.login-bg { - // background: url(img/login_bg.png) no-repeat; - background-size: cover; -} - -.login-social-button { - width: auto; - height: auto; -} - -@media (min-width: 1200px) { - .container { - width: 100%; - } -} - -@media (min-width: 992px) { - .container { - width: 100%; - } -} - -@media (min-width: 768px) { - .container { - width: 100%; - } -} - -@media (min-width: 401px) and (max-width: 560px) { - .social-btns i { - padding: 0.4em !important; - } - .accesss-methods { - padding-top: 1em; - } -} - -@media (min-width: 0px) and (max-width: 400px) { - .social-btns i { - padding: 0.4em !important; - } - .card-header { - height: 350px !important; - } - .accesss-methods { - padding-top: 1em; - } -} diff --git a/dmp-frontend/src/app/ui/auth/login/login.component.ts b/dmp-frontend/src/app/ui/auth/login/login.component.ts index f0531cbc1..eebd9aaca 100644 --- a/dmp-frontend/src/app/ui/auth/login/login.component.ts +++ b/dmp-frontend/src/app/ui/auth/login/login.component.ts @@ -18,7 +18,6 @@ export class LoginComponent extends BaseComponent implements OnInit { public auth2: any; private returnUrl: string; - //public cofigurableProviders: ConfigurableProvider[]; constructor( private zone: NgZone, diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html index 841707064..7c59fea12 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.html @@ -112,7 +112,7 @@ chevron_right
diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts index 6f74eabd5..e19f8740e 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.component.ts @@ -49,6 +49,7 @@ import { DmpDescriptionTemplate } from '@app/core/model/dmp/dmp'; import { FileTransformerEntityType } from '@app/core/common/enum/file-transformer-entity-type'; import { nameof } from 'ts-simple-nameof'; import { AbstractControl, UntypedFormArray, UntypedFormGroup } from '@angular/forms'; +import { TableOfContentsValidationService } from './table-of-contents/services/table-of-contents-validation-service'; @Component({ selector: 'app-description-editor-component', @@ -60,6 +61,7 @@ export class DescriptionEditorComponent extends BaseEditor this.prepareForm(data)); + this.tocValidationService.validateForm(); } refreshOnNavigateToData(id?: Guid): void { this.formGroup.markAsPristine(); - if (this.isNew) { + if (this.isNew || this.isCopy) { let route = []; route.push('/descriptions/edit/' + id); this.router.navigate(route, { queryParams: { 'lookup': this.queryParamsService.serializeLookup(this.lookupParams), 'lv': ++this.lv }, replaceUrl: true, relativeTo: this.route }); @@ -841,7 +847,7 @@ export class DescriptionEditorComponent extends BaseEditor { if (key === 'required') { // errors.push(this.language.instant(name + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); - if(name == 'label') errors.push(this.language.instant(this.language.instant('DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION') + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); + if(name == 'label') errors.push(this.language.instant(this.language.instant('DESCRIPTION-EDITOR.BASE-INFO.FIELDS.TITLE') + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); else if(name == 'descriptionTemplateId') errors.push(this.language.instant(this.language.instant('DESCRIPTION-EDITOR.BASE-INFO.FIELDS.DESCRIPTION-TEMPLATE') + ": " + this.language.instant('GENERAL.FORM-VALIDATION-DISPLAY-DIALOG.REQUIRED'))); } else if (key === 'email') { @@ -1015,6 +1021,10 @@ export class DescriptionEditorComponent extends BaseEditor this.tocValidationService.validateForm()); // // const labelSubscription = // this.formGroup.get('label').valueChanges @@ -1261,6 +1271,7 @@ export class DescriptionEditorComponent extends BaseEditor this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed), concatMap(dmp => { return this.descriptionService.getSingle(Guid.parse(id), DescriptionEditorResolver.cloneLookupFields()).pipe(tap(x => this.breadcrumbService.addIdResolvedValue(x.id?.toString(), x.label)), takeUntil(this._destroyed), map(description => { + description.id = null; + description.hash = null; + description.status = DescriptionStatus.Draft; description.dmp = dmp; description.dmpDescriptionTemplate = { + id: dmp.dmpDescriptionTemplates.filter(x => x.sectionId == Guid.parse(dmpSectionId) && x.descriptionTemplateGroupId == description.descriptionTemplate.groupId)[0].id, sectionId: Guid.parse(dmpSectionId) } return description; diff --git a/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts b/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts index e86406d08..2d1ea28a0 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-editor.routing.ts @@ -21,7 +21,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -39,7 +40,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-EDIT-DESCRIPTION' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -57,7 +59,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-NEW' // , // authContext: { // permissions: [AppPermission.EditDescription] @@ -75,7 +78,8 @@ const routes: Routes = [ data: { ...BreadcrumbService.generateRouteDataConfiguration({ title: 'BREADCRUMBS.EDIT-DESCRIPTION' - }) + }), + title: 'DESCRIPTION-EDITOR.TITLE-NEW' // , // authContext: { // permissions: [AppPermission.EditDescription] diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.html b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.html index 2df2cfbe0..8a96b965d 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.html +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.html @@ -82,7 +82,7 @@
- + {{field.data.label}} {{propertiesFormGroup?.get(field.id).get('textValue').getError('backendError').message}}
diff --git a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts index 0b7f93b1d..7cf364498 100644 --- a/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/description-form/components/form-field/form-field.component.ts @@ -164,7 +164,7 @@ export class DescriptionFormFieldComponent extends BaseComponent implements OnIn // } break; case DescriptionTemplateFieldType.CHECK_BOX: - if (this.propertiesFormGroup?.get(this.field.id).get('textValue').value == "false") this.propertiesFormGroup?.get(this.field.id).get('textValue').setValue(undefined); + this.propertiesFormGroup?.get(this.field.id).get('textValue').setValue(this.propertiesFormGroup?.get(this.field.id).get('textValue').value === 'true'); break; } diff --git a/dmp-frontend/src/app/ui/description/editor/table-of-contents/services/table-of-contents-validation-service.ts b/dmp-frontend/src/app/ui/description/editor/table-of-contents/services/table-of-contents-validation-service.ts new file mode 100644 index 000000000..c90ed33ca --- /dev/null +++ b/dmp-frontend/src/app/ui/description/editor/table-of-contents/services/table-of-contents-validation-service.ts @@ -0,0 +1,13 @@ +import { EventEmitter, Injectable } from "@angular/core"; + +@Injectable() +export class TableOfContentsValidationService { + private _validateFormEvent: EventEmitter = new EventEmitter(); + get validateFormEvent(): EventEmitter { + return this._validateFormEvent; + } + + validateForm(): void { + this._validateFormEvent.emit(); + } +} diff --git a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts index ecf0ca556..42f076dea 100644 --- a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts +++ b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents-internal/table-of-contents-internal.ts @@ -6,6 +6,7 @@ import { ToCEntry } from '../models/toc-entry'; import { ToCEntryType } from '../models/toc-entry-type.enum'; import { DescriptionFieldIndicator } from '../../description-editor.model'; import { Observable, Subscription, map } from 'rxjs'; +import { TableOfContentsValidationService } from '../services/table-of-contents-validation-service'; @Component({ selector: 'table-of-contents-internal', @@ -34,8 +35,7 @@ export class TableOfContentsInternal implements OnInit, OnDestroy { tocEntriesStateSubscriptions: Subscription[] = []; tocEntriesStateMap: Map = new Map(); - constructor() { - } + constructor(private tocValidationService: TableOfContentsValidationService) { } ngOnInit(): void { // console.log('component created' + JSON.stringify(this.tocentries)); @@ -90,10 +90,10 @@ export class TableOfContentsInternal implements OnInit, OnDestroy { refreshErrorIndicators(): void { this.updatedMap = this.updateMap(this.tocentries, this.parentMap); for (let entry of this.tocentries) { - this.tocEntriesStateMap.set(entry.id, false); + this.tocEntriesStateMap.set(entry.id, this.hasErrors(entry.id)); this.tocEntriesStateSubscriptions.push( - this.propertiesFormGroup.statusChanges + this.tocValidationService.validateFormEvent .pipe(map(() => this.hasErrors(entry.id))) .subscribe(next => { this.tocEntriesStateMap.set(entry.id, next); diff --git a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.module.ts b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.module.ts index 2a7bc3749..413bfde9a 100644 --- a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.module.ts +++ b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.module.ts @@ -1,15 +1,16 @@ import {CommonModule} from '@angular/common'; -import {NgModule} from '@angular/core'; +import { NgModule} from '@angular/core'; import {RouterModule} from '@angular/router'; import { TableOfContentsInternal } from './table-of-contents-internal/table-of-contents-internal'; import { MatIconModule } from '@angular/material/icon'; import { VisibilityRulesService } from '@app/ui/description/editor/description-form/visibility-rules/visibility-rules.service'; import { TableOfContentsComponent } from './table-of-contents.component'; +import { TableOfContentsValidationService } from './services/table-of-contents-validation-service'; @NgModule({ imports: [CommonModule, RouterModule, MatIconModule], declarations: [TableOfContentsComponent, TableOfContentsInternal], exports: [TableOfContentsComponent], - providers: [VisibilityRulesService] + providers: [VisibilityRulesService, TableOfContentsValidationService] }) export class TableOfContentsModule { } diff --git a/dmp-frontend/src/app/ui/description/listing/description-listing.component.scss b/dmp-frontend/src/app/ui/description/listing/description-listing.component.scss index 3e272773e..c8c27591b 100644 --- a/dmp-frontend/src/app/ui/description/listing/description-listing.component.scss +++ b/dmp-frontend/src/app/ui/description/listing/description-listing.component.scss @@ -1,12 +1,3 @@ - -.header-image { - background: url("/assets/images/new-dashboard-bg.png") no-repeat; - background-size: cover; - margin-top: 70px; - min-height: 15em; - position: relative; -} - .header-title { text-align: left; font-size: 1.25rem; diff --git a/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss b/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss index 570988e99..d940eb054 100644 --- a/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss +++ b/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss @@ -52,7 +52,7 @@ } .id-btn { - background: url("../../../../assets/images/NoPath.png") no-repeat center; + background: url("../../../../assets/images/orcid.png") no-repeat center; width: 1em; margin-right: 0.3em; align-self: center; diff --git a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html index bfb3efd29..6dfbdd2c7 100644 --- a/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html +++ b/dmp-frontend/src/app/ui/dmp/dmp-editor-blueprint/dmp-editor.component.html @@ -78,50 +78,66 @@
-
-
{{'DMP-EDITOR.TITLE' | translate}}
-
-
    -
    - -
    -
  1. {{section.label}}
  2. -
      -
    1. -
      -
      {{'DMP-EDITOR.DESCRIPTION' | translate}}: {{ description.label }}
      - close - check -
      -
    2. -
    - + +
    +
    +
    + {{'DMP-EDITOR.TITLE' | translate}} +
    +
    +
    + +
    +
      +
      + + +
    1. {{section.label}}
    2. +
        +
      1. +
        +
        {{'DMP-EDITOR.DESCRIPTION' | translate}}: {{ description.label }}
        +
        close
        + check +
        +
      2. +
      + +
      +
    +
    +
    + +
    +
    + -
-
-
- -
-
{{'DMP-EDITOR.ACTIONS.NEXT-STEP' | translate}}
- chevron_right +
+
+
{{'DMP-EDITOR.ACTIONS.NEXT-STEP' | translate}}
+ chevron_right +
-
- + +
+
+ +
-
+