diff --git a/sormas-api/pom.xml b/sormas-api/pom.xml index c0d0c05f9aa..793b9ef6f07 100644 --- a/sormas-api/pom.xml +++ b/sormas-api/pom.xml @@ -2,7 +2,7 @@ de.symeda.sormas sormas-base - 1.92.0 + 1.93.0 ../sormas-base 4.0.0 diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java index 48863689ec3..54ee2717460 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/ConfigFacade.java @@ -84,6 +84,8 @@ public interface ConfigFacade { boolean isDuplicateChecksExcludePersonsOfArchivedEntries(); + boolean isDuplicateChecksNationalHealthIdOverridesCriteria(); + double getNameSimilarityThreshold(); int getInfrastructureSyncThreshold(); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java b/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java index 141a288e7db..a167261f297 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java @@ -79,6 +79,7 @@ import de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryFacade; import de.symeda.sormas.api.infrastructure.region.RegionFacade; import de.symeda.sormas.api.infrastructure.subcontinent.SubcontinentFacade; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogFacade; import de.symeda.sormas.api.outbreak.OutbreakFacade; import de.symeda.sormas.api.person.PersonFacade; import de.symeda.sormas.api.report.AggregateReportFacade; @@ -519,6 +520,10 @@ public static ExternalEmailFacade getExternalEmailFacade() { return get().lookupEjbRemote(ExternalEmailFacade.class); } + public static ManualMessageLogFacade getManualMessageLogFacade() { + return get().lookupEjbRemote(ManualMessageLogFacade.class); + } + @SuppressWarnings("unchecked") public

P lookupEjbRemote(Class

clazz) { try { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseFacade.java index 7ac6a0e8d9a..298587e6997 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseFacade.java @@ -48,7 +48,7 @@ import de.symeda.sormas.api.infrastructure.district.DistrictDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; -import de.symeda.sormas.api.messaging.ManualMessageLogDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogDto; import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.PersonReferenceDto; import de.symeda.sormas.api.sample.PathogenTestDto; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnum.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnum.java index 15a81785624..44f55bff4fd 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnum.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnum.java @@ -29,6 +29,8 @@ public abstract class CustomizableEnum implements Serializable { private static final long serialVersionUID = 8698428745095686559L; + public static final String I18N_PREFIX = "CustomizableEnum"; + /** * The enum value, identical {@link CustomizableEnumValueDto#getValue()}. */ @@ -93,4 +95,6 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash(value); } + + public abstract Map> getAllProperties(); } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumCriteria.java new file mode 100644 index 00000000000..6314aeaf72d --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumCriteria.java @@ -0,0 +1,58 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.customizableenum; + +import java.io.Serializable; + +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.utils.criteria.BaseCriteria; + +public class CustomizableEnumCriteria extends BaseCriteria implements Serializable, Cloneable { + + private static final long serialVersionUID = 6254688396874544620L; + + private String freeTextFilter; + private CustomizableEnumType dataType; + private Disease disease; + + public String getFreeTextFilter() { + return freeTextFilter; + } + + public CustomizableEnumCriteria freeTextFilter(String freeTextFilter) { + this.freeTextFilter = freeTextFilter; + return this; + } + + public CustomizableEnumType getDataType() { + return dataType; + } + + public CustomizableEnumCriteria dataType(CustomizableEnumType dataType) { + this.dataType = dataType; + return this; + } + + public Disease getDisease() { + return disease; + } + + public CustomizableEnumCriteria disease(Disease disease) { + this.disease = disease; + return this; + } + +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumFacade.java index fbd8584d071..1133f9f6e8e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumFacade.java @@ -20,10 +20,12 @@ import javax.ejb.Remote; +import de.symeda.sormas.api.BaseFacade; import de.symeda.sormas.api.Disease; @Remote -public interface CustomizableEnumFacade { +public interface CustomizableEnumFacade + extends BaseFacade { List getAllAfter(Date date); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumHelper.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumHelper.java new file mode 100644 index 00000000000..b92f344a9ae --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumHelper.java @@ -0,0 +1,28 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.customizableenum; + +import java.util.regex.Pattern; + +public class CustomizableEnumHelper { + + private static final String ENUM_VALUE_PATTERN = "[A-Z0-9_.]+"; + + public static boolean isValidEnumValue(String value) { + return Pattern.matches(ENUM_VALUE_PATTERN, value); + } + +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumTranslation.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumTranslation.java index 20cc393772e..a32c3ba071c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumTranslation.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumTranslation.java @@ -34,6 +34,15 @@ public class CustomizableEnumTranslation implements Serializable { @Size(max = CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String value; + public CustomizableEnumTranslation() { + + } + + public CustomizableEnumTranslation(String languageCode, String value) { + this.languageCode = languageCode; + this.value = value; + } + public String getLanguageCode() { return languageCode; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumType.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumType.java index 461ec882323..efb2569f27d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumType.java @@ -15,13 +15,10 @@ package de.symeda.sormas.api.customizableenum; -import org.apache.commons.text.WordUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.environment.environmentsample.Pathogen; import de.symeda.sormas.api.event.SpecificRisk; +import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.person.OccupationType; /** @@ -34,8 +31,6 @@ public enum CustomizableEnumType { OCCUPATION_TYPE(OccupationType.class), PATHOGEN(Pathogen.class); - private static final Logger logger = LoggerFactory.getLogger(CustomizableEnumType.class); - private final Class enumClass; CustomizableEnumType(Class enumClass) { @@ -58,7 +53,7 @@ public Class getEnumClass() { @Override public String toString() { - return WordUtils.capitalize(name().toLowerCase(), '_').replace("_", ""); + return I18nProperties.getEnumCaption(this); } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueDto.java index f57a92e72b7..92bcde6d842 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueDto.java @@ -17,13 +17,16 @@ import java.util.List; import java.util.Map; +import java.util.Set; import javax.validation.Valid; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.EntityDto; import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.FieldConstraints; /** @@ -35,14 +38,27 @@ public class CustomizableEnumValueDto extends EntityDto { private static final long serialVersionUID = 4360662500289404985L; + public static final String I18N_PREFIX = "CustomizableEnumValue"; + + public static final String DATA_TYPE = "dataType"; + public static final String VALUE = "value"; + public static final String CAPTION = "caption"; + public static final String DESCRIPTION = "description"; + public static final String TRANSLATIONS = "translations"; + public static final String DISEASES = "diseases"; + public static final String PROPERTIES = "properties"; + + @NotNull(message = Validations.required) private CustomizableEnumType dataType; + @NotNull(message = Validations.required) @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String value; + @NotNull(message = Validations.required) @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String caption; @Valid private List translations; - private List diseases; + private Set diseases; @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String description; @Valid @@ -54,6 +70,12 @@ public class CustomizableEnumValueDto extends EntityDto { */ private boolean defaultValue; + public static CustomizableEnumValueDto build() { + CustomizableEnumValueDto dto = new CustomizableEnumValueDto(); + dto.setUuid(DataHelper.createUuid()); + return dto; + } + public CustomizableEnumType getDataType() { return dataType; } @@ -86,11 +108,11 @@ public void setTranslations(List translations) { this.translations = translations; } - public List getDiseases() { + public Set getDiseases() { return diseases; } - public void setDiseases(List diseases) { + public void setDiseases(Set diseases) { this.diseases = diseases; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueIndexDto.java new file mode 100644 index 00000000000..b84f5042086 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueIndexDto.java @@ -0,0 +1,82 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.customizableenum; + +import java.util.Map; +import java.util.Set; + +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.EntityDto; + +public class CustomizableEnumValueIndexDto extends EntityDto { + + private static final long serialVersionUID = -2014244462630609783L; + + public static final String I18N_PREFIX = "CustomizableEnumValue"; + + public static final String DATA_TYPE = "dataType"; + public static final String VALUE = "value"; + public static final String CAPTION = "caption"; + public static final String DISEASES = "diseases"; + public static final String PROPERTIES = "properties"; + + private CustomizableEnumType dataType; + private String value; + private String caption; + private Set diseases; + private Map properties; + + public CustomizableEnumType getDataType() { + return dataType; + } + + public void setDataType(CustomizableEnumType dataType) { + this.dataType = dataType; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getCaption() { + return caption; + } + + public void setCaption(String caption) { + this.caption = caption; + } + + public Set getDiseases() { + return diseases; + } + + public void setDiseases(Set diseases) { + this.diseases = diseases; + } + + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + +} diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/document/MockDocumentStorageService.java b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueReferenceDto.java similarity index 57% rename from sormas-backend/src/test/java/de/symeda/sormas/backend/document/MockDocumentStorageService.java rename to sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueReferenceDto.java index ecb1f709c6e..2ed1383aacc 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/document/MockDocumentStorageService.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/customizableenum/CustomizableEnumValueReferenceDto.java @@ -1,6 +1,6 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System - * Copyright © 2016-2020 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -12,27 +12,25 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package de.symeda.sormas.backend.document; -import java.nio.charset.StandardCharsets; +package de.symeda.sormas.api.customizableenum; -import javax.enterprise.inject.Specializes; +import de.symeda.sormas.api.ReferenceDto; -@Specializes -public class MockDocumentStorageService extends DocumentStorageService { +public class CustomizableEnumValueReferenceDto extends ReferenceDto { - @Override - public byte[] read(String storageReference) { - return storageReference.getBytes(StandardCharsets.UTF_8); + private static final long serialVersionUID = 4360662500289404985L; + + public CustomizableEnumValueReferenceDto() { } - @Override - public String save(Document document, byte[] content) { - return document.getUuid(); + public CustomizableEnumValueReferenceDto(String uuid) { + setUuid(uuid); } - @Override - public void delete(String storageReference) { + public CustomizableEnumValueReferenceDto(String uuid, String caption) { + setUuid(uuid); + setCaption(caption); } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseVariant.java b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseVariant.java index f8ff852b3bb..a749735ffcc 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseVariant.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/disease/DiseaseVariant.java @@ -16,6 +16,7 @@ package de.symeda.sormas.api.disease; import java.io.Serializable; +import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -68,4 +69,11 @@ public boolean matchPropertyValue(String propertyKey, Object value) { public boolean isHasDetails() { return hasDetails; } + + @Override + public Map> getAllProperties() { + Map> allProperties = new HashMap<>(); + allProperties.put(HAS_DETAILS, boolean.class); + return allProperties; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentDto.java index 5dee757eb28..97cb31894da 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentDto.java @@ -23,7 +23,6 @@ import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.SensitiveData; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto; public class DocumentDto extends PseudonymizableDto { @@ -108,4 +107,8 @@ public DocumentRelatedEntityType getRelatedEntityType() { public void setRelatedEntityType(DocumentRelatedEntityType relatedEntityType) { this.relatedEntityType = relatedEntityType; } + + public DocumentReferenceDto toReference() { + return new DocumentReferenceDto(getUuid(), name); + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentFacade.java index 148c981fa6c..0a696618ae0 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentFacade.java @@ -17,6 +17,7 @@ import java.io.IOException; import java.util.List; import java.util.Map; +import java.util.Set; import javax.ejb.Remote; import javax.validation.Valid; @@ -34,6 +35,8 @@ public interface DocumentFacade { List getDocumentsRelatedToEntity(DocumentRelatedEntityType type, String uuid); + List getReferencesRelatedToEntity(DocumentRelatedEntityType type, String uuid, Set fileExtensions); + Map> getDocumentsRelatedToEntities(DocumentCriteria criteria, List sortProperties); String isExistingDocument(DocumentRelatedEntityType type, String uuid, String name); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/docgeneneration/EmailTemplateFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentReferenceDto.java similarity index 70% rename from sormas-api/src/main/java/de/symeda/sormas/api/docgeneneration/EmailTemplateFacade.java rename to sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentReferenceDto.java index cf8428e8ec3..8d2817c147a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/docgeneneration/EmailTemplateFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentReferenceDto.java @@ -16,16 +16,15 @@ * along with this program. If not, see . */ -package de.symeda.sormas.api.docgeneneration; +package de.symeda.sormas.api.document; -import java.util.Properties; +import de.symeda.sormas.api.ReferenceDto; -import javax.ejb.Remote; +public class DocumentReferenceDto extends ReferenceDto { -import de.symeda.sormas.api.caze.CaseReferenceDto; + private static final long serialVersionUID = -6376903475087381467L; -@Remote -public interface EmailTemplateFacade { - - String generateCaseEmailContent(String templateName, CaseReferenceDto cazeRef, Properties extraProperties) throws DocumentTemplateException; + public DocumentReferenceDto(String uuid, String name) { + super(uuid, name); + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/environment/EnvironmentReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/environment/EnvironmentReferenceDto.java index dd64d5cd733..aa2a41ee0ff 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/environment/EnvironmentReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/environment/EnvironmentReferenceDto.java @@ -2,6 +2,7 @@ import de.symeda.sormas.api.ReferenceDto; import de.symeda.sormas.api.feature.FeatureType; +import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.DependingOnFeatureType; import de.symeda.sormas.api.utils.SensitiveData; @@ -26,7 +27,7 @@ public EnvironmentReferenceDto(String uuid, String environmentName) { @Override public String getCaption() { - return environmentName; + return environmentName.trim().length() > 0 ? environmentName : DataHelper.getShortUuid(getUuid()); } public String getEnvironmentName() { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/EnvironmentSampleIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/EnvironmentSampleIndexDto.java index 12df7a30e27..35f5683cfa0 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/EnvironmentSampleIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/EnvironmentSampleIndexDto.java @@ -75,6 +75,7 @@ public class EnvironmentSampleIndexDto extends PseudonymizableIndexDto implement private long numberOfTests; private List positivePathogenTests; private Pathogen latestTestedPathogen; + private String latestTestedPathogenDetails; private PathogenTestResultType latestPathogenTestResult; public EnvironmentSampleIndexDto( @@ -207,6 +208,14 @@ public void setLatestTestedPathogen(Pathogen latestTestedPathogen) { this.latestTestedPathogen = latestTestedPathogen; } + public String getLatestTestedPathogenDetails() { + return latestTestedPathogenDetails; + } + + public void setLatestTestedPathogenDetails(String latestTestedPathogenDetails) { + this.latestTestedPathogenDetails = latestTestedPathogenDetails; + } + public PathogenTestResultType getLatestPathogenTestResult() { return latestPathogenTestResult; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/Pathogen.java b/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/Pathogen.java index 6a1de2cc9c2..c22a7310b71 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/Pathogen.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/environment/environmentsample/Pathogen.java @@ -16,6 +16,7 @@ package de.symeda.sormas.api.environment.environmentsample; import java.io.Serializable; +import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -61,4 +62,11 @@ public boolean matchPropertyValue(String propertyKey, Object value) { public boolean isHasDetails() { return hasDetails; } + + @Override + public Map> getAllProperties() { + Map> allProperties = new HashMap<>(); + allProperties.put(HAS_DETAILS, boolean.class); + return allProperties; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/SpecificRisk.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/SpecificRisk.java index 9fa0f1055bf..8c14c9d4ea7 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/SpecificRisk.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/SpecificRisk.java @@ -16,6 +16,7 @@ package de.symeda.sormas.api.event; import java.io.Serializable; +import java.util.Collections; import java.util.Map; import de.symeda.sormas.api.customizableenum.CustomizableEnum; @@ -36,4 +37,9 @@ public void setProperties(Map properties) { public boolean matchPropertyValue(String property, Object value) { return false; } + + @Override + public Map> getAllProperties() { + return Collections.emptyMap(); + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailFacade.java index fe27d87ad62..b37928d759e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailFacade.java @@ -25,11 +25,17 @@ import de.symeda.sormas.api.docgeneneration.DocumentTemplateException; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; +import de.symeda.sormas.api.document.DocumentReferenceDto; +import de.symeda.sormas.api.person.PersonReferenceDto; @Remote public interface ExternalEmailFacade { List getTemplateNames(DocumentWorkflow documentWorkflow); + List getAttachableDocuments(DocumentWorkflow documentWorkflow, String relatedEntityUuid); + void sendEmail(@Valid ExternalEmailOptionsDto options) throws DocumentTemplateException, ExternalEmailException; + + boolean isAttachmentAvailable(PersonReferenceDto personReferenceDto); } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailOptionsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailOptionsDto.java index 7c680cdfc82..a86828514f2 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailOptionsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/externalemail/ExternalEmailOptionsDto.java @@ -1,24 +1,23 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package de.symeda.sormas.api.externalemail; import java.io.Serializable; +import java.util.List; +import java.util.Set; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -27,16 +26,19 @@ import de.symeda.sormas.api.audit.AuditedClass; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; import de.symeda.sormas.api.docgeneneration.RootEntityType; +import de.symeda.sormas.api.document.DocumentReferenceDto; import de.symeda.sormas.api.i18n.Validations; @AuditedClass public class ExternalEmailOptionsDto implements Serializable { + private static final long serialVersionUID = 1005305870535265027L; public static final String I18N_PREFIX = "ExternalEmailOptions"; public static final String TEMPLATE_NAME = "templateName"; public static final String RECIPIENT_EMAIL = "recipientEmail"; + public static final String ATTACHED_DOCUMENTS = "attachedDocuments"; @NotNull(message = Validations.requiredField) private final DocumentWorkflow documentWorkflow; @@ -50,6 +52,7 @@ public class ExternalEmailOptionsDto implements Serializable { @NotNull(message = Validations.requiredField) @Size(min = 1, message = Validations.requiredField) private String recipientEmail; + private Set attachedDocuments; public ExternalEmailOptionsDto(DocumentWorkflow documentWorkflow, RootEntityType rootEntityType, ReferenceDto rootEntityReference) { this.documentWorkflow = documentWorkflow; @@ -84,4 +87,12 @@ public String getRecipientEmail() { public void setRecipientEmail(String recipientEmail) { this.recipientEmail = recipientEmail; } + + public Set getAttachedDocuments() { + return attachedDocuments; + } + + public void setAttachedDocuments(Set attachedDocuments) { + this.attachedDocuments = attachedDocuments; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index f1b06a7c5ae..f6d3dd2ee08 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -816,6 +816,16 @@ public interface Captions { String countryArchivedCountries = "countryArchivedCountries"; String createSymptomJournalAccountButton = "createSymptomJournalAccountButton"; String creationDate = "creationDate"; + String CustomizableEnum_hasDetails = "CustomizableEnum.hasDetails"; + String CustomizableEnum_hasDetails_short = "CustomizableEnum.hasDetails.short"; + String CustomizableEnumValue_caption = "CustomizableEnumValue.caption"; + String CustomizableEnumValue_dataType = "CustomizableEnumValue.dataType"; + String CustomizableEnumValue_diseases = "CustomizableEnumValue.diseases"; + String CustomizableEnumValue_properties = "CustomizableEnumValue.properties"; + String CustomizableEnumValue_value = "CustomizableEnumValue.value"; + String customizableEnumValueAllDiseases = "customizableEnumValueAllDiseases"; + String customizableEnumValueDiseaseCount = "customizableEnumValueDiseaseCount"; + String customizableEnumValueNoProperties = "customizableEnumValueNoProperties"; String dashboardAggregatedNumber = "dashboardAggregatedNumber"; String dashboardAlive = "dashboardAlive"; String dashboardApplyCustomFilter = "dashboardApplyCustomFilter"; @@ -1397,8 +1407,13 @@ public interface Captions { String exposureFlightNumber = "exposureFlightNumber"; String exposureSourceCaseName = "exposureSourceCaseName"; String exposureTimePeriod = "exposureTimePeriod"; + String externalEmailAttachedDocuments = "externalEmailAttachedDocuments"; + String ExternalEmailOptions_attachedDocuments = "ExternalEmailOptions.attachedDocuments"; String ExternalEmailOptions_recipientEmail = "ExternalEmailOptions.recipientEmail"; String ExternalEmailOptions_templateName = "ExternalEmailOptions.templateName"; + String externalEmailSentBy = "externalEmailSentBy"; + String externalEmailSentTo = "externalEmailSentTo"; + String externalEmailUsedTemplate = "externalEmailUsedTemplate"; String ExternalMessage = "ExternalMessage"; String ExternalMessage_assignee = "ExternalMessage.assignee"; String ExternalMessage_caseReportDate = "ExternalMessage.caseReportDate"; @@ -1768,6 +1783,7 @@ public interface Captions { String PathogenTest_testedDiseaseVariant = "PathogenTest.testedDiseaseVariant"; String PathogenTest_testedDiseaseVariantDetails = "PathogenTest.testedDiseaseVariantDetails"; String PathogenTest_testedPathogen = "PathogenTest.testedPathogen"; + String PathogenTest_testedPathogenDetails = "PathogenTest.testedPathogenDetails"; String PathogenTest_testResult = "PathogenTest.testResult"; String PathogenTest_testResultText = "PathogenTest.testResultText"; String PathogenTest_testResultVerified = "PathogenTest.testResultVerified"; @@ -2629,6 +2645,7 @@ public interface Captions { String userrole_main = "userrole.main"; String userrole_notifications = "userrole.notifications"; String UserRole_portHealthUser = "UserRole.portHealthUser"; + String UserRole_restrictAccessToAssignedEntities = "UserRole.restrictAccessToAssignedEntities"; String UserRole_smsNotificationTypes = "UserRole.smsNotificationTypes"; String UserRole_templateUserRole = "UserRole.templateUserRole"; String UserRole_userRights = "UserRole.userRights"; @@ -2637,6 +2654,7 @@ public interface Captions { String userRoleNotifications = "userRoleNotifications"; String userRoleNotificationTypeEmail = "userRoleNotificationTypeEmail"; String userRoleNotificationTypeSms = "userRoleNotificationTypeSms"; + String userRoleShowOnlyRestrictedAccessToAssignCases = "userRoleShowOnlyRestrictedAccessToAssignCases"; String userRoleUserrolesView = "userRoleUserrolesView"; String userUpdatePasswordConfirmation = "userUpdatePasswordConfirmation"; String Vaccination = "Vaccination"; @@ -2698,6 +2716,8 @@ public interface Captions { String View_configuration_continents_short = "View.configuration.continents.short"; String View_configuration_countries = "View.configuration.countries"; String View_configuration_countries_short = "View.configuration.countries.short"; + String View_configuration_customizableEnums = "View.configuration.customizableEnums"; + String View_configuration_customizableEnums_short = "View.configuration.customizableEnums.short"; String View_configuration_devMode = "View.configuration.devMode"; String View_configuration_devMode_short = "View.configuration.devMode.short"; String View_configuration_districts = "View.configuration.districts"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/I18nProperties.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/I18nProperties.java index a14c5a0efd7..d117ce5dc41 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/I18nProperties.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/I18nProperties.java @@ -194,6 +194,10 @@ public static String getCaption(String key, String defaultValue) { return getInstance(userLanguage.get()).captionProperties.getString(key, defaultValue); } + public static String getCaption(String key, String defaultValue, String addition) { + return getInstance(userLanguage.get()).captionProperties.getString(key + (addition != null ? "." + addition : ""), defaultValue); + } + /** * Uses key as default value */ @@ -202,17 +206,25 @@ public static String getPrefixCaption(String prefix, String key) { } public static String getPrefixCaption(String prefix, String key, String defaultValue) { + return getPrefixCaption(prefix, key, defaultValue, null); + } + + public static String getPrefixCaption(String prefix, String key, String defaultValue, String addition) { String result = null; if (prefix != null) { - result = getInstance(userLanguage.get()).captionProperties.getString(prefix + "." + key); + result = getInstance(userLanguage.get()).captionProperties.getString(prefix + "." + key + (addition != null ? "." + addition : "")); } if (result == null) { - result = getCaption(key, defaultValue); + result = getCaption(key, defaultValue, addition); } return result; } + public static String getPrefixCaptionShort(String prefix, String key) { + return getPrefixCaption(prefix, key, null, "short"); + } + /** * Iterates through the prefixes to determines the caption for the specified propertyId. */ diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java index 6776c50163a..e54f53c6709 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java @@ -317,6 +317,7 @@ public interface Strings { String errorEventParticipantNotEditable = "errorEventParticipantNotEditable"; String errorEventsFromAnotherJurisdiction = "errorEventsFromAnotherJurisdiction"; String errorEventUnlinkEventGroupFromAnotherJurisdiction = "errorEventUnlinkEventGroupFromAnotherJurisdiction"; + String errorExternalEmailAttachmentCannotEncrypt = "errorExternalEmailAttachmentCannotEncrypt"; String errorExternalSurveillanceToolCasesNotSharable = "errorExternalSurveillanceToolCasesNotSharable"; String errorExternalSurveillanceToolEventNotOwned = "errorExternalSurveillanceToolEventNotOwned"; String errorExternalSurveillanceToolNonClusterEvent = "errorExternalSurveillanceToolNonClusterEvent"; @@ -513,6 +514,7 @@ public interface Strings { String headingCreatePathogenTestResult = "headingCreatePathogenTestResult"; String headingCreateSurveillanceReport = "headingCreateSurveillanceReport"; String headingCurrentHospitalization = "headingCurrentHospitalization"; + String headingCustomizableEnumConfigurationInfo = "headingCustomizableEnumConfigurationInfo"; String headingDatabaseExportFailed = "headingDatabaseExportFailed"; String headingDataImport = "headingDataImport"; String headingDearchiveCampaign = "headingDearchiveCampaign"; @@ -601,6 +603,7 @@ public interface Strings { String headingExposureInvestigation = "headingExposureInvestigation"; String headingExtendFollowUp = "headingExtendFollowUp"; String headingExtendQuarantine = "headingExtendQuarantine"; + String headingExternalEmailDetails = "headingExternalEmailDetails"; String headingExternalEmailSend = "headingExternalEmailSend"; String headingExternalMessageCorrection = "headingExternalMessageCorrection"; String headingExternalMessageDownload = "headingExternalMessageDownload"; @@ -903,6 +906,7 @@ public interface Strings { String infoCreateNewSampleDiscardsChangesContact = "infoCreateNewSampleDiscardsChangesContact"; String infoCreateNewSampleDiscardsChangesEventParticipant = "infoCreateNewSampleDiscardsChangesEventParticipant"; String infoCustomExport = "infoCustomExport"; + String infoCustomizableEnumConfigurationInfo = "infoCustomizableEnumConfigurationInfo"; String infoDashboardFinalLaboratoryResult = "infoDashboardFinalLaboratoryResult"; String infoDashboardIncidence = "infoDashboardIncidence"; String infoDatabaseExportTables = "infoDatabaseExportTables"; @@ -964,6 +968,7 @@ public interface Strings { String infoNoAccessToPersonEntities = "infoNoAccessToPersonEntities"; String infoNoAdditionalTests = "infoNoAdditionalTests"; String infoNoCasesFoundStatistics = "infoNoCasesFoundStatistics"; + String infoNoCustomizableEnumTranslations = "infoNoCustomizableEnumTranslations"; String infoNoDiseaseSelected = "infoNoDiseaseSelected"; String infoNoEnvironmentSamples = "infoNoEnvironmentSamples"; String infoNoEventGroups = "infoNoEventGroups"; @@ -1220,6 +1225,7 @@ public interface Strings { String messageCountVisitsNotSetToLost = "messageCountVisitsNotSetToLost"; String messageCountVisitsNotSetToLostAccessDeniedReason = "messageCountVisitsNotSetToLostAccessDeniedReason"; String messageCreateCollectionTask = "messageCreateCollectionTask"; + String messageCustomizableEnumValueSaved = "messageCustomizableEnumValueSaved"; String messageDatabaseExportFailed = "messageDatabaseExportFailed"; String messageDeleteImmunizationVaccinations = "messageDeleteImmunizationVaccinations"; String messageDeleteReasonNotFilled = "messageDeleteReasonNotFilled"; @@ -1288,6 +1294,9 @@ public interface Strings { String messageExportConfigurationDeleted = "messageExportConfigurationDeleted"; String messageExportConfigurationSaved = "messageExportConfigurationSaved"; String messageExportFailed = "messageExportFailed"; + String messageExternalEmailAttachmentNotAvailableInfo = "messageExternalEmailAttachmentNotAvailableInfo"; + String messageExternalEmailAttachmentPassword = "messageExternalEmailAttachmentPassword"; + String messageExternalEmailNoAttachments = "messageExternalEmailNoAttachments"; String messageExternalJournalDidNotProvideMessage = "messageExternalJournalDidNotProvideMessage"; String messageExternalLabResultsAdapterNotFound = "messageExternalLabResultsAdapterNotFound"; String messageExternalMessagesAssigned = "messageExternalMessagesAssigned"; @@ -1356,6 +1365,10 @@ public interface Strings { String messageNoEventFound = "messageNoEventFound"; String messageNoEventParticipantsSelected = "messageNoEventParticipantsSelected"; String messageNoEventsSelected = "messageNoEventsSelected"; + String messageNoExternalEmailToCaseSent = "messageNoExternalEmailToCaseSent"; + String messageNoExternalEmailToContactSent = "messageNoExternalEmailToContactSent"; + String messageNoExternalEmailToEventParticipantSent = "messageNoExternalEmailToEventParticipantSent"; + String messageNoExternalEmailToTravelEntrySent = "messageNoExternalEmailToTravelEntrySent"; String messageNoExternalMessagesSelected = "messageNoExternalMessagesSelected"; String messageNoImmunizationsSelected = "messageNoImmunizationsSelected"; String messageNoPathogenTestsSelected = "messageNoPathogenTestsSelected"; @@ -1574,6 +1587,9 @@ public interface Strings { String promptContactEpiWeekTo = "promptContactEpiWeekTo"; String promptContactsSearchField = "promptContactsSearchField"; String promptCreationDateFrom = "promptCreationDateFrom"; + String promptCustomizableEnumSearchField = "promptCustomizableEnumSearchField"; + String promptCustomizableEnumTranslationCaption = "promptCustomizableEnumTranslationCaption"; + String promptCustomizableEnumTranslationLanguage = "promptCustomizableEnumTranslationLanguage"; String promptDateTo = "promptDateTo"; String promptDisease = "promptDisease"; String promptDistrict = "promptDistrict"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Validations.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Validations.java index 70531a6ea44..5fd5571e404 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Validations.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Validations.java @@ -13,6 +13,7 @@ public interface Validations { String afterDate = "afterDate"; String afterDateSoft = "afterDateSoft"; String afterDateWithDate = "afterDateWithDate"; + String attachedDocumentNotRelatedToEntity = "attachedDocumentNotRelatedToEntity"; String beforeDate = "beforeDate"; String beforeDateSoft = "beforeDateSoft"; String birthDateInFuture = "birthDateInFuture"; @@ -44,6 +45,10 @@ public interface Validations { String contactFollowUpUntilDate = "contactFollowUpUntilDate"; String contactFollowUpUntilDateSoftValidation = "contactFollowUpUntilDateSoftValidation"; String contactWithoutInfrastructureData = "contactWithoutInfrastructureData"; + String customizableEnumValueAllowedCharacters = "customizableEnumValueAllowedCharacters"; + String customizableEnumValueDuplicateLanguage = "customizableEnumValueDuplicateLanguage"; + String customizableEnumValueDuplicateValue = "customizableEnumValueDuplicateValue"; + String customizableEnumValueEmptyTranslations = "customizableEnumValueEmptyTranslations"; String defaultInfrastructureAlreadyExisting = "defaultInfrastructureAlreadyExisting"; String defaultInfrastructureInvalidParentDistrict = "defaultInfrastructureInvalidParentDistrict"; String defaultInfrastructureInvalidParentRegion = "defaultInfrastructureInvalidParentRegion"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogCriteria.java new file mode 100644 index 00000000000..cce19729c21 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogCriteria.java @@ -0,0 +1,87 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.manualmessagelog; + +import de.symeda.sormas.api.caze.CaseReferenceDto; +import de.symeda.sormas.api.contact.ContactReferenceDto; +import de.symeda.sormas.api.event.EventParticipantReferenceDto; +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.api.travelentry.TravelEntryReferenceDto; +import de.symeda.sormas.api.utils.criteria.BaseCriteria; + +public class ManualMessageLogCriteria extends BaseCriteria { + + private MessageType messageType; + private CaseReferenceDto caze; + private ContactReferenceDto contact; + private EventParticipantReferenceDto eventParticipant; + private TravelEntryReferenceDto travelEntry; + private Boolean withTemplate; + + public MessageType getMessageType() { + return messageType; + } + + public ManualMessageLogCriteria messageType(MessageType messageType) { + this.messageType = messageType; + return this; + } + + public CaseReferenceDto getCaze() { + return caze; + } + + public ManualMessageLogCriteria caze(CaseReferenceDto caze) { + this.caze = caze; + return this; + } + + public ContactReferenceDto getContact() { + return contact; + } + + public ManualMessageLogCriteria contact(ContactReferenceDto contact) { + this.contact = contact; + return this; + } + + public EventParticipantReferenceDto getEventParticipant() { + return eventParticipant; + } + + public ManualMessageLogCriteria eventParticipant(EventParticipantReferenceDto eventParticipant) { + this.eventParticipant = eventParticipant; + return this; + } + + public TravelEntryReferenceDto getTravelEntry() { + return travelEntry; + } + + public ManualMessageLogCriteria travelEntry(TravelEntryReferenceDto travelEntry) { + this.travelEntry = travelEntry; + return this; + } + + public Boolean getWithTemplate() { + return withTemplate; + } + + public ManualMessageLogCriteria withTemplate(Boolean withEmailTemplate) { + this.withTemplate = withEmailTemplate; + return this; + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/messaging/ManualMessageLogDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogDto.java similarity index 59% rename from sormas-api/src/main/java/de/symeda/sormas/api/messaging/ManualMessageLogDto.java rename to sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogDto.java index 20baede4873..00d24ecc50b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/messaging/ManualMessageLogDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogDto.java @@ -1,8 +1,27 @@ -package de.symeda.sormas.api.messaging; +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.manualmessagelog; import java.util.Date; import de.symeda.sormas.api.EntityDto; +import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.PersonReferenceDto; import de.symeda.sormas.api.user.UserReferenceDto; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogFacade.java new file mode 100644 index 00000000000..7933e6c4d5d --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogFacade.java @@ -0,0 +1,26 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.manualmessagelog; + +import java.util.List; + +import javax.ejb.Remote; + +@Remote +public interface ManualMessageLogFacade { + + List getIndexList(ManualMessageLogCriteria criteria); +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogIndexDto.java new file mode 100644 index 00000000000..6b1b2f2a416 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/manualmessagelog/ManualMessageLogIndexDto.java @@ -0,0 +1,97 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.api.manualmessagelog; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.api.user.UserReferenceDto; +import de.symeda.sormas.api.utils.PersonalData; +import de.symeda.sormas.api.utils.SensitiveData; +import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizable; +import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto; + +public class ManualMessageLogIndexDto extends PseudonymizableIndexDto implements Serializable, Pseudonymizable { + + private static final long serialVersionUID = -6632086079342652486L; + + private final MessageType messageType; + private final Date sentDate; + private UserReferenceDto sendingUser; + @PersonalData + @SensitiveData + private final String emailAddress; + private final String usedTemplate; + private final List attachedDocuments; + private final boolean senderInJurisdiction; + + public ManualMessageLogIndexDto( + String uuid, + MessageType messageType, + Date sentDate, + String sendingUserUuid, + String sendingUserFirstName, + String sendingUserLastName, + String emailAddress, + String usedTemplate, + Object attachedDocuments, + boolean inJurisdiction, + boolean senderInJurisdiction) { + super(uuid); + this.messageType = messageType; + this.sentDate = sentDate; + this.sendingUser = new UserReferenceDto(sendingUserUuid, sendingUserFirstName, sendingUserLastName); + this.emailAddress = emailAddress; + this.usedTemplate = usedTemplate; + this.attachedDocuments = (List) attachedDocuments; + this.inJurisdiction = inJurisdiction; + this.senderInJurisdiction = senderInJurisdiction; + } + + public MessageType getMessageType() { + return messageType; + } + + public Date getSentDate() { + return sentDate; + } + + public UserReferenceDto getSendingUser() { + return sendingUser; + } + + public void setSendingUser(UserReferenceDto sendingUser) { + this.sendingUser = sendingUser; + } + + public String getEmailAddress() { + return emailAddress; + } + + public String getUsedTemplate() { + return usedTemplate; + } + + public List getAttachedDocuments() { + return attachedDocuments; + } + + public boolean isSenderInJurisdiction() { + return senderInJurisdiction; + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/messaging/MessageType.java b/sormas-api/src/main/java/de/symeda/sormas/api/messaging/MessageType.java index c440cf974fe..d6b0dbf471c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/messaging/MessageType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/messaging/MessageType.java @@ -1,16 +1,19 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System - * Copyright © 2016-2022 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. + * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package de.symeda.sormas.api.messaging; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/OccupationType.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/OccupationType.java index 6239ce266c2..d8e69b37067 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/OccupationType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/OccupationType.java @@ -81,4 +81,11 @@ public static Map> getDefaultValues() { public boolean isHasDetails() { return hasDetails; } + + @Override + public Map> getAllProperties() { + Map> allProperties = new HashMap<>(); + allProperties.put(HAS_DETAILS, boolean.class); + return allProperties; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java index 993abab30a2..112b25770f1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java @@ -59,6 +59,7 @@ public class PathogenTestDto extends PseudonymizableDto { public static final String TESTED_DISEASE_VARIANT = "testedDiseaseVariant"; public static final String TESTED_DISEASE_VARIANT_DETAILS = "testedDiseaseVariantDetails"; public static final String TESTED_PATHOGEN = "testedPathogen"; + public static final String TESTED_PATHOGEN_DETAILS = "testedPathogenDetails"; public static final String TYPING_ID = "typingId"; public static final String TEST_TYPE = "testType"; public static final String PCR_TEST_SPECIFICATION = "pcrTestSpecification"; @@ -106,6 +107,8 @@ public class PathogenTestDto extends PseudonymizableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String testedDiseaseVariantDetails; private Pathogen testedPathogen; + @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) + private String testedPathogenDetails; @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String typingId; @NotNull(message = Validations.requiredField) @@ -299,6 +302,14 @@ public void setTestedPathogen(Pathogen testedPathogen) { this.testedPathogen = testedPathogen; } + public String getTestedPathogenDetails() { + return testedPathogenDetails; + } + + public void setTestedPathogenDetails(String testedPathogenDetails) { + this.testedPathogenDetails = testedPathogenDetails; + } + public String getTypingId() { return typingId; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/user/DefaultUserRole.java b/sormas-api/src/main/java/de/symeda/sormas/api/user/DefaultUserRole.java index 0ca6ddd27d6..79aed19247c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/user/DefaultUserRole.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/user/DefaultUserRole.java @@ -452,7 +452,8 @@ public Set getDefaultUserRights() { EXTERNAL_EMAIL_ATTACH_DOCUMENTS, SORMAS_REST, SORMAS_UI, - DEV_MODE)); + DEV_MODE, + CUSTOMIZABLE_ENUM_MANAGEMENT)); break; case ADMIN_SUPERVISOR: userRights.addAll( diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserCriteria.java index a081c98a87b..31358e7aa30 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserCriteria.java @@ -16,6 +16,7 @@ public class UserCriteria extends BaseCriteria implements Serializable { private RegionReferenceDto region; private DistrictReferenceDto district; private String freeText; + private Boolean showOnlyRestrictedAccessToAssignedEntities; public UserCriteria active(Boolean active) { this.active = active; @@ -62,4 +63,12 @@ public UserCriteria freeText(String freeText) { public String getFreeText() { return freeText; } + + public Boolean getShowOnlyRestrictedAccessToAssignedEntities() { + return showOnlyRestrictedAccessToAssignedEntities; + } + + public void setShowOnlyRestrictedAccessToAssignedEntities(Boolean showOnlyRestrictedAccessToAssignedEntities) { + this.showOnlyRestrictedAccessToAssignedEntities = showOnlyRestrictedAccessToAssignedEntities; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java index 8e2d984adbc..c3ac8b92d22 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java @@ -271,7 +271,8 @@ public enum UserRight { DEV_MODE(UserRightGroup.CONFIGURATION), EMAIL_TEMPLATE_MANAGEMENT(UserRightGroup.EXTERNAL_EMAILS), EXTERNAL_EMAIL_SEND(UserRightGroup.EXTERNAL_EMAILS), - EXTERNAL_EMAIL_ATTACH_DOCUMENTS(UserRightGroup.EXTERNAL_EMAILS, UserRight._EXTERNAL_EMAIL_SEND); + EXTERNAL_EMAIL_ATTACH_DOCUMENTS(UserRightGroup.EXTERNAL_EMAILS, UserRight._EXTERNAL_EMAIL_SEND), + CUSTOMIZABLE_ENUM_MANAGEMENT(UserRightGroup.CONFIGURATION); //@formatter:on @@ -472,6 +473,7 @@ public enum UserRight { public static final String _EMAIL_TEMPLATE_MANAGEMENT = "EMAIL_TEMPLATE_MANAGEMENT"; public static final String _EXTERNAL_EMAIL_SEND = "EXTERNAL_EMAIL_SEND"; public static final String _EXTERNAL_EMAIL_ATTACH_DOCUMENTS = "EXTERNAL_EMAIL_ATTACH_DOCUMENTS"; + public static final String _CUSTOMIZABLE_ENUM_MANAGEMENT = "CUSTOMIZABLE_ENUM_MANAGEMENT"; private static final Map> userRightDependencies = buildUserRightDependencies(); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleCriteria.java index c7268a95df2..bd08d4e413d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleCriteria.java @@ -9,6 +9,7 @@ public class UserRoleCriteria extends BaseCriteria implements Serializable { private Boolean enabled; private UserRight userRight; private JurisdictionLevel jurisdictionLevel; + private Boolean showOnlyRestrictedAccessToAssignedEntities; public UserRoleCriteria enabled(Boolean enabled) { this.enabled = enabled; @@ -40,4 +41,12 @@ public JurisdictionLevel getJurisdictionLevel() { public void setUserRight(UserRight userRight) { this.userRight = userRight; } + + public Boolean getShowOnlyRestrictedAccessToAssignedEntities() { + return showOnlyRestrictedAccessToAssignedEntities; + } + + public void setShowOnlyRestrictedAccessToAssignedEntities(Boolean showOnlyRestrictedAccessToAssignedEntities) { + this.showOnlyRestrictedAccessToAssignedEntities = showOnlyRestrictedAccessToAssignedEntities; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleDto.java index 6b0be932df1..8016b1f17db 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/user/UserRoleDto.java @@ -53,6 +53,7 @@ public class UserRoleDto extends EntityDto { public static final String PORT_HEALTH_USER = "portHealthUser"; public static final String NOTIFICATION_TYPES = "notificationTypes"; public static final String LINKED_DEFAULT_USER_ROLE = "linkedDefaultUserRole"; + public static final String RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES = "restrictAccessToAssignedEntities"; private Set userRights; private boolean enabled = true; @@ -68,6 +69,7 @@ public class UserRoleDto extends EntityDto { private JurisdictionLevel jurisdictionLevel; private Set emailNotificationTypes = Collections.emptySet(); private Set smsNotificationTypes = Collections.emptySet(); + private boolean restrictAccessToAssignedEntities = false; public static UserRoleDto build(UserRight... userRights) { @@ -207,6 +209,14 @@ public void setNotificationTypes(NotificationTypes notificationTypes) { this.emailNotificationTypes = notificationTypes.email; } + public boolean isRestrictAccessToAssignedEntities() { + return restrictAccessToAssignedEntities; + } + + public void setRestrictAccessToAssignedEntities(boolean restrictAccessToAssignedEntities) { + this.restrictAccessToAssignedEntities = restrictAccessToAssignedEntities; + } + @Override public String buildCaption() { return caption; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/DataHelper.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/DataHelper.java index a169ad7ad3b..ceba1b1bbd3 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/utils/DataHelper.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/DataHelper.java @@ -48,6 +48,7 @@ import de.symeda.sormas.api.caze.BirthDateDto; import de.symeda.sormas.api.caze.BurialInfoDto; import de.symeda.sormas.api.disease.DiseaseVariant; +import de.symeda.sormas.api.environment.environmentsample.Pathogen; import de.symeda.sormas.api.event.SpecificRisk; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; @@ -494,4 +495,8 @@ public static Date removeTime(Date date) { } return shortDate; } + + public static String getPathogenString(Pathogen pathogen, String pathogenDetails) { + return pathogen != null ? pathogen.getCaption() + (StringUtils.isNotBlank(pathogenDetails) ? " (" + pathogenDetails + ")" : "") : ""; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/PseudonymizableIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/PseudonymizableIndexDto.java index d487e39c812..cd541282042 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/PseudonymizableIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/PseudonymizableIndexDto.java @@ -22,7 +22,7 @@ public class PseudonymizableIndexDto extends AbstractUuidDto implements Pseudonymizable { private boolean pseudonymized; - private boolean inJurisdiction; + protected boolean inJurisdiction; @Override public boolean isPseudonymized() { diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index 4d7940abe8e..2581ae76814 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ar-SA.properties b/sormas-api/src/main/resources/captions_ar-SA.properties index 7a125b5fe56..b962ef802d5 100644 --- a/sormas-api/src/main/resources/captions_ar-SA.properties +++ b/sormas-api/src/main/resources/captions_ar-SA.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_cs-CZ.properties b/sormas-api/src/main/resources/captions_cs-CZ.properties index 0a3b439551e..800b76ec820 100644 --- a/sormas-api/src/main/resources/captions_cs-CZ.properties +++ b/sormas-api/src/main/resources/captions_cs-CZ.properties @@ -71,7 +71,7 @@ adoptHomeAddressOfCasePerson=Přijmout bydliště osoby případu adoptHomeAddressOfCasePersonIfRelationMatches=Přijmout bydliště osoby v případě, že bydlí ve stejné domácnosti casePersonAddress=Adresa osoby případu viewMessage=Zobrazit zprávu -primarySuffix=primary +primarySuffix=primární # About about=O aplikaci aboutAdditionalInfo=Dodatečné informace @@ -363,7 +363,7 @@ caseFilterWithoutResponsibleUser=Pouze případy bez odpovědného uživatele caseFilterWithExtendedQuarantine=Pouze případy s rozšířenou karanténou caseFilterWithReducedQuarantine=Pouze případy se sníženou karanténou caseFilterOnlyQuarantineHelpNeeded=Pomoc potřebná v karanténě -caseFilterIncludeCasesFromOtherJurisdictions=Include cases from other jurisdictions +caseFilterIncludeCasesFromOtherJurisdictions=Zahrnout případy z jiných jurisdikcí caseFilterOnlyCasesWithFulfilledReferenceDefinition=Pouze případy, které splňují referenční definici caseFilterRelatedToEvent=Pouze případy s událostmi caseFilterOnlyFromOtherInstances=Pouze případy z jiných instancí @@ -718,7 +718,7 @@ contactChooseSourceCase=Vybrat zdrojový případ contactOnlyQuarantineHelpNeeded=Pomoc potřebná v karanténě contactOnlyWithExtendedQuarantine=Pouze kontakty s rozšířenou karanténou contactOnlyWithReducedQuarantine=Pouze kontakty se sníženou karanténou -contactIncludeContactsFromOtherJurisdictions=Include contacts from other jurisdictions +contactIncludeContactsFromOtherJurisdictions=Zahrnout kontakty z jiných jurisdikcí contactOnlyWithSharedEventWithSourceCase=Pouze kontakty se zdrojovými případy propojené se zadanou událostí contactOnlyWithSourceCaseInGivenEvent=Pouze kontakty, jejichž zdrojové případy jsou propojeny s touto událostí contactFollowUpDay=Den @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Oznamující uživatel ContactExport.reportingUserRoles=Role oznamujícího uživatele ContactExport.followUpStatusChangeUserName=Odpovědný uživatel ContactExport.followUpStatusChangeUserRoles=Role odpovědného uživatele +# Customizable enums +CustomizableEnum.hasDetails=Zobrazit další detaily textového pole, když je tato hodnota vybrána +CustomizableEnum.hasDetails.short=Má detaily +# Customizable enum values +customizableEnumValueAllDiseases=Všechny nemoci +customizableEnumValueDiseaseCount=%d nemoci +customizableEnumValueNoProperties=Žádné vlastnosti +CustomizableEnumValue.dataType=Datový typ +CustomizableEnumValue.value=Hodnota +CustomizableEnumValue.caption=Popisek +CustomizableEnumValue.diseases=Nemoci +CustomizableEnumValue.properties=Vlastnosti # Dashboard dashboardAlive=Naživu dashboardApplyCustomFilter=Použít vlastní filtr @@ -1170,8 +1182,8 @@ EnvironmentSample.labSampleId = ID laboratorního vzorku EnvironmentSample.specimenCondition = Stav vzorku EnvironmentSample.location = Umístění místa odběru vzorků EnvironmentSample.generalComment = Obecný komentář -EnvironmentSample.positivePathogenTests = Positive pathogen tests -EnvironmentSample.latestPathogenTest = Latest pathogen test +EnvironmentSample.positivePathogenTests = Pozitivní testy na patogeny +EnvironmentSample.latestPathogenTest = Nejnovější test patogenu EnvironmentSample.numberOfTests = Počet testů # Event @@ -1658,8 +1670,8 @@ messagesNoSmsSentForCase=Neodeslána žádná SMS na osobu případu messagesNoPhoneNumberForCasePerson=Osoba případu nemá telefonní číslo messagesSms=SMS messagesEmail=E-mail -messagesEmails=Emails -messagesSendEmail=Send email +messagesEmails=E-maily +messagesSendEmail=Poslat e-mail messagesSendingSms=Odeslat nové SMS messagesNumberOfMissingPhoneNumbers=Počet vybraných případů bez telefonního čísla\: %s messagesCharacters=Znaků\: %d / 160 @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Testovaná choroba PathogenTest.testedDiseaseVariant=Testovaná varianta choroby PathogenTest.testedDiseaseDetails=Název testované choroby PathogenTest.testedPathogen=Testovaný patogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Psaní ID PathogenTest.serotype=Sérotyp PathogenTest.cqValue=Hodnota CQ/CT @@ -2661,8 +2674,10 @@ View.configuration.populationdata=Údaje o obyvatelstvu View.configuration.populationdata.short=Obyvatelstvo View.configuration.linelisting=Konfigurace výpisu řádků View.configuration.linelisting.short=Řádek výpisu -View.configuration.emailTemplates=Email Templates -View.configuration.emailTemplates.short=Email Templates +View.configuration.emailTemplates=Šablony e-mailů +View.configuration.emailTemplates.short=Šablony e-mailů +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Adresář kontaktů View.contacts.archive=Archiv kontaktů View.contacts.epidata=Epidemiologické údaje kontaktu @@ -2755,7 +2770,7 @@ SormasToSormasOptions.withAssociatedContacts=Sdílet související kontakty SormasToSormasOptions.withSamples=Sdílet vzorky SormasToSormasOptions.withEventParticipants=Sdílet účastníky události SormasToSormasOptions.withImmunizations=Sdílet imunizaci -SormasToSormasOptions.withSurveillanceReports=Share reports +SormasToSormasOptions.withSurveillanceReports=Sdílet reporty SormasToSormasOptions.handOverOwnership=Převést vlastnictví SormasToSormasOptions.pseudonymizeData=Vyloučit osobní údaje SormasToSormasOptions.comment=Komentář @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Propojené výchozí uživatelské role UserRole.portHealthUser=Uživatel Vstupní hygienické kontroly UserRole.smsNotificationTypes=Typy SMS oznámení UserRole.templateUserRole=Šablona role uživatele +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=Seznam uživatelských rolí userRoleNotifications=Oznámení userRoleNotificationTypeSms = SMS @@ -2892,11 +2909,16 @@ environmentSampleNotShipped = Neodesláno environmentSampleShipped = Odesláno environmentSampleReceived = Přijato environmentSampleActiveSamples=Aktivní vzorky prostředí -environmentSampleArchivedSamples=Archived environment samples +environmentSampleArchivedSamples=Archivované vzorky prostředí environmentSampleAllActiveAndArchivedSamples=Všechny aktivní a archivované vzorky prostředí environmentSampleDeletedSamples=Odstraněné vzorky prostředí humanSampleViewType=Lidský environmentSampleViewType=Prostředí environmentSampleNewSample=Nový vzorek -ExternalEmailOptions.templateName=Choose template -ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.templateName=Vyberte šablonu +ExternalEmailOptions.recipientEmail=E-mailová adresa +ExternalEmailOptions.attachedDocuments=Přiložit dokument(y) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_de-CH.properties b/sormas-api/src/main/resources/captions_de-CH.properties index c321d64ce19..1d72d96b683 100644 --- a/sormas-api/src/main/resources/captions_de-CH.properties +++ b/sormas-api/src/main/resources/captions_de-CH.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Meldender Nutzer ContactExport.reportingUserRoles=Benutzerrolle des meldenden Nutzers ContactExport.followUpStatusChangeUserName=Verantwortlicher Benutzer ContactExport.followUpStatusChangeUserRoles=Benutzerrolle des verantwortlichen Benutzers +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Lebendig dashboardApplyCustomFilter=Eigenen Filter anwenden @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Getestete Krankheit PathogenTest.testedDiseaseVariant=Getestete Krankheitsvariante PathogenTest.testedDiseaseDetails=Name der getesteten Krankheit PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typisierungs-ID PathogenTest.serotype=Serotyp PathogenTest.cqValue=CQ/CT Wert @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing/Zeilenauflistung Einstellungen View.configuration.linelisting.short=Line Listing/Zeilenauflistung View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Kontaktverzeichnis View.contacts.archive=Kontaktarchiv View.contacts.epidata=Epidemiologische Daten des Kontakts @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Verknüpfte Standard-Benutzerrolle UserRole.portHealthUser=Einreise Benutzer UserRole.smsNotificationTypes=SMS-Benachrichtigungstypen UserRole.templateUserRole=Benutzerrollenvorlage +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=Liste der Benutzerrollen userRoleNotifications=Benachrichtigungen userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_de-DE.properties b/sormas-api/src/main/resources/captions_de-DE.properties index 3f864f22733..121a65ec2f2 100644 --- a/sormas-api/src/main/resources/captions_de-DE.properties +++ b/sormas-api/src/main/resources/captions_de-DE.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Meldender Nutzer ContactExport.reportingUserRoles=Benutzerrolle des meldenden Nutzers ContactExport.followUpStatusChangeUserName=Verantwortlicher Benutzer ContactExport.followUpStatusChangeUserRoles=Benutzerrolle des verantwortlichen Benutzers +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Lebendig dashboardApplyCustomFilter=Eigenen Filter anwenden @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Getestete Krankheit PathogenTest.testedDiseaseVariant=Getestete Krankheitsvariante PathogenTest.testedDiseaseDetails=Name der getesteten Krankheit PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typisierungs-ID PathogenTest.serotype=Serotyp PathogenTest.cqValue=CQ/CT Wert @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing/Zeilenauflistung Einstellungen View.configuration.linelisting.short=Line Listing/Zeilenauflistung View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Kontaktverzeichnis View.contacts.archive=Kontaktabschlüsse View.contacts.epidata=Kontakt Epidemiologische Daten @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Verknüpfte Standard-Benutzerrolle UserRole.portHealthUser=Einreise Benutzer UserRole.smsNotificationTypes=SMS-Benachrichtigungstypen UserRole.templateUserRole=Benutzerrollenvorlage +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=Liste der Benutzerrollen userRoleNotifications=Benachrichtigungen userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Umgebung environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_en-AF.properties b/sormas-api/src/main/resources/captions_en-AF.properties index 2ca167b7b33..a63935ef48f 100644 --- a/sormas-api/src/main/resources/captions_en-AF.properties +++ b/sormas-api/src/main/resources/captions_en-AF.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_en-GH.properties b/sormas-api/src/main/resources/captions_en-GH.properties index 9a2ae6de3d0..a6b6aee3c83 100644 --- a/sormas-api/src/main/resources/captions_en-GH.properties +++ b/sormas-api/src/main/resources/captions_en-GH.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_en-NG.properties b/sormas-api/src/main/resources/captions_en-NG.properties index 98f44b5ebc3..ed17cfa4b25 100644 --- a/sormas-api/src/main/resources/captions_en-NG.properties +++ b/sormas-api/src/main/resources/captions_en-NG.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_es-CU.properties b/sormas-api/src/main/resources/captions_es-CU.properties index 5c4edabf94f..47c4c7dbbac 100644 --- a/sormas-api/src/main/resources/captions_es-CU.properties +++ b/sormas-api/src/main/resources/captions_es-CU.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Usuario informante ContactExport.reportingUserRoles=Roles del usuario informante ContactExport.followUpStatusChangeUserName=Usuario responsable ContactExport.followUpStatusChangeUserRoles=Roles del usuario responsable +# Customizable enums +CustomizableEnum.hasDetails=Mostrar un campo de texto adicional de detalles cuando se seleccione este valor +CustomizableEnum.hasDetails.short=Tiene detalles +# Customizable enum values +customizableEnumValueAllDiseases=Todas las enfermedades +customizableEnumValueDiseaseCount=%d enfermedades +customizableEnumValueNoProperties=Sin propiedades +CustomizableEnumValue.dataType=Tipo de datos +CustomizableEnumValue.value=Valor +CustomizableEnumValue.caption=Leyenda +CustomizableEnumValue.diseases=Enfermedades +CustomizableEnumValue.properties=Propiedades # Dashboard dashboardAlive=Vivo dashboardApplyCustomFilter=Aplicar filtro personalizado @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Enfermedad probada PathogenTest.testedDiseaseVariant=Variante de enfermedad probada PathogenTest.testedDiseaseDetails=Nombre de la enfermedad probada PathogenTest.testedPathogen=Patógeno probado +PathogenTest.testedPathogenDetails=Detalles del patógeno probado PathogenTest.typingId=ID de tipo PathogenTest.serotype=Serotipo PathogenTest.cqValue=Valor CQ/CT @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configuración del listado de líneas View.configuration.linelisting.short=Listado de líneas View.configuration.emailTemplates=Plantillas de mensaje View.configuration.emailTemplates.short=Plantillas de mensaje +View.configuration.customizableEnums=Configuración de enumeración personalizable +View.configuration.customizableEnums.short=Enumeraciones personalizables View.contacts=Directorio de contactos View.contacts.archive=Archivo de contactos View.contacts.epidata=Datos epidemiológicos de contacto @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Rol de usuario predeterminado vinculado UserRole.portHealthUser=Usuario de salud portuaria UserRole.smsNotificationTypes=Tipos de notificación por SMS UserRole.templateUserRole=Plantilla de rol de usuario +UserRole.restrictAccessToAssignedEntities=Restringir el acceso a las entidades asignadas +userRoleShowOnlyRestrictedAccessToAssignCases=Sólo mostrar roles de usuario con acceso restringido a las entidades asignadas userRoleUserrolesView=Lista de roles de usuario userRoleNotifications=Notificaciones userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Ambiente environmentSampleNewSample=Nueva muestra ExternalEmailOptions.templateName=Seleccionar plantilla ExternalEmailOptions.recipientEmail=Dirección de correo electrónico +ExternalEmailOptions.attachedDocuments=Adjuntar documento(s) +externalEmailUsedTemplate=Plantilla +externalEmailSentBy=Enviado por +externalEmailSentTo=Enviado a +externalEmailAttachedDocuments=Documentos adjuntos \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_es-ES.properties b/sormas-api/src/main/resources/captions_es-ES.properties index 917f75858ee..314ec07ea6d 100644 --- a/sormas-api/src/main/resources/captions_es-ES.properties +++ b/sormas-api/src/main/resources/captions_es-ES.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fa-AF.properties b/sormas-api/src/main/resources/captions_fa-AF.properties index 29a6f7ca66b..49a0ca12419 100644 --- a/sormas-api/src/main/resources/captions_fa-AF.properties +++ b/sormas-api/src/main/resources/captions_fa-AF.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fi-FI.properties b/sormas-api/src/main/resources/captions_fi-FI.properties index 9a8e8f5e3fd..1d508878220 100644 --- a/sormas-api/src/main/resources/captions_fi-FI.properties +++ b/sormas-api/src/main/resources/captions_fi-FI.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Elossa dashboardApplyCustomFilter=Käytä mukautettua suodatinta @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Testattu sairaus PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Testatun sairauden nimi PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotyyppi PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Rivilistauksen asetukset View.configuration.linelisting.short=Rivilistaus View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Kontaktiluettelo View.contacts.archive=Kontaktiarkisto View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fil-PH.properties b/sormas-api/src/main/resources/captions_fil-PH.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_fil-PH.properties +++ b/sormas-api/src/main/resources/captions_fil-PH.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fj-FJ.properties b/sormas-api/src/main/resources/captions_fj-FJ.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_fj-FJ.properties +++ b/sormas-api/src/main/resources/captions_fj-FJ.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fr-CD.properties b/sormas-api/src/main/resources/captions_fr-CD.properties index 123c9763b9e..100dbfc7d03 100644 --- a/sormas-api/src/main/resources/captions_fr-CD.properties +++ b/sormas-api/src/main/resources/captions_fr-CD.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fr-CH.properties b/sormas-api/src/main/resources/captions_fr-CH.properties index 4d02291747f..0b9f32b2b71 100644 --- a/sormas-api/src/main/resources/captions_fr-CH.properties +++ b/sormas-api/src/main/resources/captions_fr-CH.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Vivant dashboardApplyCustomFilter=Appliquer un filtre personnalisé @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Maladie testée PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Nom de la maladie Testée PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Sérotype PathogenTest.cqValue=Valeur CQ @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configuration de la liste des lignes View.configuration.linelisting.short=Liste des lignes View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Répertoire de contacts View.contacts.archive=Archive de contact View.contacts.epidata=Données épidémiologiques du contact @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fr-FR.properties b/sormas-api/src/main/resources/captions_fr-FR.properties index abc869b993a..2a8af85d1d5 100644 --- a/sormas-api/src/main/resources/captions_fr-FR.properties +++ b/sormas-api/src/main/resources/captions_fr-FR.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Utilisateur de rapport ContactExport.reportingUserRoles=Rôle du rapporteur ContactExport.followUpStatusChangeUserName=Utilisateur responsable ContactExport.followUpStatusChangeUserRoles=Rôle des utilisateurs responsables +# Customizable enums +CustomizableEnum.hasDetails=Affiche un champ de texte pour des détails supplémentaires lorsque cette valeur est sélectionnée +CustomizableEnum.hasDetails.short=A des détails +# Customizable enum values +customizableEnumValueAllDiseases=Toutes les maladies +customizableEnumValueDiseaseCount=%d maladies +customizableEnumValueNoProperties=Aucune propriété +CustomizableEnumValue.dataType=Types de Donnée +CustomizableEnumValue.value=Valeur +CustomizableEnumValue.caption=Libellé +CustomizableEnumValue.diseases=Maladies +CustomizableEnumValue.properties=Propriétés # Dashboard dashboardAlive=Vivant dashboardApplyCustomFilter=Appliquer ce filtre personnalisé @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Maladie testée PathogenTest.testedDiseaseVariant=Variante de la maladie testée PathogenTest.testedDiseaseDetails=Nom de la maladie testée PathogenTest.testedPathogen=Agent pathogène testé +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=ID de la saisie PathogenTest.serotype=Sérotype PathogenTest.cqValue=Valeur CQ/CT @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configuration de la liste des lignes View.configuration.linelisting.short=Liste des lignes View.configuration.emailTemplates=Modèles d'e-mail View.configuration.emailTemplates.short=Modèles d'e-mail +View.configuration.customizableEnums=Configuration de l'Enum personnalisable +View.configuration.customizableEnums.short=Enums personnalisables View.contacts=Répertoire des contacts View.contacts.archive=Archive de contact View.contacts.epidata=Données épidémiologiques du contact @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_fr-TN.properties b/sormas-api/src/main/resources/captions_fr-TN.properties index b140c790240..470fe456902 100644 --- a/sormas-api/src/main/resources/captions_fr-TN.properties +++ b/sormas-api/src/main/resources/captions_fr-TN.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Utilisateur de rapport ContactExport.reportingUserRoles=Rôle du rapporteur ContactExport.followUpStatusChangeUserName=Utilisateur responsable ContactExport.followUpStatusChangeUserRoles=Rôle des utilisateurs responsables +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Vivant dashboardApplyCustomFilter=Appliquer ce filtre personnalisé @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Maladie testée PathogenTest.testedDiseaseVariant=Variante de la maladie testée PathogenTest.testedDiseaseDetails=Nom de la maladie testée PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=ID de la saisie PathogenTest.serotype=Sérotype PathogenTest.cqValue=Valeur CQ/CT @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configuration de la liste des lignes View.configuration.linelisting.short=Liste des lignes View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Répertoire des contacts View.contacts.archive=Archive de contact View.contacts.epidata=Données épidémiologiques du contact @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_hi-IN.properties b/sormas-api/src/main/resources/captions_hi-IN.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_hi-IN.properties +++ b/sormas-api/src/main/resources/captions_hi-IN.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_hr-HR.properties b/sormas-api/src/main/resources/captions_hr-HR.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_hr-HR.properties +++ b/sormas-api/src/main/resources/captions_hr-HR.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_it-CH.properties b/sormas-api/src/main/resources/captions_it-CH.properties index c83ec3e504f..ae94b5bbfc0 100644 --- a/sormas-api/src/main/resources/captions_it-CH.properties +++ b/sormas-api/src/main/resources/captions_it-CH.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=In vita dashboardApplyCustomFilter=Applica filtro personalizzato @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Malattia testata PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Nome malattia testata PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotipo PathogenTest.cqValue=Valore CQ/CT @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configurazione line listing/elenco linee View.configuration.linelisting.short=Line listing/elenco linee View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Elenco contatti View.contacts.archive=Archivio Contatti View.contacts.epidata=Dati Epidemiologici del Contatto @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_it-IT.properties b/sormas-api/src/main/resources/captions_it-IT.properties index ddf3bfb2d80..68948bf3cc5 100644 --- a/sormas-api/src/main/resources/captions_it-IT.properties +++ b/sormas-api/src/main/resources/captions_it-IT.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=In vita dashboardApplyCustomFilter=Applica filtro personalizzato @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Malattia testata PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Nome malattia testata PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotipo PathogenTest.cqValue=Valore CQ/CT @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Configurazione line listing/elenco linee View.configuration.linelisting.short=Line listing/elenco linee View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Elenco contatti View.contacts.archive=Archivio Contatti View.contacts.epidata=Dati Epidemiologici del Contatto @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ja-JP.properties b/sormas-api/src/main/resources/captions_ja-JP.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_ja-JP.properties +++ b/sormas-api/src/main/resources/captions_ja-JP.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ne-NP.properties b/sormas-api/src/main/resources/captions_ne-NP.properties index 7a125b5fe56..b962ef802d5 100644 --- a/sormas-api/src/main/resources/captions_ne-NP.properties +++ b/sormas-api/src/main/resources/captions_ne-NP.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_nl-NL.properties b/sormas-api/src/main/resources/captions_nl-NL.properties index b6a7096aeba..28752af0c13 100644 --- a/sormas-api/src/main/resources/captions_nl-NL.properties +++ b/sormas-api/src/main/resources/captions_nl-NL.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_no-NO.properties b/sormas-api/src/main/resources/captions_no-NO.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_no-NO.properties +++ b/sormas-api/src/main/resources/captions_no-NO.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_pl-PL.properties b/sormas-api/src/main/resources/captions_pl-PL.properties index c81244f90b7..45727e4b14d 100644 --- a/sormas-api/src/main/resources/captions_pl-PL.properties +++ b/sormas-api/src/main/resources/captions_pl-PL.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ps-AF.properties b/sormas-api/src/main/resources/captions_ps-AF.properties index 8c34cded07d..ff61e684f82 100644 --- a/sormas-api/src/main/resources/captions_ps-AF.properties +++ b/sormas-api/src/main/resources/captions_ps-AF.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=ژوندی dashboardApplyCustomFilter=کستم فلتر عملی کړه @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_pt-PT.properties b/sormas-api/src/main/resources/captions_pt-PT.properties index 52b354f979a..00399a50a3e 100644 --- a/sormas-api/src/main/resources/captions_pt-PT.properties +++ b/sormas-api/src/main/resources/captions_pt-PT.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ro-RO.properties b/sormas-api/src/main/resources/captions_ro-RO.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_ro-RO.properties +++ b/sormas-api/src/main/resources/captions_ro-RO.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ru-RU.properties b/sormas-api/src/main/resources/captions_ru-RU.properties index ae1c6dbe0a6..153efa67b96 100644 --- a/sormas-api/src/main/resources/captions_ru-RU.properties +++ b/sormas-api/src/main/resources/captions_ru-RU.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_sv-SE.properties b/sormas-api/src/main/resources/captions_sv-SE.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_sv-SE.properties +++ b/sormas-api/src/main/resources/captions_sv-SE.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_sw-KE.properties b/sormas-api/src/main/resources/captions_sw-KE.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_sw-KE.properties +++ b/sormas-api/src/main/resources/captions_sw-KE.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_tr-TR.properties b/sormas-api/src/main/resources/captions_tr-TR.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_tr-TR.properties +++ b/sormas-api/src/main/resources/captions_tr-TR.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_uk-UA.properties b/sormas-api/src/main/resources/captions_uk-UA.properties index 73cf7cfb8af..6ba203efdd7 100644 --- a/sormas-api/src/main/resources/captions_uk-UA.properties +++ b/sormas-api/src/main/resources/captions_uk-UA.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_ur-PK.properties b/sormas-api/src/main/resources/captions_ur-PK.properties index 3313d8866c2..1773d71a332 100644 --- a/sormas-api/src/main/resources/captions_ur-PK.properties +++ b/sormas-api/src/main/resources/captions_ur-PK.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=رپورٹنگ صارف ContactExport.reportingUserRoles=صارف کے کردار کی رپورٹنگ ContactExport.followUpStatusChangeUserName=ذمہ دار صارف ContactExport.followUpStatusChangeUserRoles=ذمہ دار صارف کردار +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=زندہ dashboardApplyCustomFilter=حسب ضرورت فلٹر لگائیں @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=ٹیسٹڈ بیماری PathogenTest.testedDiseaseVariant=ٹیسٹڈ بیماری کی قسم PathogenTest.testedDiseaseDetails=ٹیسٹڈ بیماری کا نام PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=ٹائپنگ شناخت PathogenTest.serotype=سیروٹائپ PathogenTest.cqValue=CQ/CT ویلیو @@ -2663,6 +2676,8 @@ View.configuration.linelisting=لائن لسٹنگ کنفیگریشن View.configuration.linelisting.short=لائن لسٹنگ View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=رابطہ کی ڈائرکٹری View.contacts.archive=آرکائیو رابطہ View.contacts.epidata=رابطے کے وبائی امراض کا ڈیٹا @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=منسلک ڈیفالٹ صارف کا کردار UserRole.portHealthUser=پورٹ ہیلتھ صارف UserRole.smsNotificationTypes=ایس ایم ایس کی اطلاعات کی اقسام UserRole.templateUserRole=صارف کے کردار کا ٹیمپلیٹ +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=صارف کے کردار کی فہرست userRoleNotifications=نوٹیفیکیشنز userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/captions_zh-CN.properties b/sormas-api/src/main/resources/captions_zh-CN.properties index 487c2876944..2c09b52be1a 100644 --- a/sormas-api/src/main/resources/captions_zh-CN.properties +++ b/sormas-api/src/main/resources/captions_zh-CN.properties @@ -859,6 +859,18 @@ ContactExport.reportingUserName=Reporting user ContactExport.reportingUserRoles=Reporting user roles ContactExport.followUpStatusChangeUserName=Responsible user ContactExport.followUpStatusChangeUserRoles=Responsible user roles +# Customizable enums +CustomizableEnum.hasDetails=Show an additional details text field when this value is selected +CustomizableEnum.hasDetails.short=Has details +# Customizable enum values +customizableEnumValueAllDiseases=All diseases +customizableEnumValueDiseaseCount=%d diseases +customizableEnumValueNoProperties=No properties +CustomizableEnumValue.dataType=Data type +CustomizableEnumValue.value=Value +CustomizableEnumValue.caption=Caption +CustomizableEnumValue.diseases=Diseases +CustomizableEnumValue.properties=Properties # Dashboard dashboardAlive=Alive dashboardApplyCustomFilter=Apply custom filter @@ -1738,6 +1750,7 @@ PathogenTest.testedDisease=Tested disease PathogenTest.testedDiseaseVariant=Tested disease variant PathogenTest.testedDiseaseDetails=Tested disease name PathogenTest.testedPathogen=Tested pathogen +PathogenTest.testedPathogenDetails=Tested pathogen details PathogenTest.typingId=Typing ID PathogenTest.serotype=Serotype PathogenTest.cqValue=CQ/CT Value @@ -2663,6 +2676,8 @@ View.configuration.linelisting=Line Listing Configuration View.configuration.linelisting.short=Line Listing View.configuration.emailTemplates=Email Templates View.configuration.emailTemplates.short=Email Templates +View.configuration.customizableEnums=Customizable Enum Configuration +View.configuration.customizableEnums.short=Customizable Enums View.contacts=Contact Directory View.contacts.archive=Contact Archive View.contacts.epidata=Contact Epidemiological Data @@ -2840,6 +2855,8 @@ UserRole.linkedDefaultUserRole=Linked default user role UserRole.portHealthUser=Port health user UserRole.smsNotificationTypes=SMS notification types UserRole.templateUserRole=User role template +UserRole.restrictAccessToAssignedEntities=Restrict access to assigned entities +userRoleShowOnlyRestrictedAccessToAssignCases=Only show user roles with access restricted to assigned entities userRoleUserrolesView=User role list userRoleNotifications=Notifications userRoleNotificationTypeSms = SMS @@ -2900,3 +2917,8 @@ environmentSampleViewType=Environment environmentSampleNewSample=New sample ExternalEmailOptions.templateName=Choose template ExternalEmailOptions.recipientEmail=Email address +ExternalEmailOptions.attachedDocuments=Attach document(s) +externalEmailUsedTemplate=Template +externalEmailSentBy=Sent by +externalEmailSentTo=Sent to +externalEmailAttachedDocuments=Attached documents \ No newline at end of file diff --git a/sormas-api/src/main/resources/doc/SORMAS_Data_Dictionary.xlsx b/sormas-api/src/main/resources/doc/SORMAS_Data_Dictionary.xlsx index 1b662bf0af9..e058e33fa20 100644 Binary files a/sormas-api/src/main/resources/doc/SORMAS_Data_Dictionary.xlsx and b/sormas-api/src/main/resources/doc/SORMAS_Data_Dictionary.xlsx differ diff --git a/sormas-api/src/main/resources/doc/SORMAS_User_Roles.xlsx b/sormas-api/src/main/resources/doc/SORMAS_User_Roles.xlsx index a68f8c452c6..e3882ca342e 100644 Binary files a/sormas-api/src/main/resources/doc/SORMAS_User_Roles.xlsx and b/sormas-api/src/main/resources/doc/SORMAS_User_Roles.xlsx differ diff --git a/sormas-api/src/main/resources/enum.properties b/sormas-api/src/main/resources/enum.properties index fc108d1c320..0cc051ecb54 100644 --- a/sormas-api/src/main/resources/enum.properties +++ b/sormas-api/src/main/resources/enum.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ar-SA.properties b/sormas-api/src/main/resources/enum_ar-SA.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_ar-SA.properties +++ b/sormas-api/src/main/resources/enum_ar-SA.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_cs-CZ.properties b/sormas-api/src/main/resources/enum_cs-CZ.properties index 3b1e4c9738c..47c3bfd20c7 100644 --- a/sormas-api/src/main/resources/enum_cs-CZ.properties +++ b/sormas-api/src/main/resources/enum_cs-CZ.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Autobus ConveyanceType.MOTORBIKE = Motorka ConveyanceType.OTHER = Ostatní +CustomizableEnumType.DISEASE_VARIANT = Varianta nemoci +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Typ zaměstnání +CustomizableEnumType.PATHOGEN = Patogen + # DashboardType DashboardType.CONTACTS = Kontakty DashboardType.SURVEILLANCE = Dozor @@ -306,7 +311,7 @@ DatabaseTable.EPIDATA = Epidemiologická data DatabaseTable.EVENTS = Události DatabaseTable.EVENTS_EVENTGROUPS = Události → skupiny událostí DatabaseTable.EVENTGROUPS = Skupiny událostí -DatabaseTable.EVENTPARTICIPANTS = Event participants +DatabaseTable.EVENTPARTICIPANTS = Účastníci události DatabaseTable.EXPOSURES = Vystavení DatabaseTable.ACTIVITIES_AS_CASE = Aktivity podle případu DatabaseTable.FACILITIES = Zařízení @@ -382,26 +387,26 @@ DefaultUserRole.CASE_OFFICER = Úředník případu DefaultUserRole.CASE_SUPERVISOR = Klinický lékař DefaultUserRole.COMMUNITY_INFORMANT = Komunitní informátor DefaultUserRole.COMMUNITY_OFFICER = Komunitní úředník -DefaultUserRole.CONTACT_OFFICER = Contact Officer -DefaultUserRole.CONTACT_SUPERVISOR = Contact Supervisor -DefaultUserRole.DISTRICT_OBSERVER = District Observer -DefaultUserRole.EVENT_OFFICER = Event Officer -DefaultUserRole.EXTERNAL_LAB_USER = External Lab Officer +DefaultUserRole.CONTACT_OFFICER = Kontaktní úředník +DefaultUserRole.CONTACT_SUPERVISOR = Kontaktní inspektor +DefaultUserRole.DISTRICT_OBSERVER = Okresní pozorovatel +DefaultUserRole.EVENT_OFFICER = Úředník pro události +DefaultUserRole.EXTERNAL_LAB_USER = Externí úředník laboratoře DefaultUserRole.HOSPITAL_INFORMANT = Nemocniční informátor DefaultUserRole.IMPORT_USER = Importovat uživatele -DefaultUserRole.LAB_USER = Lab Officer +DefaultUserRole.LAB_USER = Laboratorní úředník DefaultUserRole.NATIONAL_CLINICIAN = Národní lékař DefaultUserRole.NATIONAL_OBSERVER = Národní pozorovatel DefaultUserRole.NATIONAL_USER = Vnitrostátní uživatel DefaultUserRole.POE_INFORMANT = POE Informátor DefaultUserRole.POE_NATIONAL_USER = POE národní uživatel DefaultUserRole.POE_SUPERVISOR = POE Supervisor -DefaultUserRole.STATE_OBSERVER = Region Observer +DefaultUserRole.STATE_OBSERVER = Regionální pozorovatel DefaultUserRole.SURVEILLANCE_OFFICER = Úředník dohledu -DefaultUserRole.SURVEILLANCE_SUPERVISOR = Surveillance Supervisor +DefaultUserRole.SURVEILLANCE_SUPERVISOR = Kontrolní dozorčí DefaultUserRole.REST_EXTERNAL_VISITS_USER = Externí návštěvník -DefaultUserRole.SORMAS_TO_SORMAS_CLIENT = Sormas to Sormas Client -DefaultUserRole.ADMIN_SUPERVISOR = Admin Surveillance Supervisor +DefaultUserRole.SORMAS_TO_SORMAS_CLIENT = Přenos klienta ze Sormas do Sormas +DefaultUserRole.ADMIN_SUPERVISOR = Administrátor Kontrolní dozorčí DefaultUserRole.BAG_USER = BAG uživatel DefaultUserRole.ENVIRONMENTAL_SURVEILLANCE_USER = Environmental Surveillance User DefaultUserRole.Short.ADMIN = Admin @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Přístup k Sormas REST UserRight.EXTERNAL_VISITS = Externí návštěvy UserRight.SORMAS_UI = Přístup k uživatelskému rozhraní Sormas UserRight.DEV_MODE = Přístup k možnostem vývojáře +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = Zobrazit existující dokumenty UserRight.DOCUMENT_UPLOAD = Nahrát dokumenty UserRight.DOCUMENT_DELETE = Odstranit dokumenty ze systému @@ -1580,8 +1586,8 @@ UserRight.ENVIRONMENT_SAMPLE_DELETE = Odstranit vzorky prostředí ze systému UserRight.ENVIRONMENT_SAMPLE_IMPORT = Importovat vzorky prostředí UserRight.ENVIRONMENT_SAMPLE_EXPORT = Exportovat vzorky prostředí UserRight.EMAIL_TEMPLATE_MANAGEMENT=Manage email templates -UserRight.EXTERNAL_EMAIL_SEND=Send external emails -UserRight.EXTERNAL_EMAIL_ATTACH_DOCUMENTS=Attach documents to external emails +UserRight.EXTERNAL_EMAIL_SEND=Odeslat externí e-maily +UserRight.EXTERNAL_EMAIL_ATTACH_DOCUMENTS=Připojit dokumenty k externím e-mailům # UserRight descriptions @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Možnost přístupu k rozhraní SORMAS REST UserRight.Desc.EXTERNAL_VISITS = Může přistupovat k externím REST koncovým bodům UserRight.Desc.SORMAS_UI = Možnost přístupu k grafickému uživatelskému rozhraní SORMAS UserRight.Desc.DEV_MODE = Možnost přístupu vývojáře v konfiguračním adresáři +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Může vytvářet, upravit a odstranit přizpůsobitelné hodnoty UserRight.Desc.DOCUMENT_VIEW = Může zobrazit existující dokumenty UserRight.Desc.DOCUMENT_UPLOAD = Může nahrát dokumenty UserRight.Desc.DOCUMENT_DELETE = Může odstranit dokumenty ze systému @@ -1776,9 +1783,9 @@ UserRight.Desc.ENVIRONMENT_SAMPLE_EDIT_RECEIVAL = Může upravit příchozí inf UserRight.Desc.ENVIRONMENT_SAMPLE_DELETE = Může odstranit vzorky prostředí ze systému UserRight.Desc.ENVIRONMENT_SAMPLE_IMPORT = Může importovat vzorky prostředí UserRight.Desc.ENVIRONMENT_SAMPLE_EXPORT = Může exportovat vzorky prostředí -UserRight.Desc.EMAIL_TEMPLATE_MANAGEMENT=Able to manage email templates -UserRight.Desc.EXTERNAL_EMAIL_SEND=Able to send external emails -UserRight.Desc.EXTERNAL_EMAIL_ATTACH_DOCUMENTS=Able to attach documents to external emails +UserRight.Desc.EMAIL_TEMPLATE_MANAGEMENT=Může spravovat šablony e-mailů +UserRight.Desc.EXTERNAL_EMAIL_SEND=Může odeslat externí e-maily +UserRight.Desc.EXTERNAL_EMAIL_ATTACH_DOCUMENTS=Může připojit dokumenty k externím e-mailům # UserRightGroup UserRightGroup.GENERAL = Obecné @@ -1804,7 +1811,7 @@ UserRightGroup.USER = Uživatelé UserRightGroup.INFRASTRUCTURE = Infrastruktura UserRightGroup.CONFIGURATION = Konfigurace UserRightGroup.DOCUMENT = Dokumenty -UserRightGroup.EXTERNAL_EMAILS=External emails +UserRightGroup.EXTERNAL_EMAILS=Externí e-maily UserRightGroup.ENVIRONMENT = Prostředí # Vaccination @@ -2167,7 +2174,7 @@ NotificationType.Desc.EVENT_PARTICIPANT_RELATED_TO_OTHER_EVENTS = Když je vytvo NotificationType.CASE_LAB_RESULT_ARRIVED = Case lab result arrived NotificationType.Desc.CASE_LAB_RESULT_ARRIVED = Odesláno všem uživatelům přidruženým k regionu nebo odpovědnému regionu případu, kdy je zadán nebo upraven výsledek testu patogenu (nečekající). NotificationType.CONTACT_LAB_RESULT_ARRIVED = Contact lab result arrived -NotificationType.Desc.CONTACT_LAB_RESULT_ARRIVED = Sent to all users associated to the region of a contact when a pathogen test result is entered or modified (non-pending). If the contact has no region the region of the source case is used. +NotificationType.Desc.CONTACT_LAB_RESULT_ARRIVED = Odesláno všem uživatelům přidruženým k oblasti kontaktu, když je zadán nebo upraven výsledek testu patogenního původce (nečeká se). Pokud kontakt nemá žádnou oblast, použije se oblast zdrojového případu. NotificationType.EVENT_PARTICIPANT_LAB_RESULT_ARRIVED = Event participant lab result arrived NotificationType.Desc.EVENT_PARTICIPANT_LAB_RESULT_ARRIVED = Sent to all users associated to the region of an event participant when a pathogen test result is entered or modified (non-pending). NotificationType.LAB_SAMPLE_SHIPPED = Vzorek laboratoře dodán diff --git a/sormas-api/src/main/resources/enum_de-CH.properties b/sormas-api/src/main/resources/enum_de-CH.properties index 5129b6c8d36..ab9a6d9e52c 100644 --- a/sormas-api/src/main/resources/enum_de-CH.properties +++ b/sormas-api/src/main/resources/enum_de-CH.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorrad ConveyanceType.OTHER = Sonstiges +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Kontakte DashboardType.SURVEILLANCE = Überwachung @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Zugriff auf Sormas REST UserRight.EXTERNAL_VISITS = Externe Anrufe UserRight.SORMAS_UI = Zugriff auf Sormas UI UserRight.DEV_MODE = Zugriff auf Entwickleroptionen +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = Bestehende Dokumente anzeigen UserRight.DOCUMENT_UPLOAD = Dokumente hochladen UserRight.DOCUMENT_DELETE = Dokumente aus dem System löschen @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Kann auf die SORMAS REST Schnittstelle zugreifen UserRight.Desc.EXTERNAL_VISITS = Kann auf REST-Endpunkte für externe Anrufe zugreifen UserRight.Desc.SORMAS_UI = Kann auf die grafische Benutzeroberfläche von SORMAS zugreifen UserRight.Desc.DEV_MODE = Kann auf Entwickleroptionen im Konfigurationsverzeichnis zugreifen +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Kann bestehende Dokumente einsehen UserRight.Desc.DOCUMENT_UPLOAD = Kann Dokumente hochladen UserRight.Desc.DOCUMENT_DELETE = Kann Dokumente aus dem System löschen diff --git a/sormas-api/src/main/resources/enum_de-DE.properties b/sormas-api/src/main/resources/enum_de-DE.properties index 845a0ce0b8c..e5533382649 100644 --- a/sormas-api/src/main/resources/enum_de-DE.properties +++ b/sormas-api/src/main/resources/enum_de-DE.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorrad ConveyanceType.OTHER = Sonstiges +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Kontakte DashboardType.SURVEILLANCE = Überwachung @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Zugriff auf Sormas REST UserRight.EXTERNAL_VISITS = Externe Anrufe UserRight.SORMAS_UI = Zugriff auf Sormas UI UserRight.DEV_MODE = Zugriff auf Entwickleroptionen +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = Bestehende Dokumente anzeigen UserRight.DOCUMENT_UPLOAD = Dokumente hochladen UserRight.DOCUMENT_DELETE = Dokumente aus dem System löschen @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Kann auf die SORMAS REST Schnittstelle zugreifen UserRight.Desc.EXTERNAL_VISITS = Kann auf REST-Endpunkte für externe Anrufe zugreifen UserRight.Desc.SORMAS_UI = Kann auf die grafische Benutzeroberfläche von SORMAS zugreifen UserRight.Desc.DEV_MODE = Kann auf Entwickleroptionen im Konfigurationsverzeichnis zugreifen +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Kann bestehende Dokumente einsehen UserRight.Desc.DOCUMENT_UPLOAD = Kann Dokumente hochladen UserRight.Desc.DOCUMENT_DELETE = Kann Dokumente aus dem System löschen diff --git a/sormas-api/src/main/resources/enum_en-AF.properties b/sormas-api/src/main/resources/enum_en-AF.properties index 671469b1c68..e87f52231b8 100644 --- a/sormas-api/src/main/resources/enum_en-AF.properties +++ b/sormas-api/src/main/resources/enum_en-AF.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_en-GH.properties b/sormas-api/src/main/resources/enum_en-GH.properties index 6866040205c..0d2c938c3a1 100644 --- a/sormas-api/src/main/resources/enum_en-GH.properties +++ b/sormas-api/src/main/resources/enum_en-GH.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_en-NG.properties b/sormas-api/src/main/resources/enum_en-NG.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_en-NG.properties +++ b/sormas-api/src/main/resources/enum_en-NG.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_es-CU.properties b/sormas-api/src/main/resources/enum_es-CU.properties index e6a783094c8..acc97cdd169 100644 --- a/sormas-api/src/main/resources/enum_es-CU.properties +++ b/sormas-api/src/main/resources/enum_es-CU.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Autobús ConveyanceType.MOTORBIKE = Motocicleta ConveyanceType.OTHER = Otro +CustomizableEnumType.DISEASE_VARIANT = Variante de enfermedad +CustomizableEnumType.SPECIFIC_EVENT_RISK = Riesgo de evento específico +CustomizableEnumType.OCCUPATION_TYPE = Tipo de ocupación +CustomizableEnumType.PATHOGEN = Patógeno + # DashboardType DashboardType.CONTACTS = Contactos DashboardType.SURVEILLANCE = Vigilancia @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Acceder a Sormas REST UserRight.EXTERNAL_VISITS = Visitas externas UserRight.SORMAS_UI = Acceder a la IU de Sormas UserRight.DEV_MODE = Acceder a opciones de desarrollador +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Administrar enumeraciones personalizables UserRight.DOCUMENT_VIEW = Ver documentos existentes UserRight.DOCUMENT_UPLOAD = Cargar documentos UserRight.DOCUMENT_DELETE = Eliminar documentos del sistema @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Puede acceder a la interfaz SORMAS REST UserRight.Desc.EXTERNAL_VISITS = Puede acceder visitas externas UserRight.Desc.SORMAS_UI = Puede acceder a la interfaz gráfica de usuario de SORMAS UserRight.Desc.DEV_MODE = Puede acceder a las opciones de desarrollador en el directorio de configuración +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Puede crear, editar y eliminar valores de enumeración personalizable UserRight.Desc.DOCUMENT_VIEW = Puede ver documentos existentes UserRight.Desc.DOCUMENT_UPLOAD = Puede cargar documentos UserRight.Desc.DOCUMENT_DELETE = Puede eliminar documentos del sistema diff --git a/sormas-api/src/main/resources/enum_es-ES.properties b/sormas-api/src/main/resources/enum_es-ES.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_es-ES.properties +++ b/sormas-api/src/main/resources/enum_es-ES.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fa-AF.properties b/sormas-api/src/main/resources/enum_fa-AF.properties index b191d4204a2..205cd4f4008 100644 --- a/sormas-api/src/main/resources/enum_fa-AF.properties +++ b/sormas-api/src/main/resources/enum_fa-AF.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fi-FI.properties b/sormas-api/src/main/resources/enum_fi-FI.properties index 1fcbaf71218..a14bf0d736d 100644 --- a/sormas-api/src/main/resources/enum_fi-FI.properties +++ b/sormas-api/src/main/resources/enum_fi-FI.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bussi ConveyanceType.MOTORBIKE = Moottoripyörä ConveyanceType.OTHER = Muu +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Jäljitys DashboardType.SURVEILLANCE = Seuranta @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fil-PH.properties b/sormas-api/src/main/resources/enum_fil-PH.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_fil-PH.properties +++ b/sormas-api/src/main/resources/enum_fil-PH.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fj-FJ.properties b/sormas-api/src/main/resources/enum_fj-FJ.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_fj-FJ.properties +++ b/sormas-api/src/main/resources/enum_fj-FJ.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fr-CD.properties b/sormas-api/src/main/resources/enum_fr-CD.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_fr-CD.properties +++ b/sormas-api/src/main/resources/enum_fr-CD.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fr-CH.properties b/sormas-api/src/main/resources/enum_fr-CH.properties index 9e41af77aca..455ef397721 100644 --- a/sormas-api/src/main/resources/enum_fr-CH.properties +++ b/sormas-api/src/main/resources/enum_fr-CH.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Moto ConveyanceType.OTHER = Autres +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_fr-FR.properties b/sormas-api/src/main/resources/enum_fr-FR.properties index 57fa6c80724..81e657a7437 100644 --- a/sormas-api/src/main/resources/enum_fr-FR.properties +++ b/sormas-api/src/main/resources/enum_fr-FR.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Moto ConveyanceType.OTHER = Autres +CustomizableEnumType.DISEASE_VARIANT = Variant de la maladie +CustomizableEnumType.SPECIFIC_EVENT_RISK = Risque d'événement spécifique +CustomizableEnumType.OCCUPATION_TYPE = Type de profession +CustomizableEnumType.PATHOGEN = Agent pathogène + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Accéder à Sormas REST UserRight.EXTERNAL_VISITS = Visites externes UserRight.SORMAS_UI = Accéder à l'interface utilisateur de Sormas UserRight.DEV_MODE = Accéder aux options de développement +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Gérer les enums personnalisables UserRight.DOCUMENT_VIEW = Afficher les documents existants UserRight.DOCUMENT_UPLOAD = Charger des documents UserRight.DOCUMENT_DELETE = Supprimer les documents du système @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Accès à l'interface REST SORMAS UserRight.Desc.EXTERNAL_VISITS = Capable d'accéder aux points de terminaison REST des visites externes UserRight.Desc.SORMAS_UI = Accès à l'interface graphique SORMAS UserRight.Desc.DEV_MODE = Possibilité d'accéder aux options du développeur dans le répertoire de configuration +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Capable de créer, modifier et supprimer des valeurs personnalisables UserRight.Desc.DOCUMENT_VIEW = Capable de voir les documents existants UserRight.Desc.DOCUMENT_UPLOAD = Capable de télécharger des documents UserRight.Desc.DOCUMENT_DELETE = Capable de supprimer les documents du système diff --git a/sormas-api/src/main/resources/enum_fr-TN.properties b/sormas-api/src/main/resources/enum_fr-TN.properties index 8c0ce6e2388..fee97038e88 100644 --- a/sormas-api/src/main/resources/enum_fr-TN.properties +++ b/sormas-api/src/main/resources/enum_fr-TN.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Moto ConveyanceType.OTHER = Autres +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Accéder à Sormas REST UserRight.EXTERNAL_VISITS = Visites externes UserRight.SORMAS_UI = Accéder à l'interface utilisateur de Sormas UserRight.DEV_MODE = Accéder aux options de développement +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = Afficher les documents existants UserRight.DOCUMENT_UPLOAD = Charger des documents UserRight.DOCUMENT_DELETE = Supprimer les documents du système @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Accès à l'interface REST SORMAS UserRight.Desc.EXTERNAL_VISITS = Capable d'accéder aux points de terminaison REST des visites externes UserRight.Desc.SORMAS_UI = Accès à l'interface graphique SORMAS UserRight.Desc.DEV_MODE = Possibilité d'accéder aux options du développeur dans le répertoire de configuration +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Capable de voir les documents existants UserRight.Desc.DOCUMENT_UPLOAD = Capable de télécharger des documents UserRight.Desc.DOCUMENT_DELETE = Capable de supprimer les documents du système diff --git a/sormas-api/src/main/resources/enum_hi-IN.properties b/sormas-api/src/main/resources/enum_hi-IN.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_hi-IN.properties +++ b/sormas-api/src/main/resources/enum_hi-IN.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_hr-HR.properties b/sormas-api/src/main/resources/enum_hr-HR.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_hr-HR.properties +++ b/sormas-api/src/main/resources/enum_hr-HR.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_it-CH.properties b/sormas-api/src/main/resources/enum_it-CH.properties index ded6f7211fd..5c4ae7e1726 100644 --- a/sormas-api/src/main/resources/enum_it-CH.properties +++ b/sormas-api/src/main/resources/enum_it-CH.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Autobus ConveyanceType.MOTORBIKE = Motocicletta ConveyanceType.OTHER = Altro +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contatti DashboardType.SURVEILLANCE = Sorveglianza @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_it-IT.properties b/sormas-api/src/main/resources/enum_it-IT.properties index a6cac8a0697..30b8a7f37b3 100644 --- a/sormas-api/src/main/resources/enum_it-IT.properties +++ b/sormas-api/src/main/resources/enum_it-IT.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Autobus ConveyanceType.MOTORBIKE = Motocicletta ConveyanceType.OTHER = Altro +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contatti DashboardType.SURVEILLANCE = Sorveglianza @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ja-JP.properties b/sormas-api/src/main/resources/enum_ja-JP.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_ja-JP.properties +++ b/sormas-api/src/main/resources/enum_ja-JP.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ne-NP.properties b/sormas-api/src/main/resources/enum_ne-NP.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_ne-NP.properties +++ b/sormas-api/src/main/resources/enum_ne-NP.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_nl-NL.properties b/sormas-api/src/main/resources/enum_nl-NL.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_nl-NL.properties +++ b/sormas-api/src/main/resources/enum_nl-NL.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_no-NO.properties b/sormas-api/src/main/resources/enum_no-NO.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_no-NO.properties +++ b/sormas-api/src/main/resources/enum_no-NO.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_pl-PL.properties b/sormas-api/src/main/resources/enum_pl-PL.properties index 46213e08454..5da3af65949 100644 --- a/sormas-api/src/main/resources/enum_pl-PL.properties +++ b/sormas-api/src/main/resources/enum_pl-PL.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ps-AF.properties b/sormas-api/src/main/resources/enum_ps-AF.properties index b191d4204a2..205cd4f4008 100644 --- a/sormas-api/src/main/resources/enum_ps-AF.properties +++ b/sormas-api/src/main/resources/enum_ps-AF.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_pt-PT.properties b/sormas-api/src/main/resources/enum_pt-PT.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_pt-PT.properties +++ b/sormas-api/src/main/resources/enum_pt-PT.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ro-RO.properties b/sormas-api/src/main/resources/enum_ro-RO.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_ro-RO.properties +++ b/sormas-api/src/main/resources/enum_ro-RO.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ru-RU.properties b/sormas-api/src/main/resources/enum_ru-RU.properties index c06990342e7..ea3d90d12bb 100644 --- a/sormas-api/src/main/resources/enum_ru-RU.properties +++ b/sormas-api/src/main/resources/enum_ru-RU.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_sv-SE.properties b/sormas-api/src/main/resources/enum_sv-SE.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_sv-SE.properties +++ b/sormas-api/src/main/resources/enum_sv-SE.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_sw-KE.properties b/sormas-api/src/main/resources/enum_sw-KE.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_sw-KE.properties +++ b/sormas-api/src/main/resources/enum_sw-KE.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_tr-TR.properties b/sormas-api/src/main/resources/enum_tr-TR.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_tr-TR.properties +++ b/sormas-api/src/main/resources/enum_tr-TR.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_uk-UA.properties b/sormas-api/src/main/resources/enum_uk-UA.properties index e3a1e0dd317..d35b6f4fc91 100644 --- a/sormas-api/src/main/resources/enum_uk-UA.properties +++ b/sormas-api/src/main/resources/enum_uk-UA.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/enum_ur-PK.properties b/sormas-api/src/main/resources/enum_ur-PK.properties index b4fb5cb2e05..d6e6398422b 100644 --- a/sormas-api/src/main/resources/enum_ur-PK.properties +++ b/sormas-api/src/main/resources/enum_ur-PK.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = بس ConveyanceType.MOTORBIKE = موٹر سائیکل ConveyanceType.OTHER = دیگر +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = روابط DashboardType.SURVEILLANCE = نگرانی @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Sormas REST تک رسائی UserRight.EXTERNAL_VISITS = بیرونی دورے UserRight.SORMAS_UI = Sormas UI تک رسائی UserRight.DEV_MODE = ڈویلپر کے اختیارات تک رسائی +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = موجودہ دستاویزات دیکھیں UserRight.DOCUMENT_UPLOAD = دستاویزات اپ لوڈ کریں UserRight.DOCUMENT_DELETE = سسٹم سے دستاویزات مٹا دیں @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = SORMAS REST انٹرفیس تک رسائی حاصل UserRight.Desc.EXTERNAL_VISITS = بیرونی دوروں تک رسائی حاصل کرنے کے قابل REST اینڈ پوائنٹس UserRight.Desc.SORMAS_UI = SORMAS گرافیکل یوزر انٹرفیس تک رسائی حاصل کرنے کے قابل UserRight.Desc.DEV_MODE = کنفیگریشن ڈائرکٹری میں ڈویلپر کے اختیارات تک رسائی حاصل کرنے کے قابل +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = موجودہ دستاویزات دیکھنے کے قابل UserRight.Desc.DOCUMENT_UPLOAD = موجودہ دستاویزات اپ لوڈ کرنےکے قابل UserRight.Desc.DOCUMENT_DELETE = سسٹم سے دستاویزات مٹانے کے قابل diff --git a/sormas-api/src/main/resources/enum_zh-CN.properties b/sormas-api/src/main/resources/enum_zh-CN.properties index 7f5f9a1712c..1b60829c8be 100644 --- a/sormas-api/src/main/resources/enum_zh-CN.properties +++ b/sormas-api/src/main/resources/enum_zh-CN.properties @@ -282,6 +282,11 @@ ConveyanceType.BUS = Bus ConveyanceType.MOTORBIKE = Motorbike ConveyanceType.OTHER = Other +CustomizableEnumType.DISEASE_VARIANT = Disease variant +CustomizableEnumType.SPECIFIC_EVENT_RISK = Specific event risk +CustomizableEnumType.OCCUPATION_TYPE = Occupation type +CustomizableEnumType.PATHOGEN = Pathogen + # DashboardType DashboardType.CONTACTS = Contacts DashboardType.SURVEILLANCE = Surveillance @@ -1560,6 +1565,7 @@ UserRight.SORMAS_REST = Access Sormas REST UserRight.EXTERNAL_VISITS = External visits UserRight.SORMAS_UI = Access Sormas UI UserRight.DEV_MODE = Access developer options +UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT = Manage customizable enums UserRight.DOCUMENT_VIEW = View existing documents UserRight.DOCUMENT_UPLOAD = Upload documents UserRight.DOCUMENT_DELETE = Delete documents from the system @@ -1758,6 +1764,7 @@ UserRight.Desc.SORMAS_REST = Able to access the SORMAS REST interface UserRight.Desc.EXTERNAL_VISITS = Able to access external visits REST endpoints UserRight.Desc.SORMAS_UI = Able to access the SORMAS graphical user interface UserRight.Desc.DEV_MODE = Able to access developer options in the configuration directory +UserRight.Desc.CUSTOMIZABLE_ENUM_MANAGEMENT = Able to create, edit and delete customizable enum values UserRight.Desc.DOCUMENT_VIEW = Able to view existing documents UserRight.Desc.DOCUMENT_UPLOAD = Able to upload documents UserRight.Desc.DOCUMENT_DELETE = Able to delete documents from the system diff --git a/sormas-api/src/main/resources/strings.properties b/sormas-api/src/main/resources/strings.properties index 45f5a0f9128..6188641d36f 100644 --- a/sormas-api/src/main/resources/strings.properties +++ b/sormas-api/src/main/resources/strings.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled!
All selec infoBulkUnresponsiveWindowHint = Hint: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1684,6 +1698,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ar-SA.properties b/sormas-api/src/main/resources/strings_ar-SA.properties index b8a40e4c886..e4e38383b71 100644 --- a/sormas-api/src/main/resources/strings_ar-SA.properties +++ b/sormas-api/src/main/resources/strings_ar-SA.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_cs-CZ.properties b/sormas-api/src/main/resources/strings_cs-CZ.properties index eee09d2f65c..c9571bc9a7b 100644 --- a/sormas-api/src/main/resources/strings_cs-CZ.properties +++ b/sormas-api/src/main/resources/strings_cs-CZ.properties @@ -421,7 +421,9 @@ errorSurveillanceReportNotEditable = Tato zpráva již není upravitelná errorEnvironmentSampleNotEditable = Tento vzorek prostředí již není upravitelný errorEnvironmentSampleNoDispatchRight = Nemáte potřebné uživatelské právo ke změně stavu odeslání tohoto vzorku errorEnvironmentSampleNoReceivalRight = Nemáte potřebné uživatelské právo ke změně stavu příjmu tohoto vzorku prostředí -errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorSendingExternalEmail = E-mail nelze odeslat. Kontaktujte prosím administrátora a upozorněte ho na tento problém. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Přístup odepřen headingActivityAsCase = Aktivita jako případ @@ -541,10 +543,10 @@ headingEditCountry = Upravit zemi headingEditContinent = Upravit kontinent headingEditSample = Upravit vzorek headingEditSubcontinent = Upravit subkontinent -headingEntitiesNotArchived = None of the entities were archived -headingEntitiesNotDearchived = None of the entities were dearchived -headingEntitiesNotEdited = None of the entities were edited -headingEntitiesNotSent = None of the entities were sent +headingEntitiesNotArchived = Žádný z těchto subjektů nebyl archivován +headingEntitiesNotDearchived = Žádný z těchto subjektů nebyl dearchivován +headingEntitiesNotEdited = Žádný z těchto subjektů nebyl upraven +headingEntitiesNotSent = Žádný z těchto subjektů nebyl odeslán headingEnvironmentalExposure = Vystavení v životním prostředí headingEpiCurve = Epidemiologické křivky headingErrorReportNotAvailable = Zpráva o chybě není k dispozici @@ -733,7 +735,7 @@ headingCasesRestored = Případy obnoveny headingContactsRestored = Kontakty obnoveny headingEventsRestored = Události obnoveny headingEventParticipantsRestored = Účastníci události obnoveni -headingImmunizationsDeleted = Immunizations deleted +headingImmunizationsDeleted = Immunizace odstraněna headingImmunizationsNotDeleted = None of the immunizations were deleted headingImmunizationsNotRestored = None of the immunizations were restored headingImmunizationsRestored = Immunizace obnovena @@ -860,7 +862,9 @@ headingEnvironmentSampleLocation = Umístění místa odběru vzorků headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Požadované patogeny k testování headingLimitedDiseases=Disease restrictions -headingExternalEmailSend=Send email +headingExternalEmailSend=Poslat e-mail +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Prosím zdokumentujte VŠECHNY relevantní aktivity po infekci\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Hromadný proces byl zrušen\!
Všechny vy infoBulkUnresponsiveWindowHint = Tip\: Pokud se ukazatel průběhu zdá být nereagující a po chvíli není vidět žádný průběh zkuste kliknout na toto vyskakovací okno nebo změnit velikost okna prohlížeče. infoNoEnvironmentSamples = Pro toto prostředí nebyly vytvořeny žádné vzorky infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = Akce mimo jurisdikci uživatele nemůže být odstraněna @@ -1475,14 +1481,22 @@ messageNoEnvironmentSamplesSelected = You have not selected any environment samp messageEnvironmentSamplesDeleted = All selected eligible environment samples have been deleted messageCountEnvironmentSamplesNotDeleted = %s environment samples not deleted\: %s messageCountEnvironmentSamplesNotDeletedAccessDeniedReason = %s environment samples not deleted because they are not in jurisdiction or owned\: %s -messageEnvironmentSamplesRestored = All selected environment samples have been restored +messageEnvironmentSamplesRestored = Všechny vybrané vzorky prostředí byly obnoveny messageEnvironmentSampleSaved = Vzorek prostředí uložen messageRestoreNotPossibleAlreadyInEvent = Uživatel události nemůže být obnoven, protože osoba již má jiného účastníka aktivní události v této události messageDuplicateEnvironmentFound = Podobné prostředí již existuje v databázi (UUID\: %s) -messageCasePersonHasNoEmail=Case person has no email address specified -messageContactPersonHasNoEmail=Contact person has no email address specified -messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified +messageCasePersonHasNoEmail=Osoba případu nemá zadanou e-mailovou adresu +messageContactPersonHasNoEmail=Kontaktní osoba nemá zadanou e-mailovou adresu +messageEventParticipantPersonHasNoEmail=Uživatel události nemá zadanou e-mailovou adresu messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = Klasifikace případu %s se změnila na %s. notificationCaseInvestigationDone = Vyšetřování případu %s bylo dokončeno. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... do promptEnvironmentSampleLonFrom= Zeměpisná délka prostředí.od... promptEnvironmentSampleLonTo= ... do +promptCustomizableEnumTranslationLanguage = Jazyk +promptCustomizableEnumTranslationCaption = Přeložený popisek +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Neuložené změny unsavedChanges.warningMessage = Tento formulář obsahuje neuložené změny. Rozhodněte, zda chcete zrušit akci, kterou jste právě učinili, abyste je zkontrolovali, nebo uložit nebo zrušit změny a pokračovat. diff --git a/sormas-api/src/main/resources/strings_de-CH.properties b/sormas-api/src/main/resources/strings_de-CH.properties index 16c091d8f6d..cad56da96fb 100644 --- a/sormas-api/src/main/resources/strings_de-CH.properties +++ b/sormas-api/src/main/resources/strings_de-CH.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Zugriff verweigert headingActivityAsCase = Aktivitäten als Fall (Betreuung/Unterbringung/Tätigkeit in Einrichtung) @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Bitte dokumentieren Sie ALLE relevanten Aktivitäten nach der Infektion\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = Die Falldefinitionskategorie des Falls %s wurde auf %s geändert. notificationCaseInvestigationDone = Die Untersuchung des Falls %s wurde durchgeführt. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Ungespeicherte Änderungen unsavedChanges.warningMessage = Dieses Formular enthält ungespeicherte Änderungen. Bitte entscheiden Sie, ob Sie die gerade ausgeführte Aktion abbrechen wollen, um sie zu überprüfen oder speichern bzw. verwerfen Sie die Änderungen und fahren fort. diff --git a/sormas-api/src/main/resources/strings_de-DE.properties b/sormas-api/src/main/resources/strings_de-DE.properties index 02ee6f40d92..607d769fc35 100644 --- a/sormas-api/src/main/resources/strings_de-DE.properties +++ b/sormas-api/src/main/resources/strings_de-DE.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Zugriff verweigert headingActivityAsCase = Betreuung/Unterbringung/Tätigkeit in Einrichtung @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Bitte dokumentieren Sie ALLE relevanten Betreuungen, Unterbringungen und Tätigkeiten in Einrichtungen\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Massenverarbeitung wurde abgebrochen\!
All infoBulkUnresponsiveWindowHint = Tipp\: Wenn der Fortschrittsbalken nicht reagiert und nach einer Weile kein Fortschritt sichtbar ist versuchen Sie auf dieses Popup-Fenster zu klicken oder die Größe Ihres Browserfensters zu verändern. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = Die Aktion außerhalb der Zuständigkeit des Benutzers kann nicht gelöscht werden @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = Die Falldefinitionskategorie des Falls %s wurde auf %s geändert. notificationCaseInvestigationDone = Die Untersuchung des Falls %s wurde durchgeführt. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Ungespeicherte Änderungen unsavedChanges.warningMessage = Dieses Formular enthält ungespeicherte Änderungen. Bitte entscheiden Sie, ob Sie die gerade ausgeführte Aktion abbrechen wollen, um sie zu überprüfen oder speichern bzw. verwerfen Sie die Änderungen und fahren fort. diff --git a/sormas-api/src/main/resources/strings_en-AF.properties b/sormas-api/src/main/resources/strings_en-AF.properties index 46b205883e3..b7aaf4b74f9 100644 --- a/sormas-api/src/main/resources/strings_en-AF.properties +++ b/sormas-api/src/main/resources/strings_en-AF.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_en-GH.properties b/sormas-api/src/main/resources/strings_en-GH.properties index 2d25441f097..f055ff748bb 100644 --- a/sormas-api/src/main/resources/strings_en-GH.properties +++ b/sormas-api/src/main/resources/strings_en-GH.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_en-NG.properties b/sormas-api/src/main/resources/strings_en-NG.properties index 3ddef2707f6..d8d8b151b91 100644 --- a/sormas-api/src/main/resources/strings_en-NG.properties +++ b/sormas-api/src/main/resources/strings_en-NG.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_es-CU.properties b/sormas-api/src/main/resources/strings_es-CU.properties index c83df960ec1..c371292f522 100644 --- a/sormas-api/src/main/resources/strings_es-CU.properties +++ b/sormas-api/src/main/resources/strings_es-CU.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = Esta muestra ambiental ya no es editable errorEnvironmentSampleNoDispatchRight = No tiene el derecho de usuario necesario para cambiar el estado de envío de esta muestra ambiental errorEnvironmentSampleNoReceivalRight = No tiene el derecho de usuario necesario para cambiar el estado de recepción de esta muestra ambiental errorSendingExternalEmail = No se pudo enviar el mensaje. Por favor, contacte a un administrador y notifíquele sobre este problema. +errorExternalEmailAttachmentCannotEncrypt=No se puede enviar el mensaje con archivos adjuntos. La persona no tiene carnet de identidad o número de teléfono para enviar la contraseña o el servicio de SMS no está configurado en el sistema. + # headings headingAccessDenied = Acceso denegado headingActivityAsCase = Actividad como caso @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Gestión de muestras headingEnvironmentSampleRequestedPathogenTests = Pruebas de patógeno solicitadas headingLimitedDiseases=Restricciones de enfermedades headingExternalEmailSend=Enviar mensaje +headingExternalEmailDetails=Detalles del mensaje +headingCustomizableEnumConfigurationInfo=Configuración de enumeración personalizable # Info texts infoActivityAsCaseInvestigation = Por favor, documente TODAS las actividades relevantes después de la infección\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = ¡El proceso masivo se canceló\!
Todas la infoBulkUnresponsiveWindowHint = Sugerencia\: Si la barra de progreso parece no responder y no hay progreso visible por algún tiempo, pruebe hacer clic en esta ventana emergente o cambiar el tamaño de la ventana de su navegador. infoNoEnvironmentSamples = No se han creado muestras para este ambiente infoRestrictDiseasesDescription=Marcar todas las enfermedades a las que el usuario debiera tener acceso +infoNoCustomizableEnumTranslations = Haga clic en el botón + a continuación para añadir traducciones a este valor de enumeración personalizable. +infoCustomizableEnumConfigurationInfo = Las enumeraciones personalizables son conjuntos de valores que se pueden personalizar para reaccionar a las necesidades individuales de un país o una situación epidemiológica específica. La tabla en esta pantalla contiene todos los valores de enumeración personalizable en la base de datos. Cada valor está asociado con un tipo de datos, por ejemplo, variantes de enfermedad o tipos de ocupación. Algunos de estos tipos de datos tienen valores predeterminados que se agregan automáticamente a la base de datos cuando se configura SORMAS o se agregan nuevos tipos de datos al sistema.

Puede agregar nuevos valores de enumeración o editar los existentes, agregar traducciones para idiomas admitidos por SORMAS, seleccionar las enfermedades para las que el valor debe ser visible (de forma predeterminada, los valores de enumeración personalizable son visibles para todas las enfermedades) y configurar propiedades adicionales.

Las propiedades se utilizan para un mayor control del comportamiento de los valores de enumeración personalizable. Por ejemplo, la propiedad "tiene detalles" que es compatible con la mayoría de los valores de enumeración controla si al seleccionar el valor de enumeración aparece un campo de texto adicional al que los usuarios pueden agregar más información. # Messages messageActionOutsideJurisdictionDeletionDenied = La acción fuera de la jurisdicción del usuario no puede ser eliminada @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=El caso no tiene una dirección de correo electróni messageContactPersonHasNoEmail=El contacto no tiene una dirección de correo electrónico especificada messageEventParticipantPersonHasNoEmail=El participante de evento no tiene una dirección de correo electrónico especificada messageTravelEntryPersonHasNoEmail=La persona de la entrada de viaje no tiene una dirección de correo electrónico especificada +messageNoExternalEmailToCaseSent=No se envió ningún mensaje al caso +messageNoExternalEmailToContactSent=No se envió ningún mensaje al contacto +messageNoExternalEmailToEventParticipantSent=No se envió ningún mensaje al participante de evento +messageNoExternalEmailToTravelEntrySent=No se envió ningún mensaje al viajero +messageExternalEmailNoAttachments=Sin archivos adjuntos +messageCustomizableEnumValueSaved = Valor de enumeración personalizable guardado +messageExternalEmailAttachmentPassword=Por favor, utilice esta contraseña para abrir los documentos que se le envíen por correo electrónico desde SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=No se pueden adjuntar documentos porque el cifrado no sería posible. Para cifrar documentos, la persona debe tener un carnet de identidad, o un número de teléfono móvil con capacidad de enviar SMS especificado en este sistema. # Notifications notificationCaseClassificationChanged = La clasificación del caso %s se cambió a %s. notificationCaseInvestigationDone = La investigación del caso %s fue realizada. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... hasta promptEnvironmentSampleLonFrom= Longitud de ambiente desde... promptEnvironmentSampleLonTo= ... hasta +promptCustomizableEnumTranslationLanguage = Idioma +promptCustomizableEnumTranslationCaption = Leyenda traducida +promptCustomizableEnumSearchField = Buscar por valor o leyenda... + # Unsaved changes unsavedChanges.warningTitle = Cambios sin guardar unsavedChanges.warningMessage = Este formulario contiene cambios sin guardar. Por favor, decida si quiere cancelar la acción que acaba de realizar para revisarlos, o guardar o descartar los cambios y continuar. diff --git a/sormas-api/src/main/resources/strings_es-ES.properties b/sormas-api/src/main/resources/strings_es-ES.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_es-ES.properties +++ b/sormas-api/src/main/resources/strings_es-ES.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fa-AF.properties b/sormas-api/src/main/resources/strings_fa-AF.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_fa-AF.properties +++ b/sormas-api/src/main/resources/strings_fa-AF.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fi-FI.properties b/sormas-api/src/main/resources/strings_fi-FI.properties index 8ab1cd2bbdb..4a7eecaf1f5 100644 --- a/sormas-api/src/main/resources/strings_fi-FI.properties +++ b/sormas-api/src/main/resources/strings_fi-FI.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Käyttö estetty headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = Potilaan %s luokitus on muuttunut luokkaan %s. notificationCaseInvestigationDone = Potilaan %s selvittely tehty. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fil-PH.properties b/sormas-api/src/main/resources/strings_fil-PH.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_fil-PH.properties +++ b/sormas-api/src/main/resources/strings_fil-PH.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fj-FJ.properties b/sormas-api/src/main/resources/strings_fj-FJ.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_fj-FJ.properties +++ b/sormas-api/src/main/resources/strings_fj-FJ.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fr-CD.properties b/sormas-api/src/main/resources/strings_fr-CD.properties index 964af2666ae..b073e6e7b55 100644 --- a/sormas-api/src/main/resources/strings_fr-CD.properties +++ b/sormas-api/src/main/resources/strings_fr-CD.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fr-CH.properties b/sormas-api/src/main/resources/strings_fr-CH.properties index cb05077707b..20643553e04 100644 --- a/sormas-api/src/main/resources/strings_fr-CH.properties +++ b/sormas-api/src/main/resources/strings_fr-CH.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Accès refusé headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = La classification du cas %s a changé en %s. notificationCaseInvestigationDone = L'enquête du cas %s a été effectuée. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fr-FR.properties b/sormas-api/src/main/resources/strings_fr-FR.properties index 6dce70e4473..9fd7c416320 100644 --- a/sormas-api/src/main/resources/strings_fr-FR.properties +++ b/sormas-api/src/main/resources/strings_fr-FR.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Accès refusé headingActivityAsCase = Activité comme cas @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Configuration de l'Enum personnalisable # Info texts infoActivityAsCaseInvestigation = Veuillez documenter toutes les activités pertinentes après l'infection \: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Cliquez sur le bouton + ci-dessous pour ajouter des traductions à cette valeur personnalisable. +infoCustomizableEnumConfigurationInfo = Les enums personnalisables sont des ensembles de valeurs qui peuvent être personnalisés afin de répondre aux besoins individuels de votre pays ou à une situation épidémiologique spécifique. Le tableau sur cet écran contient toutes les valeurs personnalisables de la base de données. Chaque valeur est associée à un type de données, par exemple des variantes de maladie ou des types de profession. Certains de ces types de données ont des valeurs par défaut qui sont automatiquement ajoutées à la base de données lorsque SORMAS est configuré ou que de nouveaux types de données sont ajoutés au système.

Vous pouvez ajouter de nouvelles valeurs d'énumération ou modifier celles existantes, ajouter des traductions pour les langues prises en charge par SORMAS, sélectionnez les maladies pour lesquelles la valeur doit être visible (par défaut, les valeurs personnalisables de l'éum sont visibles pour toutes les maladies) et configurez les propriétés supplémentaires.

Les propriétés sont utilisées pour mieux contrôler le comportement des valeurs personnalisables. Par exemple, la propriété "a des détails" qui est supportée par la plupart des valeurs enum bascule si la sélection de cette valeur devrait faire apparaître un champ de texte supplémentaire auquel les utilisateurs peuvent ajouter plus d'informations. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Valeur de l'énumération personnalisable enregistrée +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = La classification du cas %s a changé en %s. notificationCaseInvestigationDone = L'enquête du cas %s a été effectuée. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Langue +promptCustomizableEnumTranslationCaption = Légende traduite +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Modifications non enregistrées unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_fr-TN.properties b/sormas-api/src/main/resources/strings_fr-TN.properties index 00973e159d2..ed5d948b958 100644 --- a/sormas-api/src/main/resources/strings_fr-TN.properties +++ b/sormas-api/src/main/resources/strings_fr-TN.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Accès refusé headingActivityAsCase = Activité comme cas @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Veuillez documenter toutes les activités pertinentes après l'infection \: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = La classification du cas %s a changé en %s. notificationCaseInvestigationDone = L'enquête du cas %s a été effectuée. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Modifications non enregistrées unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_hi-IN.properties b/sormas-api/src/main/resources/strings_hi-IN.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_hi-IN.properties +++ b/sormas-api/src/main/resources/strings_hi-IN.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_hr-HR.properties b/sormas-api/src/main/resources/strings_hr-HR.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_hr-HR.properties +++ b/sormas-api/src/main/resources/strings_hr-HR.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_it-CH.properties b/sormas-api/src/main/resources/strings_it-CH.properties index 0703b489f54..f4e1bf2b82f 100644 --- a/sormas-api/src/main/resources/strings_it-CH.properties +++ b/sormas-api/src/main/resources/strings_it-CH.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Accesso negato headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = La classificazione del caso %s è cambiata in %s. notificationCaseInvestigationDone = La ricerca sul caso %s è stata effettuata. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_it-IT.properties b/sormas-api/src/main/resources/strings_it-IT.properties index 4dd571c8c26..4cb759c9270 100644 --- a/sormas-api/src/main/resources/strings_it-IT.properties +++ b/sormas-api/src/main/resources/strings_it-IT.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Accesso negato headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = La classificazione del caso %s è cambiata in %s. notificationCaseInvestigationDone = La ricerca sul caso %s è stata effettuata. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ja-JP.properties b/sormas-api/src/main/resources/strings_ja-JP.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_ja-JP.properties +++ b/sormas-api/src/main/resources/strings_ja-JP.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ne-NP.properties b/sormas-api/src/main/resources/strings_ne-NP.properties index b8a40e4c886..e4e38383b71 100644 --- a/sormas-api/src/main/resources/strings_ne-NP.properties +++ b/sormas-api/src/main/resources/strings_ne-NP.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_nl-NL.properties b/sormas-api/src/main/resources/strings_nl-NL.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_nl-NL.properties +++ b/sormas-api/src/main/resources/strings_nl-NL.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_no-NO.properties b/sormas-api/src/main/resources/strings_no-NO.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_no-NO.properties +++ b/sormas-api/src/main/resources/strings_no-NO.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_pl-PL.properties b/sormas-api/src/main/resources/strings_pl-PL.properties index 8a1458432b1..0021767deb7 100644 --- a/sormas-api/src/main/resources/strings_pl-PL.properties +++ b/sormas-api/src/main/resources/strings_pl-PL.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ps-AF.properties b/sormas-api/src/main/resources/strings_ps-AF.properties index b862b7ba48c..eac76349a27 100644 --- a/sormas-api/src/main/resources/strings_ps-AF.properties +++ b/sormas-api/src/main/resources/strings_ps-AF.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_pt-PT.properties b/sormas-api/src/main/resources/strings_pt-PT.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_pt-PT.properties +++ b/sormas-api/src/main/resources/strings_pt-PT.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ro-RO.properties b/sormas-api/src/main/resources/strings_ro-RO.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_ro-RO.properties +++ b/sormas-api/src/main/resources/strings_ro-RO.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ru-RU.properties b/sormas-api/src/main/resources/strings_ru-RU.properties index d38525b9af5..4694646b208 100644 --- a/sormas-api/src/main/resources/strings_ru-RU.properties +++ b/sormas-api/src/main/resources/strings_ru-RU.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_sv-SE.properties b/sormas-api/src/main/resources/strings_sv-SE.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_sv-SE.properties +++ b/sormas-api/src/main/resources/strings_sv-SE.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_sw-KE.properties b/sormas-api/src/main/resources/strings_sw-KE.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_sw-KE.properties +++ b/sormas-api/src/main/resources/strings_sw-KE.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_tr-TR.properties b/sormas-api/src/main/resources/strings_tr-TR.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_tr-TR.properties +++ b/sormas-api/src/main/resources/strings_tr-TR.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_uk-UA.properties b/sormas-api/src/main/resources/strings_uk-UA.properties index 7bb88b95acf..1a5e1ed321c 100644 --- a/sormas-api/src/main/resources/strings_uk-UA.properties +++ b/sormas-api/src/main/resources/strings_uk-UA.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/strings_ur-PK.properties b/sormas-api/src/main/resources/strings_ur-PK.properties index eaa9976df56..f1129df9b04 100644 --- a/sormas-api/src/main/resources/strings_ur-PK.properties +++ b/sormas-api/src/main/resources/strings_ur-PK.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = رسائی مسترد کر دی headingActivityAsCase = سرگرمی بطور کیس @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = براہ کرم انفیکشن کے بعد تمام متعلقہ سرگرمیوں کو دستاویز کریں\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = بلک پروسیس کو منسوخ کر دیا گ infoBulkUnresponsiveWindowHint = اشارہ\: اگر پروگریس بار غیر جوابی لگتا ہے اور تھوڑی دیر کے بعد کوئی پیش رفت نظر نہیں آتی ہے، تو اس پاپ اپ ونڈو پر کلک کرنے کی کوشش کریں یا اپنی براؤزر ونڈو کا سائز تبدیل کریں۔ infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = صارف کے دائرہ اختیار سے باہر کی کارروائی کو حذف نہیں کیا جا سکتا @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = کیس %s کی درجہ بندی %s میں تبدیل ہو گئی ہے۔ notificationCaseInvestigationDone = کیس %s کی تفتیش ہو چکی ہے۔ @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = غیر محفوظ تبدیلیاں unsavedChanges.warningMessage = یہ فارم غیر محفوظ شدہ تبدیلیوں پر مشتمل ہے۔ براہ کرم فیصلہ کریں کہ آیا آپ ان کا جائزہ لینے کے لیے جو کارروائی آپ نے ابھی کی ہے اسے منسوخ کرنا چاہتے ہیں، یا تبدیلیوں کو محفوظ یا رد کرنا اور جاری رکھنا چاہتے ہیں۔ diff --git a/sormas-api/src/main/resources/strings_zh-CN.properties b/sormas-api/src/main/resources/strings_zh-CN.properties index 4a2be56607a..d104d9d8c6f 100644 --- a/sormas-api/src/main/resources/strings_zh-CN.properties +++ b/sormas-api/src/main/resources/strings_zh-CN.properties @@ -422,6 +422,8 @@ errorEnvironmentSampleNotEditable = This environment sample is not editable anym errorEnvironmentSampleNoDispatchRight = You do not have the necessary user right to change the dispatch status of this environment sample errorEnvironmentSampleNoReceivalRight = You do not have the necessary user right to change the receival status of this environment sample errorSendingExternalEmail = Email could not be sent. Please contact an admin and notify them about this problem. +errorExternalEmailAttachmentCannotEncrypt=Can't send email with attachments. The person has no national health id or primary phone number to send the password to or the SMS service is not set up in the system. + # headings headingAccessDenied = Access denied headingActivityAsCase = Activity as Case @@ -861,6 +863,8 @@ headingEnvironmentSampleManagement = Sample management headingEnvironmentSampleRequestedPathogenTests = Requested pathogens to be tested headingLimitedDiseases=Disease restrictions headingExternalEmailSend=Send email +headingExternalEmailDetails=Email details +headingCustomizableEnumConfigurationInfo=Customizable enum configuration # Info texts infoActivityAsCaseInvestigation = Please document ALL relevant activities after infection\: @@ -1061,6 +1065,8 @@ infoBulkProcessCancelled = Bulk process has been cancelled\!
All sele infoBulkUnresponsiveWindowHint = Hint\: If the progress bar seems to be unresponsive and no progress is visible after a while, try to click this popup window or resize your browser window. infoNoEnvironmentSamples = No samples have been created for this environment infoRestrictDiseasesDescription=Mark all diseases that the user is supposed to have access to +infoNoCustomizableEnumTranslations = Click on the + button below to add translations to this customizable enum value. +infoCustomizableEnumConfigurationInfo = Customizable enums are value sets that can be customized in order to react to the individual needs of your country or a specific epidemiological situation. The table on this screen contains all customizable enum values in the database. Each value is associated with a data type, e.g. disease variants or occupation types. Some of these data types have default values that are automatically added to the database when SORMAS is set up or new data types are added to the system.

You can add new enum values or edit existing ones, add translations for languages supported by SORMAS, select the diseases that the value should be visible for (by default, customizable enum values are visible for all diseases), and configure additional properties.

Properties are used to further control the behaviour of customizable enum values. E.g. the "has details" property that is supported by most enum values toggles whether selecting this enum value would bring up an additional text field that users can add more information to. # Messages messageActionOutsideJurisdictionDeletionDenied = The action outside user's jurisdiction cannot be deleted @@ -1483,6 +1489,14 @@ messageCasePersonHasNoEmail=Case person has no email address specified messageContactPersonHasNoEmail=Contact person has no email address specified messageEventParticipantPersonHasNoEmail=Event participant person has no email address specified messageTravelEntryPersonHasNoEmail=Travel entry person has no email address specified +messageNoExternalEmailToCaseSent=No email sent to case person +messageNoExternalEmailToContactSent=No email sent to contact person +messageNoExternalEmailToEventParticipantSent=No email sent to event participant person +messageNoExternalEmailToTravelEntrySent=No email sent to travel entry person +messageExternalEmailNoAttachments=No attachments +messageCustomizableEnumValueSaved = Customizable enum value saved +messageExternalEmailAttachmentPassword=Please use this password to open the documents sent to you via email from SORMAS\: %s +messageExternalEmailAttachmentNotAvailableInfo=Attaching documents is disabled because encryption would not be possible. To encrypt documents, the person needs to have either a national health ID specified, or a primary mobile phone number set with SMS sending set up on this system. # Notifications notificationCaseClassificationChanged = The classification of case %s has changed to %s. notificationCaseInvestigationDone = The investigation of case %s has been done. @@ -1683,6 +1697,10 @@ promptEnvironmentSampleLatTo= ... to promptEnvironmentSampleLonFrom= Environment longitude from... promptEnvironmentSampleLonTo= ... to +promptCustomizableEnumTranslationLanguage = Language +promptCustomizableEnumTranslationCaption = Translated caption +promptCustomizableEnumSearchField = Search by value or caption... + # Unsaved changes unsavedChanges.warningTitle = Unsaved changes unsavedChanges.warningMessage = This form contains unsaved changes. Please decide whether you want to cancel the action you have just taken in order to review them, or save or discard the changes and continue. diff --git a/sormas-api/src/main/resources/validations.properties b/sormas-api/src/main/resources/validations.properties index b6fb7d49782..5e92dd5e38c 100644 --- a/sormas-api/src/main/resources/validations.properties +++ b/sormas-api/src/main/resources/validations.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ar-SA.properties b/sormas-api/src/main/resources/validations_ar-SA.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_ar-SA.properties +++ b/sormas-api/src/main/resources/validations_ar-SA.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_cs-CZ.properties b/sormas-api/src/main/resources/validations_cs-CZ.properties index e6ea9a67307..48002e8c4b2 100644 --- a/sormas-api/src/main/resources/validations_cs-CZ.properties +++ b/sormas-api/src/main/resources/validations_cs-CZ.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Hodnota se může skládat pouze z velkých písmen, číslic a znaků „_“ a „.“. +customizableEnumValueEmptyTranslations = Vyberte jazyky a zadejte popisky pro všechny překlady v seznamu. +customizableEnumValueDuplicateLanguage = Přidejte pouze jeden překlad pro každý jazyk. +customizableEnumValueDuplicateValue = Hodnota %s již existuje pro datový typ %s. Hodnoty Enum musí být jedinečné. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_de-CH.properties b/sormas-api/src/main/resources/validations_de-CH.properties index 471a3e51aff..bc8fa7f9aad 100644 --- a/sormas-api/src/main/resources/validations_de-CH.properties +++ b/sormas-api/src/main/resources/validations_de-CH.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_de-DE.properties b/sormas-api/src/main/resources/validations_de-DE.properties index 8e0936a66e3..b49531cf805 100644 --- a/sormas-api/src/main/resources/validations_de-DE.properties +++ b/sormas-api/src/main/resources/validations_de-DE.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_en-AF.properties b/sormas-api/src/main/resources/validations_en-AF.properties index 4e47a8e2b45..78cc9588ad2 100644 --- a/sormas-api/src/main/resources/validations_en-AF.properties +++ b/sormas-api/src/main/resources/validations_en-AF.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_en-GH.properties b/sormas-api/src/main/resources/validations_en-GH.properties index 5e7456668f7..73c9e715bef 100644 --- a/sormas-api/src/main/resources/validations_en-GH.properties +++ b/sormas-api/src/main/resources/validations_en-GH.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_en-NG.properties b/sormas-api/src/main/resources/validations_en-NG.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_en-NG.properties +++ b/sormas-api/src/main/resources/validations_en-NG.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_es-CU.properties b/sormas-api/src/main/resources/validations_es-CU.properties index 50f664f0cc3..9f845f0fbc7 100644 --- a/sormas-api/src/main/resources/validations_es-CU.properties +++ b/sormas-api/src/main/resources/validations_es-CU.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = Este municipio está en una provincia defaultInfrastructureInvalidParentDistrict = Esta área de salud está en un municipio diferente al predeterminado, o no existe un municipio predeterminado. defaultInfrastructureNotRemovableChildCommunity = Tiene que eliminar el área de salud predeterminada antes de eliminar el municipio predeterminado. defaultInfrastructureNotRemovableChildDistrict = Tiene que eliminar el municipio predeterminado antes de eliminar la provincia predeterminada. -emailTemplateSubjectInvalid=La primera línea de la plantilla de mensaje debe comenzar con un carácter "\#" seguido por un máximo de 50 caracteres \ No newline at end of file +emailTemplateSubjectInvalid=La primera línea de la plantilla de mensaje debe comenzar con un carácter "\#" seguido por un máximo de 50 caracteres +customizableEnumValueAllowedCharacters = El valor sólo puede consistir en letras mayúsculas, números y los caracteres "_" y ".". +customizableEnumValueEmptyTranslations = Por favor, seleccione idiomas e introduzca leyendas para todas las traducciones de la lista. +customizableEnumValueDuplicateLanguage = Por favor, sólo añada una traducción por idioma. +customizableEnumValueDuplicateValue = El valor %s ya existe para el tipo de datos %s. Los valores de enumeración deben ser únicos. +attachedDocumentNotRelatedToEntity=El documento adjunto no está relacionado con la entidad. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_es-ES.properties b/sormas-api/src/main/resources/validations_es-ES.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_es-ES.properties +++ b/sormas-api/src/main/resources/validations_es-ES.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fa-AF.properties b/sormas-api/src/main/resources/validations_fa-AF.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_fa-AF.properties +++ b/sormas-api/src/main/resources/validations_fa-AF.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fi-FI.properties b/sormas-api/src/main/resources/validations_fi-FI.properties index 40fa792c1f2..1869e2e301d 100644 --- a/sormas-api/src/main/resources/validations_fi-FI.properties +++ b/sormas-api/src/main/resources/validations_fi-FI.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fil-PH.properties b/sormas-api/src/main/resources/validations_fil-PH.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_fil-PH.properties +++ b/sormas-api/src/main/resources/validations_fil-PH.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fj-FJ.properties b/sormas-api/src/main/resources/validations_fj-FJ.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_fj-FJ.properties +++ b/sormas-api/src/main/resources/validations_fj-FJ.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fr-CD.properties b/sormas-api/src/main/resources/validations_fr-CD.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_fr-CD.properties +++ b/sormas-api/src/main/resources/validations_fr-CD.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fr-CH.properties b/sormas-api/src/main/resources/validations_fr-CH.properties index 64df5ac349b..b340452e185 100644 --- a/sormas-api/src/main/resources/validations_fr-CH.properties +++ b/sormas-api/src/main/resources/validations_fr-CH.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fr-FR.properties b/sormas-api/src/main/resources/validations_fr-FR.properties index c26d8d01fe9..c07fe009fb6 100644 --- a/sormas-api/src/main/resources/validations_fr-FR.properties +++ b/sormas-api/src/main/resources/validations_fr-FR.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = La valeur ne peut contenir que des lettres majuscules, des chiffres, et les caractères "_" et ".". +customizableEnumValueEmptyTranslations = Veuillez sélectionner les langues et saisir des légendes pour toutes les traductions de la liste. +customizableEnumValueDuplicateLanguage = Veuillez ajouter une seule traduction par langue. +customizableEnumValueDuplicateValue = La valeur %s existe déjà pour le type de données %s. Les valeurs Enum doivent être uniques. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_fr-TN.properties b/sormas-api/src/main/resources/validations_fr-TN.properties index 39c9d223c88..45397dd1196 100644 --- a/sormas-api/src/main/resources/validations_fr-TN.properties +++ b/sormas-api/src/main/resources/validations_fr-TN.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_hi-IN.properties b/sormas-api/src/main/resources/validations_hi-IN.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_hi-IN.properties +++ b/sormas-api/src/main/resources/validations_hi-IN.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_hr-HR.properties b/sormas-api/src/main/resources/validations_hr-HR.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_hr-HR.properties +++ b/sormas-api/src/main/resources/validations_hr-HR.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_it-CH.properties b/sormas-api/src/main/resources/validations_it-CH.properties index fb6a8d2afde..4de9dcf0978 100644 --- a/sormas-api/src/main/resources/validations_it-CH.properties +++ b/sormas-api/src/main/resources/validations_it-CH.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_it-IT.properties b/sormas-api/src/main/resources/validations_it-IT.properties index aa4eda1232b..ccb2b2817e8 100644 --- a/sormas-api/src/main/resources/validations_it-IT.properties +++ b/sormas-api/src/main/resources/validations_it-IT.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ja-JP.properties b/sormas-api/src/main/resources/validations_ja-JP.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_ja-JP.properties +++ b/sormas-api/src/main/resources/validations_ja-JP.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ne-NP.properties b/sormas-api/src/main/resources/validations_ne-NP.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_ne-NP.properties +++ b/sormas-api/src/main/resources/validations_ne-NP.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_nl-NL.properties b/sormas-api/src/main/resources/validations_nl-NL.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_nl-NL.properties +++ b/sormas-api/src/main/resources/validations_nl-NL.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_no-NO.properties b/sormas-api/src/main/resources/validations_no-NO.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_no-NO.properties +++ b/sormas-api/src/main/resources/validations_no-NO.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_pl-PL.properties b/sormas-api/src/main/resources/validations_pl-PL.properties index 036c6773139..dded0ebca59 100644 --- a/sormas-api/src/main/resources/validations_pl-PL.properties +++ b/sormas-api/src/main/resources/validations_pl-PL.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ps-AF.properties b/sormas-api/src/main/resources/validations_ps-AF.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_ps-AF.properties +++ b/sormas-api/src/main/resources/validations_ps-AF.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_pt-PT.properties b/sormas-api/src/main/resources/validations_pt-PT.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_pt-PT.properties +++ b/sormas-api/src/main/resources/validations_pt-PT.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ro-RO.properties b/sormas-api/src/main/resources/validations_ro-RO.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_ro-RO.properties +++ b/sormas-api/src/main/resources/validations_ro-RO.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ru-RU.properties b/sormas-api/src/main/resources/validations_ru-RU.properties index 936a1eaa3b0..897e32acb26 100644 --- a/sormas-api/src/main/resources/validations_ru-RU.properties +++ b/sormas-api/src/main/resources/validations_ru-RU.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_sv-SE.properties b/sormas-api/src/main/resources/validations_sv-SE.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_sv-SE.properties +++ b/sormas-api/src/main/resources/validations_sv-SE.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_sw-KE.properties b/sormas-api/src/main/resources/validations_sw-KE.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_sw-KE.properties +++ b/sormas-api/src/main/resources/validations_sw-KE.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_tr-TR.properties b/sormas-api/src/main/resources/validations_tr-TR.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_tr-TR.properties +++ b/sormas-api/src/main/resources/validations_tr-TR.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_uk-UA.properties b/sormas-api/src/main/resources/validations_uk-UA.properties index d669e9447bb..aea21edec85 100644 --- a/sormas-api/src/main/resources/validations_uk-UA.properties +++ b/sormas-api/src/main/resources/validations_uk-UA.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_ur-PK.properties b/sormas-api/src/main/resources/validations_ur-PK.properties index 1e27541508c..d5ecdc4714c 100644 --- a/sormas-api/src/main/resources/validations_ur-PK.properties +++ b/sormas-api/src/main/resources/validations_ur-PK.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-api/src/main/resources/validations_zh-CN.properties b/sormas-api/src/main/resources/validations_zh-CN.properties index 195e74bb0b5..3d7687efa5e 100644 --- a/sormas-api/src/main/resources/validations_zh-CN.properties +++ b/sormas-api/src/main/resources/validations_zh-CN.properties @@ -286,4 +286,9 @@ defaultInfrastructureInvalidParentRegion = This district is in a different regio defaultInfrastructureInvalidParentDistrict = This community is in a different district than the default district, or there is no default district. defaultInfrastructureNotRemovableChildCommunity = You have to remove the default community before removing the default district. defaultInfrastructureNotRemovableChildDistrict = You have to remove the default district before removing the default region. -emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters \ No newline at end of file +emailTemplateSubjectInvalid=The first line of the email template needs to start with a "\#" character followed by at most 50 characters +customizableEnumValueAllowedCharacters = Value may only consist of uppercase letters, numbers, and the characters "_" and ".". +customizableEnumValueEmptyTranslations = Please select languages and enter captions for all translations in the list. +customizableEnumValueDuplicateLanguage = Please only add one translation per language. +customizableEnumValueDuplicateValue = The value %s already exists for data type %s. Enum values have to be unique. +attachedDocumentNotRelatedToEntity=The attached document is not related to the entity. \ No newline at end of file diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java index 59bc8e9823d..fe774f6b16d 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java @@ -15,8 +15,6 @@ package de.symeda.sormas.app.backend.common; -import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_TEXT; - import java.lang.reflect.Array; import java.math.BigInteger; import java.sql.SQLException; @@ -39,7 +37,6 @@ import com.j256.ormlite.dao.Dao; import com.j256.ormlite.dao.GenericRawResults; import com.j256.ormlite.field.DataType; -import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.support.ConnectionSource; import com.j256.ormlite.table.TableUtils; @@ -49,12 +46,7 @@ import android.text.TextUtils; import android.util.Log; -import javax.persistence.Column; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; - import de.symeda.sormas.api.Disease; -import de.symeda.sormas.api.Language; import de.symeda.sormas.api.caze.VaccinationStatus; import de.symeda.sormas.api.caze.Vaccine; import de.symeda.sormas.api.caze.VaccineManufacturer; @@ -198,7 +190,7 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper { public static final String DATABASE_NAME = "sormas.db"; // any time you make changes to your database objects, you may have to increase the database version - public static final int DATABASE_VERSION = 356; + public static final int DATABASE_VERSION = 357; private static DatabaseHelper instance = null; @@ -3155,22 +3147,28 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int getDao(District.class).executeRaw("ALTER TABLE district ADD COLUMN defaultInfrastructure boolean default false;"); getDao(Community.class).executeRaw("ALTER TABLE community ADD COLUMN defaultInfrastructure boolean default false;"); - case 355: - currentVersion = 355; - - getDao(User.class).executeRaw("ALTER TABLE users RENAME TO tmp_users;"); - getDao(User.class).executeRaw("CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, active BOOLEAN, address_id BIGINT REFERENCES location(id), associatedOfficer_id BIGINT REFERENCES users(id), community_id BIGINT REFERENCES community(id), district_id BIGINT REFERENCES district(id), firstName TEXT, healthFacility_id BIGINT REFERENCES facility(id), " + - "jurisdictionLevel VARCHAR(255), language VARCHAR(255), lastName TEXT, limitedDiseases TEXT, phone TEXT, pointOfEntry_id BIGINT REFERENCES pointOfEntry(id), region_id BIGINT REFERENCES region(id), userEmail TEXT, userName TEXT, " + - "changeDate TIMESTAMP NOT NULL, creationDate TIMESTAMP NOT NULL, lastOpenedDate TIMESTAMP, localChangeDate TIMESTAMP NOT NULL, modified BOOLEAN, snapshot BOOLEAN, uuid VARCHAR(36) NOT NULL, UNIQUE(snapshot, uuid));"); - getDao(User.class).executeRaw( - "INSERT INTO users (active, address_id, associatedOfficer_id, community_id, district_id, firstName, healthFacility_id, " + - "jurisdictionLevel, language, lastName, limitedDiseases, phone, pointOfEntry_id, region_id, userEmail, userName, " + - "changeDate, creationDate, id, lastOpenedDate, localChangeDate, modified, snapshot, uuid) " - + "SELECT active, address_id, associatedOfficer_id, community_id, district_id, firstName, healthFacility_id, " + - "jurisdictionLevel, language, lastName, limitedDisease, phone, pointOfEntry_id, region_id, userEmail, userName, " + - "changeDate, creationDate, id, lastOpenedDate, localChangeDate, modified, snapshot, uuid FROM tmp_users;"); - getDao(User.class).executeRaw("UPDATE users set limitedDiseases = '[' || limitedDiseases || ']' where limitedDiseases IS NOT NULL and limitedDiseases <> '';"); - getDao(Environment.class).executeRaw("DROP TABLE tmp_users;"); + case 355: + currentVersion = 355; + + getDao(User.class).executeRaw("ALTER TABLE users RENAME TO tmp_users;"); + getDao(User.class).executeRaw( + "CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, active BOOLEAN, address_id BIGINT REFERENCES location(id), associatedOfficer_id BIGINT REFERENCES users(id), community_id BIGINT REFERENCES community(id), district_id BIGINT REFERENCES district(id), firstName TEXT, healthFacility_id BIGINT REFERENCES facility(id), " + + "jurisdictionLevel VARCHAR(255), language VARCHAR(255), lastName TEXT, limitedDiseases TEXT, phone TEXT, pointOfEntry_id BIGINT REFERENCES pointOfEntry(id), region_id BIGINT REFERENCES region(id), userEmail TEXT, userName TEXT, " + + "changeDate TIMESTAMP NOT NULL, creationDate TIMESTAMP NOT NULL, lastOpenedDate TIMESTAMP, localChangeDate TIMESTAMP NOT NULL, modified BOOLEAN, snapshot BOOLEAN, uuid VARCHAR(36) NOT NULL, UNIQUE(snapshot, uuid));"); + getDao(User.class).executeRaw( + "INSERT INTO users (active, address_id, associatedOfficer_id, community_id, district_id, firstName, healthFacility_id, " + + "jurisdictionLevel, language, lastName, limitedDiseases, phone, pointOfEntry_id, region_id, userEmail, userName, " + + "changeDate, creationDate, id, lastOpenedDate, localChangeDate, modified, snapshot, uuid) " + + "SELECT active, address_id, associatedOfficer_id, community_id, district_id, firstName, healthFacility_id, " + + "jurisdictionLevel, language, lastName, limitedDisease, phone, pointOfEntry_id, region_id, userEmail, userName, " + + "changeDate, creationDate, id, lastOpenedDate, localChangeDate, modified, snapshot, uuid FROM tmp_users;"); + getDao(User.class).executeRaw( + "UPDATE users set limitedDiseases = '[' || limitedDiseases || ']' where limitedDiseases IS NOT NULL and limitedDiseases <> '';"); + getDao(Environment.class).executeRaw("DROP TABLE tmp_users;"); + + case 356: + currentVersion = 356; + getDao(PathogenTest.class).executeRaw("ALTER TABLE pathogenTest ADD COLUMN testedPathogenDetails varchar(512);"); // ATTENTION: break should only be done after last version break; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/customizableenum/CustomizableEnumValue.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/customizableenum/CustomizableEnumValue.java index 2eef35ceb64..0b2e890f8a3 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/customizableenum/CustomizableEnumValue.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/customizableenum/CustomizableEnumValue.java @@ -3,8 +3,10 @@ import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -50,7 +52,7 @@ public class CustomizableEnumValue extends AbstractDomainObject { @Column(name = "diseases") private String diseasesString; - private List diseases; + private Set diseases; @Column private String description; @@ -131,19 +133,19 @@ public void setDiseasesString(String diseasesString) { } @Transient - public List getDiseases() { + public Set getDiseases() { if (diseases == null) { if (StringUtils.isBlank(diseasesString)) { - diseases = new ArrayList<>(); + diseases = new HashSet<>(); } else { - diseases = Stream.of(diseasesString.split(",")).map(Disease::valueOf).collect(Collectors.toList()); + diseases = Stream.of(diseasesString.split(",")).map(Disease::valueOf).collect(Collectors.toSet()); } } return diseases; } - public void setDiseases(List diseases) { + public void setDiseases(Set diseases) { this.diseases = diseases; if (CollectionUtils.isNotEmpty(diseases)) { diseasesString = diseases.stream().map(Disease::getName).collect(Collectors.joining(",")); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTest.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTest.java index f45ab94e4d7..b39f5e0c7ce 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTest.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTest.java @@ -94,6 +94,9 @@ public class PathogenTest extends PseudonymizableAdo { private Pathogen testedPathogen; + @Column(length = CHARACTER_LIMIT_DEFAULT) + private String testedPathogenDetails; + @Column private String typingId; @@ -242,6 +245,14 @@ public void setTestedPathogen(Pathogen testedPathogen) { } } + public String getTestedPathogenDetails() { + return testedPathogenDetails; + } + + public void setTestedPathogenDetails(String testedPathogenDetails) { + this.testedPathogenDetails = testedPathogenDetails; + } + public String getTypingId() { return typingId; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTestDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTestDtoHelper.java index b538d305481..a90104d6c75 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTestDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/PathogenTestDtoHelper.java @@ -73,6 +73,7 @@ protected void fillInnerFromDto(PathogenTest target, PathogenTestDto source) { target.setTestedDiseaseDetails(source.getTestedDiseaseDetails()); target.setTestedDiseaseVariantDetails(source.getTestedDiseaseVariantDetails()); target.setTestedPathogen(source.getTestedPathogen()); + target.setTestedPathogenDetails(source.getTestedPathogenDetails()); target.setTypingId(source.getTypingId()); target.setTestResultVerified(source.getTestResultVerified()); target.setTestResultText(source.getTestResultText()); @@ -112,6 +113,7 @@ protected void fillInnerFromAdo(PathogenTestDto target, PathogenTest source) { target.setTestedDiseaseDetails(source.getTestedDiseaseDetails()); target.setTestedDiseaseVariantDetails(source.getTestedDiseaseVariantDetails()); target.setTestedPathogen(source.getTestedPathogen()); + target.setTestedPathogenDetails(source.getTestedPathogenDetails()); target.setTypingId(source.getTypingId()); if (source.getLab() != null) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlTextReadField.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlTextReadField.java index f21bc37fbb5..b0006112548 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlTextReadField.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlTextReadField.java @@ -38,6 +38,7 @@ import androidx.databinding.BindingMethods; import androidx.databinding.InverseBindingListener; +import de.symeda.sormas.api.environment.environmentsample.Pathogen; import de.symeda.sormas.api.environment.environmentsample.WeatherCondition; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.person.ApproximateAgeType; @@ -532,4 +533,16 @@ public static void setWeatherConditionsValue(ControlTextReadField textField, Map textField.setValue(map.keySet().stream().filter(map::get).map(WeatherCondition::toString).collect(Collectors.joining(", "))); } } + + @BindingAdapter(value = { + "pathogenValue", + "pathogenDetailsValue", + "defaultValue" }, requireAll = false) + public static void setPathogenValue(ControlTextReadField textField, Pathogen pathogen, String pathogenDetails, String defaultValue) { + if (pathogen == null) { + textField.setValue(defaultValue); + } else { + textField.setValue(pathogen.getCaption() + (StringUtils.isNotBlank(pathogenDetails) ? " (" + pathogenDetails + ")" : "")); + } + } } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/edit/EnvironmentEditSampleListFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/edit/EnvironmentEditSampleListFragment.java index 904e83387e7..95935a4e4a0 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/edit/EnvironmentEditSampleListFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/environment/edit/EnvironmentEditSampleListFragment.java @@ -107,8 +107,8 @@ public int getEditLayout() { @Override public void onListItemClick(View view, int position, Object item) { - EnvironmentSample sample = (EnvironmentSample) item; - EnvironmentSampleEditActivity.startActivity(getActivity(), sample.getUuid()); + EnvironmentSampleListViewModel.SampleWithTestedPathogens sample = (EnvironmentSampleListViewModel.SampleWithTestedPathogens) item; + EnvironmentSampleEditActivity.startActivity(getActivity(), sample.getSample().getUuid()); } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java index 6ca02f496b8..2b53851e327 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/edit/PathogenTestEditFragment.java @@ -27,6 +27,7 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.customizableenum.CustomizableEnumType; import de.symeda.sormas.api.disease.DiseaseVariant; +import de.symeda.sormas.api.environment.environmentsample.Pathogen; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; import de.symeda.sormas.api.sample.PCRTestSpecification; import de.symeda.sormas.api.sample.PathogenTestDto; @@ -107,8 +108,7 @@ record = getActivityRootData(); diseaseVariantList.add(DataUtils.toItem(record.getTestedDiseaseVariant())); } - List pathogens = - DatabaseHelper.getCustomizableEnumValueDao().getEnumValues(CustomizableEnumType.PATHOGEN, null); + List pathogens = DatabaseHelper.getCustomizableEnumValueDao().getEnumValues(CustomizableEnumType.PATHOGEN, null); pathogenList = DataUtils.toItems(pathogens); if (record.getTestedPathogen() != null && !diseaseVariants.contains(record.getTestedPathogen())) { pathogenList.add(DataUtils.toItem(record.getTestedPathogen())); @@ -177,9 +177,18 @@ public void onChange(ControlPropertyField field) { }); contentBinding.pathogenTestTestedDiseaseVariant.initializeSpinner(diseaseVariantList); - contentBinding.pathogenTestTestedPathogen.initializeSpinner(pathogenList); + contentBinding.pathogenTestTestedPathogenDetails.setVisibility(GONE); + contentBinding.pathogenTestTestedPathogen.initializeSpinner(pathogenList, e -> { + Pathogen pathogen = (Pathogen) e.getValue(); + if (pathogen != null && pathogen.isHasDetails()) { + contentBinding.pathogenTestTestedPathogenDetails.setVisibility(VISIBLE); + } else { + contentBinding.pathogenTestTestedPathogenDetails.setVisibility(GONE); + contentBinding.pathogenTestTestedPathogenDetails.setValue(null); + } + }); - if(sample != null){ + if (sample != null) { contentBinding.pathogenTestTestedDiseaseLayout.setVisibility(VISIBLE); contentBinding.pathogenTestTestedDisease.setRequired(true); contentBinding.pathogenTestTestedPathogen.setVisibility(GONE); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java index f2d9d37af7e..28bece5d2cc 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/pathogentest/read/PathogenTestReadFragment.java @@ -34,9 +34,6 @@ import de.symeda.sormas.app.backend.sample.PathogenTest; import de.symeda.sormas.app.databinding.FragmentPathogenTestReadLayoutBinding; -import static android.view.View.GONE; -import static android.view.View.VISIBLE; - public class PathogenTestReadFragment extends BaseReadFragment { private PathogenTest record; @@ -79,7 +76,7 @@ public void onLayoutBinding(FragmentPathogenTestReadLayoutBinding contentBinding contentBinding.pathogenTestTestedDiseaseVariant.setVisibility(record.getTestedDiseaseVariant() != null ? VISIBLE : GONE); } - if(record.getSample() != null){ + if (record.getSample() != null) { contentBinding.pathogenTestTestedDiseaseLayout.setVisibility(VISIBLE); contentBinding.pathogenTestTestedPathogen.setVisibility(GONE); } else { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/PersonContactDetailDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/PersonContactDetailDialog.java index 6fb39801951..329da8202b9 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/PersonContactDetailDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/PersonContactDetailDialog.java @@ -25,6 +25,7 @@ import androidx.databinding.library.baseAdapters.BR; import androidx.fragment.app.FragmentActivity; +import de.symeda.sormas.api.person.PersonContactDetailDto; import de.symeda.sormas.api.person.PersonContactDetailType; import de.symeda.sormas.api.person.PhoneNumberType; import de.symeda.sormas.api.utils.ValidationException; @@ -52,6 +53,7 @@ public PersonContactDetailDialog( PersonContactDetail personContactDetail, Person person, PseudonymizableAdo activityRootData, + UiFieldAccessCheckers fieldAccessCheckers, boolean create) { super( activity, @@ -61,7 +63,7 @@ public PersonContactDetailDialog( R.string.heading_person_contact_detail, -1, false, - UiFieldAccessCheckers.forSensitiveData(personContactDetail.isPseudonymized()), + fieldAccessCheckers, FieldVisibilityCheckers.withDisease(PersonFragmentHelper.getDiseaseOfAssociatedEntity(activityRootData))); this.data = personContactDetail; @@ -82,6 +84,8 @@ protected void initializeContentView(ViewDataBinding rootBinding, ViewDataBindin contentBinding.personContactDetailPersonContactDetailType.initializeSpinner(DataUtils.getEnumItems(PersonContactDetailType.class, true)); contentBinding.personContactDetailPhoneNumberType.initializeSpinner(DataUtils.getEnumItems(PhoneNumberType.class, true)); + setFieldVisibilitiesAndAccesses(PersonContactDetailDto.class, contentBinding.mainContent); + contentBinding.personContactDetailPersonContactDetailType.addValueChangedListener(e -> { if (e.getValue() != PersonContactDetailType.OTHER && (data.getPhoneNumberType() == null || data.getPhoneNumberType() != PhoneNumberType.OTHER)) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java index 99bc15d7697..281dd1a408b 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java @@ -43,6 +43,7 @@ import de.symeda.sormas.api.person.CauseOfDeath; import de.symeda.sormas.api.person.DeathPlaceType; import de.symeda.sormas.api.person.EducationType; +import de.symeda.sormas.api.person.PersonContactDetailDto; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.api.person.PresentCondition; import de.symeda.sormas.api.person.Salutation; @@ -371,6 +372,10 @@ private void setLocationFieldVisibilitiesAndAccesses(View view) { setFieldVisibilitiesAndAccesses(LocationDto.class, (ViewGroup) view); } + private void setPersonContactDetailFieldVisibilitiesAndAccesses(View view) { + setFieldVisibilitiesAndAccesses(PersonContactDetailDto.class, (ViewGroup) view); + } + private void setBurialFieldVisibilities(final FragmentPersonEditLayoutBinding contentBinding) { if (PresentCondition.BURIED.equals(contentBinding.personPresentCondition.getValue())) { if (isVisibleAllowed(PersonDto.class, contentBinding.personBurialDate)) { @@ -416,8 +421,13 @@ private void setUpControlListeners() { onPersonContactDetailItemClickListener = (v, item) -> { final PersonContactDetail personContactDetail = (PersonContactDetail) item; final PersonContactDetail personContactDetailClone = (PersonContactDetail) personContactDetail.clone(); - final PersonContactDetailDialog dialog = - new PersonContactDetailDialog(BaseActivity.getActiveActivity(), personContactDetailClone, record, getActivityRootData(), false); + final PersonContactDetailDialog dialog = new PersonContactDetailDialog( + BaseActivity.getActiveActivity(), + personContactDetailClone, + record, + getActivityRootData(), + getFieldAccessCheckers(), + false); dialog.setPositiveCallback(() -> checkExistingPrimaryContactDetails(personContactDetailClone, dialog, () -> { record.getPersonContactDetails().set(record.getPersonContactDetails().indexOf(personContactDetail), personContactDetailClone); @@ -445,8 +455,13 @@ private void setUpControlListeners() { getContentBinding().btnAddPersonContactDetail.setOnClickListener(v -> { final PersonContactDetail personContactDetail = DatabaseHelper.getPersonContactDetailDao().build(); - final PersonContactDetailDialog dialog = - new PersonContactDetailDialog(BaseActivity.getActiveActivity(), personContactDetail, record, getActivityRootData(), true); + final PersonContactDetailDialog dialog = new PersonContactDetailDialog( + BaseActivity.getActiveActivity(), + personContactDetail, + record, + getActivityRootData(), + getFieldAccessCheckers(), + true); dialog.setPositiveCallback(() -> checkExistingPrimaryContactDetails(personContactDetail, dialog, () -> { record.getPersonContactDetails().add(0, personContactDetail); @@ -475,7 +490,7 @@ private void addAddress(Location item) { private void updatePersonContactDetails() { getContentBinding().setPersonContactDetailList(getPersonContactDetails()); - getContentBinding().setPersonContactDetailBindCallback(this::setLocationFieldVisibilitiesAndAccesses); + getContentBinding().setPersonContactDetailBindCallback(this::setPersonContactDetailFieldVisibilitiesAndAccesses); } private void removePersonContactDetail(PersonContactDetail item) { @@ -572,7 +587,7 @@ public void onLayoutBinding(FragmentPersonEditLayoutBinding contentBinding) { contentBinding.setPersonContactDetailList(getPersonContactDetails()); contentBinding.setPersonContactDetailItemClickCallback(onPersonContactDetailItemClickListener); - getContentBinding().setPersonContactDetailBindCallback(this::setLocationFieldVisibilitiesAndAccesses); + getContentBinding().setPersonContactDetailBindCallback(this::setPersonContactDetailFieldVisibilitiesAndAccesses); setUpLayoutBinding(this, record, contentBinding); } diff --git a/sormas-app/app/src/main/res/layout/fragment_pathogen_test_edit_layout.xml b/sormas-app/app/src/main/res/layout/fragment_pathogen_test_edit_layout.xml index 2a799a69160..938776afa76 100644 --- a/sormas-app/app/src/main/res/layout/fragment_pathogen_test_edit_layout.xml +++ b/sormas-app/app/src/main/res/layout/fragment_pathogen_test_edit_layout.xml @@ -119,6 +119,11 @@ app:value="@={data.testedPathogen}" style="@style/ControlSingleColumnStyle" /> + + + @@ -78,7 +79,7 @@ android:maxLines="1" android:ellipsize="end" android:visibility="@{data.testedPathogen != null ? View.VISIBLE : View.GONE}" - app:value="@{data.testedPathogen}" /> + app:value="@{DataHelper.getPathogenString(data.testedPathogen, data.testedPathogenDetails)}" /> diff --git a/sormas-app/app/src/main/res/layout/row_task_list_item_layout.xml b/sormas-app/app/src/main/res/layout/row_task_list_item_layout.xml index fa2c820c142..be69209f923 100644 --- a/sormas-app/app/src/main/res/layout/row_task_list_item_layout.xml +++ b/sormas-app/app/src/main/res/layout/row_task_list_item_layout.xml @@ -21,6 +21,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto"> + + @@ -61,10 +63,23 @@ android:textSize="@dimen/listActivityRowTertiaryTextSize" android:textColor="@color/listActivityRowTertiaryText" android:fontFamily="sans-serif-medium" + android:visibility="@{data.environment != null ? View.GONE : View.VISIBLE}" app:diseaseValue="@{data}" app:defaultValue='@{@string/value_disease_unknown}' /> + + @@ -182,10 +197,28 @@ android:scrollHorizontally="true" android:maxLines="1" android:ellipsize="end" + android:visibility="@{data.environment != null ? View.GONE : View.VISIBLE}" app:patientValue="@{data}" app:defaultValue='@{@string/value_person_unknown}' /> + + + + org.apache.pdfbox + pdfbox + + + + diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java index df21835150b..67319f28f7e 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java @@ -169,7 +169,7 @@ import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.location.LocationDto; import de.symeda.sormas.api.location.LocationReferenceDto; -import de.symeda.sormas.api.messaging.ManualMessageLogDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogDto; import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.ApproximateAgeType; import de.symeda.sormas.api.person.CauseOfDeath; @@ -242,7 +242,7 @@ import de.symeda.sormas.backend.common.ConfigFacadeEjb.ConfigFacadeEjbLocal; import de.symeda.sormas.backend.common.CriteriaBuilderHelper; import de.symeda.sormas.backend.common.NotificationService; -import de.symeda.sormas.backend.common.messaging.ManualMessageLogService; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogService; import de.symeda.sormas.backend.common.messaging.MessageContents; import de.symeda.sormas.backend.common.messaging.MessageSubject; import de.symeda.sormas.backend.common.messaging.MessagingService; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java index 2864f49effe..e0dca473768 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java @@ -203,6 +203,10 @@ private CriteriaQuery buildIndexCriteria( if (caseCriteria != null) { caseUserFilterCriteria.setIncludeCasesFromOtherJurisdictions(caseCriteria.getIncludeCasesFromOtherJurisdictions()); } + + if (currentUserService.hasRestrictedAccessToAssignedEntities()) { + caseUserFilterCriteria.setRestrictAccessToAssignedEntities(true); + } Predicate filter = caseService.createUserFilter(caseQueryContext, caseUserFilterCriteria); if (!prefetchIds) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java index e97ef29a18b..684a4d73873 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java @@ -1394,6 +1394,11 @@ public Predicate createUserFilter(CaseQueryContext caseQueryContext, CaseUserFil Predicate filter = null; final JurisdictionLevel jurisdictionLevel = currentUser.getJurisdictionLevel(); + + if (currentUserHasRestrictedAccessToAssignedEntities()) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(casePath.get(Case.SURVEILLANCE_OFFICER).get(User.ID), currentUser.getId())); + } + if (jurisdictionLevel != JurisdictionLevel.NATION) { // whoever created the case or is assigned to it is allowed to access it if (userFilterCriteria == null || (userFilterCriteria.getIncludeCasesFromOtherJurisdictions())) { @@ -1405,61 +1410,63 @@ public Predicate createUserFilter(CaseQueryContext caseQueryContext, CaseUserFil filterResponsible = cb.disjunction(); } - switch (jurisdictionLevel) { - case REGION: - final Region region = currentUser.getRegion(); - if (region != null) { - filter = CriteriaBuilderHelper.or( - cb, - filter, - cb.equal(casePath.get(Case.REGION).get(Region.ID), region.getId()), - cb.equal(casePath.get(Case.RESPONSIBLE_REGION).get(Region.ID), region.getId())); - } - break; - case DISTRICT: - final District district = currentUser.getDistrict(); - if (district != null) { - filter = CriteriaBuilderHelper.or( - cb, - filter, - cb.equal(casePath.get(Case.DISTRICT).get(District.ID), district.getId()), - cb.equal(casePath.get(Case.RESPONSIBLE_DISTRICT).get(District.ID), district.getId())); - } - break; - case HEALTH_FACILITY: - final Facility healthFacility = currentUser.getHealthFacility(); - if (healthFacility != null) { - filter = - CriteriaBuilderHelper.or(cb, filter, cb.equal(casePath.get(Case.HEALTH_FACILITY).get(Facility.ID), healthFacility.getId())); - } - break; - case COMMUNITY: - final Community community = currentUser.getCommunity(); - if (community != null) { - filter = CriteriaBuilderHelper.or( - cb, - filter, - cb.equal(casePath.get(Case.COMMUNITY).get(Community.ID), community.getId()), - cb.equal(casePath.get(Case.RESPONSIBLE_COMMUNITY).get(Community.ID), community.getId())); - } - break; - case POINT_OF_ENTRY: - final PointOfEntry pointOfEntry = currentUser.getPointOfEntry(); - if (pointOfEntry != null) { - filter = - CriteriaBuilderHelper.or(cb, filter, cb.equal(casePath.get(Case.POINT_OF_ENTRY).get(PointOfEntry.ID), pointOfEntry.getId())); + if (!currentUserHasRestrictedAccessToAssignedEntities()) { + switch (jurisdictionLevel) { + case REGION: + final Region region = currentUser.getRegion(); + if (region != null) { + filter = CriteriaBuilderHelper.or( + cb, + filter, + cb.equal(casePath.get(Case.REGION).get(Region.ID), region.getId()), + cb.equal(casePath.get(Case.RESPONSIBLE_REGION).get(Region.ID), region.getId())); + } + break; + case DISTRICT: + final District district = currentUser.getDistrict(); + if (district != null) { + filter = CriteriaBuilderHelper.or( + cb, + filter, + cb.equal(casePath.get(Case.DISTRICT).get(District.ID), district.getId()), + cb.equal(casePath.get(Case.RESPONSIBLE_DISTRICT).get(District.ID), district.getId())); + } + break; + case HEALTH_FACILITY: + final Facility healthFacility = currentUser.getHealthFacility(); + if (healthFacility != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(casePath.get(Case.HEALTH_FACILITY).get(Facility.ID), healthFacility.getId())); + } + break; + case COMMUNITY: + final Community community = currentUser.getCommunity(); + if (community != null) { + filter = CriteriaBuilderHelper.or( + cb, + filter, + cb.equal(casePath.get(Case.COMMUNITY).get(Community.ID), community.getId()), + cb.equal(casePath.get(Case.RESPONSIBLE_COMMUNITY).get(Community.ID), community.getId())); + } + break; + case POINT_OF_ENTRY: + final PointOfEntry pointOfEntry = currentUser.getPointOfEntry(); + if (pointOfEntry != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(casePath.get(Case.POINT_OF_ENTRY).get(PointOfEntry.ID), pointOfEntry.getId())); + } + break; + case LABORATORY: + final Subquery sampleSubQuery = cq.subquery(Long.class); + final Root sampleRoot = sampleSubQuery.from(Sample.class); + final SampleJoins joins = new SampleJoins(sampleRoot); + final Join cazeJoin = joins.getCaze(); + sampleSubQuery.where(cb.and(cb.equal(cazeJoin, casePath), sampleService.createUserFilterWithoutAssociations(cb, joins))); + sampleSubQuery.select(sampleRoot.get(Sample.ID)); + filter = CriteriaBuilderHelper.or(cb, filter, cb.exists(sampleSubQuery)); + break; + default: } - break; - case LABORATORY: - final Subquery sampleSubQuery = cq.subquery(Long.class); - final Root sampleRoot = sampleSubQuery.from(Sample.class); - final SampleJoins joins = new SampleJoins(sampleRoot); - final Join cazeJoin = joins.getCaze(); - sampleSubQuery.where(cb.and(cb.equal(cazeJoin, casePath), sampleService.createUserFilterWithoutAssociations(cb, joins))); - sampleSubQuery.select(sampleRoot.get(Sample.ID)); - filter = CriteriaBuilderHelper.or(cb, filter, cb.exists(sampleSubQuery)); - break; - default: } // get all cases based on the user's contact association @@ -1680,12 +1687,20 @@ public EditPermissionType isAddContactAllowed(Case caze) { return EditPermissionType.REFUSED; } + if (currentUserHasRestrictedAccessToAssignedEntities() && !DataHelper.equal(caze.getSurveillanceOfficer(), getCurrentUser())) { + return EditPermissionType.REFUSED; + } + return super.getEditPermissionType(caze); } @Override public EditPermissionType getEditPermissionType(Case caze) { + if (currentUserHasRestrictedAccessToAssignedEntities() && !DataHelper.equal(caze.getSurveillanceOfficer(), getCurrentUser())) { + return EditPermissionType.REFUSED; + } + if (!inJurisdictionOrOwned(caze)) { return EditPermissionType.OUTSIDE_JURISDICTION; } @@ -2337,11 +2352,11 @@ public String getCaseUuidForAutomaticSampleAssignment(Set uuids, Disease cb.lessThanOrEqualTo( CriteriaBuilderHelper.dateDiff( cb, - cb.function( - ExtendedPostgreSQL94Dialect.DATE, - Date.class, - CriteriaBuilderHelper.coalesce(cb, Date.class, earliestSampleSq, caseRoot.get(Case.REPORT_DATE))), - cb.function(ExtendedPostgreSQL94Dialect.DATE, Date.class, cb.literal(new Date()))), + cb.function( + ExtendedPostgreSQL94Dialect.DATE, + Date.class, + CriteriaBuilderHelper.coalesce(cb, Date.class, earliestSampleSq, caseRoot.get(Case.REPORT_DATE))), + cb.function(ExtendedPostgreSQL94Dialect.DATE, Date.class, cb.literal(new Date()))), Long.valueOf(TimeUnit.DAYS.toSeconds(automaticSampleAssignmentThreshold)).doubleValue())); List caseUuids = em.createQuery(cq).getResultList(); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseUserFilterCriteria.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseUserFilterCriteria.java index 0fa3eb01809..58a9cbe5687 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseUserFilterCriteria.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseUserFilterCriteria.java @@ -8,6 +8,7 @@ public class CaseUserFilterCriteria { private boolean excludeCasesFromContacts; private Boolean includeCasesFromOtherJurisdictions = Boolean.FALSE; private boolean excludeLimitedSyncRestrictions; + private boolean restrictAccessToAssignedEntities; public boolean isExcludeCasesFromContacts() { return excludeCasesFromContacts; @@ -39,4 +40,12 @@ public CaseUserFilterCriteria excludeLimitedSyncRestrictions(boolean excludeLimi this.excludeLimitedSyncRestrictions = excludeLimitedSyncRestrictions; return this; } + + public boolean isRestrictAccessToAssignedEntities() { + return restrictAccessToAssignedEntities; + } + + public void setRestrictAccessToAssignedEntities(boolean restrictAccessToAssignedEntities) { + this.restrictAccessToAssignedEntities = restrictAccessToAssignedEntities; + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/BaseAdoService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/BaseAdoService.java index bdf6e4ea2a9..1c8d252c7ae 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/BaseAdoService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/BaseAdoService.java @@ -94,6 +94,10 @@ public User getCurrentUser() { return currentUserService.getCurrentUser(); } + public boolean currentUserHasRestrictedAccessToAssignedEntities() { + return currentUserService.hasRestrictedAccessToAssignedEntities(); + } + public boolean hasRight(UserRight right) { return currentUserService.hasUserRight(right); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/ConfigFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/ConfigFacadeEjb.java index 5b2046bd001..033258a9889 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/ConfigFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/ConfigFacadeEjb.java @@ -101,6 +101,7 @@ public class ConfigFacadeEjb implements ConfigFacade { public static final String SMS_AUTH_SECRET = "sms.auth.secret"; public static final String DUPLICATE_CHECKS_EXCLUDE_PERSONS_OF_ACHIVED_ENTRIES = "duplicatechecks.excludepersonsonlylinkedtoarchivedentries"; + public static final String DUPLICATE_CHECKS_NATIONAL_HEALTH_ID_OVERRIDES_CRITERIA = "duplicatechecks.nationalhealthidoverridescriteria"; public static final String NAME_SIMILARITY_THRESHOLD = "namesimilaritythreshold"; public static final String INFRASTRUCTURE_SYNC_THRESHOLD = "infrastructuresyncthreshold"; @@ -436,6 +437,11 @@ public boolean isDuplicateChecksExcludePersonsOfArchivedEntries() { return getBoolean(DUPLICATE_CHECKS_EXCLUDE_PERSONS_OF_ACHIVED_ENTRIES, false); } + @Override + public boolean isDuplicateChecksNationalHealthIdOverridesCriteria() { + return getBoolean(DUPLICATE_CHECKS_NATIONAL_HEALTH_ID_OVERRIDES_CRITERIA, false); + } + @Override public double getNameSimilarityThreshold() { return getDouble(NAME_SIMILARITY_THRESHOLD, PersonHelper.DEFAULT_NAME_SIMILARITY_THRESHOLD); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/EmailService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/EmailService.java index 5b0c78f8439..9ee6b5c03af 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/EmailService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/EmailService.java @@ -17,8 +17,12 @@ *******************************************************************************/ package de.symeda.sormas.backend.common.messaging; +import java.io.File; import java.io.UnsupportedEncodingException; +import java.util.Map; +import javax.activation.DataHandler; +import javax.activation.FileDataSource; import javax.annotation.Resource; import javax.ejb.Asynchronous; import javax.ejb.EJB; @@ -26,10 +30,14 @@ import javax.ejb.Stateless; import javax.mail.Message; import javax.mail.MessagingException; +import javax.mail.Multipart; +import javax.mail.Part; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -49,10 +57,39 @@ public class EmailService { private ConfigFacadeEjbLocal configFacade; @Asynchronous - public void sendEmail(String recipient, String subject, String content) throws MessagingException { + public void sendEmailAsync(String recipient, String subject, String content) throws MessagingException { Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); + sendEmailAsync(recipient, subject, content, "text/plain; charset=utf-8"); + } + + public void sendEmail(String recipient, String subject, String content, Map attachments) throws MessagingException { + + Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); + + Multipart multipart = new MimeMultipart(); + MimeBodyPart messageBodyPart = new MimeBodyPart(); + messageBodyPart.setContent(content, "text/plain; charset=utf-8"); + + multipart.addBodyPart(messageBodyPart); + + for (Map.Entry attachment : attachments.entrySet()) { + File file = attachment.getKey(); + String fileName = attachment.getValue(); + + MimeBodyPart attachPart = new MimeBodyPart(); + attachPart.setDataHandler(new DataHandler(new FileDataSource(file))); + attachPart.setFileName(fileName); + attachPart.setDisposition(Part.ATTACHMENT); + + multipart.addBodyPart(attachPart); + } + + sendEmailAsync(recipient, subject, multipart, null); + } + + private void sendEmailAsync(String recipient, String subject, Object content, String contentType) throws MessagingException { MimeMessage message = new MimeMessage(mailSession); String senderAddress = configFacade.getEmailSenderAddress(); @@ -66,9 +103,8 @@ public void sendEmail(String recipient, String subject, String content) throws M } message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(recipient, false)); - message.setSubject(subject, "UTF-8"); - message.setContent(content, "text/plain; charset=utf-8"); + message.setContent(content, contentType); Transport.send(message); logger.info("Mail sent to {}.", recipient); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLog.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLog.java deleted file mode 100644 index 01ad54bebe8..00000000000 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLog.java +++ /dev/null @@ -1,71 +0,0 @@ -package de.symeda.sormas.backend.common.messaging; - -import java.util.Date; - -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; - -import de.symeda.sormas.api.messaging.MessageType; -import de.symeda.sormas.backend.common.AbstractDomainObject; -import de.symeda.sormas.backend.person.Person; -import de.symeda.sormas.backend.user.User; - -@Entity -public class ManualMessageLog extends AbstractDomainObject { - - public static final String TABLE_NAME = "manualmessagelog"; - - public static final String MESSAGE_TYPE = "messageType"; - public static final String SENT_DATE = "sentDate"; - public static final String SENDING_USER = "sendingUser"; - public static final String RECIPIENT_PERSON = "recipientPerson"; - - private MessageType messageType; - private Date sentDate; - private User sendingUser; - private Person recipientPerson; - - @Enumerated(EnumType.STRING) - public MessageType getMessageType() { - return messageType; - } - - public void setMessageType(MessageType messageType) { - this.messageType = messageType; - } - - @Temporal(TemporalType.TIMESTAMP) - public Date getSentDate() { - return sentDate; - } - - public void setSentDate(Date sentDate) { - this.sentDate = sentDate; - } - - @ManyToOne(cascade = {}, fetch = FetchType.LAZY) - @JoinColumn(nullable = false) - public User getSendingUser() { - return sendingUser; - } - - public void setSendingUser(User sendingUser) { - this.sendingUser = sendingUser; - } - - @ManyToOne(cascade = {}) - @JoinColumn(nullable = false) - public Person getRecipientPerson() { - return recipientPerson; - } - - public void setRecipientPerson(Person recipientPerson) { - this.recipientPerson = recipientPerson; - } -} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLogService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLogService.java deleted file mode 100644 index 7eea18457ce..00000000000 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/ManualMessageLogService.java +++ /dev/null @@ -1,54 +0,0 @@ -package de.symeda.sormas.backend.common.messaging; - -import java.util.List; - -import javax.ejb.LocalBean; -import javax.ejb.Stateless; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; -import javax.validation.constraints.NotNull; - -import de.symeda.sormas.api.messaging.MessageType; -import de.symeda.sormas.backend.common.BaseAdoService; -import de.symeda.sormas.backend.person.Person; - -@Stateless -@LocalBean -public class ManualMessageLogService extends BaseAdoService { - - public static final int MANUAL_MESSAGE_LOG_LIMIT = 5; - - public ManualMessageLogService() { - super(ManualMessageLog.class); - } - - public List getByPersonUuid(@NotNull String personUuid, MessageType messageType) { - - final CriteriaBuilder cb = em.getCriteriaBuilder(); - final CriteriaQuery cq = cb.createQuery(ManualMessageLog.class); - final Root manualMessageLogRoot = cq.from(ManualMessageLog.class); - - final Predicate filter = cb.and( - cb.equal(manualMessageLogRoot.get(ManualMessageLog.RECIPIENT_PERSON).get(Person.UUID), personUuid), - cb.equal(manualMessageLogRoot.get(ManualMessageLog.MESSAGE_TYPE), messageType)); - - cq.where(filter); - cq.orderBy(cb.desc(manualMessageLogRoot.get(ManualMessageLog.SENT_DATE))); - - return em.createQuery(cq).setMaxResults(MANUAL_MESSAGE_LOG_LIMIT).getResultList(); - } - - public List getByPersonUuid(@NotNull String personUuid) { - - final CriteriaBuilder cb = em.getCriteriaBuilder(); - final CriteriaQuery cq = cb.createQuery(ManualMessageLog.class); - final Root manualMessageLogRoot = cq.from(ManualMessageLog.class); - - cq.where(cb.equal(manualMessageLogRoot.get(ManualMessageLog.RECIPIENT_PERSON).get(Person.UUID), personUuid)); - cq.orderBy(cb.desc(manualMessageLogRoot.get(ManualMessageLog.SENT_DATE))); - - return em.createQuery(cq).setMaxResults(MANUAL_MESSAGE_LOG_LIMIT).getResultList(); - } -} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/MessagingService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/MessagingService.java index 5b651065034..6d6ac5c9dd9 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/MessagingService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/messaging/MessagingService.java @@ -36,6 +36,8 @@ import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.backend.common.ConfigFacadeEjb; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLog; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogService; import de.symeda.sormas.backend.person.Person; import de.symeda.sormas.backend.user.User; import de.symeda.sormas.backend.user.UserService; @@ -132,7 +134,7 @@ private void sendEmail(String subject, String messageContent, String emailAddres logger.info(String.format("Tried to send an email to a %s without an email address (UUID: %s).", recipientType, recipientUuid)); } else { try { - emailService.sendEmail(emailAddress, subject, messageContent); + emailService.sendEmailAsync(emailAddress, subject, messageContent); } catch (MessagingException e) { logError(recipientUuid, recipientType, MessageType.EMAIL); throw new NotificationDeliveryFailedException("Email could not be sent due to an unexpected error.", MessageType.EMAIL, e); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactService.java index 57868211d23..eca0c747ad0 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactService.java @@ -1078,49 +1078,56 @@ public Predicate createUserFilterWithoutCase(ContactQueryContext qc, ContactCrit CriteriaQuery cq = qc.getQuery(); From contactRoot = qc.getRoot(); + Predicate filter = null; + + if (currentUserHasRestrictedAccessToAssignedEntities()) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(contactRoot.get(Contact.CONTACT_OFFICER).get(User.ID), getCurrentUser().getId())); + } + // National users can access all contacts in the system final JurisdictionLevel jurisdictionLevel = currentUser.getJurisdictionLevel(); if ((jurisdictionLevel == JurisdictionLevel.NATION && !UserRole.isPortHealthUser(currentUser.getUserRoles()))) { return CriteriaBuilderHelper.limitedDiseasePredicate(cb, currentUser, contactRoot.get(Contact.DISEASE)); } - Predicate filter = null; // whoever created it or is assigned to it is allowed to access it if (contactCriteria == null || contactCriteria.getIncludeContactsFromOtherJurisdictions()) { filter = cb.equal(contactRoot.get(Contact.REPORTING_USER), currentUser); filter = cb.or(filter, cb.equal(contactRoot.get(Contact.CONTACT_OFFICER), currentUser)); } - switch (jurisdictionLevel) { - case REGION: - final Region region = currentUser.getRegion(); - if (region != null) { - filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.REGION), currentUser.getRegion())); - } - break; - case DISTRICT: - final District district = currentUser.getDistrict(); - if (district != null) { - filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.DISTRICT), currentUser.getDistrict())); - } - break; - case COMMUNITY: - final Community community = currentUser.getCommunity(); - if (community != null) { - filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.COMMUNITY), currentUser.getCommunity())); + if (!currentUserHasRestrictedAccessToAssignedEntities()) { + switch (jurisdictionLevel) { + case REGION: + final Region region = currentUser.getRegion(); + if (region != null) { + filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.REGION), currentUser.getRegion())); + } + break; + case DISTRICT: + final District district = currentUser.getDistrict(); + if (district != null) { + filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.DISTRICT), currentUser.getDistrict())); + } + break; + case COMMUNITY: + final Community community = currentUser.getCommunity(); + if (community != null) { + filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(contactRoot.get(Contact.COMMUNITY), currentUser.getCommunity())); + } + break; + case LABORATORY: + final Subquery sampleSubQuery = cq.subquery(Long.class); + final Root sampleRoot = sampleSubQuery.from(Sample.class); + final SampleJoins joins = new SampleJoins(sampleRoot); + final Join contactJoin = joins.getContact(); + + sampleSubQuery.where(cb.and(cb.equal(contactJoin, contactRoot), sampleService.createUserFilterWithoutAssociations(cb, joins))); + sampleSubQuery.select(sampleRoot.get(Sample.ID)); + filter = CriteriaBuilderHelper.or(cb, filter, cb.exists(sampleSubQuery)); + break; + default: } - break; - case LABORATORY: - final Subquery sampleSubQuery = cq.subquery(Long.class); - final Root sampleRoot = sampleSubQuery.from(Sample.class); - final SampleJoins joins = new SampleJoins(sampleRoot); - final Join contactJoin = joins.getContact(); - - sampleSubQuery.where(cb.and(cb.equal(contactJoin, contactRoot), sampleService.createUserFilterWithoutAssociations(cb, joins))); - sampleSubQuery.select(sampleRoot.get(Sample.ID)); - filter = CriteriaBuilderHelper.or(cb, filter, cb.exists(sampleSubQuery)); - break; - default: } filter = CriteriaBuilderHelper.and( @@ -1837,6 +1844,10 @@ public EditPermissionType getEditPermissionType(Contact contact) { return EditPermissionType.OUTSIDE_JURISDICTION; } + if (currentUserHasRestrictedAccessToAssignedEntities() && !DataHelper.equal(contact.getContactOfficer(), (getCurrentUser()))) { + return EditPermissionType.REFUSED; + } + if (sormasToSormasShareInfoService.isContactOwnershipHandedOver(contact) || (contact.getSormasToSormasOriginInfo() != null && !contact.getSormasToSormasOriginInfo().isOwnershipHandedOver())) { return EditPermissionType.WITHOUT_OWNERSHIP; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java index f5575b7fb67..0eccc6f0049 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java @@ -15,6 +15,8 @@ package de.symeda.sormas.backend.customizableenum; +import static de.symeda.sormas.backend.util.QueryHelper.getResultList; + import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; import java.util.Comparator; @@ -35,6 +37,13 @@ import javax.ejb.LockType; import javax.ejb.Singleton; import javax.ejb.Stateless; +import javax.inject.Inject; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Expression; +import javax.persistence.criteria.Order; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -43,17 +52,31 @@ import de.symeda.sormas.api.Language; import de.symeda.sormas.api.customizableenum.CustomEnumNotFoundException; import de.symeda.sormas.api.customizableenum.CustomizableEnum; +import de.symeda.sormas.api.customizableenum.CustomizableEnumCriteria; import de.symeda.sormas.api.customizableenum.CustomizableEnumFacade; +import de.symeda.sormas.api.customizableenum.CustomizableEnumHelper; import de.symeda.sormas.api.customizableenum.CustomizableEnumTranslation; import de.symeda.sormas.api.customizableenum.CustomizableEnumType; import de.symeda.sormas.api.customizableenum.CustomizableEnumValueDto; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueIndexDto; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueReferenceDto; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.api.utils.InvalidCustomizationException; +import de.symeda.sormas.api.utils.SortProperty; +import de.symeda.sormas.api.utils.ValidationRuntimeException; +import de.symeda.sormas.backend.common.AbstractBaseEjb; import de.symeda.sormas.backend.common.ConfigFacadeEjb; import de.symeda.sormas.backend.util.DtoHelper; +import de.symeda.sormas.backend.util.Pseudonymizer; +import de.symeda.sormas.backend.util.RightsAllowed; @Singleton(name = "CustomizableEnumFacade") -public class CustomizableEnumFacadeEjb implements CustomizableEnumFacade { +public class CustomizableEnumFacadeEjb + extends + AbstractBaseEjb + implements CustomizableEnumFacade { /** * Maps a customizable enum type to all enum value entities of that type in the database. @@ -84,12 +107,81 @@ public class CustomizableEnumFacadeEjb implements CustomizableEnumFacade { @EJB private ConfigFacadeEjb.ConfigFacadeEjbLocal configFacade; + public CustomizableEnumFacadeEjb() { + + } + + @Inject + public CustomizableEnumFacadeEjb(CustomizableEnumValueService service) { + super(CustomizableEnumValue.class, CustomizableEnumValueDto.class, service); + } + @Lock(LockType.READ) @Override public List getAllAfter(Date date) { return service.getAllAfter(date).stream().map(this::toDto).collect(Collectors.toList()); } + @Override + protected CustomizableEnumValue fillOrBuildEntity(CustomizableEnumValueDto source, CustomizableEnumValue target, boolean checkChangeDate) { + + target = DtoHelper.fillOrBuildEntity(source, target, CustomizableEnumValue::new, checkChangeDate); + + target.setDataType(source.getDataType()); + target.setValue(source.getValue()); + target.setCaption(source.getCaption()); + target.setTranslations(source.getTranslations()); + target.setDiseases(source.getDiseases()); + target.setDescription(source.getDescription()); + target.setDescriptionTranslations(source.getDescriptionTranslations()); + target.setProperties(source.getProperties()); + target.setDefaultValue(source.isDefaultValue()); + + return target; + } + + @Override + public void validate(CustomizableEnumValueDto dto) throws ValidationRuntimeException { + + if (!CustomizableEnumHelper.isValidEnumValue(dto.getValue())) { + throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.customizableEnumValueAllowedCharacters)); + } + } + + @Lock(LockType.READ) + @RightsAllowed(UserRight._CUSTOMIZABLE_ENUM_MANAGEMENT) + @Override + public CustomizableEnumValueDto save(CustomizableEnumValueDto dto) { + + if (dto == null) { + return null; + } + + validate(dto); + + CustomizableEnumValue existingEntity = service.getByUuid(dto.getUuid()); + + List dataTypeValues = enumValues.get(dto.getDataType()); + if (existingEntity == null && dataTypeValues != null && dataTypeValues.contains(dto.getValue())) { + throw new ValidationRuntimeException( + I18nProperties.getValidationError(Validations.customizableEnumValueDuplicateValue, dto.getDataType().toString(), dto.getValue())); + } + + CustomizableEnumValue enumValue = fillOrBuildEntity(dto, existingEntity, true); + service.ensurePersisted(enumValue); + + // Reset cache since values have been changed + loadData(); + + return toDto(enumValue); + } + + @Lock(LockType.READ) + @Override + public long count(CustomizableEnumCriteria criteria) { + return service.count((cb, root) -> service.buildCriteriaFilter(criteria, cb, root)); + } + @Lock(LockType.READ) @Override public List getByUuids(List uuids) { @@ -102,6 +194,70 @@ public List getAllUuids() { return service.getAllUuids(); } + @Lock(LockType.READ) + @RightsAllowed(UserRight._CUSTOMIZABLE_ENUM_MANAGEMENT) + @Override + public List getIndexList( + CustomizableEnumCriteria criteria, + Integer first, + Integer max, + List sortProperties) { + + CriteriaBuilder cb = em.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(CustomizableEnumValue.class); + Root root = cq.from(CustomizableEnumValue.class); + + Predicate filter = null; + if (criteria != null) { + filter = service.buildCriteriaFilter(criteria, cb, root); + } + if (filter != null) { + cq.where(filter); + } + + if (CollectionUtils.isNotEmpty(sortProperties)) { + List order = new ArrayList<>(sortProperties.size()); + for (SortProperty sortProperty : sortProperties) { + Expression expression; + switch (sortProperty.propertyName) { + case CustomizableEnumValue.DATA_TYPE: + case CustomizableEnumValue.VALUE: + case CustomizableEnumValue.CAPTION: + expression = root.get(sortProperty.propertyName); + break; + default: + throw new IllegalArgumentException(sortProperty.propertyName); + } + order.add(sortProperty.ascending ? cb.asc(expression) : cb.desc(expression)); + } + cq.orderBy(order); + } else { + cq.orderBy(cb.asc(root.get(CustomizableEnumValue.DATA_TYPE)), cb.asc(root.get(CustomizableEnumValue.VALUE))); + } + + cq.select(root); + + return getResultList(em, cq, first, max, this::toIndexDto); + } + + private CustomizableEnumValueIndexDto toIndexDto(CustomizableEnumValue entity) { + + if (entity == null) { + return null; + } + + CustomizableEnumValueIndexDto dto = new CustomizableEnumValueIndexDto(); + DtoHelper.fillDto(dto, entity); + + dto.setDataType(entity.getDataType()); + dto.setValue(entity.getValue()); + dto.setCaption(entity.getCaption()); + dto.setDiseases(entity.getDiseases()); + dto.setProperties(entity.getProperties()); + + return dto; + } + /** * Using LockType.READ to provide concurrent locks to multiple clients. */ @@ -294,7 +450,7 @@ public void loadData() { } } - private CustomizableEnumValueDto toDto(CustomizableEnumValue source) { + public CustomizableEnumValueDto toDto(CustomizableEnumValue source) { if (source == null) { return null; @@ -316,8 +472,40 @@ private CustomizableEnumValueDto toDto(CustomizableEnumValue source) { return target; } + @Override + protected CustomizableEnumValueReferenceDto toRefDto(CustomizableEnumValue customizableEnumValue) { + + if (customizableEnumValue == null) { + return null; + } + + return new CustomizableEnumValueReferenceDto(customizableEnumValue.getUuid()); + } + + @Override + protected void pseudonymizeDto(CustomizableEnumValue source, CustomizableEnumValueDto dto, Pseudonymizer pseudonymizer, boolean inJurisdiction) { + // Customizable enum values don't need to be pseudonymized + } + + @Override + protected void restorePseudonymizedDto( + CustomizableEnumValueDto dto, + CustomizableEnumValueDto existingDto, + CustomizableEnumValue entity, + Pseudonymizer pseudonymizer) { + // Customizable enum values don't need to be pseudonymized + } + @LocalBean @Stateless public static class CustomizableEnumFacadeEjbLocal extends CustomizableEnumFacadeEjb { + + public CustomizableEnumFacadeEjbLocal() { + } + + @Inject + public CustomizableEnumFacadeEjbLocal(CustomizableEnumValueService service) { + super(service); + } } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValue.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValue.java index 69f48bf7ea5..8ba71f9cb0b 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValue.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValue.java @@ -17,6 +17,7 @@ import java.util.List; import java.util.Map; +import java.util.Set; import javax.persistence.Column; import javax.persistence.Convert; @@ -30,7 +31,7 @@ import de.symeda.sormas.api.customizableenum.CustomizableEnumTranslation; import de.symeda.sormas.api.customizableenum.CustomizableEnumType; import de.symeda.sormas.backend.common.AbstractDomainObject; -import de.symeda.sormas.backend.disease.DiseaseListConverter; +import de.symeda.sormas.backend.user.DiseaseSetConverter; import de.symeda.sormas.backend.util.ModelConstants; /** @@ -47,11 +48,16 @@ public class CustomizableEnumValue extends AbstractDomainObject { public static final String TABLE_NAME = "customizableenumvalue"; + public static final String DATA_TYPE = "dataType"; + public static final String VALUE = "value"; + public static final String CAPTION = "caption"; + public static final String DISEASES = "diseases"; + private CustomizableEnumType dataType; private String value; private String caption; private List translations; - private List diseases; + private Set diseases; private String description; private List descriptionTranslations; private Map properties; @@ -100,12 +106,12 @@ public void setTranslations(List translations) { } @Column - @Convert(converter = DiseaseListConverter.class) - public List getDiseases() { + @Convert(converter = DiseaseSetConverter.class) + public Set getDiseases() { return diseases; } - public void setDiseases(List diseases) { + public void setDiseases(Set diseases) { this.diseases = diseases; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValueService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValueService.java index 7348b3ce4eb..1b3740d40ac 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValueService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumValueService.java @@ -21,8 +21,12 @@ import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.From; import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; +import de.symeda.sormas.api.customizableenum.CustomizableEnumCriteria; +import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.backend.common.AdoServiceWithUserFilterAndJurisdiction; +import de.symeda.sormas.backend.common.CriteriaBuilderHelper; @Stateless @LocalBean @@ -38,4 +42,32 @@ public Predicate createUserFilter(CriteriaBuilder cb, CriteriaQuery cq, From from) { + + Predicate filter = null; + + if (criteria.getFreeTextFilter() != null) { + String[] textFilters = criteria.getFreeTextFilter().split("\\s+"); + for (String textFilter : textFilters) { + if (DataHelper.isNullOrEmpty(textFilter)) { + continue; + } + + Predicate likeFilters = cb.or( + CriteriaBuilderHelper.unaccentedIlike(cb, from.get(CustomizableEnumValue.VALUE), textFilter), + CriteriaBuilderHelper.unaccentedIlike(cb, from.get(CustomizableEnumValue.CAPTION), textFilter)); + filter = CriteriaBuilderHelper.and(cb, filter, likeFilters); + } + } + if (criteria.getDataType() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(CustomizableEnumValue.DATA_TYPE), criteria.getDataType())); + } + if (criteria.getDisease() != null) { + filter = CriteriaBuilderHelper + .and(cb, filter, cb.like(from.get(CustomizableEnumValue.DISEASES).as(String.class), "%" + criteria.getDisease().name() + '%')); + } + + return filter; + } + } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/Document.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/Document.java index 0e0eb92f5b3..4985ea010b6 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/Document.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/Document.java @@ -37,7 +37,7 @@ public class Document extends AbstractDomainObject { public static final String DELETED = "deleted"; public static final String UPLOADING_USER = "uploadingUser"; public static final String NAME = "name"; - public static final String CONTENT_TYPE = "contentType"; + public static final String MIME_TYPE = "mimeType"; public static final String SIZE = "size"; public static final String RELATED_ENTITY_UUID = "relatedEntityUuid"; public static final String RELATED_ENTITY_TYPE = "relatedEntityType"; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentFacadeEjb.java index e356f59cd60..30dc136c6bc 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentFacadeEjb.java @@ -21,6 +21,7 @@ import java.io.InputStream; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; import javax.ejb.EJB; @@ -40,6 +41,7 @@ import de.symeda.sormas.api.document.DocumentCriteria; import de.symeda.sormas.api.document.DocumentDto; import de.symeda.sormas.api.document.DocumentFacade; +import de.symeda.sormas.api.document.DocumentReferenceDto; import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.api.utils.FileContentsDoNotMatchExtensionException; @@ -183,6 +185,11 @@ public List getDocumentsRelatedToEntity(DocumentRelatedEntityType t return documentService.getRelatedToEntity(type, uuid).stream().map(d -> convertToDto(d, pseudonymizer)).collect(Collectors.toList()); } + @Override + public List getReferencesRelatedToEntity(DocumentRelatedEntityType type, String uuid, Set fileExtensions) { + return documentService.getReferencesRelatedToEntity(type, uuid, fileExtensions); + } + @Override public Map> getDocumentsRelatedToEntities(DocumentCriteria criteria, List sortProperties) { Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentService.java index 70132b8b992..a45cc3378e5 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentService.java @@ -16,6 +16,7 @@ import java.util.ArrayList; import java.util.List; +import java.util.Set; import javax.ejb.LocalBean; import javax.ejb.Stateless; @@ -28,9 +29,11 @@ import javax.persistence.criteria.Root; import de.symeda.sormas.api.document.DocumentDto; +import de.symeda.sormas.api.document.DocumentReferenceDto; import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.utils.SortProperty; import de.symeda.sormas.backend.common.AdoServiceWithUserFilterAndJurisdiction; +import de.symeda.sormas.backend.common.CriteriaBuilderHelper; import de.symeda.sormas.backend.util.QueryHelper; @Stateless @@ -100,12 +103,7 @@ public List getRelatedToEntity(DocumentRelatedEntityType type, String Root from = cq.from(getElementClass()); from.fetch(Document.UPLOADING_USER); - Predicate filter = cb.and( - cb.isFalse(from.get(Document.DELETED)), - cb.equal(from.get(Document.RELATED_ENTITY_TYPE), type), - cb.equal(from.get(Document.RELATED_ENTITY_UUID), uuid)); - - cq.where(filter); + cq.where(buildRelatedEntityFilter(type, uuid, cb, from)); if (sortProperties != null && sortProperties.size() > 0) { List order = new ArrayList(sortProperties.size()); @@ -131,6 +129,38 @@ public List getRelatedToEntity(DocumentRelatedEntityType type, String return em.createQuery(cq).getResultList(); } + public List getReferencesRelatedToEntity(DocumentRelatedEntityType type, String uuid, Set fileExtensions) { + CriteriaBuilder cb = em.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(DocumentReferenceDto.class); + Root from = cq.from(getElementClass()); + + cq.multiselect(from.get(Document.UUID), from.get(Document.NAME)); + + cq.where(CriteriaBuilderHelper.and(cb, buildRelatedEntityFilter(type, uuid, cb, from), buildExtensionFilter(fileExtensions, cb, from))); + + cq.orderBy(cb.asc(cb.lower(from.get(DocumentDto.NAME)))); + + return em.createQuery(cq).getResultList(); + } + + private static Predicate buildRelatedEntityFilter(DocumentRelatedEntityType type, String uuid, CriteriaBuilder cb, Root from) { + return cb.and( + cb.isFalse(from.get(Document.DELETED)), + cb.equal(from.get(Document.RELATED_ENTITY_TYPE), type), + cb.equal(from.get(Document.RELATED_ENTITY_UUID), uuid)); + } + + private static Predicate buildExtensionFilter(Set fileExtensions, CriteriaBuilder cb, Root from) { + if (fileExtensions == null) { + return null; + } + + Predicate[] predicates = + fileExtensions.stream().map(extension -> cb.like(from.get(Document.NAME), "%" + extension)).toArray(Predicate[]::new); + + return cb.or(predicates); + } + public String isExisting(DocumentRelatedEntityType type, String uuid, String name) { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery cq = cb.createQuery(String.class); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentStorageService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentStorageService.java index 83f0055b74c..80d6e5770d6 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentStorageService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/document/DocumentStorageService.java @@ -14,6 +14,7 @@ */ package de.symeda.sormas.backend.document; +import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; @@ -25,6 +26,7 @@ import javax.ejb.LocalBean; import javax.ejb.Stateless; +import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,7 +55,16 @@ public class DocumentStorageService { private UserService userService; public byte[] read(String storageReference) throws IOException { - return Files.readAllBytes(Paths.get(configFacade.getDocumentFilesPath(), storageReference)); + return Files.readAllBytes(getFilePath(storageReference)); + } + + public File getFile(String storageReference) { + return getFilePath(storageReference).toFile(); + } + + @NotNull + private Path getFilePath(String storageReference) { + return Paths.get(configFacade.getDocumentFilesPath(), storageReference); } public String save(Document document, byte[] content) throws IOException { @@ -66,7 +77,7 @@ public String save(Document document, byte[] content) throws IOException { } public void delete(String storageReference) { - Path path = Paths.get(configFacade.getDocumentFilesPath(), storageReference); + Path path = getFilePath(storageReference); try { Files.deleteIfExists(path); } catch (IOException e) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/EnvironmentService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/EnvironmentService.java index 9f193bfc6e2..199498a56bf 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/EnvironmentService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/EnvironmentService.java @@ -90,36 +90,41 @@ public Predicate createUserFilter(EnvironmentQueryContext queryContext) { final EnvironmentJoins environmentJoins = queryContext.getJoins(); final From environmentJoin = queryContext.getRoot(); - if (jurisdictionLevel != JurisdictionLevel.NATION) { - switch (jurisdictionLevel) { - case REGION: - if (currentUser.getRegion() != null) { - filter = - CriteriaBuilderHelper.or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.REGION), currentUser.getRegion())); - } - break; - case DISTRICT: - if (currentUser.getDistrict() != null) { - filter = CriteriaBuilderHelper - .or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.DISTRICT), currentUser.getDistrict())); - } - break; - case COMMUNITY: - if (currentUser.getCommunity() != null) { - filter = CriteriaBuilderHelper - .or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.COMMUNITY), currentUser.getCommunity())); + if (currentUserHasRestrictedAccessToAssignedEntities()) { + filter = + CriteriaBuilderHelper.and(cb, filter, cb.equal(environmentJoin.get(Environment.RESPONSIBLE_USER).get(User.ID), currentUser.getId())); + } else { + if (jurisdictionLevel != JurisdictionLevel.NATION) { + switch (jurisdictionLevel) { + case REGION: + if (currentUser.getRegion() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.REGION), currentUser.getRegion())); + } + break; + case DISTRICT: + if (currentUser.getDistrict() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.DISTRICT), currentUser.getDistrict())); + } + break; + case COMMUNITY: + if (currentUser.getCommunity() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(environmentJoins.getLocation().get(Location.COMMUNITY), currentUser.getCommunity())); + } + break; + default: } - break; - default: - } - Predicate filterResponsible = cb.equal(environmentJoins.getRoot().get(Environment.REPORTING_USER), currentUser); - filterResponsible = cb.or(filterResponsible, cb.equal(environmentJoins.getRoot().get(Environment.RESPONSIBLE_USER), currentUser)); + Predicate filterResponsible = cb.equal(environmentJoins.getRoot().get(Environment.REPORTING_USER), currentUser); + filterResponsible = cb.or(filterResponsible, cb.equal(environmentJoins.getRoot().get(Environment.RESPONSIBLE_USER), currentUser)); - if (filter != null) { - filter = CriteriaBuilderHelper.or(cb, filter, filterResponsible, createEnvironmentSampleFilter(queryContext)); - } else { - filter = filterResponsible; + if (filter != null) { + filter = CriteriaBuilderHelper.or(cb, filter, filterResponsible, createEnvironmentSampleFilter(queryContext)); + } else { + filter = filterResponsible; + } } } @@ -398,6 +403,10 @@ public EditPermissionType getEditPermissionType(Environment environment) { return EditPermissionType.OUTSIDE_JURISDICTION; } + if (currentUserHasRestrictedAccessToAssignedEntities() && !DataHelper.equal(environment.getResponsibleUser(), getCurrentUser())) { + return EditPermissionType.REFUSED; + } + return super.getEditPermissionType(environment); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjb.java index 66383afc8a7..a53a5722469 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjb.java @@ -252,25 +252,31 @@ private void loadAndSetPositivePathogens(CriteriaBuilder cb, List samples) { + List sampleIds = samples.stream().map(EnvironmentSampleIndexDto::getId).collect(Collectors.toList()); - CriteriaQuery testCq = cb.createTupleQuery(); + CriteriaQuery testCq = cb.createQuery(Object[].class); Root testRoot = testCq.from(PathogenTest.class); Expression sampleIdExpr = testRoot.get(PathogenTest.ENVIRONMENT_SAMPLE).get(Sample.ID); - testCq.multiselect(testRoot.get(PathogenTest.TESTED_PATHOGEN), testRoot.get(PathogenTest.TEST_RESULT), sampleIdExpr); + testCq.multiselect( + testRoot.get(PathogenTest.TESTED_PATHOGEN), + testRoot.get(PathogenTest.TESTED_PATHOGEN_DETAILS), + testRoot.get(PathogenTest.TEST_RESULT), + sampleIdExpr); testCq.where(cb.isFalse(testRoot.get(PathogenTest.DELETED)), sampleIdExpr.in(sampleIds)); testCq.orderBy(cb.desc(testRoot.get(PathogenTest.CHANGE_DATE))); - List testList = em.createQuery(testCq).getResultList(); + List testList = em.createQuery(testCq).getResultList(); testList.stream() // collecting to map keyed by sample id, keeping the first result that is the latest test for each sample - .collect(Collectors.toMap(pathogenTest -> (Long) pathogenTest.get(2), Function.identity(), (t1, t2) -> t1)) + .collect(Collectors.toMap(pathogenTest -> (Long) pathogenTest[3], Function.identity(), (t1, t2) -> t1)) .forEach((sampleId, t) -> samples.stream().filter(s -> s.getId().equals(sampleId)).findFirst().ifPresent(s -> { - s.setLatestTestedPathogen((Pathogen) t.get(0)); - s.setLatestPathogenTestResult((PathogenTestResultType) t.get(1)); + s.setLatestTestedPathogen((Pathogen) t[0]); + s.setLatestTestedPathogenDetails((String) t[1]); + s.setLatestPathogenTestResult((PathogenTestResultType) t[2]); })); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleJurisdictionValidator.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleJurisdictionValidator.java index 695870eba73..5ca583b4a31 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleJurisdictionValidator.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleJurisdictionValidator.java @@ -24,6 +24,7 @@ import org.apache.commons.lang3.NotImplementedException; +import de.symeda.sormas.backend.environment.Environment; import de.symeda.sormas.backend.location.Location; import de.symeda.sormas.backend.user.User; import de.symeda.sormas.backend.util.PredicateJurisdictionValidator; @@ -45,13 +46,28 @@ public static EnvironmentSampleJurisdictionValidator of(EnvironmentSampleQueryCo return new EnvironmentSampleJurisdictionValidator(qc.getCriteriaBuilder(), user, qc.getJoins(), null); } - @Override - public Predicate isRootInJurisdictionOrOwned() { - final Predicate reportedByCurrentUser = cb.and( + public Predicate isRootInJurisdictionOrOwned(boolean currentHasUserRestrictedAccess) { + if (currentHasUserRestrictedAccess) { + final Predicate reportedByCurrentUser = getReportedByCurrentUserPredicate(); + final Predicate restrictedAccess = + cb.equal(joins.getEnvironment().get(Environment.RESPONSIBLE_USER).get(User.ID), user.getChangeUser().getId()); + return cb.or(reportedByCurrentUser, restrictedAccess); + } else { + return isRootInJurisdictionOrOwned(); + } + } + + private Predicate getReportedByCurrentUserPredicate() { + return cb.and( cb.isNotNull(joins.getRoot().get(EnvironmentSample.REPORTING_USER)), user != null ? cb.equal(joins.getRoot().get(EnvironmentSample.REPORTING_USER).get(User.ID), user.getId()) : cb.equal(joins.getRoot().get(EnvironmentSample.REPORTING_USER).get(User.ID), userPath.get(User.ID))); + } + + @Override + public Predicate isRootInJurisdictionOrOwned() { + final Predicate reportedByCurrentUser = getReportedByCurrentUserPredicate(); return cb.or(reportedByCurrentUser, isRootInJurisdiction()); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleService.java index e7974284352..d1793c97732 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleService.java @@ -194,6 +194,6 @@ public Predicate buildCriteriaFilter(EnvironmentSampleCriteria criteria, Environ private Predicate inJurisdictionOrOwned(CriteriaBuilder cb, CriteriaQuery cq, From from) { return EnvironmentSampleJurisdictionValidator .of(new EnvironmentSampleQueryContext(cb, cq, from, new EnvironmentSampleJoins(from)), userService.getCurrentUser()) - .isRootInJurisdictionOrOwned(); + .isRootInJurisdictionOrOwned(currentUserHasRestrictedAccessToAssignedEntities()); } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java index c387ede83e8..a6173b103d0 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java @@ -466,62 +466,67 @@ public Predicate createUserFilter(final EventQueryContext queryContext, final Ev final EventJoins eventJoins = queryContext.getJoins(); final From eventJoin = queryContext.getRoot(); - if (jurisdictionLevel != JurisdictionLevel.NATION) { - switch (jurisdictionLevel) { - case REGION: - if (currentUser.getRegion() != null) { - filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.REGION), currentUser.getRegion())); - } - break; - case DISTRICT: - if (currentUser.getDistrict() != null) { - filter = - CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.DISTRICT), currentUser.getDistrict())); - } - break; - case COMMUNITY: - if (currentUser.getCommunity() != null) { - filter = - CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.COMMUNITY), currentUser.getCommunity())); - } - break; - case HEALTH_FACILITY: - if (currentUser.getHealthFacility() != null && currentUser.getHealthFacility().getDistrict() != null) { - filter = CriteriaBuilderHelper - .or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.DISTRICT), currentUser.getHealthFacility().getDistrict())); + if (currentUserHasRestrictedAccessToAssignedEntities()) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(eventJoin.get(Event.RESPONSIBLE_USER).get(User.ID), currentUser.getId())); + } else { + if (jurisdictionLevel != JurisdictionLevel.NATION) { + switch (jurisdictionLevel) { + case REGION: + if (currentUser.getRegion() != null) { + filter = + CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.REGION), currentUser.getRegion())); + } + break; + case DISTRICT: + if (currentUser.getDistrict() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.DISTRICT), currentUser.getDistrict())); + } + break; + case COMMUNITY: + if (currentUser.getCommunity() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.COMMUNITY), currentUser.getCommunity())); + } + break; + case HEALTH_FACILITY: + if (currentUser.getHealthFacility() != null && currentUser.getHealthFacility().getDistrict() != null) { + filter = CriteriaBuilderHelper + .or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.DISTRICT), currentUser.getHealthFacility().getDistrict())); + } + break; + case LABORATORY: + final Subquery sampleSubQuery = cq.subquery(Long.class); + final Root sampleRoot = sampleSubQuery.from(Sample.class); + final SampleJoins sampleJoins = new SampleJoins(sampleRoot); + final Join eventParticipant = sampleJoins.getEventParticipant(); + final From eventParticipantJoin = eventJoins.getEventParticipants(); + SampleJurisdictionPredicateValidator sampleJurisdictionPredicateValidator = + SampleJurisdictionPredicateValidator.withoutAssociations(cb, sampleJoins, currentUser); + sampleSubQuery.where( + cb.and(cb.equal(eventParticipant, eventParticipantJoin), sampleJurisdictionPredicateValidator.inJurisdictionOrOwned())); + sampleSubQuery.select(sampleRoot.get(Sample.ID)); + filter = CriteriaBuilderHelper.or(cb, cb.exists(sampleSubQuery)); + break; + default: } - break; - case LABORATORY: - final Subquery sampleSubQuery = cq.subquery(Long.class); - final Root sampleRoot = sampleSubQuery.from(Sample.class); - final SampleJoins sampleJoins = new SampleJoins(sampleRoot); - final Join eventParticipant = sampleJoins.getEventParticipant(); - final From eventParticipantJoin = eventJoins.getEventParticipants(); - SampleJurisdictionPredicateValidator sampleJurisdictionPredicateValidator = - SampleJurisdictionPredicateValidator.withoutAssociations(cb, sampleJoins, currentUser); - sampleSubQuery - .where(cb.and(cb.equal(eventParticipant, eventParticipantJoin), sampleJurisdictionPredicateValidator.inJurisdictionOrOwned())); - sampleSubQuery.select(sampleRoot.get(Sample.ID)); - filter = CriteriaBuilderHelper.or(cb, cb.exists(sampleSubQuery)); - break; - default: - } - Predicate filterResponsible = cb.equal(eventJoins.getRoot().get(Event.REPORTING_USER), currentUser); - filterResponsible = cb.or(filterResponsible, cb.equal(eventJoins.getRoot().get(Event.RESPONSIBLE_USER), currentUser)); + Predicate filterResponsible = cb.equal(eventJoins.getRoot().get(Event.REPORTING_USER), currentUser); + filterResponsible = cb.or(filterResponsible, cb.equal(eventJoins.getRoot().get(Event.RESPONSIBLE_USER), currentUser)); - if (eventUserFilterCriteria != null && eventUserFilterCriteria.isIncludeUserCaseAndEventParticipantFilter()) { - filter = CriteriaBuilderHelper.or(cb, filter, createCaseAndEventParticipantFilter(queryContext)); - } + if (eventUserFilterCriteria != null && eventUserFilterCriteria.isIncludeUserCaseAndEventParticipantFilter()) { + filter = CriteriaBuilderHelper.or(cb, filter, createCaseAndEventParticipantFilter(queryContext)); + } - if (eventUserFilterCriteria != null && eventUserFilterCriteria.isForceRegionJurisdiction()) { - filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.REGION), currentUser.getRegion())); - } + if (eventUserFilterCriteria != null && eventUserFilterCriteria.isForceRegionJurisdiction()) { + filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(eventJoins.getLocation().get(Location.REGION), currentUser.getRegion())); + } - if (filter != null) { - filter = CriteriaBuilderHelper.or(cb, filter, filterResponsible); - } else { - filter = filterResponsible; + if (filter != null) { + filter = CriteriaBuilderHelper.or(cb, filter, filterResponsible); + } else { + filter = filterResponsible; + } } } @@ -1062,6 +1067,10 @@ public EditPermissionType getEditPermissionType(Event event) { return EditPermissionType.OUTSIDE_JURISDICTION; } + if (currentUserHasRestrictedAccessToAssignedEntities() && !DataHelper.equal(event.getResponsibleUser(), getCurrentUser())) { + return EditPermissionType.REFUSED; + } + if (sormasToSormasShareInfoService.isEventOwnershipHandedOver(event) || event.getSormasToSormasOriginInfo() != null && !event.getSormasToSormasOriginInfo().isOwnershipHandedOver()) { return EditPermissionType.WITHOUT_OWNERSHIP; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/AttachmentService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/AttachmentService.java new file mode 100644 index 00000000000..f73eecf2727 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/AttachmentService.java @@ -0,0 +1,201 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.externalemail; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.AbstractMap; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Random; +import java.util.Set; +import java.util.stream.Collectors; + +import javax.ejb.EJB; +import javax.ejb.LocalBean; +import javax.ejb.Stateless; + +import org.apache.pdfbox.Loader; +import org.apache.pdfbox.pdmodel.PDDocument; +import org.apache.pdfbox.pdmodel.encryption.AccessPermission; +import org.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy; +import org.apache.poi.xwpf.usermodel.XWPFDocument; + +import com.lowagie.text.Document; +import com.lowagie.text.DocumentException; +import com.lowagie.text.Image; +import com.lowagie.text.pdf.PdfWriter; + +import de.symeda.sormas.api.utils.DateHelper; +import de.symeda.sormas.backend.common.ConfigFacadeEjb; +import de.symeda.sormas.backend.document.DocumentService; +import de.symeda.sormas.backend.document.DocumentStorageService; +import fr.opensagres.poi.xwpf.converter.pdf.PdfOptions; + +@Stateless +@LocalBean +public class AttachmentService { + + public static final String DOCX_FILE_EXTENSION = ".docx"; + public static final String PDF_FILE_EXTENSION = ".pdf"; + public static final String IMAGE_FILE_EXTENSTIONS = ".jpg,.jpeg,.png,.gif"; + private static final String TEMP_FILE_PREFIX = "sormas_temp"; + private static final Random RANDOM = new Random(); + + @EJB + private DocumentService documentService; + @EJB + private DocumentStorageService documentStorageService; + @EJB + private ConfigFacadeEjb.ConfigFacadeEjbLocal configFacade; + + // @formatter:off + private final Map converters = Map.of( + DOCX_FILE_EXTENSION, new DocXConverter(), + IMAGE_FILE_EXTENSTIONS, new ImageConverter() + ); + // @formatter:on + + public Set getAttachableFileExtensions() { + return Set.of((PDF_FILE_EXTENSION + "," + DOCX_FILE_EXTENSION + "," + IMAGE_FILE_EXTENSTIONS).split(",")); + } + + public Map createEncryptedPdfs(List sormasDocuments, String password) { + return sormasDocuments.stream().map(d -> { + String fileName = d.getName(); + String fileExtension = fileName.substring(fileName.lastIndexOf(".")); + + try { + final File encryptedPdf; + File document = documentStorageService.getFile(d.getStorageReference()); + if (fileExtension.equals(PDF_FILE_EXTENSION)) { + encryptedPdf = encryptPdf(document, password); + } else { + PdfConverter converter = getConverter(fileExtension); + fileName = converter.getConvertedFileName(fileName); + File converted = converter.convert(document); + encryptedPdf = encryptPdf(converted, password); + converted.delete(); + } + + return new AbstractMap.SimpleEntry<>(encryptedPdf, fileName); + } catch (IOException e) { + // not really expected to happen + throw new RuntimeException(e); + } + }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } + + private File encryptPdf(File pdf, String password) throws IOException { + PDDocument pdd = Loader.loadPDF(pdf); + + AccessPermission ap = new AccessPermission(); + StandardProtectionPolicy stpp = new StandardProtectionPolicy(password, password, ap); + stpp.setEncryptionKeyLength(128); + stpp.setPermissions(ap); + pdd.protect(stpp); + + String encryptedFile = getTmpFilePathForConversion() + "_encrypted" + PDF_FILE_EXTENSION; + pdd.save(encryptedFile); + pdd.close(); + + return new File(encryptedFile); + } + + private PdfConverter getConverter(String fileExtension) { + Optional converterKey = converters.keySet().stream().filter(k -> k.contains(fileExtension)).findFirst(); + if (converterKey.isEmpty()) { + throw new IllegalArgumentException("No converter found for file extension " + fileExtension); + } + + return converters.get(converterKey.get()); + } + + private Path getTmpFilePathForConversion() { + Path path = Paths.get(configFacade.getTempFilesPath()); + String fileName = TEMP_FILE_PREFIX + "_converted_" + DateHelper.formatDateForExport(new Date()) + "_" + RANDOM.nextInt(Integer.MAX_VALUE); + + return path.resolve(fileName); + + } + + private interface PdfConverter { + + File convert(File file) throws IOException; + + default String getConvertedFileName(String fileName) { + return fileName.substring(0, fileName.lastIndexOf(".")) + PDF_FILE_EXTENSION; + } + } + + private class DocXConverter implements PdfConverter { + + @Override + public File convert(File file) throws IOException { + String convertedFilePath = getTmpFilePathForConversion() + PDF_FILE_EXTENSION; + try (InputStream inputStream = new FileInputStream(file); OutputStream outputStream = new FileOutputStream(convertedFilePath)) { + XWPFDocument document = new XWPFDocument(inputStream); + PdfOptions options = PdfOptions.create(); + // Convert .docx file to .pdf file + fr.opensagres.poi.xwpf.converter.pdf.PdfConverter.getInstance().convert(document, outputStream, options); + } catch (FileNotFoundException e) { + throw new RuntimeException(e); + } + + return new File(convertedFilePath); + } + } + + private class ImageConverter implements PdfConverter { + + @Override + public File convert(File file) throws IOException { + String convertedFilePath = getTmpFilePathForConversion() + PDF_FILE_EXTENSION; + + try (FileOutputStream fos = new FileOutputStream(convertedFilePath);) { + Document document = new Document(); + PdfWriter writer = PdfWriter.getInstance(document, fos); + + writer.open(); + document.open(); + + Image image = Image.getInstance(file.getPath()); + float scale = ((document.getPageSize().getWidth() - document.leftMargin() - document.rightMargin()) / image.getWidth()) * 100; + image.scalePercent(scale); + document.add(image); + + document.close(); + writer.close(); + } catch (DocumentException e) { + throw new RuntimeException(e); + } + + return new File(convertedFilePath); + } + } + +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjb.java index 450cbb1b05f..aba01f432fe 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjb.java @@ -1,26 +1,30 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package de.symeda.sormas.backend.externalemail; import static de.symeda.sormas.backend.docgeneration.DocumentTemplateFacadeEjb.splitTemplateContent; +import java.io.File; +import java.util.Collections; +import java.util.Date; import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.stream.Collectors; import javax.ejb.EJB; import javax.ejb.LocalBean; @@ -28,29 +32,71 @@ import javax.mail.MessagingException; import javax.validation.Valid; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.text.RandomStringGenerator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import de.symeda.sormas.api.CountryHelper; +import de.symeda.sormas.api.caze.CaseReferenceDto; +import de.symeda.sormas.api.contact.ContactReferenceDto; +import de.symeda.sormas.api.docgeneneration.DocumentTemplateEntities; import de.symeda.sormas.api.docgeneneration.DocumentTemplateException; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; import de.symeda.sormas.api.docgeneneration.DocumentWorkflowType; import de.symeda.sormas.api.docgeneneration.RootEntityType; +import de.symeda.sormas.api.document.DocumentReferenceDto; +import de.symeda.sormas.api.document.DocumentRelatedEntityType; +import de.symeda.sormas.api.event.EventParticipantReferenceDto; import de.symeda.sormas.api.externalemail.ExternalEmailException; import de.symeda.sormas.api.externalemail.ExternalEmailFacade; import de.symeda.sormas.api.externalemail.ExternalEmailOptionsDto; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.api.person.PersonReferenceDto; +import de.symeda.sormas.api.travelentry.TravelEntryReferenceDto; +import de.symeda.sormas.api.utils.DataHelper.Pair; +import de.symeda.sormas.api.utils.ValidationRuntimeException; +import de.symeda.sormas.backend.caze.CaseService; +import de.symeda.sormas.backend.common.ConfigFacadeEjb.ConfigFacadeEjbLocal; import de.symeda.sormas.backend.common.messaging.EmailService; +import de.symeda.sormas.backend.common.messaging.MessagingService; +import de.symeda.sormas.backend.common.messaging.NotificationDeliveryFailedException; +import de.symeda.sormas.backend.contact.ContactService; import de.symeda.sormas.backend.docgeneration.DocumentTemplateEntitiesBuilder; import de.symeda.sormas.backend.docgeneration.DocumentTemplateFacadeEjb; import de.symeda.sormas.backend.docgeneration.DocumentTemplateFacadeEjb.EmailTemplateTexts; import de.symeda.sormas.backend.docgeneration.RootEntities; +import de.symeda.sormas.backend.document.Document; +import de.symeda.sormas.backend.document.DocumentFacadeEjb.DocumentFacadeEjbLocal; +import de.symeda.sormas.backend.document.DocumentService; +import de.symeda.sormas.backend.document.DocumentStorageService; +import de.symeda.sormas.backend.event.EventParticipantService; +import de.symeda.sormas.backend.externalemail.luxembourg.NationalHealthIdValidator; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLog; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogService; +import de.symeda.sormas.backend.person.Person; +import de.symeda.sormas.backend.person.PersonService; +import de.symeda.sormas.backend.travelentry.services.TravelEntryService; +import de.symeda.sormas.backend.user.User; import de.symeda.sormas.backend.user.UserService; @Stateless(name = "ExternalEmailFacade") public class ExternalEmailFacadeEjb implements ExternalEmailFacade { private static final Logger logger = LoggerFactory.getLogger(ExternalEmailFacadeEjb.class); + public static final int ATTACHMENT_PASSWORD_LENGTH = 10; + // @formatter:off + private static final Map DOCUMENT_WORKFLOW_DOCUMENT_RELATION_MAPPING = Map.of( + DocumentWorkflow.CASE_EMAIL, DocumentRelatedEntityType.CASE, + DocumentWorkflow.CONTACT_EMAIL, DocumentRelatedEntityType.CONTACT, + DocumentWorkflow.TRAVEL_ENTRY_EMAIL, DocumentRelatedEntityType.TRAVEL_ENTRY + ); + // @formatter:on + @EJB private DocumentTemplateFacadeEjb.DocumentTemplateFacadeEjbLocal documentTemplateFacade; @EJB @@ -59,30 +105,163 @@ public class ExternalEmailFacadeEjb implements ExternalEmailFacade { private EmailService emailService; @EJB private UserService userService; + @EJB + private DocumentFacadeEjbLocal documentFacade; + @EJB + private DocumentService documentService; + @EJB + private DocumentStorageService documentStorageService; + @EJB + private AttachmentService attachmentService; + @EJB + private PersonService personService; + @EJB + private ConfigFacadeEjbLocal configFacade; + @EJB + private MessagingService messagingService; + @EJB + private CaseService caseService; + @EJB + private ContactService contactService; + @EJB + private EventParticipantService eventParticipantService; + @EJB + private TravelEntryService travelEntryService; + @EJB + private ManualMessageLogService manualMessageLogService; @Override public List getTemplateNames(DocumentWorkflow documentWorkflow) { return documentTemplateFacade.getAvailableTemplates(documentWorkflow); } + @Override + public List getAttachableDocuments(DocumentWorkflow documentWorkflow, String relatedEntityUuid) { + DocumentRelatedEntityType relatedEntityType = DOCUMENT_WORKFLOW_DOCUMENT_RELATION_MAPPING.get(documentWorkflow); + if (relatedEntityType == null) { + throw new IllegalArgumentException("Documents not supported for the given workflow"); + } + + return documentFacade.getReferencesRelatedToEntity(relatedEntityType, relatedEntityUuid, attachmentService.getAttachableFileExtensions()); + } + @Override public void sendEmail(@Valid ExternalEmailOptionsDto options) throws DocumentTemplateException, ExternalEmailException { validateOptions(options); - String generatedText = documentTemplateFacade.generateDocumentTxtFromEntities( - options.getDocumentWorkflow(), - options.getTemplateName(), - templateEntitiesBuilder.resolveEntities( + + User currentUser = userService.getCurrentUser(); + DocumentTemplateEntities documentEntities = templateEntitiesBuilder.resolveEntities( new RootEntities().addReference(options.getRootEntityType(), options.getRootEntityReference()) - .addEntity(RootEntityType.ROOT_USER, userService.getCurrentUser())), - null); + .addEntity(RootEntityType.ROOT_USER, currentUser)); + + PersonReferenceDto personRef = (PersonReferenceDto) documentEntities.getEntity(RootEntityType.ROOT_PERSON); + Person person = personService.getByReferenceDto(personRef); + + Map attachments = Collections.emptyMap(); + Set attachedDocuments = options.getAttachedDocuments(); + List sormasDocuments = Collections.emptyList(); + + String password = null; + PasswordType passwordType = null; + if (CollectionUtils.isNotEmpty(attachedDocuments)) { + Pair passwordAndType = getPassword(person); + password = passwordAndType.getElement0(); + passwordType = passwordAndType.getElement1(); + + List documentUuids = attachedDocuments.stream().map(DocumentReferenceDto::getUuid).collect(Collectors.toList()); + sormasDocuments = documentService.getByUuids(documentUuids); + validateAttachedDocuments(sormasDocuments, options); + + attachments = attachmentService.createEncryptedPdfs(sormasDocuments, password); + } + + String generatedText = + documentTemplateFacade.generateDocumentTxtFromEntities(options.getDocumentWorkflow(), options.getTemplateName(), documentEntities, null); EmailTemplateTexts emailTexts = splitTemplateContent(generatedText); try { - emailService.sendEmail(options.getRecipientEmail(), emailTexts.getSubject(), emailTexts.getContent()); - } catch (MessagingException e) { + emailService.sendEmail(options.getRecipientEmail(), emailTexts.getSubject(), emailTexts.getContent(), attachments); + + if (passwordType == PasswordType.RANDOM) { + messagingService.sendManualMessage( + person, + null, + String.format(I18nProperties.getString(Strings.messageExternalEmailAttachmentPassword), password), + MessageType.SMS); + } + } catch (MessagingException | NotificationDeliveryFailedException e) { logger.error("Error sending email", e); throw new ExternalEmailException(I18nProperties.getString(Strings.errorSendingExternalEmail)); } + + attachments.keySet().forEach(File::delete); + manualMessageLogService.ensurePersisted(createMessageLog(options, person.toReference(), currentUser, sormasDocuments)); + } + + private static void validateAttachedDocuments(List sormasDocuments, ExternalEmailOptionsDto options) { + DocumentRelatedEntityType documentRelatedEntityType = DOCUMENT_WORKFLOW_DOCUMENT_RELATION_MAPPING.get(options.getDocumentWorkflow()); + if (sormasDocuments.stream() + .anyMatch( + d -> d.getRelatedEntityType() != documentRelatedEntityType + && !Objects.equals(d.getRelatedEntityUuid(), options.getRootEntityReference().getUuid()))) { + throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.attachedDocumentNotRelatedToEntity)); + } + } + + @Override + public boolean isAttachmentAvailable(PersonReferenceDto personReferenceDto) { + Person person = personService.getByReferenceDto(personReferenceDto); + + return getApplicablePasswordType(person) != PasswordType.NONE; + } + + private PasswordType getApplicablePasswordType(Person person) { + String nationalHealthId = person.getNationalHealthId(); + boolean canSendSms = configFacade.isSmsServiceSetUp() && person.getPhone() != null; + + if (configFacade.isConfiguredCountry(CountryHelper.COUNTRY_CODE_LUXEMBOURG)) { + if (isValidLuxembourgNationalHealthId(nationalHealthId, person)) { + return PasswordType.HEALTH_ID; + } + + return canSendSms ? PasswordType.RANDOM : PasswordType.NONE; + } else { + if (nationalHealthId != null) { + return PasswordType.HEALTH_ID; + } + + return canSendSms ? PasswordType.RANDOM : PasswordType.NONE; + } + } + + private Pair getPassword(Person person) throws ExternalEmailException { + PasswordType passwordType = getApplicablePasswordType(person); + + switch (passwordType) { + case HEALTH_ID: + return new Pair<>(person.getNationalHealthId(), passwordType); + case RANDOM: + return new Pair<>(generateRandomPassword(), passwordType); + case NONE: + default: + throw new ExternalEmailException(I18nProperties.getString(Strings.errorExternalEmailAttachmentCannotEncrypt)); + } + } + + private static String generateRandomPassword() { + return new RandomStringGenerator.Builder().withinRange( + new char[]{ + 'a', + 'z'}, + new char[]{ + 'A', + 'Z'}, + new char[]{ + '2', + '9'}) + .filteredBy(codePoint -> !"lIO".contains(String.valueOf((char) codePoint))) + .build() + .generate(ATTACHMENT_PASSWORD_LENGTH); } private static void validateOptions(ExternalEmailOptionsDto options) { @@ -92,8 +271,58 @@ private static void validateOptions(ExternalEmailOptionsDto options) { } } + private ManualMessageLog createMessageLog( + ExternalEmailOptionsDto options, + PersonReferenceDto personRef, + User currentUser, + List attachedDocuments) { + ManualMessageLog log = new ManualMessageLog(); + + log.setMessageType(MessageType.EMAIL); + log.setSendingUser(currentUser); + log.setRecipientPerson(personService.getByReferenceDto(personRef)); + log.setSentDate(new Date()); + log.setEmailAddress(options.getRecipientEmail()); + log.setUsedTemplate(options.getTemplateName()); + log.setAttachedDocuments(attachedDocuments.stream().map(Document::getName).collect(Collectors.toList())); + + // `*Service::getByReferenceDto` does a null check, so we don't need to do it here + log.setCaze(caseService.getByReferenceDto(getRootEntityReference(options, RootEntityType.ROOT_CASE, CaseReferenceDto.class))); + log.setContact(contactService.getByReferenceDto(getRootEntityReference(options, RootEntityType.ROOT_CONTACT, ContactReferenceDto.class))); + log.setEventParticipant( + eventParticipantService + .getByReferenceDto(getRootEntityReference(options, RootEntityType.ROOT_EVENT_PARTICIPANT, EventParticipantReferenceDto.class))); + log.setTravelEntry( + travelEntryService.getByReferenceDto(getRootEntityReference(options, RootEntityType.ROOT_TRAVEL_ENTRY, TravelEntryReferenceDto.class))); + + return log; + } + + private static T getRootEntityReference(ExternalEmailOptionsDto options, RootEntityType rootEntityType, Class referenceClass) { + if (options.getRootEntityType() == rootEntityType) { + return referenceClass.cast(options.getRootEntityReference()); + } + + return null; + } + + private static boolean isValidLuxembourgNationalHealthId(String nationalHealthId, Person person) { + + if (StringUtils.isEmpty(nationalHealthId)) { + return false; + } + + return NationalHealthIdValidator.isValid(nationalHealthId, person); + } + @Stateless @LocalBean public static class ExternalEmailFacadeEjbLocal extends ExternalEmailFacadeEjb { } + + private enum PasswordType { + HEALTH_ID, + RANDOM, + NONE + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitLuhn.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitLuhn.java new file mode 100644 index 00000000000..698b79ce1b3 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitLuhn.java @@ -0,0 +1,72 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.externalemail.luxembourg; + +/** + * Apply Luhn algorithm to compute check digit + * This algorithm is used to compute the first check digit + * during extended unique id generation + * + * @author Ciedmdr + */ +public class CheckDigitLuhn { + + /** + * Computes the checksum C according Luhn algorithm + *

+ * Bases légales : + * 1 Règlement grand-ducal du 16 mars 1994 + * 2 Loi du 19 juin 2013 relative à l'identification des personnes physiques + * + * @param String charset to compute Luhn check digit + * @return the check digit + */ + public static int computeCheckDigit(String iNumber) { + int checkSum = 0; + int weight = 0; + int weightedDigit = 0; + for (int pos = 0; pos < iNumber.length(); pos++) { + weight = (pos % 2 == 0) ? 2 : 1; + weightedDigit = Character.digit(iNumber.charAt(iNumber.length() - pos - 1), 10) * weight; + checkSum += (weightedDigit > 9 ? weightedDigit - 9 : weightedDigit); + } + return (10 - checkSum % 10) % 10; + } + + /** + * Verify the number in parameter (11 DIGITS + Luhn check digit = 12 DIGITS) + * + * @param iNumber + * @return true if checked + */ + public static boolean checkDigit(String iNumber) { + int checkSum = 0; + int weight = 0; + int weightedDigit = 0; + for (int pos = 0; pos < iNumber.length(); pos++) { + weight = (pos % 2 == 0) ? 1 : 2; + weightedDigit = Character.digit(iNumber.charAt(iNumber.length() - pos - 1), 10) * weight; + checkSum += (weightedDigit > 9 ? weightedDigit - 9 : weightedDigit); + } + if (checkSum % 10 == 0) + return true; + else + return false; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitVerhoeff.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitVerhoeff.java new file mode 100644 index 00000000000..c34cc70d58d --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/CheckDigitVerhoeff.java @@ -0,0 +1,286 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.externalemail.luxembourg; + +/** + * Apply Verhoeff algorithm to compute check digit + * This algorithm is used to compute the second check digit during extended unique id generation + * + * @author Ciedmdr + */ +public class CheckDigitVerhoeff { + + private static int inv(int iPos) { + int invTable[] = { + 0, + 4, + 3, + 2, + 1, + 5, + 6, + 7, + 8, + 9}; + return invTable[iPos]; + } + + private static int d(int j, int k) { + int dTable[][] = { + { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9}, + { + 1, + 2, + 3, + 4, + 0, + 6, + 7, + 8, + 9, + 5}, + { + 2, + 3, + 4, + 0, + 1, + 7, + 8, + 9, + 5, + 6}, + { + 3, + 4, + 0, + 1, + 2, + 8, + 9, + 5, + 6, + 7}, + { + 4, + 0, + 1, + 2, + 3, + 9, + 5, + 6, + 7, + 8}, + { + 5, + 9, + 8, + 7, + 6, + 0, + 4, + 3, + 2, + 1}, + { + 6, + 5, + 9, + 8, + 7, + 1, + 0, + 4, + 3, + 2}, + { + 7, + 6, + 5, + 9, + 8, + 2, + 1, + 0, + 4, + 3}, + { + 8, + 7, + 6, + 5, + 9, + 3, + 2, + 1, + 0, + 4}, + { + 9, + 8, + 7, + 6, + 5, + 4, + 3, + 2, + 1, + 0}}; + return dTable[j][k]; + } + + private static int p(int i, int Ni) { + int pTable[][] = { + { + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9}, + { + 1, + 5, + 7, + 6, + 2, + 8, + 3, + 0, + 9, + 4}, + { + 5, + 8, + 0, + 3, + 7, + 9, + 6, + 1, + 4, + 2}, + { + 8, + 9, + 1, + 6, + 0, + 4, + 3, + 5, + 2, + 7}, + { + 9, + 4, + 5, + 3, + 1, + 2, + 6, + 8, + 7, + 0}, + { + 4, + 2, + 8, + 6, + 5, + 7, + 3, + 9, + 0, + 1}, + { + 2, + 7, + 9, + 3, + 8, + 0, + 6, + 4, + 1, + 5}, + { + 7, + 0, + 4, + 6, + 9, + 1, + 3, + 2, + 5, + 8}}; + return pTable[i % 8][Ni]; + } + + /** + * Computes the checksum C as + * C = inv(F_n (a_n)×F_(n-1) (a_(n-1) )×… ×F_1 (a_1 ) ) + * (with × being the multiplication in D_5) + * + * @param String charset to compute Verhoeff check digit + * @return the check digit + */ + public static int computeCheckDigit(String iNumber) { + int checkSum = 0; + for (int pos = 0; pos < iNumber.length(); pos++) { + checkSum = d(checkSum, p(pos + 1, Character.digit(iNumber.charAt(iNumber.length() - pos - 1), 10))); + } + return inv(checkSum); + } + + /** + * Verify the number in parameter (11 DIGITS + Verhoeff check digit = 12 DIGITS) + * The verification computes and verified the following equation + * (F_n (a_n )×F_(n-1) (a_(n-1) )×…×F_1 (a_1 )×C) = 0 + * + * @param iNumber + * @return true if checked + */ + public static boolean checkDigit(String iNumber) { + int checkSum = 0; + for (int pos = 0; pos < iNumber.length(); pos++) { + checkSum = d(checkSum, p(pos, Character.digit(iNumber.charAt(iNumber.length() - pos - 1), 10))); + } + if (checkSum == 0) { + return true; + } + return false; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidator.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidator.java new file mode 100644 index 00000000000..cbb3e995f4e --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidator.java @@ -0,0 +1,72 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.externalemail.luxembourg; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import de.symeda.sormas.backend.person.Person; + +public class NationalHealthIdValidator { + + /** + * - AAAA = année de naissance + * - MM = mois de naissance + * - JJ = jour de naissance + * - XXX = numéro aléatoire unique par date de naissance + * - C1 = numéro de contrôle calculé sur AAAAMMJJXXX suivant l’algorithme LUHN 10 + * - C2 = numéro de contrôle calculé sur AAAAMMJJXXX suivant l’algorithme VERHOEFF + */ + private static final Pattern NATIONAL_HEALTH_ID_PATTERN = Pattern.compile("(\\d{4})(\\d{2})(\\d{2})(\\d{3})(\\d)(\\d)"); + + public static boolean isValid(String nationalHealthId, Person person) { + if (nationalHealthId == null) { + return false; + } + + Matcher patternMatcher = NATIONAL_HEALTH_ID_PATTERN.matcher(nationalHealthId); + if (!patternMatcher.matches()) { + return false; + } + + String yyyy = patternMatcher.group(1); + String mm = patternMatcher.group(2); + String dd = patternMatcher.group(3); + String xxx = patternMatcher.group(4); + String c1 = patternMatcher.group(5); + String c2 = patternMatcher.group(6); + + if (isNullOrEquals(person.getBirthdateYYYY(), Integer.parseInt(yyyy)) + && isNullOrEquals(person.getBirthdateMM(), Integer.parseInt(mm)) + && isNullOrEquals(person.getBirthdateDD(), Integer.parseInt(dd))) { + String iNumber = yyyy + mm + dd + xxx; + + if (CheckDigitLuhn.checkDigit(iNumber + c1) && CheckDigitVerhoeff.checkDigit(iNumber + c2)) { + return true; + } + } + + return false; + } + + private static boolean isNullOrEquals(Integer personBirthdateFieldValue, int yyyy) { + return personBirthdateFieldValue == null || personBirthdateFieldValue == yyyy; + } + +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageJurisdictionPredicateValidator.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageJurisdictionPredicateValidator.java new file mode 100644 index 00000000000..1af826fbde6 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageJurisdictionPredicateValidator.java @@ -0,0 +1,98 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import java.util.Set; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Predicate; + +import de.symeda.sormas.api.person.PersonAssociation; +import de.symeda.sormas.backend.person.PersonJoins; +import de.symeda.sormas.backend.person.PersonJurisdictionPredicateValidator; +import de.symeda.sormas.backend.user.User; +import de.symeda.sormas.backend.util.PredicateJurisdictionValidator; + +public class ManualMessageJurisdictionPredicateValidator extends PredicateJurisdictionValidator { + + private PersonJurisdictionPredicateValidator personJurisdictionValidator; + + public ManualMessageJurisdictionPredicateValidator( + CriteriaQuery cq, + CriteriaBuilder cb, + User user, + PersonJoins personJoins, + Set permittedPersonAssociations) { + super(cb, user, null, null); + personJurisdictionValidator = PersonJurisdictionPredicateValidator.of(cq, cb, personJoins, user, permittedPersonAssociations); + } + + @Override + public Predicate inJurisdictionOrOwned() { + return personJurisdictionValidator.inJurisdictionOrOwned(); + } + + @Override + public Predicate inJurisdiction() { + return personJurisdictionValidator.inJurisdiction(); + } + + @Override + public Predicate isRootInJurisdictionOrOwned() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenNotAllowed() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenNationalLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenRegionalLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenDistrictLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenCommunityLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenFacilityLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenPointOfEntryLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } + + @Override + protected Predicate whenLaboratoryLevel() { + throw new UnsupportedOperationException("Jurisdiction validation should woprk through person"); + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLog.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLog.java new file mode 100644 index 00000000000..e19878ab8b8 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLog.java @@ -0,0 +1,175 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import java.util.Date; +import java.util.List; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.hibernate.annotations.Type; + +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.api.utils.FieldConstraints; +import de.symeda.sormas.backend.caze.Case; +import de.symeda.sormas.backend.common.AbstractDomainObject; +import de.symeda.sormas.backend.contact.Contact; +import de.symeda.sormas.backend.event.EventParticipant; +import de.symeda.sormas.backend.person.Person; +import de.symeda.sormas.backend.travelentry.TravelEntry; +import de.symeda.sormas.backend.user.User; +import de.symeda.sormas.backend.util.ModelConstants; + +@Entity +public class ManualMessageLog extends AbstractDomainObject { + + public static final String TABLE_NAME = "manualmessagelog"; + + public static final String MESSAGE_TYPE = "messageType"; + public static final String SENT_DATE = "sentDate"; + public static final String SENDING_USER = "sendingUser"; + public static final String RECIPIENT_PERSON = "recipientPerson"; + public static final String EMAIL_ADDRESS = "emailAddress"; + public static final String USED_TEMPLATE = "usedTemplate"; + public static final String ATTACHED_DOCUMENTS = "attachedDocuments"; + + public static final String CASE = "caze"; + public static final String CONTACT = "contact"; + public static final String EVENT_PARTICIPANT = "eventParticipant"; + public static final String TRAVEL_ENTRY = "travelEntry"; + + private MessageType messageType; + private Date sentDate; + private User sendingUser; + private Person recipientPerson; + private String emailAddress; + private String usedTemplate; + private List attachedDocuments; + private Case caze; + private Contact contact; + private EventParticipant eventParticipant; + private TravelEntry travelEntry; + + @Enumerated(EnumType.STRING) + public MessageType getMessageType() { + return messageType; + } + + public void setMessageType(MessageType messageType) { + this.messageType = messageType; + } + + @Temporal(TemporalType.TIMESTAMP) + public Date getSentDate() { + return sentDate; + } + + public void setSentDate(Date sentDate) { + this.sentDate = sentDate; + } + + @ManyToOne(cascade = {}, fetch = FetchType.LAZY) + @JoinColumn(nullable = false) + public User getSendingUser() { + return sendingUser; + } + + public void setSendingUser(User sendingUser) { + this.sendingUser = sendingUser; + } + + @ManyToOne(cascade = {}) + @JoinColumn(nullable = false) + public Person getRecipientPerson() { + return recipientPerson; + } + + public void setRecipientPerson(Person recipientPerson) { + this.recipientPerson = recipientPerson; + } + + @Column(length = FieldConstraints.CHARACTER_LIMIT_DEFAULT) + public String getEmailAddress() { + return emailAddress; + } + + public void setEmailAddress(String emailAddress) { + this.emailAddress = emailAddress; + } + + @Column(length = FieldConstraints.CHARACTER_LIMIT_BIG) + public String getUsedTemplate() { + return usedTemplate; + } + + public void setUsedTemplate(String usedTemplate) { + this.usedTemplate = usedTemplate; + } + + @Type(type = ModelConstants.HIBERNATE_TYPE_JSON) + @Column(columnDefinition = ModelConstants.COLUMN_DEFINITION_JSON) + public List getAttachedDocuments() { + return attachedDocuments; + } + + public void setAttachedDocuments(List attachedDocuments) { + this.attachedDocuments = attachedDocuments; + } + + @ManyToOne(fetch = FetchType.LAZY) + public Case getCaze() { + return caze; + } + + public void setCaze(Case caze) { + this.caze = caze; + } + + @ManyToOne(fetch = FetchType.LAZY) + public Contact getContact() { + return contact; + } + + public void setContact(Contact contact) { + this.contact = contact; + } + + @ManyToOne(fetch = FetchType.LAZY) + public EventParticipant getEventParticipant() { + return eventParticipant; + } + + public void setEventParticipant(EventParticipant eventParticipant) { + this.eventParticipant = eventParticipant; + } + + @ManyToOne(fetch = FetchType.LAZY) + public TravelEntry getTravelEntry() { + return travelEntry; + } + + public void setTravelEntry(TravelEntry travelEntry) { + this.travelEntry = travelEntry; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjb.java new file mode 100644 index 00000000000..87dedf60574 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjb.java @@ -0,0 +1,107 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import java.util.List; + +import javax.ejb.EJB; +import javax.ejb.LocalBean; +import javax.ejb.Stateless; +import javax.persistence.EntityManager; +import javax.persistence.PersistenceContext; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; + +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogFacade; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogIndexDto; +import de.symeda.sormas.api.user.UserRight; +import de.symeda.sormas.backend.user.User; +import de.symeda.sormas.backend.user.UserService; +import de.symeda.sormas.backend.util.JurisdictionHelper; +import de.symeda.sormas.backend.util.ModelConstants; +import de.symeda.sormas.backend.util.Pseudonymizer; +import de.symeda.sormas.backend.util.RightsAllowed; + +@Stateless(name = "ManualMessageLogFacade") +public class ManualMessageLogFacadeEjb implements ManualMessageLogFacade { + + @PersistenceContext(unitName = ModelConstants.PERSISTENCE_UNIT_NAME) + protected EntityManager em; + + @EJB + private ManualMessageLogService manualMessageLogService; + @EJB + private UserService userService; + + @RightsAllowed({ + UserRight._SEND_MANUAL_EXTERNAL_MESSAGES, + UserRight._EXTERNAL_EMAIL_SEND}) + public List getIndexList(ManualMessageLogCriteria criteria) { + + final CriteriaBuilder cb = em.getCriteriaBuilder(); + final CriteriaQuery cq = cb.createQuery(ManualMessageLogIndexDto.class); + final Root root = cq.from(ManualMessageLog.class); + + ManualMessageLogJoins joins = new ManualMessageLogJoins(root); + + cq.multiselect( + root.get(ManualMessageLog.UUID), + root.get(ManualMessageLog.MESSAGE_TYPE), + root.get(ManualMessageLog.SENT_DATE), + joins.getSendingUser().get(User.UUID), + joins.getSendingUser().get(User.FIRST_NAME), + joins.getSendingUser().get(User.LAST_NAME), + root.get(ManualMessageLog.EMAIL_ADDRESS), + root.get(ManualMessageLog.USED_TEMPLATE), + root.get(ManualMessageLog.ATTACHED_DOCUMENTS), + JurisdictionHelper.booleanSelector(cb, manualMessageLogService.inJurisdictionOrOwned(cq, cb, root)), + JurisdictionHelper.booleanSelector(cb, userService.inJurisdictionOrOwned(cb, joins.getSendungUserJoins()))); + + Predicate filter = manualMessageLogService.buildCriteriaFilter(criteria, root, cb); + if (filter != null) { + cq.where(filter); + } + + cq.orderBy(cb.desc(root.get(ManualMessageLog.SENT_DATE))); + // distinct needed because of the jurisdiction selection, + // it can bring multiple results for one manual message log because the person has multiple assigned entities that can have email + cq.distinct(true); + + List resultList = em.createQuery(cq).getResultList(); + + Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue)); + pseudonymizer.pseudonymizeDtoCollection( + ManualMessageLogIndexDto.class, + resultList, + ManualMessageLogIndexDto::isInJurisdiction, + (m, inJurisdiction) -> { + pseudonymizer.pseudonymizeUser(m.isSenderInJurisdiction(), m::setSendingUser); + }); + + return resultList; + } + + @LocalBean + @Stateless + public static class ManualMessageLogFacadeEjbLocal extends ManualMessageLogFacadeEjb { + + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogJoins.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogJoins.java new file mode 100644 index 00000000000..ac9557a4421 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogJoins.java @@ -0,0 +1,53 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import javax.persistence.criteria.From; +import javax.persistence.criteria.Join; +import javax.persistence.criteria.JoinType; + +import de.symeda.sormas.backend.common.QueryJoins; +import de.symeda.sormas.backend.user.User; +import de.symeda.sormas.backend.user.UserJoins; + +public class ManualMessageLogJoins extends QueryJoins { + + private Join sendingUser; + private UserJoins sendingUserJoins; + + public ManualMessageLogJoins(From root) { + super(root); + } + + public Join getSendingUser() { + return getOrCreate(sendingUser, ManualMessageLog.SENDING_USER, JoinType.LEFT, this::setSendingUser); + } + + private void setSendingUser(Join sendingUser) { + this.sendingUser = sendingUser; + } + + public UserJoins getSendungUserJoins() { + return getOrCreate(sendingUserJoins, () -> new UserJoins(getSendingUser()), this::setSendingUserJoins); + } + + private void setSendingUserJoins(UserJoins sendingUserJoins) { + this.sendingUserJoins = sendingUserJoins; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogService.java new file mode 100644 index 00000000000..298f745cae0 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogService.java @@ -0,0 +1,128 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import java.util.List; + +import javax.ejb.EJB; +import javax.ejb.LocalBean; +import javax.ejb.Stateless; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; +import javax.validation.constraints.NotNull; + +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.backend.caze.Case; +import de.symeda.sormas.backend.common.BaseAdoService; +import de.symeda.sormas.backend.contact.Contact; +import de.symeda.sormas.backend.event.EventParticipant; +import de.symeda.sormas.backend.person.Person; +import de.symeda.sormas.backend.person.PersonJoins; +import de.symeda.sormas.backend.person.PersonService; +import de.symeda.sormas.backend.travelentry.TravelEntry; +import de.symeda.sormas.backend.user.User; +import de.symeda.sormas.backend.user.UserService; + +import static de.symeda.sormas.backend.common.CriteriaBuilderHelper.and; + +@Stateless +@LocalBean +public class ManualMessageLogService extends BaseAdoService { + + public static final int MANUAL_MESSAGE_LOG_LIMIT = 5; + + @EJB + private UserService userService; + @EJB + private PersonService personService; + + public ManualMessageLogService() { + super(ManualMessageLog.class); + } + + public List getByPersonUuid(@NotNull String personUuid, MessageType messageType) { + + final CriteriaBuilder cb = em.getCriteriaBuilder(); + final CriteriaQuery cq = cb.createQuery(ManualMessageLog.class); + final Root manualMessageLogRoot = cq.from(ManualMessageLog.class); + + final Predicate filter = cb.and( + cb.equal(manualMessageLogRoot.get(ManualMessageLog.RECIPIENT_PERSON).get(Person.UUID), personUuid), + cb.equal(manualMessageLogRoot.get(ManualMessageLog.MESSAGE_TYPE), messageType)); + + cq.where(filter); + cq.orderBy(cb.desc(manualMessageLogRoot.get(ManualMessageLog.SENT_DATE))); + + return em.createQuery(cq).setMaxResults(MANUAL_MESSAGE_LOG_LIMIT).getResultList(); + } + + public List getByPersonUuid(@NotNull String personUuid) { + + final CriteriaBuilder cb = em.getCriteriaBuilder(); + final CriteriaQuery cq = cb.createQuery(ManualMessageLog.class); + final Root manualMessageLogRoot = cq.from(ManualMessageLog.class); + + cq.where(cb.equal(manualMessageLogRoot.get(ManualMessageLog.RECIPIENT_PERSON).get(Person.UUID), personUuid)); + cq.orderBy(cb.desc(manualMessageLogRoot.get(ManualMessageLog.SENT_DATE))); + + return em.createQuery(cq).setMaxResults(MANUAL_MESSAGE_LOG_LIMIT).getResultList(); + } + + public Predicate inJurisdictionOrOwned(CriteriaQuery cq, CriteriaBuilder cb, Root root) { + final User currentUser = userService.getCurrentUser(); + return new ManualMessageJurisdictionPredicateValidator( + cq, + cb, + currentUser, + new PersonJoins(root.join(ManualMessageLog.RECIPIENT_PERSON)), + personService.getPermittedAssociations()).inJurisdictionOrOwned(); + } + + public Predicate buildCriteriaFilter(ManualMessageLogCriteria criteria, Root root, CriteriaBuilder cb) { + Predicate filter = null; + + if (criteria.getMessageType() != null) { + filter = and(cb, filter, cb.equal(root.get(ManualMessageLog.MESSAGE_TYPE), criteria.getMessageType())); + } + + if (criteria.getCaze() != null) { + filter = and(cb, filter, cb.equal(root.get(ManualMessageLog.CASE).get(Case.UUID), criteria.getCaze().getUuid())); + } + + if (criteria.getContact() != null) { + filter = and(cb, filter, cb.equal(root.get(ManualMessageLog.CONTACT).get(Contact.UUID), criteria.getContact().getUuid())); + } + + if (criteria.getEventParticipant() != null) { + filter = and(cb, + filter, + cb.equal(root.get(ManualMessageLog.EVENT_PARTICIPANT).get(EventParticipant.UUID), criteria.getEventParticipant().getUuid())); + } + + if (criteria.getTravelEntry() != null) { + filter = and(cb, filter, cb.equal(root.get(ManualMessageLog.TRAVEL_ENTRY).get(TravelEntry.UUID), criteria.getTravelEntry().getUuid())); + } + + if (criteria.getWithTemplate() != null) { + filter = and(cb, filter, cb.isNotNull(root.get(ManualMessageLog.USED_TEMPLATE))); + } + + return filter; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java index 762f1774f11..237038e5600 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java @@ -60,7 +60,6 @@ import de.symeda.sormas.api.person.SymptomJournalStatus; import de.symeda.sormas.backend.caze.Case; import de.symeda.sormas.backend.common.AbstractDomainObject; -import de.symeda.sormas.backend.common.messaging.ManualMessageLog; import de.symeda.sormas.backend.contact.Contact; import de.symeda.sormas.backend.event.EventParticipant; import de.symeda.sormas.backend.immunization.entity.Immunization; @@ -70,6 +69,7 @@ import de.symeda.sormas.backend.infrastructure.facility.Facility; import de.symeda.sormas.backend.infrastructure.region.Region; import de.symeda.sormas.backend.location.Location; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLog; import de.symeda.sormas.backend.travelentry.TravelEntry; @Entity diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java index 689377134b0..d4c09b19fe2 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java @@ -18,6 +18,7 @@ import static de.symeda.sormas.backend.common.CriteriaBuilderHelper.and; import static de.symeda.sormas.backend.common.CriteriaBuilderHelper.andEquals; import static de.symeda.sormas.backend.common.CriteriaBuilderHelper.andInValues; +import static de.symeda.sormas.backend.common.CriteriaBuilderHelper.or; import java.sql.Timestamp; import java.util.ArrayList; @@ -89,7 +90,6 @@ import de.symeda.sormas.backend.common.CoreAdo; import de.symeda.sormas.backend.common.CriteriaBuilderHelper; import de.symeda.sormas.backend.common.FilterProvider; -import de.symeda.sormas.backend.common.messaging.ManualMessageLogService; import de.symeda.sormas.backend.contact.Contact; import de.symeda.sormas.backend.contact.ContactJoins; import de.symeda.sormas.backend.contact.ContactQueryContext; @@ -107,6 +107,7 @@ import de.symeda.sormas.backend.immunization.entity.Immunization; import de.symeda.sormas.backend.infrastructure.district.District; import de.symeda.sormas.backend.location.Location; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogService; import de.symeda.sormas.backend.travelentry.TravelEntry; import de.symeda.sormas.backend.travelentry.TravelEntryJoins; import de.symeda.sormas.backend.travelentry.TravelEntryQueryContext; @@ -884,7 +885,7 @@ public Predicate buildSimilarityCriteriaFilter(PersonSimilarityCriteria criteria final Predicate dayEquals = cb.equal(personFrom.get(Person.BIRTHDATE_DD), criteria.getBirthdateDD()); filter = and(cb, filter, cb.or(cb.isNull(personFrom.get(Person.BIRTHDATE_DD)), dayEquals)); } - if (!StringUtils.isBlank(criteria.getNationalHealthId())) { + if (StringUtils.isNotBlank(criteria.getNationalHealthId())) { final Predicate nationalEqual = cb.equal(personFrom.get(Person.NATIONAL_HEALTH_ID), criteria.getNationalHealthId()); filter = and(cb, filter, cb.or(cb.isNull(personFrom.get(Person.NATIONAL_HEALTH_ID)), nationalEqual)); } @@ -922,6 +923,10 @@ public Predicate buildSimilarityCriteriaFilter(PersonSimilarityCriteria criteria } } + if (configFacade.isDuplicateChecksNationalHealthIdOverridesCriteria() && StringUtils.isNotBlank(criteria.getNationalHealthId())) { + filter = or(cb, filter, cb.equal(personFrom.get(Person.NATIONAL_HEALTH_ID), criteria.getNationalHealthId())); + } + return filter; } @@ -1090,7 +1095,12 @@ public boolean isEditAllowed(String personUuid) { cb.equal(from.get(Person.UUID), personUuid), cb.or( cb.and( - cb.and(cb.isNotNull(joins.getCaze()), cb.isFalse(joins.getCaze().get(Case.DELETED))), + cb.and( + cb.isNotNull(joins.getCaze()), + cb.isFalse(joins.getCaze().get(Case.DELETED)), + currentUserHasRestrictedAccessToAssignedEntities() + ? cb.equal(joins.getCaze().get(Case.SURVEILLANCE_OFFICER).get(User.ID), getCurrentUser().getId()) + : cb.conjunction()), caseService.createOwnershipPredicate(true, joins.getCaze(), cb, cq)), cb.and( cb.and(cb.isNotNull(joins.getContact()), cb.isFalse(joins.getContact().get(Contact.DELETED))), diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java index c87143a6236..52beec65f52 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java @@ -61,6 +61,7 @@ public class PathogenTest extends DeletableAdo { public static final String TESTED_DISEASE_VARIANT = "testedDiseaseVariant"; public static final String TESTED_DISEASE_VARIANT_DETAILS = "testedDiseaseVariantDetails"; public static final String TESTED_PATHOGEN = "testedPathogen"; + public static final String TESTED_PATHOGEN_DETAILS = "testedPathogenDetails"; public static final String TYPING_ID = "typingId"; public static final String TEST_TYPE = "testType"; public static final String PCR_TEST_SPECIFICATION = "pcrTestSpecification"; @@ -100,6 +101,7 @@ public class PathogenTest extends DeletableAdo { private String testedDiseaseVariantDetails; @Convert(converter = PathogenConverter.class) private Pathogen testedPathogen; + private String testedPathogenDetails; private String typingId; private PathogenTestType testType; private PCRTestSpecification pcrTestSpecification; @@ -199,6 +201,15 @@ public void setTestedPathogen(Pathogen testedPathogen) { this.testedPathogen = testedPathogen; } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getTestedPathogenDetails() { + return testedPathogenDetails; + } + + public void setTestedPathogenDetails(String testedPathogenDetails) { + this.testedPathogenDetails = testedPathogenDetails; + } + @Column public String getTypingId() { return typingId; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.java index 27ffaf326fe..ccc04163d4a 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.java @@ -265,6 +265,7 @@ public static PathogenTestDto toDto(PathogenTest source) { target.setTestedDiseaseDetails(source.getTestedDiseaseDetails()); target.setTestedDiseaseVariantDetails(source.getTestedDiseaseVariantDetails()); target.setTestedPathogen(source.getTestedPathogen()); + target.setTestedPathogenDetails(source.getTestedPathogenDetails()); target.setTypingId(source.getTypingId()); target.setTestType(source.getTestType()); target.setPcrTestSpecification(source.getPcrTestSpecification()); @@ -389,22 +390,18 @@ public Date getLatestPathogenTestDate(String sampleUuid) { public List getPositiveOrLatest(List sampleUuids) { Collection dtos = toPseudonymizedDtos(pathogenTestService.getBySampleUuids(sampleUuids, true)).stream() - .collect( - Collectors.toMap( - s -> s.getSample().getUuid(), - s -> s, - (s1, s2) -> { - - // keep the positive one - if (s1.getTestResult() == PathogenTestResultType.POSITIVE) { - return s1; - } else if (s2.getTestResult() == PathogenTestResultType.POSITIVE) { - return s2; - } - - // ordered by creation date by default, so always keep the first one - return s1; - })) + .collect(Collectors.toMap(s -> s.getSample().getUuid(), s -> s, (s1, s2) -> { + + // keep the positive one + if (s1.getTestResult() == PathogenTestResultType.POSITIVE) { + return s1; + } else if (s2.getTestResult() == PathogenTestResultType.POSITIVE) { + return s2; + } + + // ordered by creation date by default, so always keep the first one + return s1; + })) .values(); return new ArrayList<>(dtos); } @@ -491,7 +488,7 @@ public PathogenTest fillOrBuildEntity(@NotNull PathogenTestDto source, PathogenT target.setTestedDiseaseDetails(source.getTestedDiseaseDetails()); target.setTestedDiseaseVariantDetails(source.getTestedDiseaseVariantDetails()); target.setTestedPathogen(source.getTestedPathogen()); - target.setTestedPathogen(source.getTestedPathogen()); + target.setTestedPathogenDetails(source.getTestedPathogenDetails()); target.setTypingId(source.getTypingId()); target.setTestType(source.getTestType()); target.setPcrTestSpecification(source.getPcrTestSpecification()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java index 69060833c2d..957b304ca25 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java @@ -658,7 +658,7 @@ public List getIndexList(TaskCriteria taskCriteria, Integer first, emptyValuePseudonymizer.pseudonymizeDto( EnvironmentReferenceDto.class, t.getEnvironment(), - taskJurisdictionFlagsDto.getEventInJurisdiction(), + taskJurisdictionFlagsDto.getEnvironmentInJurisdiction(), null); } }, true); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskQueryContext.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskQueryContext.java index f2bb80c395b..a4dc3fd51db 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskQueryContext.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskQueryContext.java @@ -48,6 +48,7 @@ public Expression getRegionExpressionForIndex(String regionProperty) { joins.getContactRegion(), joins.getEventRegion(), joins.getTravelEntryResponsibleRegion(), + joins.getEnvironmentRegion(), regionProperty); } @@ -63,6 +64,7 @@ public Expression getDistrictExpressionForIndex(String districtProperty) joins.getContactDistrict(), joins.getEventDistrict(), joins.getTravelEntryResponsibleDistrict(), + joins.getEnvironmentDistrict(), districtProperty); } @@ -74,6 +76,7 @@ public Expression getCommunityExpressionForIndex(String communityPropert joins.getContactCommunity(), joins.getEventCommunity(), joins.getTravelEntryResponsibleCommunity(), + joins.getEnvironmentCommunity(), communityProperty); } @@ -84,6 +87,7 @@ private Expression getIndexJurisdictionExpression( Join contactJurisdictionJoin, Join eventJurisdictionJoin, Join travelEntryResponsibleJurisdictionJoin, + Join environmentJurisdictionJoin, String propertyName) { return cb. selectCase() @@ -97,6 +101,11 @@ cb. selectCase() .otherwise( cb. selectCase() .when(cb.isNotNull(eventJurisdictionJoin), eventJurisdictionJoin.get(propertyName)) - .otherwise(travelEntryResponsibleJurisdictionJoin.get(propertyName))))); + .otherwise( + cb. selectCase() + .when( + cb.isNotNull(travelEntryResponsibleJurisdictionJoin), + travelEntryResponsibleJurisdictionJoin.get(propertyName)) + .otherwise(environmentJurisdictionJoin.get(propertyName)))))); } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskService.java index 0daf00b0793..cdf58fa3342 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskService.java @@ -219,7 +219,12 @@ public Predicate createUserFilter(TaskQueryContext taskQueryContext, TaskCriteri TaskJoins joins = taskQueryContext.getJoins(); - Predicate assigneeFilter = createAssigneeFilter(cb, joins.getAssignee()); + Predicate assigneeFilter; + if (currentUserHasRestrictedAccessToAssignedEntities()) { + assigneeFilter = cb.disjunction(); + } else { + assigneeFilter = createAssigneeFilter(cb, joins.getAssignee()); + } Predicate relatedEntityNotDeletedFilter = cb.or( cb.equal(taskPath.get(Task.TASK_CONTEXT), TaskContext.GENERAL), diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/CurrentUserService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/CurrentUserService.java index f067a49249a..16c3a2b3800 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/CurrentUserService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/CurrentUserService.java @@ -1,6 +1,7 @@ package de.symeda.sormas.backend.user; import java.util.Set; +import java.util.stream.Collectors; import javax.annotation.Resource; import javax.ejb.LocalBean; @@ -98,6 +99,15 @@ public boolean hasAnyUserRight(Set userRights) { return getCurrentUser().hasAnyUserRight(userRights); } + public boolean hasRestrictedAccessToAssignedEntities() { + if (getCurrentUser() != null && !getCurrentUser().getUserRoles().isEmpty()) { + return getCurrentUser().getUserRoles() + .stream() + .allMatch(UserRole::isRestrictAccessToAssignedEntities); + } + return false; + } + // We need a clean transaction as we do not want call potential entity listeners which would lead to recursion @Transactional(Transactional.TxType.REQUIRES_NEW) User fetchUser(String userName) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserFacadeEjb.java index 43864621244..bf98568c25c 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserFacadeEjb.java @@ -692,6 +692,11 @@ public List getIndexList(UserCriteria userCriteria, Integer first, Inte filter = userService.buildCriteriaFilter(userCriteria, cb, user); } + if (userCriteria != null && Boolean.TRUE.equals(userCriteria.getShowOnlyRestrictedAccessToAssignedEntities())) { + Join rolesJoin = user.join(User.USER_ROLES, JoinType.LEFT); + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(rolesJoin.get(UserRole.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES), true)); + } + if (filter != null) { /* * No preemptive distinct because this does collide with @@ -737,7 +742,11 @@ public List getIndexList(UserCriteria userCriteria, Integer first, Inte cq.select(user); - return QueryHelper.getResultList(em, cq, first, max, UserFacadeEjb::toDto); + final List resultList = QueryHelper.getResultList(em, cq, first, max, UserFacadeEjb::toDto); + // because the selection is based on User entity and we need userRole join (we cannot avoid it) which pulls duplicate rows, + // and distinct on the query does not work because of sorting (e.g. Address) + // we need to deduplicate the list using java code + return resultList.stream().distinct().collect(Collectors.toList()); } @Override @@ -754,11 +763,16 @@ public long count(UserCriteria userCriteria) { filter = userService.buildCriteriaFilter(userCriteria, cb, root); } + if (userCriteria != null && Boolean.TRUE.equals(userCriteria.getShowOnlyRestrictedAccessToAssignedEntities())) { + Join rolesJoin = root.join(User.USER_ROLES, JoinType.LEFT); + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(rolesJoin.get(UserRole.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES), true)); + } + if (filter != null) { cq.where(filter); } - cq.select(cb.count(root)); + cq.select(cb.countDistinct(root)); return em.createQuery(cq).getSingleResult(); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserJurisdictionPredicateValidator.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserJurisdictionPredicateValidator.java new file mode 100644 index 00000000000..e505958a903 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserJurisdictionPredicateValidator.java @@ -0,0 +1,95 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.user; + +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.Path; +import javax.persistence.criteria.Predicate; + +import de.symeda.sormas.backend.infrastructure.community.Community; +import de.symeda.sormas.backend.infrastructure.district.District; +import de.symeda.sormas.backend.infrastructure.facility.Facility; +import de.symeda.sormas.backend.infrastructure.pointofentry.PointOfEntry; +import de.symeda.sormas.backend.util.PredicateJurisdictionValidator; + +public class UserJurisdictionPredicateValidator extends PredicateJurisdictionValidator { + + private final UserJoins joins; + + public UserJurisdictionPredicateValidator(CriteriaBuilder cb, User user, Path userPath, UserJoins joins) { + super(cb, user, userPath, null); + this.joins = joins; + } + + @Override + public Predicate isRootInJurisdictionOrOwned() { + return isRootInJurisdiction(); + } + + @Override + protected Predicate whenNotAllowed() { + return cb.disjunction(); + } + + @Override + protected Predicate whenNationalLevel() { + return cb.conjunction(); + } + + @Override + protected Predicate whenRegionalLevel() { + return cb.conjunction(); + } + + @Override + protected Predicate whenDistrictLevel() { + return user != null + ? cb.equal(joins.getRoot().get(User.DISTRICT).get(District.ID), user.getDistrict().getId()) + : cb.equal(joins.getRoot().get(User.DISTRICT).get(District.ID), userPath.get(User.DISTRICT).get(District.ID)); + } + + @Override + protected Predicate whenCommunityLevel() { + return user != null + ? cb.equal(joins.getRoot().get(User.COMMUNITY).get(Community.ID), user.getCommunity().getId()) + : cb.equal(joins.getRoot().get(User.COMMUNITY).get(Community.ID), userPath.get(User.COMMUNITY).get(Community.ID)); + + } + + @Override + protected Predicate whenFacilityLevel() { + return user != null + ? cb.equal(joins.getRoot().get(User.HEALTH_FACILITY).get(Facility.ID), user.getHealthFacility().getId()) + : cb.equal(joins.getRoot().get(User.HEALTH_FACILITY).get(Facility.ID), userPath.get(User.HEALTH_FACILITY).get(Facility.ID)); + } + + @Override + protected Predicate whenPointOfEntryLevel() { + return user != null + ? cb.equal(joins.getRoot().get(User.POINT_OF_ENTRY).get(PointOfEntry.ID), user.getPointOfEntry().getId()) + : cb.equal(joins.getRoot().get(User.POINT_OF_ENTRY).get(PointOfEntry.ID), userPath.get(User.POINT_OF_ENTRY).get(PointOfEntry.ID)); + } + + @Override + protected Predicate whenLaboratoryLevel() { + return user != null + ? cb.equal(joins.getRoot().get(User.LABORATORY).get(Facility.ID), user.getLaboratory().getId()) + : cb.equal(joins.getRoot().get(User.LABORATORY).get(Facility.ID), userPath.get(User.LABORATORY).get(Facility.ID)); + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRole.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRole.java index dbaa82a7841..55a2c10305c 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRole.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRole.java @@ -68,6 +68,7 @@ public class UserRole extends AbstractDomainObject { public static final String LINKED_DEFAULT_USER_ROLE = "linkedDefaultUserRole"; public static final String EMAIL_NOTIFICATIONS = "emailNotificationTypes"; public static final String SMS_NOTIFICATIONS = "smsNotificationTypes"; + public static final String RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES = "restrictAccessToAssignedEntities"; private Set userRights; private boolean enabled = true; @@ -80,6 +81,7 @@ public class UserRole extends AbstractDomainObject { private JurisdictionLevel jurisdictionLevel; private Set emailNotificationTypes = Collections.emptySet(); private Set smsNotificationTypes = Collections.emptySet(); + private boolean restrictAccessToAssignedEntities; @ElementCollection(fetch = FetchType.EAGER) @Enumerated(EnumType.STRING) @@ -151,6 +153,15 @@ public void setPortHealthUser(boolean portHealthUser) { this.portHealthUser = portHealthUser; } + @Column + public boolean isRestrictAccessToAssignedEntities() { + return restrictAccessToAssignedEntities; + } + + public void setRestrictAccessToAssignedEntities(boolean restrictAccessToAssignedEntities) { + this.restrictAccessToAssignedEntities = restrictAccessToAssignedEntities; + } + @Enumerated(EnumType.STRING) public JurisdictionLevel getJurisdictionLevel() { return jurisdictionLevel; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleFacadeEjb.java index 9090087f759..9aebc4057a3 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleFacadeEjb.java @@ -282,6 +282,7 @@ public UserRole fillOrBuildEntity(UserRoleDto source, UserRole target, boolean c target.setSmsNotificationTypes(source.getSmsNotificationTypes()); target.setJurisdictionLevel(source.getJurisdictionLevel()); target.setLinkedDefaultUserRole(source.getLinkedDefaultUserRole()); + target.setRestrictAccessToAssignedEntities(source.isRestrictAccessToAssignedEntities()); return target; } @@ -306,6 +307,7 @@ public static UserRoleDto toDto(UserRole source) { target.setSmsNotificationTypes(new HashSet<>(source.getSmsNotificationTypes())); target.setJurisdictionLevel(source.getJurisdictionLevel()); target.setLinkedDefaultUserRole(source.getLinkedDefaultUserRole()); + target.setRestrictAccessToAssignedEntities(source.isRestrictAccessToAssignedEntities()); return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleService.java index 90af64c2f5d..6fc1d89e702 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserRoleService.java @@ -165,6 +165,11 @@ public Predicate buildCriteriaFilter( filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(UserRole.JURISDICTION_LEVEL), userRoleCriteria.getJurisdictionLevel())); } + if (userRoleCriteria.getShowOnlyRestrictedAccessToAssignedEntities() != null + && Boolean.TRUE.equals(userRoleCriteria.getShowOnlyRestrictedAccessToAssignedEntities())) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(UserRole.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES), true)); + } + return filter; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserService.java index 7e158c77820..0961f9fa9c4 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/UserService.java @@ -291,9 +291,9 @@ public List getUserReferences( // eliminate users that are limited to others diseases if (limitedDisease != null) { - Predicate restrictOtherLimitedDiseaseUsers = cb.or( - cb.isNull(userRoot.get(User.LIMITED_DISEASES)), - cb.like(userRoot.get(User.LIMITED_DISEASES).as(String.class), "%" + limitedDisease.name() + '%')); + Predicate restrictOtherLimitedDiseaseUsers = cb.or( + cb.isNull(userRoot.get(User.LIMITED_DISEASES)), + cb.like(userRoot.get(User.LIMITED_DISEASES).as(String.class), "%" + limitedDisease.name() + '%')); filter = CriteriaBuilderHelper.and(cb, filter, restrictOtherLimitedDiseaseUsers); } @@ -388,9 +388,9 @@ public List getUserRefsByInfrastructure( filter = CriteriaBuilderHelper.and(cb, filter, jurisdictionFilter); if (limitedDisease != null) { - Predicate restrictOtherLimitedDiseaseUsers = cb.or( - cb.isNull(userRoot.get(User.LIMITED_DISEASES)), - cb.like(userRoot.get(User.LIMITED_DISEASES).as(String.class), "%" + limitedDisease.name() + "%")); + Predicate restrictOtherLimitedDiseaseUsers = cb.or( + cb.isNull(userRoot.get(User.LIMITED_DISEASES)), + cb.like(userRoot.get(User.LIMITED_DISEASES).as(String.class), "%" + limitedDisease.name() + "%")); filter = CriteriaBuilderHelper.and(cb, filter, restrictOtherLimitedDiseaseUsers); } @@ -920,4 +920,8 @@ public boolean isPortHealthUser() { Set userRoleDtos = user.getUserRoles().stream().map(UserRoleFacadeEjb::toDto).collect(Collectors.toSet()); return userRoleFacade.isPortHealthUser(userRoleDtos); } + + public Predicate inJurisdictionOrOwned(CriteriaBuilder cb, UserJoins joins) { + return new UserJurisdictionPredicateValidator(cb, getCurrentUser(), null, joins).inJurisdictionOrOwned(); + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/util/Pseudonymizer.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/util/Pseudonymizer.java index 43d6d917818..d1dabd32791 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/util/Pseudonymizer.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/util/Pseudonymizer.java @@ -64,13 +64,15 @@ private SensitiveDataFieldAccessChecker getSensitiveDataFieldAccessChecker(boole return getFieldAccessCheckers(inJurisdiction).getCheckerByType(SensitiveDataFieldAccessChecker.class); } - public boolean pseudonymizeUser( - User dtoUser, - User currentUser, - Consumer setPseudonymizedValue) { + public boolean pseudonymizeUser(User dtoUser, User currentUser, Consumer setPseudonymizedValue) { boolean isInJurisdiction = dtoUser == null || isUserInJurisdiction(dtoUser, currentUser); - SensitiveDataFieldAccessChecker sensitiveDataFieldAccessChecker = getSensitiveDataFieldAccessChecker(isInJurisdiction); + return pseudonymizeUser(isInJurisdiction, setPseudonymizedValue); + } + + public boolean pseudonymizeUser(boolean isUserInJurisdiction, Consumer setPseudonymizedValue) { + + SensitiveDataFieldAccessChecker sensitiveDataFieldAccessChecker = getSensitiveDataFieldAccessChecker(isUserInJurisdiction); boolean isConfiguredToCheck = sensitiveDataFieldAccessChecker != null && pseudonymizeMandatoryFields; if (isConfiguredToCheck && !sensitiveDataFieldAccessChecker.hasRight()) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/vaccination/VaccinationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/vaccination/VaccinationFacadeEjb.java index 33b58a978b6..aabfda19138 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/vaccination/VaccinationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/vaccination/VaccinationFacadeEjb.java @@ -469,7 +469,9 @@ public void updateVaccinationStatuses(Contact contact) { } } - @RightsAllowed(UserRight._EVENTPARTICIPANT_EDIT) + @RightsAllowed({ + UserRight._EVENTPARTICIPANT_CREATE, + UserRight._EVENTPARTICIPANT_EDIT }) public void updateVaccinationStatuses(EventParticipant eventParticipant) { if (eventParticipant.getEvent().getDisease() == null) { return; diff --git a/sormas-backend/src/main/resources/META-INF/glassfish-ejb-jar.xml b/sormas-backend/src/main/resources/META-INF/glassfish-ejb-jar.xml index 2b2dd72c6ac..4c66be06a60 100644 --- a/sormas-backend/src/main/resources/META-INF/glassfish-ejb-jar.xml +++ b/sormas-backend/src/main/resources/META-INF/glassfish-ejb-jar.xml @@ -977,6 +977,11 @@ DEV_MODE + + CUSTOMIZABLE_ENUM_MANAGEMENT + CUSTOMIZABLE_ENUM_MANAGEMENT + + SYSTEM diff --git a/sormas-backend/src/main/resources/META-INF/persistence.xml b/sormas-backend/src/main/resources/META-INF/persistence.xml index 6fee6a39ba8..2a8fa42d7fa 100644 --- a/sormas-backend/src/main/resources/META-INF/persistence.xml +++ b/sormas-backend/src/main/resources/META-INF/persistence.xml @@ -63,7 +63,7 @@ de.symeda.sormas.backend.sormastosormas.share.outgoing.ShareRequestInfo de.symeda.sormas.backend.document.Document de.symeda.sormas.backend.exposure.Exposure - de.symeda.sormas.backend.common.messaging.ManualMessageLog + de.symeda.sormas.backend.manualmessagelog.ManualMessageLog de.symeda.sormas.backend.systemevent.SystemEvent de.symeda.sormas.backend.externalmessage.ExternalMessage de.symeda.sormas.backend.caze.surveillancereport.SurveillanceReport diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index 17bbe259052..206da133468 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -12783,4 +12783,55 @@ WHERE ur.linkeddefaultuserrole = 'ADMIN'; INSERT INTO schema_version (version_number, comment) VALUES (532, 'Create new user rights to manage, send and attach documents to email templates #12466'); +-- 2023-11-13 Add CUSTOMIZABLE_ENUM_MANAGEMENT user right #6340 +INSERT INTO userroles_userrights (userrole_id, userright) +SELECT id, 'CUSTOMIZABLE_ENUM_MANAGEMENT' +FROM public.userroles +WHERE userroles.linkeddefaultuserrole = 'ADMIN'; + +INSERT INTO schema_version (version_number, comment) VALUES (533, 'Add CUSTOMIZABLE_ENUM_MANAGEMENT user right #6340'); + +-- 2023-12-04 Add tested pathogen name #12663 +ALTER TABLE pathogentest ADD COLUMN testedpathogendetails varchar(512); +ALTER TABLE pathogentest_history ADD COLUMN testedpathogendetails varchar(512); + +INSERT INTO schema_version (version_number, comment) VALUES (534, 'Add tested pathogen details #12663'); + +-- 2023-12-13 Display a history of sent external emails #12465 +ALTER TABLE manualmessagelog + ADD COLUMN usedtemplate text, + ADD COLUMN emailaddress text, + ADD COLUMN attacheddocuments jsonb, + ADD COLUMN caze_id bigint, + ADD COLUMN contact_id bigint, + ADD COLUMN eventparticipant_id bigint, + ADD COLUMN travelentry_id bigint; + +ALTER TABLE manualmessagelog + ADD CONSTRAINT fk_manualmessagelog_caze_id FOREIGN KEY (caze_id) REFERENCES cases (id); +ALTER TABLE manualmessagelog + ADD CONSTRAINT fk_manualmessagelog_contact_id FOREIGN KEY (contact_id) REFERENCES contact (id); +ALTER TABLE manualmessagelog + ADD CONSTRAINT fk_manualmessagelog_eventparticipant_id FOREIGN KEY (eventparticipant_id) REFERENCES eventparticipant (id); +ALTER TABLE manualmessagelog + ADD CONSTRAINT fk_manualmessagelog_travelentry_id FOREIGN KEY (travelentry_id) REFERENCES travelentry (id); + +ALTER TABLE manualmessagelog_history + ADD COLUMN usedtemplate text, + ADD COLUMN emailaddress text, + ADD COLUMN attacheddocuments jsonb, + ADD COLUMN caze_id bigint, + ADD COLUMN contact_id bigint, + ADD COLUMN eventparticipant_id bigint, + ADD COLUMN travelentry_id bigint; + +INSERT INTO schema_version (version_number, comment) VALUES (535, 'Display a history of sent external emails #12465'); + +-- 2023-12-05 Assign case(s) to a User and allow them to see the data of only the assigned case(s) in the system #12697 +ALTER TABLE userroles ADD COLUMN restrictAccessToAssignedEntities boolean NOT NULL DEFAULT false; +ALTER TABLE userroles_history ADD COLUMN restrictAccessToAssignedEntities boolean; + +INSERT INTO schema_version (version_number, comment) VALUES (536, 'Assign case(s) to a User and allow them to see the data of only the assigned case(s) in the system #12697'); + + -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** \ No newline at end of file diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java index 6be4f3fddf9..701acbbeb7b 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java @@ -33,6 +33,10 @@ import javax.persistence.EntityManager; import javax.persistence.Query; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogFacade; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogFacadeEjb; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogFacadeEjb.ManualMessageLogFacadeEjbLocal; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogService; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; @@ -1027,4 +1031,12 @@ public ExternalMessageProcessingFacade getExternalMessageProcessingFacade() { public ExternalEmailFacade getExternalEmailFacade() { return getBean(ExternalEmailFacadeEjbLocal.class); } + + public ManualMessageLogFacade getManualMessageLogFacade() { + return getBean(ManualMessageLogFacadeEjbLocal.class); + } + + public ManualMessageLogService getManualMessageLogService() { + return getBean(ManualMessageLogService.class); + } } diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/ArchitectureTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/ArchitectureTest.java index 78c515431ca..fe237fa8f5e 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/ArchitectureTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/ArchitectureTest.java @@ -69,6 +69,7 @@ import de.symeda.sormas.backend.infrastructure.pointofentry.PointOfEntryFacadeEjb; import de.symeda.sormas.backend.infrastructure.region.RegionFacadeEjb; import de.symeda.sormas.backend.infrastructure.subcontinent.SubcontinentFacadeEjb; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLogFacadeEjb; import de.symeda.sormas.backend.outbreak.OutbreakFacadeEjb; import de.symeda.sormas.backend.report.AggregateReportFacadeEjb; import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb; @@ -274,11 +275,7 @@ public void testExternalMessageFacadeEjbAuthorization(JavaClasses classes) { assertFacadeEjbAnnotated( ExternalMessageFacadeEjb.class, AuthMode.CLASS_ONLY, - Arrays.asList( - "getExternalMessagesAdapterVersion", - "fetchAndSaveExternalMessages", - "bulkAssignExternalMessages", - "delete"), + Arrays.asList("getExternalMessagesAdapterVersion", "fetchAndSaveExternalMessages", "bulkAssignExternalMessages", "delete"), classes); } @@ -462,6 +459,11 @@ public void testEnvironmentImportFacadeEjbAuthorization(JavaClasses classes) { assertFacadeEjbAnnotated(EnvironmentImportFacadeEjb.class, AuthMode.CLASS_ONLY, classes); } + @ArchTest + public void testManualMessageLogFacadeEjbAuthorization(JavaClasses classes) { + assertFacadeEjbAnnotated(ManualMessageLogFacadeEjb.class, AuthMode.METHODS_ONLY, classes); + } + private void assertFacadeEjbAnnotated(Class facadeEjbClass, JavaClasses classes) { assertFacadeEjbAnnotated(facadeEjbClass, AuthMode.CLASS_AND_METHODS, Collections.emptyList(), classes); } diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/EntityMappingTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/EntityMappingTest.java index 16ccc279aca..ef78357b0bf 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/EntityMappingTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/EntityMappingTest.java @@ -78,7 +78,7 @@ import de.symeda.sormas.api.infrastructure.region.RegionDto; import de.symeda.sormas.api.infrastructure.subcontinent.SubcontinentDto; import de.symeda.sormas.api.location.LocationDto; -import de.symeda.sormas.api.messaging.ManualMessageLogDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogDto; import de.symeda.sormas.api.outbreak.OutbreakDto; import de.symeda.sormas.api.person.PersonContactDetailDto; import de.symeda.sormas.api.person.PersonDto; @@ -119,7 +119,6 @@ import de.symeda.sormas.backend.clinicalcourse.HealthConditions; import de.symeda.sormas.backend.common.AbstractDomainObject; import de.symeda.sormas.backend.common.NotExposedToApi; -import de.symeda.sormas.backend.common.messaging.ManualMessageLog; import de.symeda.sormas.backend.contact.Contact; import de.symeda.sormas.backend.customizableenum.CustomizableEnumValue; import de.symeda.sormas.backend.disease.DiseaseConfiguration; @@ -148,6 +147,7 @@ import de.symeda.sormas.backend.infrastructure.region.Region; import de.symeda.sormas.backend.infrastructure.subcontinent.Subcontinent; import de.symeda.sormas.backend.location.Location; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLog; import de.symeda.sormas.backend.outbreak.Outbreak; import de.symeda.sormas.backend.person.Person; import de.symeda.sormas.backend.person.PersonContactDetail; diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/MockProducer.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/MockProducer.java index 1feeeea26ee..c53190ba024 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/MockProducer.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/MockProducer.java @@ -64,7 +64,7 @@ */ public class MockProducer implements InitialContextFactory { - private static final String TMP_PATH = "target/tmp"; + public static final String TMP_PATH = "target/tmp"; private static InitialContext initialContext = mock(InitialContext.class); private static SessionContext sessionContext = mock(SessionContext.class, withSettings().lenient()); @@ -135,6 +135,7 @@ private static void resetProperties() { properties.setProperty(ConfigFacadeEjb.COUNTRY_NAME, "nigeria"); properties.setProperty(ConfigFacadeEjb.CSV_SEPARATOR, ";"); properties.setProperty(ConfigFacadeEjb.TEMP_FILES_PATH, TMP_PATH); + properties.setProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, TMP_PATH + "/documents"); } public static void wireMocks() { diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java index 781a5580810..6224a457d22 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java @@ -198,6 +198,15 @@ public UserRoleReferenceDto getUserRoleReference(DefaultUserRole userRole) { return userRoleDtoMap.get(userRole); } + public UserRoleReferenceDto createUserRoleWithRestrictedAccessToAssignedEntitiesUsingTemplate(DefaultUserRole templateUserRole) { + UserRoleDto userRole = new UserRoleDto(); + userRole.setCaption(templateUserRole.toString() + "Restricted"); + userRole.setJurisdictionLevel(templateUserRole.getJurisdictionLevel()); + userRole.setUserRights(Arrays.stream(templateUserRole.getDefaultUserRights().toArray(new UserRight[0])).collect(Collectors.toSet())); + userRole.setRestrictAccessToAssignedEntities(true); + return beanTest.getUserRoleFacade().saveUserRole(userRole).toReference(); + } + public UserRole getUserRole(DefaultUserRole userRole) { if (userRoleMap.isEmpty()) { createUserRoles(); @@ -231,6 +240,22 @@ public UserDto createSurveillanceOfficer(RDCF rdcf) { getUserRoleReference(DefaultUserRole.SURVEILLANCE_OFFICER)); } + public UserDto createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(RDCF rdcf) { + if (rdcf == null) { + rdcf = createRDCF("Region", "District", "Community", "Facility"); + } + + final UserDto user = createUser( + rdcf.region.getUuid(), + rdcf.district.getUuid(), + rdcf.facility.getUuid(), + "SurvOff", + "RestrictedAccess", + createUserRoleWithRestrictedAccessToAssignedEntitiesUsingTemplate(DefaultUserRole.SURVEILLANCE_OFFICER)); + + return user; + } + public UserDto createContactOfficer(RDCF rdcf) { if (rdcf == null) { rdcf = createRDCF("Region", "District", "Community", "Facility"); @@ -275,8 +300,12 @@ public UserDto createUser(RDCF rdcf, UserRoleReferenceDto... roles) { } public UserDto createUser(RDCF rdcf, DefaultUserRole defaultUserRole) { + return createUser(rdcf, "User", defaultUserRole); + } + + public UserDto createUser(RDCF rdcf, String lastName, DefaultUserRole defaultUserRole) { UserRoleReferenceDto userRole = getUserRoleReference(defaultUserRole); - return createUser(rdcf.region.getUuid(), rdcf.district.getUuid(), rdcf.facility.getUuid(), userRole.getCaption(), "User", userRole); + return createUser(rdcf.region.getUuid(), rdcf.district.getUuid(), rdcf.facility.getUuid(), userRole.getCaption(), lastName, userRole); } public UserDto createUser(RDCF rdcf, String firstName, String lastName, UserRoleReferenceDto... roles) { @@ -936,7 +965,7 @@ public ContactDto createContact( } public TaskDto createTask(UserReferenceDto assigneeUser) { - return createTask(TaskContext.GENERAL, TaskType.OTHER, TaskStatus.PENDING, null, null, null, new Date(), assigneeUser); + return createTask(TaskContext.GENERAL, TaskType.OTHER, TaskStatus.PENDING, null, null, null, null, new Date(), assigneeUser); } public TaskDto createTask(TaskContext context, ReferenceDto entityRef, Consumer customConfig) { @@ -959,6 +988,7 @@ public TaskDto createTask( CaseReferenceDto caze, ContactReferenceDto contact, EventReferenceDto event, + EnvironmentReferenceDto environment, Date dueDate, UserReferenceDto assigneeUser) { @@ -973,6 +1003,9 @@ public TaskDto createTask( case EVENT: entityRef = event; break; + case ENVIRONMENT: + entityRef = environment; + break; case GENERAL: entityRef = null; break; @@ -2163,7 +2196,9 @@ public DiseaseVariant createDiseaseVariant(String name, Disease disease) { CustomizableEnumValue diseaseVariant = new CustomizableEnumValue(); diseaseVariant.setDataType(CustomizableEnumType.DISEASE_VARIANT); diseaseVariant.setValue("BF.1.2"); - diseaseVariant.setDiseases(Collections.singletonList(disease)); + Set diseases = new HashSet<>(); + diseases.add(disease); + diseaseVariant.setDiseases(diseases); diseaseVariant.setCaption(name + " variant"); beanTest.getCustomizableEnumValueService().ensurePersisted(diseaseVariant); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java index 9ff32cc896d..f2ac3b6c7f2 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java @@ -16,6 +16,7 @@ package de.symeda.sormas.backend.caze; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.anyOf; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -192,6 +193,7 @@ public class CaseFacadeEjbTest extends AbstractBeanTest { private UserDto nationalUser; private UserDto surveillanceSupervisor; private UserDto surveillanceOfficer; + private UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities; @Override public void init() { @@ -200,6 +202,7 @@ public void init() { rdcf = creator.createRDCF("Region", "District", "Community", "Facility"); surveillanceSupervisor = creator.createSurveillanceSupervisor(rdcf); surveillanceOfficer = creator.createSurveillanceOfficer(rdcf); + surveillanceOfficerWithRestrictedAccessToAssignedEntities = creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); nationalUser = creator.createNationalUser(); } @@ -573,6 +576,7 @@ public void testMovingCaseUpdatesTaskAssigneeAndCreatesPreviousHospitalization() caze.toReference(), null, null, + null, new Date(), surveillanceOfficer.toReference()); TaskDto doneTask = creator.createTask( @@ -582,6 +586,7 @@ public void testMovingCaseUpdatesTaskAssigneeAndCreatesPreviousHospitalization() caze.toReference(), null, null, + null, new Date(), surveillanceOfficer.toReference()); @@ -813,6 +818,71 @@ public void testGetIndexListByEventFreeText() { assertEquals(1, getCaseFacade().getIndexList(new CaseCriteria().eventLike("signal description"), 0, 100, null).size()); } + @Test + public void testGetIndexListByARestrictedAccessToAssignedEntities() { + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + + String lastName = "Person"; + PersonDto cazePerson = creator.createPerson("Case", lastName); + final CaseDataDto firstCase = creator.createCase( + surveillanceSupervisor.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf); + creator.createCase( + surveillanceSupervisor.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf, + c -> c.setHealthFacilityDetails("abc")); + creator.createCase( + surveillanceSupervisor.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf, + c -> c.setHealthFacilityDetails("xyz")); + + List results = getCaseFacade().getIndexList( + null, + 0, + 100, + Arrays.asList( + new SortProperty(CaseIndexDto.DISEASE), + new SortProperty(CaseIndexDto.PERSON_FIRST_NAME), + new SortProperty(CaseIndexDto.RESPONSIBLE_DISTRICT_NAME), + new SortProperty(CaseIndexDto.HEALTH_FACILITY_NAME, false), + new SortProperty(CaseIndexDto.SURVEILLANCE_OFFICER_UUID))); + + assertEquals(0, results.size()); + + loginWith(nationalUser); + firstCase.setSurveillanceOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + CaseDataDto caze = getCaseFacade().save(firstCase); + + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + List results2 = getCaseFacade().getIndexList( + null, + 0, + 100, + Arrays.asList( + new SortProperty(CaseIndexDto.DISEASE), + new SortProperty(CaseIndexDto.PERSON_FIRST_NAME), + new SortProperty(CaseIndexDto.RESPONSIBLE_DISTRICT_NAME), + new SortProperty(CaseIndexDto.HEALTH_FACILITY_NAME, false), + new SortProperty(CaseIndexDto.SURVEILLANCE_OFFICER_UUID))); + assertEquals(1, results2.size()); + } + @Test public void testCaseExportWithPrescriptionsTreatmentsVisits() { @@ -1297,6 +1367,7 @@ public void testCaseDeletionAndRestoration() throws ExternalSurveillanceToolRunt caze.toReference(), null, null, + null, new Date(), surveillanceSupervisor.toReference()); SampleDto sample = creator @@ -1607,6 +1678,7 @@ public void testMergeCase() throws IOException { otherCaseReference, new ContactReferenceDto(), new EventReferenceDto(), + null, new Date(), otherUserReference); TreatmentDto treatment = creator.createTreatment(otherCase); @@ -2091,7 +2163,8 @@ public void testCreateInvestigationTask() { CaseDataDto caze = creator.createCase(informant, person, rdcf); List caseTasks = getTaskFacade().getAllPendingByCase(caze.toReference()); - assertEquals(surveillanceOfficer.toReference(), caseTasks.get(0).getAssigneeUser()); + final UserReferenceDto assigneeUser = caseTasks.get(0).getAssigneeUser(); + assertThat(assigneeUser, anyOf(is(surveillanceOfficer), is(surveillanceOfficerWithRestrictedAccessToAssignedEntities))); } @Test diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java index 19bc75a1a97..afdfcc9b9b9 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java @@ -548,6 +548,7 @@ public void testContactDeletionAndRestoration() { null, contact.toReference(), null, + null, new Date(), user.toReference()); SampleDto sample = @@ -991,6 +992,50 @@ public void testGetIndexDetailedList() { } } + @Test + public void testGetIndexListByARestrictedAccessToAssignedEntities() { + RDCF rdcf = creator.createRDCF(); + UserDto user = creator.createNationalUser(); + + PersonDto cazePerson = creator.createPerson("Case", "Person"); + CaseDataDto caze = creator.createCase( + user.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf); + PersonDto contactPerson = creator.createPerson("Contact", "Person"); + final ContactDto contact = + creator.createContact(user.toReference(), user.toReference(), contactPerson.toReference(), caze, new Date(), new Date(), null); + + PersonDto contactPerson2 = creator.createPerson("Contact2", "Person2"); + final ContactDto contact2 = + creator.createContact(user.toReference(), user.toReference(), contactPerson2.toReference(), null, new Date(), new Date(), Disease.EVD); + + assertEquals(2, getContactFacade().getIndexList(null, 0, 100, null).size()); + + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + final List indexList = getContactFacade().getIndexList(null, 0, 100, null); + assertEquals(0, indexList.size()); + + loginWith(user); + contact2.setContactOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getContactFacade().save(contact2); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(1, getContactFacade().getIndexList(null, 0, 100, null).size()); + + loginWith(user); + caze.setSurveillanceOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getCaseFacade().save(caze); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(2, getContactFacade().getIndexList(null, 0, 100, null).size()); + } + @Test public void testGetContactCountsByCasesForDashboard() { @@ -1891,6 +1936,7 @@ public void testMergeContact() throws IOException { null, otherContactReference, new EventReferenceDto(), + null, new Date(), otherUserReference); getContactFacade().save(otherContact); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjbTest.java index 62cad98ceb5..75828d3238a 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjbTest.java @@ -3,8 +3,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; -import java.util.Arrays; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -24,7 +25,9 @@ public void createCustomEnums() { CustomizableEnumValue entry = new CustomizableEnumValue(); entry.setDataType(CustomizableEnumType.DISEASE_VARIANT); entry.setValue("BF.1.2"); - entry.setDiseases(Arrays.asList(Disease.CORONAVIRUS)); + Set diseases = new HashSet<>(); + diseases.add(Disease.CORONAVIRUS); + entry.setDiseases(diseases); entry.setCaption("BF.1.2 variant"); getCustomizableEnumValueService().ensurePersisted(entry); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/deletionconfiguration/CoreEntityDeletionServiceTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/deletionconfiguration/CoreEntityDeletionServiceTest.java index 7e11dec3e39..69fed078cb2 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/deletionconfiguration/CoreEntityDeletionServiceTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/deletionconfiguration/CoreEntityDeletionServiceTest.java @@ -627,8 +627,16 @@ public void testContactPermanentDeletion() { contactDto.setReportDateTime(beyondRelevanceDate); getContactFacade().save(contactDto); - TaskDto taskDto = creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contactDto.toReference(), null, new Date(), null); + TaskDto taskDto = creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contactDto.toReference(), + null, + null, + new Date(), + null); SampleDto sample = creator.createSample( contactDto.toReference(), @@ -640,8 +648,16 @@ public void testContactPermanentDeletion() { ContactDto contactDto2 = creator.createContact(user.toReference(), person.toReference(), Disease.CORONAVIRUS); - TaskDto taskDto2 = creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contactDto2.toReference(), null, new Date(), null); + TaskDto taskDto2 = creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contactDto2.toReference(), + null, + null, + new Date(), + null); SampleDto sample2 = creator.createSample( contactDto2.toReference(), @@ -678,8 +694,16 @@ public void testContactPermanentDeletion() { ContactDto contactDto3 = creator.createContact(user.toReference(), person.toReference(), Disease.CORONAVIRUS); - TaskDto taskDto3 = creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contactDto3.toReference(), null, new Date(), null); + TaskDto taskDto3 = creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contactDto3.toReference(), + null, + null, + new Date(), + null); SampleDto sample3 = creator.createSample( contactDto3.toReference(), @@ -741,8 +765,16 @@ public void testPermanentDeletionOfVisitLinkedToMultipleContacts() throws IOExce ContactDto contactDto = creator.createContact(user.toReference(), person.toReference(), Disease.CORONAVIRUS); - TaskDto taskDto = creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contactDto.toReference(), null, new Date(), null); + TaskDto taskDto = creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contactDto.toReference(), + null, + null, + new Date(), + null); SampleDto sample = creator.createSample( contactDto.toReference(), @@ -761,8 +793,16 @@ public void testPermanentDeletionOfVisitLinkedToMultipleContacts() throws IOExce //create second contact with the same person ContactDto contactDto2 = creator.createContact(user.toReference(), person.toReference(), Disease.CORONAVIRUS); - TaskDto taskDto2 = creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contactDto2.toReference(), null, new Date(), null); + TaskDto taskDto2 = creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contactDto2.toReference(), + null, + null, + new Date(), + null); SampleDto sample2 = creator.createSample( contactDto2.toReference(), user.toReference(), diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/EnvironmentFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/EnvironmentFacadeEjbTest.java index 5f9b2c6df13..71d7acd86af 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/EnvironmentFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/EnvironmentFacadeEjbTest.java @@ -1,6 +1,7 @@ package de.symeda.sormas.backend.environment; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.List; @@ -111,4 +112,31 @@ public void testGetIndexList() { assertEquals(1, byUserRdcf.size()); assertEquals(environment2.getUuid(), byUserRdcf.get(0).getUuid()); } + + @Test + public void testGetIndexListByARestrictedAccessToAssignedEntities() { + + UserDto user = creator.createNationalUser(); + TestDataCreator.RDCF rdcf1 = creator.createRDCF(); + EnvironmentDto environment1 = creator.createEnvironment("Test Environment", EnvironmentMedia.WATER, user.toReference(), rdcf1); + TestDataCreator.RDCF rdcf2 = creator.createRDCF(); + EnvironmentDto environment2 = creator.createEnvironment("Test Environment 2", EnvironmentMedia.AIR, user.toReference(), rdcf2); + + List allResults = getEnvironmentFacade().getIndexList(new EnvironmentCriteria(), 0, 100, null); + assertEquals(2, allResults.size()); + + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf1); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + assertEquals(0, getEnvironmentFacade().getIndexList(new EnvironmentCriteria(), 0, 100, null).size()); + + loginWith(user); + environment1.setResponsibleUser(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getEnvironmentFacade().save(environment1); + + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(1, getEnvironmentFacade().getIndexList(new EnvironmentCriteria(), 0, 100, null).size()); + } + } diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjbTest.java index 64ab62bf3b9..c2d3e71eb49 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/environment/environmentsample/EnvironmentSampleFacadeEjbTest.java @@ -26,6 +26,7 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.LocalDate; import java.time.ZoneId; @@ -98,19 +99,19 @@ public void init() { public void testSave() { EnvironmentSampleDto dto = creator.createEnvironmentSample(environment.toReference(), reportingUser.toReference(), rdcf, lab.toReference(), s -> { - s.setSampleMaterial(EnvironmentSampleMaterial.WATER); - s.setLaboratory(lab.toReference()); - s.setFieldSampleId("123"); - s.setChlorineResiduals(1.0f); - s.setPhValue(8); - s.setHeavyRain(YesNoUnknown.YES); - s.setDispatched(true); - s.setReceived(false); - s.setGeneralComment("General comment"); - s.getLocation().setAddressType(PersonAddressType.OTHER_ADDRESS); - s.getLocation().setCity("City"); - s.getLocation().setStreet("Street"); - }); + s.setSampleMaterial(EnvironmentSampleMaterial.WATER); + s.setLaboratory(lab.toReference()); + s.setFieldSampleId("123"); + s.setChlorineResiduals(1.0f); + s.setPhValue(8); + s.setHeavyRain(YesNoUnknown.YES); + s.setDispatched(true); + s.setReceived(false); + s.setGeneralComment("General comment"); + s.getLocation().setAddressType(PersonAddressType.OTHER_ADDRESS); + s.getLocation().setCity("City"); + s.getLocation().setStreet("Street"); + }); EnvironmentSampleDto createdDto = getEnvironmentSampleFacade().save(dto); @@ -210,8 +211,8 @@ public void testGetByUuid() { public void testGetReferenceByUuid() { EnvironmentSampleDto dto = creator.createEnvironmentSample(environment.toReference(), reportingUser.toReference(), rdcf, lab.toReference(), s -> { - s.setSampleMaterial(EnvironmentSampleMaterial.AIR); - }); + s.setSampleMaterial(EnvironmentSampleMaterial.AIR); + }); EnvironmentSampleReferenceDto referenceDto = getEnvironmentSampleFacade().getReferenceByUuid(dto.getUuid()); @@ -264,7 +265,7 @@ public void testPseudonymization() { assertThat(returnedSample.getLocation().getCity(), is(emptyString())); assertThat(returnedSample.getLaboratory(), is(nullValue())); assertThat(returnedSample.getReportingUser(), is(nullValue())); - assertThat(returnedSample.getEnvironment().getCaption(), is(emptyString())); + assertThat(returnedSample.getEnvironment().getCaption(), is(DataHelper.getShortUuid(sample.getEnvironment().getUuid()))); } @Test @@ -525,6 +526,42 @@ public void testGetIndexList() { assertThat(getEnvironmentSampleFacade().getIndexList(criteria3, null, null, null), hasSize(2)); } + @Test + public void testGetIndexListWithRestrictedAccessToAssignedEntities() { + EnvironmentSampleDto environmentSample = + creator.createEnvironmentSample(environment.toReference(), reportingUser.toReference(), rdcf, lab.toReference(), s -> { + s.setFieldSampleId("field_sample-1"); + s.getLocation().setRegion(rdcf.region); + s.getLocation().setDistrict(rdcf.district); + s.getLocation().setStreet("street"); + s.getLocation().setHouseNumber("1"); + s.getLocation().setPostalCode("12345"); + s.getLocation().setCity("city"); + s.setDispatched(true); + s.setDispatchDate(new Date()); + s.setReceived(false); + s.setSampleMaterial(EnvironmentSampleMaterial.OTHER); + s.setOtherSampleMaterial("Other sample material"); + }); + Pathogen positivePathogen = creator.createPathogen("TEST_PATHOGEN", "Test pathogen"); + PathogenTestDto positiveTest = creator.createPathogenTest( + environmentSample.toReference(), + PathogenTestType.ISOLATION, + positivePathogen, + lab.toReference(), + reportingUser.toReference(), + PathogenTestResultType.POSITIVE, + null); + assertThat(getEnvironmentSampleFacade().getIndexList(null, null, null, null), hasSize(1)); + + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + assertThat(getEnvironmentSampleFacade().getIndexList(null, null, null, null), hasSize(0)); + + } + @Test public void testRelevanceStatusFilter() { EnvironmentDto environment1 = creator.createEnvironment("Env1", EnvironmentMedia.WATER, reportingUser.toReference(), rdcf); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/event/EventFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/event/EventFacadeEjbTest.java index 3164ff5e684..d21d495c443 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/event/EventFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/event/EventFacadeEjbTest.java @@ -228,6 +228,61 @@ public void testGetIndexList() { assertEquals("TitleEv2", results.get(0).getEventTitle()); } + @Test + public void testGetIndexListByARestrictedAccessToAssignedEntities() { + RDCF rdcf = creator.createRDCF(); + UserDto user = creator.createSurveillanceSupervisor(rdcf); + final EventDto event = creator.createEvent( + EventStatus.SIGNAL, + EventInvestigationStatus.PENDING, + "TitleEv1", + "DescriptionEv1", + "First", + "Name", + "12345", + TypeOfPlace.PUBLIC_PLACE, + DateHelper.subtractDays(new Date(), 1), + new Date(), + user.toReference(), + user.toReference(), + Disease.EVD, + rdcf); + + final EventDto event1 = creator.createEvent( + EventStatus.EVENT, + EventInvestigationStatus.PENDING, + "TitleEv2", + "DescriptionEv2", + "First", + "Name", + "12345", + TypeOfPlace.FACILITY, + DateHelper.subtractDays(new Date(), 1), + new Date(), + user.toReference(), + user.toReference(), + Disease.EVD, + rdcf); + + EventCriteria eventCriteria = new EventCriteria(); + List results = getEventFacade().getIndexList(eventCriteria, 0, 100, null); + assertEquals(2, results.size()); + + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + List results2 = getEventFacade().getIndexList(eventCriteria, 0, 100, null); + assertEquals(0, results2.size()); + + loginWith(user); + event.setResponsibleUser(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getEventFacade().save(event); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + List results3 = getEventFacade().getIndexList(eventCriteria, 0, 100, null); + assertEquals(1, results3.size()); + } + @Test public void testGetExportList() { diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjbTest.java index 4b6a8ab083e..8ee42d2a627 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/ExternalEmailFacadeEjbTest.java @@ -1,40 +1,57 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ package de.symeda.sormas.backend.externalemail; import static de.symeda.sormas.backend.docgeneration.TemplateTestUtil.cleanLineSeparators; +import static de.symeda.sormas.backend.externalemail.luxembourg.NationalHealthIdValidatorTest.VALID_LU_NATIONAL_HEALTH_ID; import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.hasValue; import static org.hamcrest.Matchers.is; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.ArgumentMatchers.any; +import java.io.File; +import java.io.IOException; import java.io.StringWriter; import java.net.URISyntaxException; -import java.text.SimpleDateFormat; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; import javax.mail.MessagingException; import org.apache.commons.io.IOUtils; +import org.apache.pdfbox.Loader; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.Mockito; +import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.caze.CaseDataDto; import de.symeda.sormas.api.contact.ContactDto; @@ -42,29 +59,42 @@ import de.symeda.sormas.api.docgeneneration.DocumentTemplateException; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; import de.symeda.sormas.api.docgeneneration.RootEntityType; +import de.symeda.sormas.api.document.DocumentDto; +import de.symeda.sormas.api.document.DocumentReferenceDto; +import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.externalemail.ExternalEmailException; import de.symeda.sormas.api.externalemail.ExternalEmailOptionsDto; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.location.LocationDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogIndexDto; +import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.user.DefaultUserRole; import de.symeda.sormas.api.user.UserDto; +import de.symeda.sormas.api.utils.ValidationRuntimeException; import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.backend.MockProducer; import de.symeda.sormas.backend.TestDataCreator; +import de.symeda.sormas.backend.common.ConfigFacadeEjb; import de.symeda.sormas.backend.common.messaging.EmailService; +import de.symeda.sormas.backend.common.messaging.InvalidPhoneNumberException; +import de.symeda.sormas.backend.common.messaging.SmsService; import de.symeda.sormas.backend.docgeneration.AbstractDocGenerationTest; public class ExternalEmailFacadeEjbTest extends AbstractDocGenerationTest { - protected static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/yyyy"); - private TestDataCreator.RDCF rdcf; + private UserDto admin; private UserDto userDto; - private PersonDto personDto; @Mock private EmailService emailService; + @Mock + private SmsService smsService; @Override public void init() { @@ -72,6 +102,14 @@ public void init() { rdcf = creator.createRDCF("Region", "District", "Community", "Facility", "PointOfEntry"); + admin = creator.createUser( + rdcf.region.getUuid(), + rdcf.district.getUuid(), + rdcf.facility.getUuid(), + "Admin", + "Admin", + creator.getUserRoleReference(DefaultUserRole.ADMIN)); + userDto = creator.createUser( rdcf.region.getUuid(), rdcf.district.getUuid(), @@ -106,12 +144,125 @@ public void setup() throws URISyntaxException { } @Test - public void testSendEmailToCasePerson() throws DocumentTemplateException, ExternalEmailException, MessagingException { + public void testGetAvailableTemplates() throws DocumentTemplateException { + loginWith(admin); - CaseDataDto caze = creator.createCase(userDto.toReference(), rdcf, (c) -> { - c.setDisease(Disease.CORONAVIRUS); - c.setPerson(personDto.toReference()); - }); + getDocumentTemplateFacade() + .writeDocumentTemplate(DocumentWorkflow.CASE_EMAIL, "CaseEmailMock.txt", "#Subject\nContent".getBytes(StandardCharsets.UTF_8)); + getDocumentTemplateFacade() + .writeDocumentTemplate(DocumentWorkflow.CONTACT_EMAIL, "ContactEmailMock.txt", "#Subject\nContent".getBytes(StandardCharsets.UTF_8)); + + loginWith(userDto); + + List templateNames = getExternalEmailFacade().getTemplateNames(DocumentWorkflow.CASE_EMAIL); + + assertThat(templateNames.size(), is(2)); + // should return predefined test template "CaseEmail.txt" and the one just created by the test + assertThat(templateNames, containsInAnyOrder("CaseEmail.txt", "CaseEmailMock.txt")); + + assertThat( + getExternalEmailFacade().getTemplateNames(DocumentWorkflow.CONTACT_EMAIL), + containsInAnyOrder("ContactEmail.txt", "ContactEmailMock.txt")); + } + + @Test + public void testGetAttachableDocuments() throws IOException { + loginWith(admin); + + CaseDataDto caze = creator.createCase(userDto.toReference(), rdcf, null); + ContactDto contact = creator.createContact(userDto.toReference(), creator.createPerson().toReference()); + + createDocument("PDF Document.pdf", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("DOCX Document.docx", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("DOC Document.doc", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("TXT Document.txt", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("JPG Document.jpg", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("JPEG Document.jpeg", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("PNG Document.png", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("GIF Document.gif", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("PPT Document.ppt", DocumentRelatedEntityType.CASE, caze.getUuid()); + createDocument("Pdf Document Contact.pdf", DocumentRelatedEntityType.CONTACT, contact.getUuid()); + createDocument("HTML Document Contact.html", DocumentRelatedEntityType.CONTACT, contact.getUuid()); + createDocument("ODS Document Contact.ods", DocumentRelatedEntityType.CONTACT, contact.getUuid()); + + loginWith(userDto); + + List attachableCaseDocuments = + getExternalEmailFacade().getAttachableDocuments(DocumentWorkflow.CASE_EMAIL, caze.getUuid()); + assertThat(attachableCaseDocuments, hasSize(6)); + assertThat( + attachableCaseDocuments.stream().map(DocumentReferenceDto::getCaption).collect(Collectors.toList()), + containsInAnyOrder( + "PDF Document.pdf", + "DOCX Document.docx", + "JPG Document.jpg", + "JPEG Document.jpeg", + "PNG Document.png", + "GIF Document.gif")); + assertThat(getExternalEmailFacade().getAttachableDocuments(DocumentWorkflow.CONTACT_EMAIL, contact.getUuid()), hasSize(1)); + + assertThrows( + IllegalArgumentException.class, + () -> getExternalEmailFacade().getAttachableDocuments(DocumentWorkflow.EVENT_PARTICIPANT_EMAIL, "dummy-uuid")); + } + + @Test + public void testIsAttachmentAvailableWithNationalHealthId() { + // not national health id and no phone number -> no attachment available + PersonDto person = createPerson(null, null); + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(false)); + + //with national health id -> attachment available + person = createPerson("1234567890", null); + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(true)); + } + + @Test + public void testIsAttachmentAvailableWithPhoneNumber() { + PersonDto person = createPerson(null, "+49 681 1234"); + + // without sms service setup -> no attachment available + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(false)); + + // setup mock sms service -> attachment available + setupMockSmsService(); + + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(true)); + } + + @Test + public void testIsAttachmentAvailableForLuxembourg() { + MockProducer.mockProperty(ConfigFacadeEjb.COUNTRY_LOCALE, CountryHelper.COUNTRY_CODE_LUXEMBOURG); + + // invalid national health id -> no attachment available + PersonDto person = createPerson("1234567890", null); + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(false)); + + // valid national health id -> attachment available + person = createPerson(VALID_LU_NATIONAL_HEALTH_ID, null); + getPersonFacade().save(person); + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(true)); + + // no national health id but phone number -> attachment available + person = createPerson(null, "+49 681 1234"); + + // no sms service setup -> no attachment available + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(false)); + + // setup mock sms service -> attachment available + setupMockSmsService(); + + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(true)); + + // invalid national health id but phone number -> attachment available + person = createPerson(VALID_LU_NATIONAL_HEALTH_ID, "+49 681 1234"); + assertThat(getExternalEmailFacade().isAttachmentAvailable(person.toReference()), is(true)); + } + + @Test + public void testSendEmailToCasePerson() throws DocumentTemplateException, ExternalEmailException, MessagingException, IOException { + + CaseDataDto caze = creator.createCase(userDto.toReference(), personDto.toReference(), rdcf); Mockito.doAnswer(invocation -> { assertThat(invocation.getArgument(0), is("test@mail.com")); @@ -124,16 +275,26 @@ public void testSendEmailToCasePerson() throws DocumentTemplateException, Extern assertThat(invocation.getArgument(2), is(expectedContent)); return null; - }).when(emailService).sendEmail(any(), any(), any()); + }).when(emailService).sendEmail(any(), any(), any(), any()); ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); options.setTemplateName("CaseEmail.txt"); options.setRecipientEmail("test@mail.com"); getExternalEmailFacade().sendEmail(options); + + Mockito.verify(emailService, Mockito.times(1)).sendEmail(any(), any(), any(), any()); + + List messageLogs = + getManualMessageLogFacade().getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).caze(caze.toReference())); + assertThat(messageLogs, hasSize(1)); + assertThat(messageLogs.get(0).getUsedTemplate(), is("CaseEmail.txt")); + assertThat(messageLogs.get(0).getEmailAddress(), is("test@mail.com")); + assertThat(messageLogs.get(0).getSendingUser(), is(userDto.toReference())); + assertThat(messageLogs.get(0).getAttachedDocuments(), hasSize(0)); } @Test - public void testSendEmailToContactPerson() throws DocumentTemplateException, ExternalEmailException, MessagingException { + public void testSendEmailToContactPerson() throws DocumentTemplateException, ExternalEmailException, MessagingException, IOException { ContactDto contact = creator.createContact(userDto.toReference(), personDto.toReference(), Disease.CORONAVIRUS, (c) -> { c.setContactStatus(ContactStatus.ACTIVE); @@ -151,12 +312,252 @@ public void testSendEmailToContactPerson() throws DocumentTemplateException, Ext assertThat(invocation.getArgument(2), is(expectedContent)); return null; - }).when(emailService).sendEmail(any(), any(), any()); + }).when(emailService).sendEmail(any(), any(), any(), any()); ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CONTACT_EMAIL, RootEntityType.ROOT_CONTACT, contact.toReference()); options.setTemplateName("ContactEmail.txt"); options.setRecipientEmail("test@mail.com"); getExternalEmailFacade().sendEmail(options); + + Mockito.verify(emailService, Mockito.times(1)).sendEmail(any(), any(), any(), any()); + + List messageLogs = + getManualMessageLogFacade().getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).contact(contact.toReference())); + assertThat(messageLogs, hasSize(1)); + assertThat(messageLogs.get(0).getUsedTemplate(), is("ContactEmail.txt")); + assertThat(messageLogs.get(0).getEmailAddress(), is("test@mail.com")); + assertThat(messageLogs.get(0).getSendingUser(), is(userDto.toReference())); + assertThat(messageLogs.get(0).getAttachedDocuments(), hasSize(0)); + } + + @Test + public void testSendEmailWithAttachments() throws MessagingException, DocumentTemplateException, ExternalEmailException, IOException { + MockProducer.mockProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, MockProducer.TMP_PATH); + String personNationalHealthId = "1234567890"; + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN, p -> { + p.setNationalHealthId(personNationalHealthId); + }); + + CaseDataDto caze = creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + List supportedFileTypes = Arrays.asList("pdf", "docx", "jpg", "png", "gif"); + List documents = new ArrayList<>(supportedFileTypes.size()); + for (String type : supportedFileTypes) { + documents.add( + createDocument( + type.toUpperCase() + " Document." + type, + DocumentRelatedEntityType.CASE, + caze.getUuid(), + IOUtils.toByteArray(getClass().getResourceAsStream("/externalemail/" + type.toUpperCase() + " Attachment." + type)))); + } + + Mockito.doAnswer(invocation -> { + Map filesAttached = invocation.getArgument(3); + + assertThat(filesAttached.size(), is(supportedFileTypes.size())); + for (String type : supportedFileTypes) { + assertThat(filesAttached, hasValue(type.toUpperCase() + " Document.pdf")); + } + + for (Map.Entry entry : filesAttached.entrySet()) { + File file = entry.getKey(); + String attachmentName = entry.getValue(); + + // pdf files should be readable + try { + Loader.loadPDF(file, personNationalHealthId); + } catch (IOException e) { + fail("Failed to open file " + attachmentName + "(" + file.getName() + "): " + e.getMessage()); + } + } + + return null; + }).when(emailService).sendEmail(any(), any(), any(), any()); + + ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); + options.setTemplateName("CaseEmail.txt"); + options.setRecipientEmail("test@mail.com"); + options.setAttachedDocuments(documents.stream().map(DocumentDto::toReference).collect(Collectors.toSet())); + + getExternalEmailFacade().sendEmail(options); + Mockito.verify(emailService, Mockito.times(1)).sendEmail(any(), any(), any(), any()); + + List messageLogs = + getManualMessageLogFacade().getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).caze(caze.toReference())); + assertThat(messageLogs, hasSize(1)); + assertThat(messageLogs.get(0).getUsedTemplate(), is("CaseEmail.txt")); + assertThat(messageLogs.get(0).getEmailAddress(), is("test@mail.com")); + assertThat(messageLogs.get(0).getSendingUser(), is(userDto.toReference())); + assertThat(messageLogs.get(0).getAttachedDocuments(), hasSize(supportedFileTypes.size())); + documents.forEach(d -> assertThat(messageLogs.get(0).getAttachedDocuments(), hasItem(d.getName()))); + } + + @Test + public void testEncryptAttachmentsWithRandomPassword() + throws MessagingException, DocumentTemplateException, ExternalEmailException, IOException, InvalidPhoneNumberException { + setupMockSmsService(); + + MockProducer.mockProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, MockProducer.TMP_PATH); + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN, p -> { + p.setPhone("+49 681 1234"); + }); + + CaseDataDto caze = creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + List supportedFileTypes = Arrays.asList("pdf", "docx", "jpg", "png", "gif"); + List documents = new ArrayList<>(supportedFileTypes.size()); + for (String type : supportedFileTypes) { + documents.add( + createDocument( + type.toUpperCase() + " Document." + type, + DocumentRelatedEntityType.CASE, + caze.getUuid(), + IOUtils.toByteArray(getClass().getResourceAsStream("/externalemail/" + type.toUpperCase() + " Attachment." + type)))); + } + + ArgumentCaptor> attachmentsCaptor = ArgumentCaptor.forClass(Map.class); + Mockito.doAnswer(invocation -> { + Map filesAttached = invocation.getArgument(3); + + assertThat(filesAttached.size(), is(supportedFileTypes.size())); + for (String type : supportedFileTypes) { + assertThat(filesAttached, hasValue(type.toUpperCase() + " Document.pdf")); + } + + return null; + }).when(emailService).sendEmail(any(), any(), any(), attachmentsCaptor.capture()); + + Mockito.doAnswer(invocation -> { + assertThat(invocation.getArgument(0), is(person.getPhone())); + // get the random password out of the message + Matcher smsMessageMatcher = + Pattern.compile(String.format(I18nProperties.getString(Strings.messageExternalEmailAttachmentPassword), "([a-zA-Z0-9]{10})")) + .matcher(invocation.getArgument(1)); + assertThat("Sms message is not the expected one", smsMessageMatcher.matches(), is(true)); + + String password = smsMessageMatcher.group(1); + + for (Map.Entry entry : attachmentsCaptor.getValue().entrySet()) { + File file = entry.getKey(); + String attachmentName = entry.getValue(); + + // pdf files should be readable + try { + Loader.loadPDF(file, password); + } catch (IOException e) { + fail("Failed to open file " + attachmentName + "(" + file.getName() + "): " + e.getMessage()); + } + } + + return null; + }).when(smsService).sendSms(any(), any()); + + ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); + options.setTemplateName("CaseEmail.txt"); + options.setRecipientEmail("test@mail.com"); + options.setAttachedDocuments(documents.stream().map(DocumentDto::toReference).collect(Collectors.toSet())); + + getExternalEmailFacade().sendEmail(options); + + Mockito.verify(emailService, Mockito.times(1)).sendEmail(any(), any(), any(), any()); + Mockito.verify(smsService, Mockito.times(1)).sendSms(any(), any()); + } + + @Test + public void testSendEmailWithUnsupportedAttachment() throws MessagingException, IOException, InvalidPhoneNumberException { + MockProducer.mockProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, MockProducer.TMP_PATH); + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN, p -> p.setNationalHealthId("1234567890")); + + CaseDataDto caze = creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + DocumentDto document = + createDocument("SomeDocument.txt", DocumentRelatedEntityType.CASE, caze.getUuid(), "Some content".getBytes(StandardCharsets.UTF_8)); + + ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); + options.setTemplateName("CaseEmail.txt"); + options.setRecipientEmail("test@mail.com"); + options.setAttachedDocuments(Collections.singleton(document.toReference())); + + assertThrows(IllegalArgumentException.class, () -> getExternalEmailFacade().sendEmail(options)); + + Mockito.verify(emailService, Mockito.times(0)).sendEmail(any(), any(), any(), any()); + Mockito.verify(smsService, Mockito.times(0)).sendSms(any(), any()); + } + + @Test + public void testSendAttachmentWithUnavailablePassword() throws MessagingException, IOException, InvalidPhoneNumberException { + MockProducer.mockProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, MockProducer.TMP_PATH); + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN); + + CaseDataDto caze = creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + DocumentDto document = + createDocument("SomeDocument.txt", DocumentRelatedEntityType.CASE, caze.getUuid(), "Some content".getBytes(StandardCharsets.UTF_8)); + + ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); + options.setTemplateName("CaseEmail.txt"); + options.setRecipientEmail("test@mail.com"); + options.setAttachedDocuments(Collections.singleton(document.toReference())); + + assertThrows(ExternalEmailException.class, () -> getExternalEmailFacade().sendEmail(options)); + + Mockito.verify(emailService, Mockito.times(0)).sendEmail(any(), any(), any(), any()); + Mockito.verify(smsService, Mockito.times(0)).sendSms(any(), any()); + } + + @Test + public void testSendAttachmentNotRelatedToEntity() throws MessagingException, IOException, InvalidPhoneNumberException { + MockProducer.mockProperty(ConfigFacadeEjb.DOCUMENT_FILES_PATH, MockProducer.TMP_PATH); + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN, p -> { + p.setNationalHealthId("1234567890"); + }); + + CaseDataDto caze = creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + DocumentDto document = + createDocument("SomeDocument.txt", DocumentRelatedEntityType.CONTACT, "mock-uuid", "Some content".getBytes(StandardCharsets.UTF_8)); + + ExternalEmailOptionsDto options = new ExternalEmailOptionsDto(DocumentWorkflow.CASE_EMAIL, RootEntityType.ROOT_CASE, caze.toReference()); + options.setTemplateName("CaseEmail.txt"); + options.setRecipientEmail("test@mail.com"); + options.setAttachedDocuments(Collections.singleton(document.toReference())); + + assertThrows(ValidationRuntimeException.class, () -> getExternalEmailFacade().sendEmail(options)); + + Mockito.verify(emailService, Mockito.times(0)).sendEmail(any(), any(), any(), any()); + Mockito.verify(smsService, Mockito.times(0)).sendSms(any(), any()); + } + + private void createDocument(String fileName, DocumentRelatedEntityType relatedEntityType, String relatedEntityUuid) throws IOException { + createDocument(fileName, relatedEntityType, relatedEntityUuid, new byte[0]); + } + + private DocumentDto createDocument(String fileName, DocumentRelatedEntityType relatedEntityType, String relatedEntityUuid, byte[] content) + throws IOException { + DocumentDto document = DocumentDto.build(); + document.setName(fileName); + document.setUploadingUser(userDto.toReference()); + document.setRelatedEntityType(relatedEntityType); + document.setRelatedEntityUuid(relatedEntityUuid); + document.setMimeType("application/octet-stream"); + + return getDocumentFacade().saveDocument(document, content); + } + + private PersonDto createPerson(String nationalHealthId, String phone) { + PersonDto person = creator.createPerson("Person", "Name", Sex.UNKNOWN, p -> { + p.setNationalHealthId(nationalHealthId); + p.setPhone(phone); + }); + creator.createCase(userDto.toReference(), person.toReference(), rdcf); + + return person; + } + + private static void setupMockSmsService() { + MockProducer.mockProperty(ConfigFacadeEjb.SMS_AUTH_KEY, "test"); + MockProducer.mockProperty(ConfigFacadeEjb.SMS_AUTH_SECRET, "test"); + MockProducer.mockProperty(ConfigFacadeEjb.SMS_SENDER_NAME, "test"); } } diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidatorTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidatorTest.java new file mode 100644 index 00000000000..cf4d55517c7 --- /dev/null +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalemail/luxembourg/NationalHealthIdValidatorTest.java @@ -0,0 +1,66 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.externalemail.luxembourg; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Test; + +import de.symeda.sormas.backend.person.Person; + +public class NationalHealthIdValidatorTest { + + public static final String VALID_LU_NATIONAL_HEALTH_ID = "1980010145728"; + + @Test + public void testIsValid() { + assertThat(NationalHealthIdValidator.isValid("19800101", createPerson(1980, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid("1980Jan0145728", createPerson(1980, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid("1980Ja0145728", createPerson(1980, 1, 1)), is(false)); + + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, 1, 1)), is(true)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(null, 1, 1)), is(true)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, 1, null)), is(true)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, null, 1)), is(true)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, null, null)), is(true)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(null, null, null)), is(true)); + + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1981, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, 2, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1980, 1, 2)), is(false)); + assertThat(NationalHealthIdValidator.isValid(VALID_LU_NATIONAL_HEALTH_ID, createPerson(1981, 1, null)), is(false)); + + assertThat(NationalHealthIdValidator.isValid("1980010145628", createPerson(1980, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid("1980010145718", createPerson(1980, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid("1980010145723", createPerson(1980, 1, 1)), is(false)); + assertThat(NationalHealthIdValidator.isValid("1980010345728", createPerson(1980, 1, null)), is(false)); + } + + @NotNull + private static Person createPerson(Integer birthdateYYYY, Integer birthdateMM, Integer birthdateDD) { + Person person = new Person(); + person.setBirthdateYYYY(birthdateYYYY); + person.setBirthdateMM(birthdateMM); + person.setBirthdateDD(birthdateDD); + + return person; + } +} diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbTest.java index f7f9b0eb7d3..035dc4dcdf2 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbTest.java @@ -28,7 +28,9 @@ import java.util.Collections; import java.util.Date; +import java.util.HashSet; import java.util.List; +import java.util.Set; import java.util.function.Consumer; import org.junit.jupiter.api.Test; @@ -279,7 +281,9 @@ public void testDiseaseVariantDeterminationOnSave() { CustomizableEnumValue diseaseVariantEnumValue = new CustomizableEnumValue(); diseaseVariantEnumValue.setDataType(CustomizableEnumType.DISEASE_VARIANT); diseaseVariantEnumValue.setValue("BF.1.2"); - diseaseVariantEnumValue.setDiseases(Collections.singletonList(Disease.CORONAVIRUS)); + Set diseases = new HashSet<>(); + diseases.add(Disease.CORONAVIRUS); + diseaseVariantEnumValue.setDiseases(diseases); diseaseVariantEnumValue.setCaption("BF.1.2 variant"); getCustomizableEnumValueService().ensurePersisted(diseaseVariantEnumValue); @@ -289,7 +293,7 @@ public void testDiseaseVariantDeterminationOnSave() { CustomizableEnumValue diseaseVariantEnumValue2 = new CustomizableEnumValue(); diseaseVariantEnumValue2.setDataType(CustomizableEnumType.DISEASE_VARIANT); diseaseVariantEnumValue2.setValue("BF.1.3"); - diseaseVariantEnumValue2.setDiseases(Collections.singletonList(Disease.CORONAVIRUS)); + diseaseVariantEnumValue2.setDiseases(diseases); diseaseVariantEnumValue2.setCaption("BF.1.3 variant"); getCustomizableEnumValueService().ensurePersisted(diseaseVariantEnumValue2); @@ -461,12 +465,12 @@ private ExternalMessageDto createLabMessage(Consumer customC SampleReportDto sampleReport = SampleReportDto.build(); sampleReport.setSampleDateTime(new Date()); sampleReport.setSpecimenCondition(SpecimenCondition.ADEQUATE); - sampleReport.setSampleMaterial(SampleMaterial.CRUST); + sampleReport.setSampleMaterial(SampleMaterial.CRUST); TestReportDto testReport = TestReportDto.build(); testReport.setTestResult(PathogenTestResultType.PENDING); testReport.setTestDateTime(new Date()); - testReport.setTestType(PathogenTestType.PCR_RT_PCR); + testReport.setTestType(PathogenTestType.PCR_RT_PCR); sampleReport.setTestReports(Collections.singletonList(testReport)); labMessage.setSampleReports(Collections.singletonList(sampleReport)); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalsurveillancetool/ExternalSurveillanceToolGatewayFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalsurveillancetool/ExternalSurveillanceToolGatewayFacadeEjbTest.java index 2d6c2b0a909..44f8a7e6d75 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalsurveillancetool/ExternalSurveillanceToolGatewayFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalsurveillancetool/ExternalSurveillanceToolGatewayFacadeEjbTest.java @@ -488,6 +488,7 @@ public void testCaseDeletionAndRestoration_WithoutCaseAllowedToBeSharedWithRepor caze.toReference(), null, null, + null, new Date(), user.toReference()); SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java index 108a590389d..0c9134c4978 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java @@ -23,10 +23,10 @@ import com.tngtech.archunit.core.importer.ClassFileImporter; import de.symeda.sormas.api.importexport.DatabaseTable; -import de.symeda.sormas.backend.common.messaging.ManualMessageLog; import de.symeda.sormas.backend.environment.Environment; import de.symeda.sormas.backend.environment.environmentsample.EnvironmentSample; import de.symeda.sormas.backend.immunization.entity.DirectoryImmunization; +import de.symeda.sormas.backend.manualmessagelog.ManualMessageLog; import de.symeda.sormas.backend.systemevent.SystemEvent; import de.symeda.sormas.backend.user.UserReference; import de.symeda.sormas.backend.vaccination.FirstVaccinationDate; diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjbTest.java new file mode 100644 index 00000000000..15d347fd475 --- /dev/null +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/manualmessagelog/ManualMessageLogFacadeEjbTest.java @@ -0,0 +1,164 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.backend.manualmessagelog; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsInAnyOrder; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.nullValue; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.function.Consumer; + +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.backend.util.RightsAllowed; +import org.junit.jupiter.api.Test; + +import de.symeda.sormas.api.caze.CaseDataDto; +import de.symeda.sormas.api.contact.ContactDto; +import de.symeda.sormas.api.event.EventDto; +import de.symeda.sormas.api.event.EventParticipantDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogIndexDto; +import de.symeda.sormas.api.messaging.MessageType; +import de.symeda.sormas.api.travelentry.TravelEntryDto; +import de.symeda.sormas.api.user.DefaultUserRole; +import de.symeda.sormas.api.user.UserDto; +import de.symeda.sormas.backend.AbstractBeanTest; +import de.symeda.sormas.backend.TestDataCreator; + +public class ManualMessageLogFacadeEjbTest extends AbstractBeanTest { + + private TestDataCreator.RDCF rdcf; + private UserDto user; + + @Override + public void init() { + super.init(); + + rdcf = creator.createRDCF(); + user = creator.createUser(rdcf, DefaultUserRole.SURVEILLANCE_OFFICER); + } + + @Test + public void testGetIndexList() { + CaseDataDto caze = creator.createCase(user.toReference(), creator.createPerson().toReference(), rdcf); + ManualMessageLog caseEmail = createEmailMessageLog(m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(caze.getPerson())); + m.setCaze(getCaseService().getByReferenceDto(caze.toReference())); + }); + ContactDto contact = creator.createContact(rdcf, user.toReference(), creator.createPerson().toReference()); + ManualMessageLog contactEmail = createEmailMessageLog(m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(contact.getPerson())); + m.setContact(getContactService().getByReferenceDto(contact.toReference())); + }); + + createManualMessageLog(MessageType.SMS, null, m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(caze.getPerson())); + m.setCaze(getCaseService().getByReferenceDto(caze.toReference())); + }); + + List caseEmails = getManualMessageLogFacade() + .getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).withTemplate(true).caze(caze.toReference())); + assertThat(caseEmails, hasSize(1)); + assertThat(caseEmails.get(0).getUuid(), is(caseEmail.getUuid())); + assertThat(caseEmails.get(0).getEmailAddress(), is("test@email.com")); + assertThat(caseEmails.get(0).getSendingUser(), is(user.toReference())); + assertThat(caseEmails.get(0).getMessageType(), is(MessageType.EMAIL)); + assertThat(caseEmails.get(0).getUsedTemplate(), is("TestTemplate.txt")); + assertThat(caseEmails.get(0).getAttachedDocuments(), containsInAnyOrder("TestDocument.pdf", "TestDoc2.docx")); + + List contactEmails = getManualMessageLogFacade() + .getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).withTemplate(true).contact(contact.toReference())); + assertThat(contactEmails, hasSize(1)); + assertThat(contactEmails.get(0).getUuid(), is(contactEmail.getUuid())); + } + + @Test + public void testGetIndexListForEventParticipant() { + EventDto event = creator.createEvent(user.toReference()); + EventParticipantDto eventParticipant = creator.createEventParticipant(event.toReference(), creator.createPerson(), user.toReference()); + + ManualMessageLog eventParticipantEmail = createEmailMessageLog(m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(eventParticipant.getPerson().toReference())); + m.setEventParticipant(getEventParticipantService().getByReferenceDto(eventParticipant.toReference())); + }); + + List epEmails = getManualMessageLogFacade().getIndexList( + new ManualMessageLogCriteria().messageType(MessageType.EMAIL).withTemplate(true).eventParticipant(eventParticipant.toReference())); + assertThat(epEmails, hasSize(1)); + assertThat(epEmails.get(0).getUuid(), is(eventParticipantEmail.getUuid())); + } + + @Test + public void testGetIndexListForTravelEntry() { + TravelEntryDto travelEntry = creator.createTravelEntry(creator.createPerson().toReference(), user.toReference(), rdcf, null); + ManualMessageLog travelEntryEmail = createEmailMessageLog(m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(travelEntry.getPerson())); + m.setTravelEntry(getTravelEntryService().getByReferenceDto(travelEntry.toReference())); + }); + + List epEmails = getManualMessageLogFacade() + .getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).withTemplate(true).travelEntry(travelEntry.toReference())); + assertThat(epEmails, hasSize(1)); + assertThat(epEmails.get(0).getUuid(), is(travelEntryEmail.getUuid())); + } + + @Test + public void testGetIndexListPseudonymization() { + TravelEntryDto travelEntry = creator.createTravelEntry(creator.createPerson().toReference(), user.toReference(), rdcf, null); + ManualMessageLog travelEntryEmail = createEmailMessageLog(m -> { + m.setRecipientPerson(getPersonService().getByReferenceDto(travelEntry.getPerson())); + m.setTravelEntry(getTravelEntryService().getByReferenceDto(travelEntry.toReference())); + }); + + TestDataCreator.RDCF rdcf2 = creator.createRDCF(); + UserDto user2 = creator.createUser(rdcf2, "Officer2", DefaultUserRole.SURVEILLANCE_OFFICER); + + loginWith(user2); + + List epEmails = getManualMessageLogFacade() + .getIndexList(new ManualMessageLogCriteria().messageType(MessageType.EMAIL).withTemplate(true).travelEntry(travelEntry.toReference())); + assertThat(epEmails, hasSize(1)); + assertThat(epEmails.get(0).getUuid(), is(travelEntryEmail.getUuid())); + assertThat(epEmails.get(0).getEmailAddress(), is(I18nProperties.getCaption(Captions.inaccessibleValue))); + assertThat(epEmails.get(0).getSendingUser(), is(nullValue())); + } + + private ManualMessageLog createEmailMessageLog(Consumer setupRelatedEntity) { + return createManualMessageLog(MessageType.EMAIL, "TestTemplate.txt", setupRelatedEntity); + } + + private ManualMessageLog createManualMessageLog(MessageType messageType, String templateName, Consumer setupRelatedEntity) { + ManualMessageLog log = new ManualMessageLog(); + log.setMessageType(messageType); + log.setSendingUser(getUserService().getByUuid(user.getUuid())); + log.setSentDate(new Date()); + log.setEmailAddress("test@email.com"); + log.setUsedTemplate(templateName); + log.setAttachedDocuments(Arrays.asList("TestDocument.pdf", "TestDoc2.docx")); + + setupRelatedEntity.accept(log); + + getManualMessageLogService().ensurePersisted(log); + + return log; + } +} diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/person/PersonFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/person/PersonFacadeEjbTest.java index d9f341dd7c8..860b1de327a 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/person/PersonFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/person/PersonFacadeEjbTest.java @@ -81,6 +81,7 @@ import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.DateHelper; import de.symeda.sormas.api.utils.SortProperty; +import de.symeda.sormas.api.uuid.AbstractUuidDto; import de.symeda.sormas.api.vaccination.VaccinationDto; import de.symeda.sormas.backend.AbstractBeanTest; import de.symeda.sormas.backend.MockProducer; @@ -467,6 +468,39 @@ public void testGetMatchingNameDtos() { assertThat(matchingUuids, containsInAnyOrder(person1.getUuid(), person3.getUuid(), person7.getUuid(), person9.getUuid(), person11.getUuid())); } + @Test + public void testSimilarPersonByNationalHealthId() { + final String nationalHealthId = "1234567890"; + UserDto user = creator.createSurveillanceSupervisor(rdcf); + + PersonDto matchingNameAndHealthIdPerson = createPersonWithCase("James", "Smith", nationalHealthId, user); + PersonDto otherNationalHealthIdPerson = createPersonWithCase("James", "Smith", "0987654321", user); + PersonDto sameNameNoHealthIdPerson = createPersonWithCase("James", "Smith", null, user); + PersonDto otherNameSameHealthIdPerson = createPersonWithCase("Maria", "Garcia", nationalHealthId, user); + PersonDto otherNameNoHealthIdPerson = createPersonWithCase("Maria", "Garcia", null, user); + + PersonSimilarityCriteria criteria = new PersonSimilarityCriteria().firstName("James").lastName("Smith").nationalHealthId(nationalHealthId); + List similarPersonUuids = + getPersonFacade().getSimilarPersonDtos(criteria).stream().map(AbstractUuidDto::getUuid).collect(Collectors.toList()); + + assertThat(similarPersonUuids, containsInAnyOrder(matchingNameAndHealthIdPerson.getUuid(), sameNameNoHealthIdPerson.getUuid())); + + MockProducer.mockProperty(ConfigFacadeEjb.DUPLICATE_CHECKS_NATIONAL_HEALTH_ID_OVERRIDES_CRITERIA, Boolean.TRUE.toString()); + similarPersonUuids = getPersonFacade().getSimilarPersonDtos(criteria).stream().map(AbstractUuidDto::getUuid).collect(Collectors.toList()); + assertThat( + similarPersonUuids, + containsInAnyOrder(matchingNameAndHealthIdPerson.getUuid(), sameNameNoHealthIdPerson.getUuid(), otherNameSameHealthIdPerson.getUuid())); + + } + + private PersonDto createPersonWithCase(String firstName, String lastName, String nationalHealthId, UserDto user) { + PersonDto person = creator.createPerson(firstName, lastName, p -> { + p.setNationalHealthId(nationalHealthId); + }); + creator.createCase(user.toReference(), person.toReference(), rdcf); + return person; + } + @Test /* * If you need to change this test to make it pass, you probably changed the behaviour of the ExternalVisitsResource. diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java index 490d765c1dc..8811ec8aa87 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java @@ -275,6 +275,51 @@ public void testGetIndexListBySampleAssociationType() { getSampleFacade().getIndexList(new SampleCriteria().sampleAssociationType(SampleAssociationType.EVENT_PARTICIPANT), 0, 100, null).size()); } + @Test + public void testGetIndexListBySampleAssociationTypeAndRestrictedAccessToAssignedEntities() { + + TestDataCreator.RDCF rdcf = creator.createRDCF("Region", "District", "Community", "Facility"); + UserDto user = useNationalAdminLogin(); + PersonDto cazePerson = creator.createPerson("Case", "Person1"); + CaseDataDto caze = creator.createCase( + user.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf); + + SampleDto cazeSample = creator.createSample(caze.toReference(), user.toReference(), rdcf.facility); + + PersonDto contactPerson = creator.createPerson("Contact", "Person2"); + ContactDto contact = creator.createContact(user.toReference(), contactPerson.toReference(), caze); + cazeSample.setSampleDateTime(DateHelper.subtractDays(new Date(), 5)); + getSampleFacade().saveSample(cazeSample); + SampleDto sample = creator.createSample( + contact.toReference(), + DateHelper.subtractDays(new Date(), 4), + new Date(), + user.toReference(), + SampleMaterial.BLOOD, + rdcf.facility); + assertEquals(2, getSampleFacade().getIndexList(new SampleCriteria(), 0, 100, null).size()); + + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + assertEquals(0, getSampleFacade().getIndexList(new SampleCriteria(), 0, 100, null).size()); + + loginWith(user); + caze.setSurveillanceOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getCaseFacade().save(caze); + contact.setContactOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getContactFacade().save(contact); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(2, getSampleFacade().getIndexList(new SampleCriteria(), 0, 100, null).size()); + } + @Test public void testGetIndexListForCaseConvertedFromContact() { diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbPseudonymizationTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbPseudonymizationTest.java index 51ec2bf406a..a2336fdc8ad 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbPseudonymizationTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbPseudonymizationTest.java @@ -389,12 +389,20 @@ public void testPseudonymizeGetByContact() { private TaskDto createCaseTask(CaseDataDto caze) { return creator - .createTask(TaskContext.CASE, TaskType.CASE_INVESTIGATION, TaskStatus.PENDING, caze.toReference(), null, null, new Date(), null); + .createTask(TaskContext.CASE, TaskType.CASE_INVESTIGATION, TaskStatus.PENDING, caze.toReference(), null, null, null, new Date(), null); } private TaskDto createContactTask(ContactDto contact) { - return creator - .createTask(TaskContext.CONTACT, TaskType.CONTACT_FOLLOW_UP, TaskStatus.PENDING, null, contact.toReference(), null, new Date(), null); + return creator.createTask( + TaskContext.CONTACT, + TaskType.CONTACT_FOLLOW_UP, + TaskStatus.PENDING, + null, + contact.toReference(), + null, + null, + new Date(), + null); } private void assertNotPseudonymized(TaskDto task) { diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbTest.java index 050e7004264..3336cdd7bde 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskFacadeEjbTest.java @@ -50,6 +50,8 @@ import de.symeda.sormas.api.caze.InvestigationStatus; import de.symeda.sormas.api.common.DeletionDetails; import de.symeda.sormas.api.contact.ContactDto; +import de.symeda.sormas.api.environment.EnvironmentDto; +import de.symeda.sormas.api.environment.EnvironmentMedia; import de.symeda.sormas.api.event.EventDto; import de.symeda.sormas.api.event.EventInvestigationStatus; import de.symeda.sormas.api.event.EventStatus; @@ -105,6 +107,7 @@ public void testTaskDirectoryForDeletedLinkedCase() { caze.toReference(), null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -129,6 +132,7 @@ public void testSampleDeletion() { null, null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); // Database should contain the created task @@ -149,6 +153,126 @@ public void testGetIndexList() { assertNotNull(getTaskFacade().getIndexList(null, 0, 100, null)); } + @Test + public void testGetIndexListByARestrictedAccessToAssignedEntitiesUser() { + RDCF rdcf = creator.createRDCF(); + + UserDto user = creator.createNationalUser(); + UserDto surveillanceOfficer = creator.createSurveillanceOfficer(rdcf); + assertNotNull(getTaskFacade().getIndexList(null, 0, 100, null)); + + //test tasks related to cases + loginWith(user); + String lastName = "Person"; + PersonDto cazePerson = creator.createPerson("Case", lastName); + final CaseDataDto firstCase = creator.createCase( + surveillanceOfficer.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf); + final CaseDataDto secondCase = creator.createCase( + surveillanceOfficer.toReference(), + cazePerson.toReference(), + Disease.EVD, + CaseClassification.PROBABLE, + InvestigationStatus.PENDING, + new Date(), + rdcf, + c -> c.setHealthFacilityDetails("abc")); + assertEquals(2, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + useNationalAdminLogin(); + UserDto surveillanceOfficerWithRestrictedAccessToAssignedEntities = + creator.createSurveillanceOfficerWithRestrictedAccessToAssignedEntities(rdcf); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertTrue(getCurrentUserService().hasRestrictedAccessToAssignedEntities()); + assertEquals(0, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + loginWith(user); + firstCase.setSurveillanceOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getCaseFacade().save(firstCase); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(1, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + //test tasks related to contacts + loginWith(user); + PersonDto contactPerson = creator.createPerson("Contact2", "Person2"); + final ContactDto contact = + creator.createContact(user.toReference(), user.toReference(), contactPerson.toReference(), null, new Date(), new Date(), Disease.EVD); + assertEquals(3, getTaskFacade().getIndexList(null, 0, 100, null).size()); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(1, getTaskFacade().getIndexList(null, 0, 100, null).size()); + loginWith(user); + contact.setContactOfficer(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getContactFacade().save(contact); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(2, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + //test tasks related to events + loginWith(user); + final EventDto event = creator.createEvent( + EventStatus.SIGNAL, + EventInvestigationStatus.PENDING, + "TitleEv1", + "DescriptionEv1", + "First", + "Name", + "12345", + TypeOfPlace.PUBLIC_PLACE, + DateHelper.subtractDays(new Date(), 1), + new Date(), + user.toReference(), + user.toReference(), + Disease.EVD, + rdcf); + creator.createTask( + TaskContext.EVENT, + TaskType.OTHER, + TaskStatus.PENDING, + null, + null, + event.toReference(), + null, + DateHelper.addDays(new Date(), 1), + user.toReference()); + assertEquals(4, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(2, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + loginWith(user); + event.setResponsibleUser(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getEventFacade().save(event); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(3, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + //test tasks related to environments + loginWith(user); + EnvironmentDto environment = creator.createEnvironment("Test Environment", EnvironmentMedia.WATER, user.toReference(), rdcf); + creator.createTask( + TaskContext.ENVIRONMENT, + TaskType.OTHER, + TaskStatus.PENDING, + null, + null, + null, + environment.toReference(), + DateHelper.addDays(new Date(), 1), + user.toReference()); + assertEquals(5, getTaskFacade().getIndexList(null, 0, 100, null).size()); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(3, getTaskFacade().getIndexList(null, 0, 100, null).size()); + + loginWith(user); + environment.setResponsibleUser(surveillanceOfficerWithRestrictedAccessToAssignedEntities.toReference()); + getEnvironmentFacade().save(environment); + loginWith(surveillanceOfficerWithRestrictedAccessToAssignedEntities); + assertEquals(4, getTaskFacade().getIndexList(null, 0, 100, null).size()); + } + @Test public void testArchivedTaskNotGettingTransfered() { @@ -189,6 +313,7 @@ public void testArchivedTaskNotGettingTransfered() { null, null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -198,6 +323,7 @@ public void testArchivedTaskNotGettingTransfered() { caze.toReference(), null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -207,6 +333,7 @@ public void testArchivedTaskNotGettingTransfered() { null, contact.toReference(), null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -216,6 +343,7 @@ public void testArchivedTaskNotGettingTransfered() { null, null, event.toReference(), + null, DateHelper.addDays(new Date(), 1), user.toReference()); // getAllActiveTasks and getAllUuids should return length 4+1+1 (case investigation & contact investigation) @@ -283,6 +411,7 @@ public void testGetAllActiveTasksBatched() { null, null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -292,6 +421,7 @@ public void testGetAllActiveTasksBatched() { caze.toReference(), null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -301,6 +431,7 @@ public void testGetAllActiveTasksBatched() { null, contact.toReference(), null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); creator.createTask( @@ -310,6 +441,7 @@ public void testGetAllActiveTasksBatched() { null, null, event.toReference(), + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -409,6 +541,7 @@ public void testFilterTasksByUserJurisdiction() { caze.toReference(), null, null, + null, new Date(), survOff.toReference()); assertThat(getTaskFacade().getIndexList(null, 0, 100, null), is(not(empty()))); @@ -541,6 +674,7 @@ public void testGetTaskListForUserWithoutEventViewRight() { null, null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -551,6 +685,7 @@ public void testGetTaskListForUserWithoutEventViewRight() { caze.toReference(), null, null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -562,6 +697,7 @@ public void testGetTaskListForUserWithoutEventViewRight() { null, contactDto.toReference(), null, + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -573,6 +709,7 @@ public void testGetTaskListForUserWithoutEventViewRight() { null, null, eventDto.toReference(), + null, DateHelper.addDays(new Date(), 1), user.toReference()); @@ -643,6 +780,7 @@ public void testUserWithoutEventViewRightSeeHisAssignTask() { null, null, eventDto.toReference(), + null, DateHelper.addDays(new Date(), 1), user.toReference()); TaskDto taskEvent2 = creator.createTask( @@ -652,6 +790,7 @@ public void testUserWithoutEventViewRightSeeHisAssignTask() { null, null, eventDto.toReference(), + null, DateHelper.addDays(new Date(), 1), noEventNoCaseViewUser.toReference()); @@ -727,8 +866,8 @@ public void testGetIndexListArchived() { RDCF rdcf = creator.createRDCF(); UserDto user = creator.createSurveillanceOfficer(rdcf); - TaskDto task = - creator.createTask(TaskContext.GENERAL, TaskType.ANIMAL_TESTING, TaskStatus.PENDING, null, null, null, new Date(), user.toReference()); + TaskDto task = creator + .createTask(TaskContext.GENERAL, TaskType.ANIMAL_TESTING, TaskStatus.PENDING, null, null, null, null, new Date(), user.toReference()); getTaskFacade().archive(Collections.singletonList(task.getUuid())); List archivedTasks = @@ -771,8 +910,8 @@ public void testGetEditPermissionTypeOnGenericTask() { RDCF rdcf = creator.createRDCF(); UserDto user = creator.createSurveillanceOfficer(rdcf); - TaskDto task = - creator.createTask(TaskContext.GENERAL, TaskType.ANIMAL_TESTING, TaskStatus.PENDING, null, null, null, new Date(), user.toReference()); + TaskDto task = creator + .createTask(TaskContext.GENERAL, TaskType.ANIMAL_TESTING, TaskStatus.PENDING, null, null, null, null, new Date(), user.toReference()); assertThat(getTaskFacade().getEditPermissionType(task.getUuid()), is(EditPermissionType.ALLOWED)); getTaskFacade().archive(Collections.singletonList(task.getUuid())); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskServiceTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskServiceTest.java index 7f02c8a5967..e8c6802da18 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskServiceTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/task/TaskServiceTest.java @@ -154,6 +154,7 @@ public void testFindBy() { contact.toReference(), null, null, + null, otherUser.toReference()); result = getTaskService().findByAssigneeContactTypeAndStatuses(null, contact.toReference(), null, null); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/user/UserFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/user/UserFacadeEjbTest.java index 6a5cc090302..59ed2aa4e71 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/user/UserFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/user/UserFacadeEjbTest.java @@ -17,6 +17,7 @@ import static org.hamcrest.Matchers.hasItem; import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -171,10 +172,13 @@ public void testGetIndexList() { */ @Test public void testGetIndexListFilteredAndOrderedByAddress() { - List result = - getUserFacade().getIndexList(new UserCriteria().freeText("min"), 0, 100, Collections.singletonList(new SortProperty(UserDto.ADDRESS))); + final UserCriteria userCriteria = new UserCriteria().freeText("min"); + List result = getUserFacade().getIndexList(userCriteria, 0, 100, Collections.singletonList(new SortProperty(UserDto.ADDRESS))); + + final long count = getUserFacade().count(userCriteria); assertThat(result, hasSize(1)); + assertThat(count, is(1L)); assertThat(result.get(0).getUserName(), equalTo("admin")); } diff --git a/sormas-backend/src/test/resources/META-INF/persistence.xml b/sormas-backend/src/test/resources/META-INF/persistence.xml index cb7e450b270..8989dfca0bd 100644 --- a/sormas-backend/src/test/resources/META-INF/persistence.xml +++ b/sormas-backend/src/test/resources/META-INF/persistence.xml @@ -64,7 +64,7 @@ de.symeda.sormas.backend.sormastosormas.share.outgoing.ShareRequestInfo de.symeda.sormas.backend.document.Document de.symeda.sormas.backend.exposure.Exposure - de.symeda.sormas.backend.common.messaging.ManualMessageLog + de.symeda.sormas.backend.manualmessagelog.ManualMessageLog de.symeda.sormas.backend.systemevent.SystemEvent de.symeda.sormas.backend.externalmessage.ExternalMessage de.symeda.sormas.backend.caze.surveillancereport.SurveillanceReport diff --git a/sormas-backend/src/test/resources/externalemail/DOCX Attachment.docx b/sormas-backend/src/test/resources/externalemail/DOCX Attachment.docx new file mode 100644 index 00000000000..232343bd1aa Binary files /dev/null and b/sormas-backend/src/test/resources/externalemail/DOCX Attachment.docx differ diff --git a/sormas-backend/src/test/resources/externalemail/GIF Attachment.gif b/sormas-backend/src/test/resources/externalemail/GIF Attachment.gif new file mode 100644 index 00000000000..f1ddb5590d4 Binary files /dev/null and b/sormas-backend/src/test/resources/externalemail/GIF Attachment.gif differ diff --git a/sormas-backend/src/test/resources/externalemail/JPG Attachment.jpg b/sormas-backend/src/test/resources/externalemail/JPG Attachment.jpg new file mode 100644 index 00000000000..ee41369cbaf Binary files /dev/null and b/sormas-backend/src/test/resources/externalemail/JPG Attachment.jpg differ diff --git a/sormas-backend/src/test/resources/externalemail/PDF Attachment.pdf b/sormas-backend/src/test/resources/externalemail/PDF Attachment.pdf new file mode 100644 index 00000000000..fd9121efcda Binary files /dev/null and b/sormas-backend/src/test/resources/externalemail/PDF Attachment.pdf differ diff --git a/sormas-backend/src/test/resources/externalemail/PNG Attachment.png b/sormas-backend/src/test/resources/externalemail/PNG Attachment.png new file mode 100644 index 00000000000..9f8d7fc2420 Binary files /dev/null and b/sormas-backend/src/test/resources/externalemail/PNG Attachment.png differ diff --git a/sormas-base/pom.xml b/sormas-base/pom.xml index c5b2466a94f..cf8cba69a6a 100644 --- a/sormas-base/pom.xml +++ b/sormas-base/pom.xml @@ -5,7 +5,7 @@ de.symeda.sormas sormas-base pom - 1.92.0 + 1.93.0 3.6.3 @@ -534,6 +534,19 @@ ${xdocreport.version} provided + + fr.opensagres.xdocreport + fr.opensagres.xdocreport.converter.docx.xwpf + ${xdocreport.version} + provided + + + org.apache.logging.log4j + log4j-core + + + + io.grpc @@ -1159,6 +1172,13 @@ + + org.apache.pdfbox + pdfbox + 3.0.0 + provided + + diff --git a/sormas-base/setup/sormas.properties b/sormas-base/setup/sormas.properties index 80422a0f070..3ce05183b6b 100644 --- a/sormas-base/setup/sormas.properties +++ b/sormas-base/setup/sormas.properties @@ -150,6 +150,10 @@ app.url= # Default: false # Possible Values: true, false #duplicatechecks.excludepersonsonlylinkedtoarchivedentries=false +# Determines whether the national health ID is used to unambiguously identify duplicate persons irrespective of whether other fields match or not. +# Default: false +# Possible Values: true, false +#duplicatechecks.nationalhealthidoverridescriteria=false # The maximum number of communities and facilities that can be synchronized in a single infrastructure synchronization call. # Lower this value if you expect mobile app users to have a bad internet connection frequently. diff --git a/sormas-cargoserver/pom.xml b/sormas-cargoserver/pom.xml index e42fbe13aa2..2520cc5e2b9 100644 --- a/sormas-cargoserver/pom.xml +++ b/sormas-cargoserver/pom.xml @@ -3,7 +3,7 @@ de.symeda.sormas sormas-base - 1.92.0 + 1.93.0 ../sormas-base diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/aCommonComponents/SideCards.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/aCommonComponents/SideCards.java index 2baae446a2f..7ddee286fc5 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/aCommonComponents/SideCards.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/aCommonComponents/SideCards.java @@ -99,4 +99,8 @@ public static By checkTextInReportSideComponent(String text) { public static By getEditSampleButtonByNumber(Integer number) { return By.xpath(String.format("(//div[contains(@id, 'edit-sample')])[%x]", number)); } + + public static By getEyeSampleIconByNumber(Integer number) { + return By.xpath(String.format("(//div[contains(@id, 'iew-sample')])[%x]", number)); + } } diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePage.java index f684be3181c..8407729d3d8 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePage.java @@ -47,8 +47,14 @@ public class EditCasePage { public static final By EDIT_TASK_BUTTON = By.cssSelector("div[id*='edit0']"); public static final By EDIT_FIRST_TASK_BUTTON = By.cssSelector("[location='events'] #edit0"); public static final By NEW_SAMPLE_BUTTON = By.cssSelector("[id='New sample']"); + public static final By SEE_SAMPLE_BUTTON = By.cssSelector("[id='See samples for this person']"); + public static final By SEE_SAMPLE_BUTTON_DE = + By.cssSelector("[id='Proben f\u00FCr diese Person ansehen']"); + public static final By SEE_CONTACTS_FOR_THIS_PERSON_BUTTON = + By.cssSelector("[id='See contacts for this person']"); public static final By NEW_SAMPLE_BUTTON_DE = By.cssSelector("[id='Neue Probe']"); - + public static final By EDIT_SAMPLE_PENCIL_BUTTON = By.cssSelector("div[id^='edit-sample']"); + public static final By EYE_SAMPLE_BUTTON = By.cssSelector("div[id^='view-sample']"); public static final By SHOW_SAMPLE_BUTTON = By.xpath( "//div[@location='samples']//div[@class='v-button v-widget link v-button-link compact v-button-compact caption-overflow-label v-button-caption-overflow-label']"); @@ -197,6 +203,8 @@ public class EditCasePage { By.xpath("//*[contains(text(),'Pick or create person')]"); public static final By PICK_OR_CREATE_CASE_POPUP_HEADER = By.xpath("//*[contains(text(),'Pick or create case')]"); + public static final By PICK_AN_EXISTING_CASE_POPUP_HEADER = + By.xpath("//*[contains(text(),'Pick an existing case')]"); public static final By CREATE_NEW_PERSON_CHECKBOX = By.xpath("//label[text()='Create a new person']"); public static final By SELECT_MATCHING_PERSON_CHECKBOX = @@ -260,6 +268,9 @@ public class EditCasePage { public static final By INFRASTRUCTURE_DATA_POPUP = By.xpath("//*[contains(text(),'Infrastructure data has changed')]"); public static final By ACTION_CONFIRM = By.cssSelector("[id='actionConfirm']"); + public static final By SAMPLES_CARD_EMPTY_MESSAGE = + By.xpath( + "//div[contains(@location,'sample')]//div[contains(text(), 'There are no samples for this person')]"); public static final By SAMPLES_CARD_DATE_OF_COLLECTED_SAMPLE = By.xpath("(//div[@location='samples']//div[@class='v-label v-widget v-label-undef-w'])[1]"); public static final By SAMPLES_CARD_LABORATORY = diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePersonPage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePersonPage.java index 421f8e0dbef..b9ab294b241 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePersonPage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/cases/EditCasePersonPage.java @@ -23,6 +23,8 @@ public class EditCasePersonPage { public static final By FIRST_NAME_INPUT = By.cssSelector("#firstName"); public static final By LAST_NAME_INPUT = By.cssSelector("#lastName"); + public static final By NEW_CONTACT_BUTTON = By.xpath("//div[@id='New contact']"); + public static final By NEW_CONTACT_BUTTON_DE = By.xpath("//div[@id='Neuer Kontakt']"); public static final By PRESENT_CONDITION_INPUT = By.cssSelector("#presentCondition input"); public static final By SEX_INPUT = By.cssSelector("#sex input"); public static final By SEX_COMBOBOX = diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/events/CreateNewEventPage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/events/CreateNewEventPage.java index 424877bc255..154923a1fa2 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/events/CreateNewEventPage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/events/CreateNewEventPage.java @@ -29,6 +29,9 @@ public class CreateNewEventPage { public static final By EVENT_IDENTIFICATION_SOURCE_COMBOBOX = By.xpath(".//div[@id='eventIdentificationSource']//label"); public static final By RISK_LEVEL_COMBOBOX = By.cssSelector(".popupContent #riskLevel div"); + public static final By SOURCE_EVENT_WINDOW_FIRST_RESULT_OPTION = + By.xpath("//div[contains(@class, 'v-grid-tablewrapper')]//tbody//tr[1]"); + public static final By POPUP_SAVE_BUTTON = By.cssSelector(".popupContent #commit"); public static final By EVENT_MANAGEMENT_STATUS_OPTIONS = By.cssSelector(".popupContent #eventManagementStatus .v-select-option label"); public static final By START_DATA_INPUT = By.cssSelector(".popupContent #startDate input"); diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/persons/EditPersonPage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/persons/EditPersonPage.java index d7cc8330a55..4e9682c8074 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/persons/EditPersonPage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/persons/EditPersonPage.java @@ -100,6 +100,7 @@ public class EditPersonPage { public static final By POPUP_RESPONSIBLE_REGION_COMBOBOX = By.cssSelector("#region div"); public static final By POPUP_RESPONSIBLE_DISTRICT_COMBOBOX = By.cssSelector("#district div"); public static final By PERSON_DATA_SAVED = By.cssSelector(".v-Notification-caption"); + public static final By LINK_EVENT_BUTTON = By.xpath("//div[@id='Ereignis verkn\u00FCpfen']"); public static final By PERSON_DATA_ADDED_AS_A_PARTICIPANT_MESSAGE = By.xpath("//*[contains(text(),'The new event participant was created.')]"); public static final By SEE_EVENTS_FOR_PERSON = @@ -109,19 +110,30 @@ public class EditPersonPage { public static final By ERROR_INDICATOR = By.cssSelector(".v-errorindicator.v-errorindicator-info"); public static final By SEE_CASES_FOR_PERSON_BUTTON = By.id("See cases for this person"); + public static final By SEE_CASES_FOR_PERSON_BUTTON_DE = + By.id("F\u00E4lle f\u00FCr diese Person ansehen"); public static final By SEE_CONTACTS_FOR_PERSON_BUTTON = By.id("See contacts for this person"); + public static final By SEE_CONTACTS_FOR_PERSON_BUTTON_DE = + By.id("Kontakte f\u00FCr diese Person ansehen"); public static final By EYE_ICON_EDIT_PERSON = By.cssSelector("[class*='v-caption-on-top']>[class*='v-popupview']"); public static final By GPS_LATITUDE_INPUT_EDIT_PERSON = By.id("latitude"); public static final By GPS_LONGITUDE_INPUT_EDIT_PERSON = By.id("longitude"); public static final By MAP_CONTAINER_EDIT_PERSON = By.cssSelector("[class*='leaflet-container']"); public static final By EDIT_CASES_BUTTON = By.id("edit-case-0"); + public static final By EDIT_CASES_ICON_BUTTON = By.cssSelector("div[id^='edit-case']"); + public static final By VIEW_CASES_ICON_BUTTON = By.cssSelector("div[id^='view-case']"); public static final By EDIT_CONTACTS_BUTTON = By.id("edit-contact-0"); + public static final By EDIT_CONTACTS_ICON_BUTTON = By.cssSelector("div[id^='edit-contact']"); + public static final By VIEW_CONTACTS_ICON_BUTTON = By.cssSelector("div[id^='view-contact']"); + public static final By EDIT_PARTICIPANT_ICON_BUTTON = + By.cssSelector("div[id^='edit-participant']"); public static final By CONFIRM_NAVIGATION_BUTTON = By.cssSelector(".popupContent #actionConfirm"); public static final By PERSON_INFORMATION_TITLE = By.cssSelector("[location='personInformationHeadingLoc']"); public static final By EVENT_PARTICIPANTS_DATA_TAB = By.cssSelector("#tab-events-eventparticipants"); + public static final By NEW_TRAVEL_ENTRY_BUTTON_DE = By.cssSelector("[id='Neue Einreise']"); public static final By NO_TRAVEL_ENTRY_LABEL_DE = By.xpath("//div[text()=\"Es gibt keine Einreisen f\u00FCr diese Person\"]"); public static final By IMMUNIZATION_ID_LABEL = diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/samples/EditSamplePage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/samples/EditSamplePage.java index 4a380720647..e9db9368c83 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/samples/EditSamplePage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/samples/EditSamplePage.java @@ -31,6 +31,10 @@ public class EditSamplePage { By.cssSelector("[id='sampleDateTime_time'] [class='v-filterselect-button']"); public static final By COMMENT_AREA_INPUT = By.cssSelector("[id='comment']"); public static final By DATE_SAMPLE_COLLECTED = By.cssSelector("[id='sampleDateTime_date'] input"); + public static final By DATE_SAMPLE_WAS_SENT_INPUT = By.cssSelector("[id='shipmentDate'] input"); + public static final By PATHOGEN_TEST_RESULT_INPUT = + By.cssSelector("[id='pathogenTestResult'] input"); + public static final By DATE_SAMPLE_RECEIVED = By.cssSelector("[id='receivedDate'] input"); public static final By FIELD_SAMPLE_ID_INPUT = By.cssSelector("[id='fieldSampleID']"); public static final By LABORATORY_COMBOBOX = @@ -50,6 +54,10 @@ public class EditSamplePage { public static final By LAB_SAMPLE_ID_INPUT = By.cssSelector("[id='labSampleID']"); public static final By REASON_FOR_SAMPLING_TESTING_COMBOBOX = By.cssSelector("[id='samplingReason'] [class='v-filterselect-button']"); + public static final By EXTERNAL_LAB_TESTING_RADIOBUTTON = + By.xpath("//label[contains(text(), 'External lab testing')]"); + public static final By INTERNAL_LAB_TESTING_RADIOBUTTON = + By.xpath("//label[contains(text(), 'Internal/in-house testing')]"); public static final By SAMPLE_TYPE_COMBOBOX = By.cssSelector("[id='sampleMaterial'] [class='v-filterselect-button']"); public static final By SPECIMEN_CONDITION_COMBOBOX = @@ -66,6 +74,7 @@ public class EditSamplePage { By.cssSelector("[class='popupContent'] [id='testTypeText']"); public static final By TYPING_ID_INPUT = By.cssSelector("[class='popupContent'] [id='typingId']"); public static final By DELETE_SAMPLE_BUTTON = By.cssSelector("#deleteRestore"); + public static final By DISCARD_SAMPLE_BUTTON = By.cssSelector("#discard"); public static final By DELETE_PATHOGEN_TEST_RESULT = By.cssSelector("[class='popupContent'] [id='deleteRestore']"); public static final By SAMPLE_DELETION_POPUP_YES_BUTTON = By.id("actionConfirm"); diff --git a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/users/UserRolesPage.java b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/users/UserRolesPage.java index aa93aeaa79f..d92639805bc 100644 --- a/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/users/UserRolesPage.java +++ b/sormas-e2e-tests/src/main/java/org/sormas/e2etests/pages/application/users/UserRolesPage.java @@ -79,6 +79,24 @@ public class UserRolesPage { public static By WORK_WITH_MESSAGE_CHECKBOX = By.xpath("//label[text()='Work with messages']"); public static By WORK_WITH_MESSAGE_CHECKBOX_VALUE = By.xpath("//label[text()='Work with messages']/preceding-sibling::input"); + public static By EDIT_EXISTING_SAMPLE_CHECKBOX = + By.xpath("//label[contains(text(),'Edit existing samples')]"); + public static By EDIT_EXISTING_SAMPLE_CHECKBOX_VALUE = + By.xpath("//label[contains(text(),'Edit existing samples')]/preceding-sibling::input\n"); + public static By EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX = + By.xpath("//label[contains(text(),'Edit existing pathogen tests')]"); + public static By EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX_VALUE = + By.xpath("//label[contains(text(),'Edit existing pathogen tests')]/preceding-sibling::input"); + public static By TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX = + By.xpath("//label[contains(text(),'Transfer samples to another lab')]"); + public static By TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX_VALUE = + By.xpath( + "//label[contains(text(),'Transfer samples to another lab')]/preceding-sibling::input"); + public static By WORK_WITH_MESSAGES_CHECKBOX = + By.xpath("//label[contains(text(),'Work with messages')]"); + public static By WORK_WITH_MESSAGES_CHECKBOX_VALUE = + By.xpath("//label[contains(text(),'Work with messages')]/preceding-sibling::input"); + public static final By GRID_RESULTS_FIRST_UUID = By.cssSelector("tr:nth-of-type(1) > td:nth-of-type(1)"); diff --git a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRights.json b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRights.json index 5451cf6d382..0259fed44f9 100644 --- a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRights.json +++ b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRights.json @@ -1 +1 @@ -["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file + ["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","CUSTOMIZABLE_ENUM_MANAGEMENT","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file diff --git a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRightsDE.json b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRightsDE.json index 5451cf6d382..f0c80b03775 100644 --- a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRightsDE.json +++ b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/AutomationAdminUserRightsDE.json @@ -1 +1 @@ -["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file +["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","CUSTOMIZABLE_ENUM_MANAGEMENT","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] diff --git a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SormasToSormasUserRights.json b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SormasToSormasUserRights.json index 5d0d453cf06..f61489c8410 100644 --- a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SormasToSormasUserRights.json +++ b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SormasToSormasUserRights.json @@ -1 +1 @@ -["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","EXTERNAL_SURVEILLANCE_DELETE","EXTERNAL_SURVEILLANCE_SHARE","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_TO_SORMAS_PROCESS","SORMAS_TO_SORMAS_SHARE","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file +["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","CUSTOMIZABLE_ENUM_MANAGEMENT","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","EXTERNAL_SURVEILLANCE_DELETE","EXTERNAL_SURVEILLANCE_SHARE","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_TO_SORMAS_PROCESS","SORMAS_TO_SORMAS_SHARE","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file diff --git a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SurvnetUserRights.json b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SurvnetUserRights.json index 5d0d453cf06..f61489c8410 100644 --- a/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SurvnetUserRights.json +++ b/sormas-e2e-tests/src/main/resources/userRightsJsonTemplates/SurvnetUserRights.json @@ -1 +1 @@ -["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","EXTERNAL_SURVEILLANCE_DELETE","EXTERNAL_SURVEILLANCE_SHARE","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_TO_SORMAS_PROCESS","SORMAS_TO_SORMAS_SHARE","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file +["ACTION_CREATE","ACTION_DELETE","ACTION_EDIT","ADDITIONAL_TEST_CREATE","ADDITIONAL_TEST_DELETE","ADDITIONAL_TEST_EDIT","ADDITIONAL_TEST_VIEW","AGGREGATE_REPORT_EDIT","AGGREGATE_REPORT_EXPORT","AGGREGATE_REPORT_VIEW","CAMPAIGN_ARCHIVE","CAMPAIGN_DELETE","CAMPAIGN_EDIT","CAMPAIGN_FORM_DATA_ARCHIVE","CAMPAIGN_FORM_DATA_DELETE","CAMPAIGN_FORM_DATA_EDIT","CAMPAIGN_FORM_DATA_EXPORT","CAMPAIGN_FORM_DATA_VIEW","CAMPAIGN_VIEW","CASE_ARCHIVE","CASE_CHANGE_DISEASE","CASE_CHANGE_EPID_NUMBER","CASE_CLASSIFY","CASE_CLINICIAN_VIEW","CASE_CREATE","CASE_DELETE","CASE_EDIT","CASE_EXPORT","CASE_IMPORT","CASE_INVESTIGATE","CASE_MERGE","CASE_REFER_FROM_POE","CASE_SHARE","CASE_TRANSFER","CASE_VIEW","CLINICAL_COURSE_EDIT","CLINICAL_COURSE_VIEW","CLINICAL_VISIT_CREATE","CLINICAL_VISIT_DELETE","CLINICAL_VISIT_EDIT","CONTACT_ARCHIVE","CONTACT_CONVERT","CONTACT_CREATE","CONTACT_DELETE","CONTACT_EDIT","CONTACT_EXPORT","CONTACT_IMPORT","CONTACT_MERGE","CONTACT_REASSIGN_CASE","CONTACT_VIEW","CUSTOMIZABLE_ENUM_MANAGEMENT","DASHBOARD_CAMPAIGNS_VIEW","DASHBOARD_CONTACT_VIEW","DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS","DASHBOARD_SAMPLES_VIEW","DASHBOARD_SURVEILLANCE_VIEW","DATABASE_EXPORT_ACCESS","DEV_MODE","DOCUMENT_DELETE","DOCUMENT_TEMPLATE_MANAGEMENT","DOCUMENT_UPLOAD","DOCUMENT_VIEW","EMAIL_TEMPLATE_MANAGEMENT","ENVIRONMENT_ARCHIVE","ENVIRONMENT_CREATE","ENVIRONMENT_DELETE","ENVIRONMENT_EDIT","ENVIRONMENT_EXPORT","ENVIRONMENT_IMPORT","ENVIRONMENT_SAMPLE_CREATE","ENVIRONMENT_SAMPLE_DELETE","ENVIRONMENT_SAMPLE_EDIT","ENVIRONMENT_SAMPLE_EDIT_DISPATCH","ENVIRONMENT_SAMPLE_EDIT_RECEIVAL","ENVIRONMENT_SAMPLE_EXPORT","ENVIRONMENT_SAMPLE_IMPORT","ENVIRONMENT_SAMPLE_VIEW","ENVIRONMENT_VIEW","EVENTGROUP_ARCHIVE","EVENTGROUP_CREATE","EVENTGROUP_DELETE","EVENTGROUP_EDIT","EVENTGROUP_LINK","EVENTPARTICIPANT_ARCHIVE","EVENTPARTICIPANT_CREATE","EVENTPARTICIPANT_DELETE","EVENTPARTICIPANT_EDIT","EVENTPARTICIPANT_IMPORT","EVENTPARTICIPANT_VIEW","EVENT_ARCHIVE","EVENT_CREATE","EVENT_DELETE","EVENT_EDIT","EVENT_EXPORT","EVENT_IMPORT","EVENT_VIEW","EXPORT_DATA_PROTECTION_DATA","EXTERNAL_EMAIL_ATTACH_DOCUMENTS","EXTERNAL_EMAIL_SEND","EXTERNAL_MESSAGE_DELETE","EXTERNAL_MESSAGE_PROCESS","EXTERNAL_MESSAGE_VIEW","EXTERNAL_SURVEILLANCE_DELETE","EXTERNAL_SURVEILLANCE_SHARE","IMMUNIZATION_ARCHIVE","IMMUNIZATION_CREATE","IMMUNIZATION_DELETE","IMMUNIZATION_EDIT","IMMUNIZATION_VIEW","INFRASTRUCTURE_ARCHIVE","INFRASTRUCTURE_CREATE","INFRASTRUCTURE_EDIT","INFRASTRUCTURE_EXPORT","INFRASTRUCTURE_IMPORT","INFRASTRUCTURE_VIEW","LINE_LISTING_CONFIGURE","MANAGE_EXTERNAL_SYMPTOM_JOURNAL","MANAGE_PUBLIC_EXPORT_CONFIGURATION","OUTBREAK_EDIT","OUTBREAK_VIEW","PATHOGEN_TEST_CREATE","PATHOGEN_TEST_DELETE","PATHOGEN_TEST_EDIT","PERFORM_BULK_OPERATIONS","PERFORM_BULK_OPERATIONS_CASE_SAMPLES","PERFORM_BULK_OPERATIONS_EVENT","PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT","PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES","PERFORM_BULK_OPERATIONS_PSEUDONYM","PERSON_CONTACT_DETAILS_DELETE","PERSON_DELETE","PERSON_EDIT","PERSON_EXPORT","PERSON_MERGE","PERSON_VIEW","POPULATION_MANAGE","PORT_HEALTH_INFO_EDIT","PORT_HEALTH_INFO_VIEW","PRESCRIPTION_CREATE","PRESCRIPTION_DELETE","PRESCRIPTION_EDIT","QUARANTINE_ORDER_CREATE","SAMPLE_CREATE","SAMPLE_DELETE","SAMPLE_EDIT","SAMPLE_EDIT_NOT_OWNED","SAMPLE_EXPORT","SAMPLE_TRANSFER","SAMPLE_VIEW","SEE_PERSONAL_DATA_IN_JURISDICTION","SEE_SENSITIVE_DATA_IN_JURISDICTION","SEND_MANUAL_EXTERNAL_MESSAGES","SORMAS_REST","SORMAS_TO_SORMAS_PROCESS","SORMAS_TO_SORMAS_SHARE","SORMAS_UI","STATISTICS_ACCESS","STATISTICS_EXPORT","TASK_ARCHIVE","TASK_ASSIGN","TASK_CREATE","TASK_DELETE","TASK_EDIT","TASK_EXPORT","TASK_VIEW","THERAPY_VIEW","TRAVEL_ENTRY_ARCHIVE","TRAVEL_ENTRY_CREATE","TRAVEL_ENTRY_DELETE","TRAVEL_ENTRY_EDIT","TRAVEL_ENTRY_MANAGEMENT_ACCESS","TRAVEL_ENTRY_VIEW","TREATMENT_CREATE","TREATMENT_DELETE","TREATMENT_EDIT","USER_CREATE","USER_EDIT","USER_ROLE_DELETE","USER_ROLE_EDIT","USER_ROLE_VIEW","USER_VIEW","VISIT_CREATE","VISIT_DELETE","VISIT_EDIT","VISIT_EXPORT","WEEKLYREPORT_VIEW"] \ No newline at end of file diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/entities/services/SampleService.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/entities/services/SampleService.java index 8dfba1a78f9..4ba265d6827 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/entities/services/SampleService.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/entities/services/SampleService.java @@ -131,7 +131,7 @@ public Sample buildGeneratedSampleWithTestResultForSelectedDiseaseAndTestType( .laboratory("Voreingestelltes Labor") .typeOfTest(testType) .testedDisease(disease) - .dateOfResult(LocalDate.now().minusDays(1)) + .dateOfResult(LocalDate.now()) .timeOfResult(LocalTime.of(11, 30)) .resultVerifiedByLabSupervisor("YES") .testResultsComment(currentTimeMillis + "Comment on new Pathogen requests or received") diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/aCommonComponents/SideCardsSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/aCommonComponents/SideCardsSteps.java index 11c1977b05a..3fdbbf91100 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/aCommonComponents/SideCardsSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/aCommonComponents/SideCardsSteps.java @@ -20,8 +20,19 @@ import static org.sormas.e2etests.pages.application.aCommonComponents.SideCards.*; import static org.sormas.e2etests.pages.application.cases.EditCasePage.EDIT_REPORT_BUTTON; +import static org.sormas.e2etests.pages.application.cases.EditCasePage.EDIT_SAMPLE_PENCIL_BUTTON; +import static org.sormas.e2etests.pages.application.cases.EditCasePage.EYE_SAMPLE_BUTTON; +import static org.sormas.e2etests.pages.application.cases.EditCasePage.SEE_SAMPLE_BUTTON_DE; +import static org.sormas.e2etests.pages.application.cases.EditCasePage.VACCINATION_CARD_INFO_ICON; +import static org.sormas.e2etests.pages.application.contacts.EditContactPage.EDIT_VACCINATION_BUTTON; import static org.sormas.e2etests.pages.application.contacts.EditContactPage.NUMBER_OF_TESTS_IN_SAMPLES; import static org.sormas.e2etests.pages.application.messages.MessagesDirectoryPage.ONE_TEST_IN_SAMPLES_DE; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.EDIT_CASES_ICON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.EDIT_CONTACTS_ICON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.EDIT_PARTICIPANT_ICON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.NEW_TRAVEL_ENTRY_BUTTON_DE; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.VIEW_CASES_ICON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.VIEW_CONTACTS_ICON_BUTTON; import static org.sormas.e2etests.pages.application.users.CreateNewUserPage.CLOSE_DIALOG_BUTTON; import static org.sormas.e2etests.steps.web.application.messages.MessagesDirectorySteps.convertStringToChosenFormatDate; @@ -200,6 +211,138 @@ public SideCardsSteps( softly.assertAll(); }); + When( + "I check that number of displayed samples with {string} icon is {int} for Samples Side Card", + (String icon, Integer number) -> { + switch (icon) { + case "pencil": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EDIT_SAMPLE_PENCIL_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EDIT_SAMPLE_PENCIL_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + case "eye": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EYE_SAMPLE_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EYE_SAMPLE_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + } + softly.assertAll(); + }); + + When( + "I check if Side card has available {string} button for DE", + (String button) -> { + switch (button) { + case "see sample for this person": + softly.assertTrue( + webDriverHelpers.isElementPresent(SEE_SAMPLE_BUTTON_DE), + "Element is not present"); + break; + case "new travel entry": + softly.assertTrue( + webDriverHelpers.isElementPresent(NEW_TRAVEL_ENTRY_BUTTON_DE), + "Element is not present"); + break; + } + softly.assertAll(); + }); + + When( + "I check that number of displayed cases with {string} icon is {int} for Cases Side Card", + (String icon, Integer number) -> { + switch (icon) { + case "pencil": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EDIT_CASES_ICON_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EDIT_CASES_ICON_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + case "eye": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + VIEW_CASES_ICON_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(VIEW_CASES_ICON_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + } + softly.assertAll(); + }); + + When( + "I check that number of displayed contacts with {string} icon is {int} for Contacts Side Card", + (String icon, Integer number) -> { + switch (icon) { + case "pencil": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EDIT_CONTACTS_ICON_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EDIT_CONTACTS_ICON_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + case "eye": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + VIEW_CONTACTS_ICON_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(VIEW_CONTACTS_ICON_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + } + softly.assertAll(); + }); + + When( + "I check that number of displayed vaccinations with {string} icon is {int} for Vaccinations Side Card", + (String icon, Integer number) -> { + switch (icon) { + case "pencil": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EDIT_VACCINATION_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EDIT_VACCINATION_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + case "eye": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EYE_SAMPLE_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(VACCINATION_CARD_INFO_ICON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + } + softly.assertAll(); + }); + + When( + "I check that number of displayed linked events with {string} icon is {int} for Events Side Card", + (String icon, Integer number) -> { + TimeUnit.SECONDS.sleep(2); // waiting for page loaded + switch (icon) { + case "pencil": + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + EDIT_PARTICIPANT_ICON_BUTTON, 5); + softly.assertEquals( + webDriverHelpers.getNumberOfElements(EDIT_PARTICIPANT_ICON_BUTTON), + number.intValue(), + "Number of displayed samples is not valid"); + break; + // place for eye icon option + } + softly.assertAll(); + }); + Then( "^I check that the case has no samples on side card for DE$", () -> { @@ -389,5 +532,12 @@ public SideCardsSteps( webDriverHelpers.clickOnWebElementBySelector(getEditSampleButtonByNumber(sampleNumber)); webDriverHelpers.waitForPageLoadingSpinnerToDisappear(30); }); + + When( + "I click on eye sample icon of the (\\d+) displayed sample on Edit Case Page", + (Integer sampleNumber) -> { + webDriverHelpers.clickOnWebElementBySelector(getEyeSampleIconByNumber(sampleNumber)); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(30); + }); } } diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CaseDirectorySteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CaseDirectorySteps.java index d1f949583f9..259a6e056ff 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CaseDirectorySteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CaseDirectorySteps.java @@ -73,7 +73,6 @@ import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_REGION_FILTER_COMBOBOX; import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_REINFECTION_FILTER_COMBOBOX; import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_REPORTING_USER_FILTER; -import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_RESET_FILTERS_BUTTON; import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_SURVOFF_FILTER_COMBOBOX; import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_VACCINATION_STATUS_FILTER_COMBOBOX; import static org.sormas.e2etests.pages.application.cases.CaseDirectoryPage.CASE_YEAR_FILTER; @@ -288,7 +287,7 @@ public CaseDirectorySteps( webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); webDriverHelpers.waitUntilElementIsVisibleAndClickable(FIRST_CASE_ID_BUTTON); webDriverHelpers.clickOnWebElementBySelector(FIRST_CASE_ID_BUTTON); - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(80); }); When( @@ -650,7 +649,6 @@ public CaseDirectorySteps( When( "^I search for cases created with the API using Person's name", () -> { - webDriverHelpers.clickOnWebElementBySelector(CASE_RESET_FILTERS_BUTTON); int maximumNumberOfRows = 23; webDriverHelpers.waitUntilAListOfElementsIsPresent( CASE_GRID_RESULTS_ROWS, maximumNumberOfRows); @@ -659,8 +657,7 @@ public CaseDirectorySteps( apiState.getLastCreatedPerson().getFirstName() + " " + apiState.getLastCreatedPerson().getLastName()); - webDriverHelpers.clickOnWebElementBySelector(CASE_APPLY_FILTERS_BUTTON); - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(70); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(200); webDriverHelpers.waitUntilAListOfElementsIsPresent( NAME_UUID_EPID_NUMBER_LIKE_INPUT, apiState.getCreatedCases().size()); Assert.assertEquals( @@ -1575,6 +1572,7 @@ public CaseDirectorySteps( And( "^I check that Relevance Status Filter is set to \"([^\"]*)\" on Case Directory page$", (String relevanceStatus) -> { + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(300); softly.assertEquals( webDriverHelpers.getValueFromWebElement(RELEVANT_STATUS_INPUT), relevanceStatus, @@ -1594,7 +1592,7 @@ public CaseDirectorySteps( webDriverHelpers.clickOnWebElementBySelector(CANCEL_POPUP); break; } - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(60); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(100); }); When( @@ -1741,7 +1739,6 @@ public CaseDirectorySteps( "^I set the Relevance Status Filter to \"([^\"]*)\" on Case Directory page$", (String status) -> { webDriverHelpers.selectFromCombobox(RELEVANT_STATUS_COMBOBOX, status); - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(200); }); } diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CreateNewCaseSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CreateNewCaseSteps.java index 03c60683cf7..565e6572a08 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CreateNewCaseSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/CreateNewCaseSteps.java @@ -108,6 +108,7 @@ import static org.sormas.e2etests.pages.application.cases.EditCasePage.CREATE_NEW_CASE_CHECKBOX; import static org.sormas.e2etests.pages.application.cases.EditCasePage.CREATE_NEW_PERSON_CHECKBOX; import static org.sormas.e2etests.pages.application.cases.EditCasePage.DISCARD_BUTTON_POPUP; +import static org.sormas.e2etests.pages.application.cases.EditCasePage.PICK_AN_EXISTING_CASE_POPUP_HEADER; import static org.sormas.e2etests.pages.application.cases.EditCasePage.PICK_OR_CREATE_CASE_POPUP_HEADER; import static org.sormas.e2etests.pages.application.cases.EditCasePage.PICK_OR_CREATE_PERSON_POPUP_HEADER; import static org.sormas.e2etests.pages.application.cases.EditCasePage.PICK_OR_CREATE_PERSON_TITLE; @@ -346,7 +347,7 @@ public CreateNewCaseSteps( webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); } if (option.equals("second")) { - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(120); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(120); webDriverHelpers.fillInWebElement( CASE_DIRECTORY_DETAILED_PAGE_FILTER_INPUT, casesUUID.get(1)); webDriverHelpers.clickOnWebElementBySelector(CASE_APPLY_FILTERS_BUTTON); @@ -857,6 +858,15 @@ public CreateNewCaseSteps( webDriverHelpers.clickOnWebElementBySelector(SAVE_BUTTON); }); + When( + "^I click on pick an existing case popup button option", + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + PICK_AN_EXISTING_CASE_POPUP_HEADER); + webDriverHelpers.clickOnWebElementBySelector(PICK_AN_EXISTING_CASE_POPUP_HEADER); + TimeUnit.SECONDS.sleep(2); + webDriverHelpers.clickOnWebElementBySelector(CONFIRM_BUTTON_POPUP); + }); When( "^I create a new case with specific data using line listing feature$", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCasePersonSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCasePersonSteps.java index 36f350372e5..d943103d4f5 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCasePersonSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCasePersonSteps.java @@ -192,6 +192,22 @@ public EditCasePersonSteps( webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); }); + When( + "I click on New Contact button in Case Person Tab", + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(NEW_CONTACT_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(NEW_CONTACT_BUTTON); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); + }); + + When( + "I click on New Contact button in Case Person Tab for DE", + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(NEW_CONTACT_BUTTON_DE); + webDriverHelpers.clickOnWebElementBySelector(NEW_CONTACT_BUTTON_DE); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(40); + }); + When( "I check if saved Person data is correct", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCaseSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCaseSteps.java index 7b307180ed3..ed7a5945ade 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCaseSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditCaseSteps.java @@ -245,6 +245,7 @@ import static org.sormas.e2etests.pages.application.cases.EditCasePage.getPreExistingConditionComboboxWithValue_DE; import static org.sormas.e2etests.pages.application.cases.EditCasePage.getPreExistingConditionCombobox_DE; import static org.sormas.e2etests.pages.application.cases.EditCasePersonPage.DATE_OF_DEATH_INPUT; +import static org.sormas.e2etests.pages.application.cases.EditCasePersonPage.SEE_CASES_FOR_THIS_PERSON_BUTTON; import static org.sormas.e2etests.pages.application.cases.EpidemiologicalDataCasePage.CONTACT_TO_BODY_FLUIDS_OPTONS; import static org.sormas.e2etests.pages.application.cases.EpidemiologicalDataCasePage.CONTACT_TO_CASE_COMBOBOX; import static org.sormas.e2etests.pages.application.cases.EpidemiologicalDataCasePage.CONTINENT_COMBOBOX; @@ -2275,6 +2276,65 @@ public EditCaseSteps( softly.assertAll(); }); + When( + "I check if Sample card has empty and no buttons are available on Edit Case Page", + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(SAVE_BUTTON); + softly.assertTrue( + webDriverHelpers.isElementPresent(SAMPLES_CARD_EMPTY_MESSAGE), + "Element is not present"); + softly.assertAll(); + softly.assertFalse( + webDriverHelpers.isElementVisibleWithTimeout(NEW_SAMPLE_BUTTON, 2), + "The new sample button is present"); + softly.assertFalse( + webDriverHelpers.isElementVisibleWithTimeout(SEE_SAMPLE_BUTTON, 2), + "The see sample for this person button is present"); + softly.assertAll(); + }); + + When( + "I check if Sample card has available {string} button on Edit Case Page", + (String button) -> { + TimeUnit.SECONDS.sleep(2); // waiting for page loaded + switch (button) { + case "see sample for this person": + softly.assertTrue( + webDriverHelpers.isElementPresent(SEE_SAMPLE_BUTTON), "Element is not present"); + break; + case "see samples for this person": + softly.assertTrue( + webDriverHelpers.isElementPresent(SEE_SAMPLE_BUTTON), "Element is not present"); + break; + } + softly.assertAll(); + }); + + When( + "I click on the {string} button on Edit Case Page", + (String button) -> { + TimeUnit.SECONDS.sleep(3); // waiting for page loaded; + switch (button) { + case "See samples for this person": + webDriverHelpers.scrollToElement(SEE_SAMPLE_BUTTON); + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(SEE_SAMPLE_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(SEE_SAMPLE_BUTTON); + break; + case "See cases for this person": + webDriverHelpers.scrollToElement(SEE_CASES_FOR_THIS_PERSON_BUTTON); + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + SEE_CASES_FOR_THIS_PERSON_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(SEE_CASES_FOR_THIS_PERSON_BUTTON); + break; + case "See contacts for this person": + webDriverHelpers.scrollToElement(SEE_CONTACTS_FOR_THIS_PERSON_BUTTON); + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + SEE_CONTACTS_FOR_THIS_PERSON_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(SEE_CONTACTS_FOR_THIS_PERSON_BUTTON); + break; + } + }); + When( "I click on the NEW IMMUNIZATION button in Edit case", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditContactsSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditContactsSteps.java index 66ee7b37576..596701c6550 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditContactsSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/cases/EditContactsSteps.java @@ -165,6 +165,7 @@ public EditContactsSteps( When( "I open the Case Contacts tab", () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(CONTACTS_TAB_BUTTON); webDriverHelpers.clickOnWebElementBySelector(CONTACTS_TAB_BUTTON); webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(NEW_CONTACT_BUTTON); }); @@ -494,6 +495,55 @@ public EditContactsSteps( softly.assertAll(); }); + When( + "I check that all editable fields are active for an contact", + () -> { + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(30); + TimeUnit.SECONDS.sleep(3); // waiting for page loaded + webDriverHelpers.waitUntilElementIsVisibleAndClickable(CONTACTS_LIST); + softly.assertEquals( + webDriverHelpers.isElementEnabled(CONTACT_CLASSIFICATION_OPTIONS), + true, + "Contact classification option is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(REPORT_DATE), + true, + "Report date is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(RESPONSIBLE_DISTRICT_INPUT), + true, + "Responsible district input is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(RESPONSIBLE_REGION_INPUT), + true, + "Responsible region input is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(RESPONSIBLE_COMMUNITY_INPUT), + true, + "Responsible community input is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(RELATIONSHIP_WITH_CASE_INPUT), + true, + "Relationship with case input is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(VACCINATION_STATUS_FOR_THIS_DISEASE_COMBOBOX), + true, + "Vaccination status combobox is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(SAVE_EDIT_BUTTON), + true, + "Save button is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DISCARD_BUTTON), + true, + "Discard button is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DELETE_BUTTON), + true, + "Delete button is not editable state but it should be!"); + softly.assertAll(); + }); + And( "I fill general comment in contact edit page with ([^\"]*)", (String comment) -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/CreateNewContactSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/CreateNewContactSteps.java index 29916874608..021266160d9 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/CreateNewContactSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/CreateNewContactSteps.java @@ -37,6 +37,7 @@ import static org.sormas.e2etests.pages.application.entries.EditTravelEntryPage.DISCARD_TASK_BUTTON; import static org.sormas.e2etests.pages.application.entries.TravelEntryPage.NEW_PERSON_RADIOBUTTON_DE; import static org.sormas.e2etests.pages.application.entries.TravelEntryPage.PICK_OR_CREATE_PERSON_HEADER_DE; +import static org.sormas.e2etests.steps.web.application.cases.CreateNewCaseSteps.casesUUID; import com.github.javafaker.Faker; import cucumber.api.java8.En; @@ -416,6 +417,19 @@ public CreateNewContactSteps( SOURCE_CASE_WINDOW_CONTACT, apiState.getCreatedCase().getUuid()); webDriverHelpers.clickOnWebElementBySelector(SOURCE_CASE_WINDOW_SEARCH_CASE_BUTTON); }); + When( + "^I search for the last created case uuid by UI in the CHOOSE SOURCE Contact window$", + () -> { + webDriverHelpers.fillInWebElement(SOURCE_CASE_WINDOW_CONTACT, casesUUID.get(0)); + webDriverHelpers.clickOnWebElementBySelector(SOURCE_CASE_WINDOW_SEARCH_CASE_BUTTON); + }); + + When( + "^I search for the last created case uuid by UI in the CHOOSE SOURCE Contact window for DE$", + () -> { + webDriverHelpers.fillInWebElement(SOURCE_CASE_WINDOW_CONTACT_DE, casesUUID.get(0)); + webDriverHelpers.clickOnWebElementBySelector(SOURCE_CASE_WINDOW_SEARCH_CASE_BUTTON); + }); When( "^I search for the last case uuid in the CHOOSE SOURCE Contact window for DE$", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/EditContactSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/EditContactSteps.java index c4aaff246a7..a14ff4cdf24 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/EditContactSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/contacts/EditContactSteps.java @@ -514,7 +514,10 @@ public EditContactSteps( When( "I click to accept potential duplicate in Shares Page", - () -> webDriverHelpers.clickOnWebElementBySelector(ACTION_CONFIRM)); + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable(ACTION_CONFIRM); + webDriverHelpers.clickOnWebElementBySelector(ACTION_CONFIRM); + }); When( "^I click on ([^\"]*) radio button Contact Person tab$", (String buttonName) -> diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/events/CreateNewEventSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/events/CreateNewEventSteps.java index 0ec68291e25..2800187d032 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/events/CreateNewEventSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/events/CreateNewEventSteps.java @@ -36,9 +36,11 @@ import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.MULTI_DAY_EVENT_CHECKBOX; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.NEW_EVENT_CREATED_DE_MESSAGE; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.NEW_EVENT_CREATED_MESSAGE; +import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.POPUP_SAVE_BUTTON; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.REPORT_DATE_INPUT; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.RISK_LEVEL_COMBOBOX; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.SAVE_BUTTON; +import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.SOURCE_EVENT_WINDOW_FIRST_RESULT_OPTION; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.SOURCE_INSTITUTIONAL_PARTNER_COMBOBOX; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.SOURCE_TYPE_COMBOBOX; import static org.sormas.e2etests.pages.application.events.CreateNewEventPage.START_DATA_EVENT; @@ -67,6 +69,7 @@ import java.util.Arrays; import java.util.List; import java.util.Locale; +import java.util.concurrent.TimeUnit; import javax.inject.Inject; import lombok.extern.slf4j.Slf4j; import org.sormas.e2etests.entities.pojo.web.Event; @@ -215,6 +218,23 @@ public CreateNewEventSteps( webDriverHelpers.clickOnWebElementBySelector(NEW_EVENT_CREATED_MESSAGE); }); + When( + "^I choose the first found result in Pick or create event window$", + () -> { + webDriverHelpers.clickOnWebElementBySelector(SOURCE_EVENT_WINDOW_FIRST_RESULT_OPTION); + webDriverHelpers.waitForRowToBeSelected(SOURCE_EVENT_WINDOW_FIRST_RESULT_OPTION); + webDriverHelpers.waitUntilElementIsVisibleAndClickable(POPUP_SAVE_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(POPUP_SAVE_BUTTON); + }); + + When( + "^I click on SAVE button in Link Event form from Edit Person page$", + () -> { + TimeUnit.SECONDS.sleep(2); // waiting for page loaded + webDriverHelpers.waitUntilElementIsVisibleAndClickable(POPUP_SAVE_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(POPUP_SAVE_BUTTON); + }); + When( "I check Multi-day event checkbox and I pick Start date and End date on Create New Event Page", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/EditPersonSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/EditPersonSteps.java index 8bbc6783639..47b7b9d687d 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/EditPersonSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/EditPersonSteps.java @@ -65,6 +65,7 @@ import static org.sormas.e2etests.pages.application.persons.EditPersonPage.IMMUNIZATION_STATUS_LABEL; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.INVALID_DATA_ERROR; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.LAST_NAME_INPUT; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.LINK_EVENT_BUTTON; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.MANAGEMENT_STATUS_LABEL; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.MAP_CONTAINER_EDIT_PERSON; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.MEANS_OF_IMMUNIZATION_LABEL; @@ -80,7 +81,9 @@ import static org.sormas.e2etests.pages.application.persons.EditPersonPage.REGION_INPUT; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SALUTATION_COMBOBOX; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEE_CASES_FOR_PERSON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEE_CASES_FOR_PERSON_BUTTON_DE; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEE_CONTACTS_FOR_PERSON_BUTTON; +import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEE_CONTACTS_FOR_PERSON_BUTTON_DE; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEE_EVENTS_FOR_PERSON; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.SEX_INPUT; import static org.sormas.e2etests.pages.application.persons.EditPersonPage.STAFF_OF_ARMED_FORCES_COMBOBOX; @@ -130,6 +133,7 @@ public class EditPersonSteps implements En { protected Person collectedPerson; public static Person newGeneratedPerson; private static String personFirstName; + public static String personUuid; public static List externalPersonUUID = new ArrayList<>(); public static List personSex = new ArrayList<>(); @@ -267,8 +271,6 @@ public EditPersonSteps( () -> { webDriverHelpers.waitForPageLoadingSpinnerToDisappear(150); webDriverHelpers.clickOnWebElementBySelector(SEE_CASES_FOR_PERSON_BUTTON); - // webDriverHelpers.clickOnWebElementBySelector(CONFIRM_NAVIGATION_BUTTON); - // webDriverHelpers.waitForPageLoadingSpinnerToDisappear(150); }); Then( "I check if data of created immunization is in Immunization tab on Edit Person Page", @@ -344,6 +346,13 @@ public EditPersonSteps( webDriverHelpers.waitUntilElementIsVisibleAndClickable(SEE_CASES_FOR_PERSON_BUTTON); }); + Then( + "I check that SEE CASES FOR THIS PERSON button appears on Edit Person page for DE", + () -> { + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(150); + webDriverHelpers.waitUntilElementIsVisibleAndClickable(SEE_CASES_FOR_PERSON_BUTTON_DE); + }); + Then( "I check that SEE CONTACTS FOR THIS PERSON button appears on Edit Person page", () -> { @@ -351,6 +360,13 @@ public EditPersonSteps( webDriverHelpers.waitUntilElementIsVisibleAndClickable(SEE_CONTACTS_FOR_PERSON_BUTTON); }); + Then( + "I check that SEE CONTACTS FOR THIS PERSON button appears on Edit Person page for DE", + () -> { + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(150); + webDriverHelpers.waitUntilElementIsVisibleAndClickable(SEE_CONTACTS_FOR_PERSON_BUTTON_DE); + }); + Then( "^I Verify The Eye Icon opening the Map is ([^\"]*) in the Edit Person Page", (String elementStatus) -> { @@ -413,6 +429,13 @@ public EditPersonSteps( previousCreatedPerson = collectedPerson; }); + When( + "^I click Link Event button on Edit Person Page for DE$", + () -> { + webDriverHelpers.waitUntilElementIsVisibleAndClickable(LINK_EVENT_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(LINK_EVENT_BUTTON); + }); + When( "I check if there is no travel entry assigned to Person", () -> { @@ -610,6 +633,13 @@ public EditPersonSteps( softly.assertAll(); }); + And( + "^I collect person UUID from Edit Case Person page$", + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsPresent(FIRST_NAME_INPUT); + personUuid = webDriverHelpers.getValueFromWebElement(UUID_INPUT); + }); + And( "^I collect person external UUID from Edit Case page$", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/PersonDirectorySteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/PersonDirectorySteps.java index 8e58e023258..430b0c4ae67 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/PersonDirectorySteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/persons/PersonDirectorySteps.java @@ -29,6 +29,7 @@ import static org.sormas.e2etests.steps.BaseSteps.locale; import static org.sormas.e2etests.steps.web.application.entries.CreateNewTravelEntrySteps.TravelEntryUuid; import static org.sormas.e2etests.steps.web.application.entries.CreateNewTravelEntrySteps.aCase; +import static org.sormas.e2etests.steps.web.application.persons.EditPersonSteps.personUuid; import com.github.javafaker.Faker; import com.google.common.truth.Truth; @@ -431,6 +432,18 @@ public PersonDirectorySteps( webDriverHelpers.fillAndSubmitInWebElement(SEARCH_PERSON_BY_FREE_TEXT, personUuid); }); + When( + "I open the last new created person by UI in person directory", + () -> { + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(150); + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + SEARCH_PERSON_BY_FREE_TEXT, 30); + webDriverHelpers.fillAndSubmitInWebElement(SEARCH_PERSON_BY_FREE_TEXT, personUuid); + webDriverHelpers.clickOnWebElementBySelector(APPLY_FILTERS_BUTTON); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(120); + webDriverHelpers.clickOnWebElementBySelector(FIRST_RESULT_IN_PERSON_DIRECTORY_TABLE); + }); + When( "I click on specific person in person directory", () -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/CreateNewSampleSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/CreateNewSampleSteps.java index a9114b41c8f..22893d53a1b 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/CreateNewSampleSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/CreateNewSampleSteps.java @@ -27,7 +27,6 @@ import static org.sormas.e2etests.pages.application.events.EventDirectoryPage.EVENT_ACTIONS_COLUMN_HEADERS; import static org.sormas.e2etests.pages.application.events.EventDirectoryPage.EVENT_ACTIONS_TABLE_DATA; import static org.sormas.e2etests.pages.application.events.EventDirectoryPage.EVENT_ACTIONS_TABLE_ROW; -import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.ADD_PATHOGEN_TEST; import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.ADD_PATHOGEN_TEST_BUTTON; import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.ANTIGEN_DETECTION_TEST_OPTION_BUTTON; import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.CELLS_IN_URINE_COMBOBOX; @@ -323,6 +322,24 @@ public CreateNewSampleSteps( sample.getResultVerifiedByLabSupervisor(), RESULT_VERIFIED_BY_LAB_SUPERVISOR_OPTIONS); }); + When( + "I create new sample with pathogen test with {string} as disease and {string} as type of test and default test result", + (String diseaseType, String typeOfTest) -> { + sample = + sampleService.buildGeneratedSampleWithTestResultForSelectedDiseaseAndTestType( + diseaseType, typeOfTest); + selectPurposeOfSample(sample.getPurposeOfTheSample(), SAMPLE_PURPOSE_OPTIONS); + fillDateOfCollection(sample.getDateOfCollection()); + selectSampleType(sample.getSampleType()); + webDriverHelpers.clickOnWebElementBySelector(ADD_PATHOGEN_TEST_BUTTON); + selectTestedDisease(sample.getTestedDisease()); + selectTypeOfTest(sample.getTypeOfTest()); + fillDateOfResult(sample.getDateOfResult(), Locale.ENGLISH); + selectLaboratory(sample.getLaboratory()); + selectResultVerifiedByLabSupervisor( + sample.getResultVerifiedByLabSupervisor(), RESULT_VERIFIED_BY_LAB_SUPERVISOR_OPTIONS); + }); + When( "I set PCR RT PCR Test specification to {string} option", (String option) -> { @@ -859,7 +876,11 @@ public CreateNewSampleSteps( When( "I confirm update case result", - () -> webDriverHelpers.clickOnWebElementBySelector(ACTION_CONFIRM_POPUP_BUTTON)); + () -> { + webDriverHelpers.waitUntilIdentifiedElementIsVisibleAndClickable( + ACTION_CONFIRM_POPUP_BUTTON); + webDriverHelpers.clickOnWebElementBySelector(ACTION_CONFIRM_POPUP_BUTTON); + }); When( "I check if Update case disease variant popup is available", diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/EditSampleSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/EditSampleSteps.java index 5629fe96b5e..e22c16e4399 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/EditSampleSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/samples/EditSampleSteps.java @@ -18,6 +18,7 @@ package org.sormas.e2etests.steps.web.application.samples; +import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.FINAL_LABORATORY_RESULT_COMBOBOX; import static org.sormas.e2etests.pages.application.samples.CreateNewSamplePage.SAVE_EDIT_SAMPLE_BUTTON; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.ADDIITONAL_NEW_TEST_RESULT_BUTTON; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.BACK_TO_CASE_DE_BUTTON; @@ -27,17 +28,22 @@ import static org.sormas.e2etests.pages.application.samples.EditSamplePage.CQ_CT_VALUE_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DATE_SAMPLE_COLLECTED; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DATE_SAMPLE_RECEIVED; +import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DATE_SAMPLE_WAS_SENT_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DELETE_PATHOGEN_TEST_RESULT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DELETE_SAMPLE_BUTTON; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DELETE_SAMPLE_REASON_POPUP; +import static org.sormas.e2etests.pages.application.samples.EditSamplePage.DISCARD_SAMPLE_BUTTON; +import static org.sormas.e2etests.pages.application.samples.EditSamplePage.EXTERNAL_LAB_TESTING_RADIOBUTTON; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.FIELD_SAMPLE_ID_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.FOUR_FOLD_INCREASE_ANTIBODY_TITER; +import static org.sormas.e2etests.pages.application.samples.EditSamplePage.INTERNAL_LAB_TESTING_RADIOBUTTON; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.LABORATORY_COMBOBOX; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.LABORATORY_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.LABORATORY_NAME_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.LAB_SAMPLE_ID_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.NEW_TEST_RESULT_DE; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.PATHOGEN_NEW_TEST_RESULT_BUTTON; +import static org.sormas.e2etests.pages.application.samples.EditSamplePage.PATHOGEN_TEST_RESULT_INPUT; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.PCR_TEST_SPECIFICATION_COMBOBOX; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.REASON_FOR_SAMPLING_TESTING_COMBOBOX; import static org.sormas.e2etests.pages.application.samples.EditSamplePage.REASON_FOR_SAMPLING_TESTING_INPUT; @@ -62,6 +68,7 @@ import java.time.LocalDate; import java.time.LocalTime; import java.time.format.DateTimeFormatter; +import java.util.concurrent.TimeUnit; import javax.inject.Inject; import org.openqa.selenium.By; import org.sormas.e2etests.entities.pojo.helpers.ComparisonHelper; @@ -265,6 +272,91 @@ public EditSampleSteps( softly.assertAll(); }); + And( + "I check that all editable fields are enabled for a sample", + () -> { + softly.assertEquals( + webDriverHelpers.isElementEnabled(EXTERNAL_LAB_TESTING_RADIOBUTTON), + true, + "External lab testing radiobutton is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(INTERNAL_LAB_TESTING_RADIOBUTTON), + true, + "Internal lab testing radiobutton is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DATE_SAMPLE_COLLECTED), + true, + "Date sample of collected field is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(COLLECTED_DATE_TIME_COMBOBOX), + true, + "Sample Date time field is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(SAMPLE_TYPE_COMBOBOX), + true, + "Type of sample combobox is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(REASON_FOR_SAMPLING_TESTING_COMBOBOX), + true, + "Reason for sampling testing combobox field is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(FIELD_SAMPLE_ID_INPUT), + true, + "Field Sample id input is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(COMMENT_AREA_INPUT), + true, + "Comment area input is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(FINAL_LABORATORY_RESULT_COMBOBOX), + true, + "Final laboratory result combobox is not editable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DELETE_SAMPLE_BUTTON), + true, + "Delete sample button is not enable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DISCARD_SAMPLE_BUTTON), + true, + "Discard sample button is not enable"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(SAVE_SAMPLE_BUTTON), + true, + "Save sample button is not enable"); + softly.assertAll(); + }); + + And( + "I check if editable fields are read only for a sample", + () -> { + TimeUnit.SECONDS.sleep(2); // waiting for page sample loaded + softly.assertEquals( + webDriverHelpers.isElementEnabled(DATE_SAMPLE_COLLECTED), + false, + "Date sample of collected field is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(COLLECTED_DATE_TIME_INPUT), + false, + "Sample Date time field is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(SAMPLE_TYPE_INPUT), + false, + "Type of sample combobox is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(REASON_FOR_SAMPLING_TESTING_INPUT), + false, + "Reason for sampling testing combobox field is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(DATE_SAMPLE_WAS_SENT_INPUT), + false, + "Date sample was sent field is not editable state but it should be!"); + softly.assertEquals( + webDriverHelpers.isElementEnabled(PATHOGEN_TEST_RESULT_INPUT), + false, + "Pathogen test result field is not editable state but it should be!"); + softly.assertAll(); + }); + And( "I check if type of sample is not set to {string}", (String option) -> { diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/CreateNewTaskSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/CreateNewTaskSteps.java index 153dcdcd14e..a481b13aa60 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/CreateNewTaskSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/CreateNewTaskSteps.java @@ -86,6 +86,7 @@ public CreateNewTaskSteps( When( "^I check the created task is correctly displayed on Edit task page", () -> { + TimeUnit.SECONDS.sleep(3); //waiting for page loaded final Task actualTask = collectTaskData(); ComparisonHelper.compareEqualEntities(task, actualTask); }); diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/TaskManagementSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/TaskManagementSteps.java index 20ff66df1ac..7df2452ec4f 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/TaskManagementSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/tasks/TaskManagementSteps.java @@ -114,10 +114,11 @@ public TaskManagementSteps( String assignedUser = CreateNewTaskSteps.task.getAssignedTo(); webDriverHelpers.fillInWebElement(ASSIGNED_USER_FILTER_INPUT, assignedUser); webDriverHelpers.clickOnWebElementBySelector(APPLY_FILTER); - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(60); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(200); + webDriverHelpers.scrollToElement(CreateNewTaskSteps.task.getCommentsOnExecution()); webDriverHelpers.clickOnWebElementBySelector( getLastCreatedEditTaskButton(CreateNewTaskSteps.task.getCommentsOnExecution())); - webDriverHelpers.waitForPageLoadingSpinnerToDisappear(60); + webDriverHelpers.waitForPageLoadingSpinnerToDisappear(200); }); When( "^I filter out last created task from Tasks Directory$", diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserManagementSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserManagementSteps.java index 53bf142af73..e39f86285c4 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserManagementSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserManagementSteps.java @@ -263,7 +263,6 @@ public UserManagementSteps( And( "I check that number of displayed users results is {int} in User Management tab", (Integer number) -> { - System.out.print(webDriverHelpers.getTextFromPresentWebElement(TOTAL_USERS_COUNTER)); assertHelpers.assertWithPoll20Second( () -> Assert.assertEquals( diff --git a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserRolesSteps.java b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserRolesSteps.java index afbc70469fd..cbf0e4813a8 100644 --- a/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserRolesSteps.java +++ b/sormas-e2e-tests/src/test/java/org/sormas/e2etests/steps/web/application/users/UserRolesSteps.java @@ -41,6 +41,10 @@ import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_CASE_INVESTIGATION_STATUS_CHECKBOX_VALUE; import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_CASES_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_CASES_CHECKBOX_VALUE; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX_VALUE; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_SAMPLE_CHECKBOX; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_SAMPLE_CHECKBOX_VALUE; import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_USERS_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.EDIT_EXISTING_USER_ROLES_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.ENABLED_DISABLED_SEARCH_COMBOBOX; @@ -55,6 +59,8 @@ import static org.sormas.e2etests.pages.application.users.UserRolesPage.SAVE_BUTTON; import static org.sormas.e2etests.pages.application.users.UserRolesPage.TRANSFER_CASES_TO_ANOTHER_REGION_DISTRICT_FACILITY_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.TRANSFER_CASES_TO_ANOTHER_REGION_DISTRICT_FACILITY_CHECKBOX_VALUE; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX_VALUE; import static org.sormas.e2etests.pages.application.users.UserRolesPage.USER_MANAGEMENT_TAB; import static org.sormas.e2etests.pages.application.users.UserRolesPage.USER_RIGHTS_COMBOBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.USER_RIGHTS_INPUT; @@ -65,6 +71,8 @@ import static org.sormas.e2etests.pages.application.users.UserRolesPage.USER_ROLE_TEMPLATE_COMBOBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.VIEW_EXISTING_USERS_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.VIEW_EXISTING_USER_ROLES_CHECKBOX; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.WORK_WITH_MESSAGES_CHECKBOX; +import static org.sormas.e2etests.pages.application.users.UserRolesPage.WORK_WITH_MESSAGES_CHECKBOX_VALUE; import static org.sormas.e2etests.pages.application.users.UserRolesPage.WORK_WITH_MESSAGE_CHECKBOX; import static org.sormas.e2etests.pages.application.users.UserRolesPage.WORK_WITH_MESSAGE_CHECKBOX_VALUE; import static org.sormas.e2etests.pages.application.users.UserRolesPage.getUserRoleCaptionByText; @@ -254,6 +262,35 @@ public UserRolesSteps( checkboxState = webDriverHelpers.isElementChecked(WORK_WITH_MESSAGE_CHECKBOX_VALUE); uncheckCheckbox(checkboxState, WORK_WITH_MESSAGE_CHECKBOX); break; + case "Edit existing samples": + webDriverHelpers.scrollToElement(EDIT_EXISTING_SAMPLE_CHECKBOX); + webDriverHelpers.waitUntilIdentifiedElementIsPresent(EDIT_EXISTING_SAMPLE_CHECKBOX); + checkboxState = + webDriverHelpers.isElementChecked(EDIT_EXISTING_SAMPLE_CHECKBOX_VALUE); + uncheckCheckbox(checkboxState, EDIT_EXISTING_SAMPLE_CHECKBOX); + break; + case "Edit existing pathogen tests": + webDriverHelpers.scrollToElement(EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX); + webDriverHelpers.waitUntilIdentifiedElementIsPresent( + EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX); + checkboxState = + webDriverHelpers.isElementChecked(EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX_VALUE); + uncheckCheckbox(checkboxState, EDIT_EXISTING_PATHOGEN_TESTS_CHECKBOX); + break; + case "Transfer samples to another lab": + webDriverHelpers.scrollToElement(TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX); + webDriverHelpers.waitUntilIdentifiedElementIsPresent( + TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX); + checkboxState = + webDriverHelpers.isElementChecked(TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX_VALUE); + uncheckCheckbox(checkboxState, TRANSFER_SAMPLES_TO_ANOTHER_LAB_CHECKBOX); + break; + case "Work with messages": + webDriverHelpers.scrollToElement(WORK_WITH_MESSAGES_CHECKBOX); + webDriverHelpers.waitUntilIdentifiedElementIsPresent(WORK_WITH_MESSAGES_CHECKBOX); + checkboxState = webDriverHelpers.isElementChecked(WORK_WITH_MESSAGES_CHECKBOX_VALUE); + uncheckCheckbox(checkboxState, WORK_WITH_MESSAGES_CHECKBOX); + break; } }); diff --git a/sormas-e2e-tests/src/test/resources/features/sanity/web/Case.feature b/sormas-e2e-tests/src/test/resources/features/sanity/web/Case.feature index a770e6c785a..eeff483efac 100644 --- a/sormas-e2e-tests/src/test/resources/features/sanity/web/Case.feature +++ b/sormas-e2e-tests/src/test/resources/features/sanity/web/Case.feature @@ -1942,4 +1942,119 @@ Feature: Case end to end tests And I check that the Archive case button is not available Then I back to Case Directory using case list button And I apply "Archived cases" to combobox on Case Directory Page - And I open the first Case result in Case Directory \ No newline at end of file + And I open the first Case result in Case Directory + + @tmsLink=HSP-6417 @env_main + Scenario: User can view and edit Sample card from Person view + Given I log in as a Admin User + And I click on the Cases button from navbar + And I click on the NEW CASE button + And I create a new case with specific data and new person + And I collect uuid of the case + And I navigate to case person tab + Then I collect person UUID from Edit Case Person page + And I click on the Persons button from navbar + And I open the last new created person by UI in person directory + And I check if Sample card has empty and no buttons are available on Edit Case Page + Then I click on See Cases for this Person button from Edit Person page + And I open the first Case result in Case Directory + And I click on New Sample + And I create new sample with pathogen test with "COVID-19" as disease and "PCR / RT-PCR" as type of test + And I set Final Laboratory Result to "Positive" on Create new Sample page + And I save the created sample with pathogen test + And I confirm update case result + Then I click on the Persons button from navbar + And I click on first person in person directory + And I check if Sample card has available "see sample for this person" button on Edit Case Page + And I click on edit sample icon of the 1 displayed sample on Edit Case page + And I check that all editable fields are enabled for a sample + Then I navigate to case tab + And I check that number of displayed samples with "pencil" icon is 1 for Samples Side Card + And I navigate to case person tab + Then I click on New Contact button in Case Person Tab + And I click CHOOSE CASE button + Then I search for the last created case uuid by UI in the CHOOSE SOURCE Contact window + And I open the first found result in the CHOOSE SOURCE Contact window + And I click on SAVE new contact button in the CHOOSE SOURCE popup of Create Contact window + And I click on New Sample + And I create new sample with pathogen test with "COVID-19" as disease and "PCR / RT-PCR" as type of test + And I set Final Laboratory Result to "Positive" on Create new Sample page + And I save the created sample with pathogen test + And I confirm update case result + And I click on pick an existing case popup button option + Then I click on the Persons button from navbar + And I click on first person in person directory + And I check that number of displayed samples with "pencil" icon is 2 for Samples Side Card + And I check if Sample card has available "see samples for this person" button on Edit Case Page + And I click on edit sample icon of the 2 displayed sample on Edit Case page + And I check that all editable fields are enabled for a sample + And I navigate to case tab + Then I click on the "See samples for this person" button on Edit Case Page + And I check that number of displayed sample results is 2 + + @tmsLink=HSP-6420 @env_main + Scenario: User cannot edit Sample card from Person view if the edit Rights for sample are missing + Given I log in as a Admin User + And I click on the Users from navbar + And I check if there is any user with the "SampleMissingUserRights" role and change his role + And I click on User roles tab from Users Page + And I check if the "SampleMissingUserRights" user role exist and delete it + And I click on New user role button on User Roles Page + And I choose "National User" as the user role template + And I fill caption input as "SampleMissingUserRights" on Create New User Role form + And I click SAVE button on User Role Page + Then I click checkbox to uncheck "Edit existing samples" + Then I click checkbox to uncheck "Edit existing pathogen tests" + Then I click checkbox to uncheck "Transfer samples to another lab" + Then I click checkbox to uncheck "Work with messages" + And I click SAVE button on User Role Page + And I back to the User role list + Then I click on User Management tab from Users directory Page + And I click on the NEW USER button + And I create new "SampleMissingUserRights" with english language for test + And I click on the Cases button from navbar + And I click on the NEW CASE button + And I create a new case with specific data and new person + And I collect uuid of the case + And I click on New Sample + And I create new sample with pathogen test with "COVID-19" as disease and "PCR / RT-PCR" as type of test and default test result + And I save the created sample with pathogen test + And I check that number of displayed samples with "pencil" icon is 1 for Samples Side Card + And I navigate to case person tab + Then I collect person UUID from Edit Case Person page + Then I click on New Contact button in Case Person Tab + And I click CHOOSE CASE button + Then I search for the last created case uuid by UI in the CHOOSE SOURCE Contact window + And I open the first found result in the CHOOSE SOURCE Contact window + And I click on SAVE new contact button in the CHOOSE SOURCE popup of Create Contact window + And I click on New Sample + And I create new sample with pathogen test with "COVID-19" as disease and "PCR / RT-PCR" as type of test and default test result + And I set Final Laboratory Result to "Positive" on Create new Sample page + And I save the created sample with pathogen test + And I check that number of displayed samples with "pencil" icon is 1 for Samples Side Card + Then I click on logout button from navbar + And I login with new created user with chosen new role + And I click on the Cases button from navbar + Then I filter with last created case using case UUID + When I open last created case + Then I click on eye sample icon of the 1 displayed sample on Edit Case Page + And I check if editable fields are read only for a sample + Then I click on the Persons button from navbar + And I open the last new created person by UI in person directory + And I check that number of displayed samples with "eye" icon is 2 for Samples Side Card + And I check if Sample card has available "see samples for this person" button on Edit Case Page + Then I click on eye sample icon of the 2 displayed sample on Edit Case Page + And I check if editable fields are read only for a sample + Then I click on the Persons button from navbar + And I click on the RESET FILTERS button for Person + And I open the last new created person by UI in person directory + Then I click on the "See samples for this person" button on Edit Case Page + And I check that number of displayed sample results is 2 + Then I click on the Persons button from navbar + And I click on the RESET FILTERS button for Person + And I open the last new created person by UI in person directory + Then I click on the "See contacts for this person" button on Edit Case Page + And I open the first contact from contacts list + Then I check that all editable fields are active for an contact + Then I click on eye sample icon of the 1 displayed sample on Edit Case Page + And I check if editable fields are read only for a sample \ No newline at end of file diff --git a/sormas-e2e-tests/src/test/resources/features/sanity/web/Persons.feature b/sormas-e2e-tests/src/test/resources/features/sanity/web/Persons.feature index 94b27dad453..75b0007a827 100644 --- a/sormas-e2e-tests/src/test/resources/features/sanity/web/Persons.feature +++ b/sormas-e2e-tests/src/test/resources/features/sanity/web/Persons.feature @@ -294,4 +294,48 @@ Feature: Edit Persons When I click on the Persons button from navbar And I click on first person in person directory Then I check that Citizenship is not visible in Contact Information section for DE version - And I check that Country of birth is not visible in Contact Information section for DE version \ No newline at end of file + And I check that Country of birth is not visible in Contact Information section for DE version + + @tmsLink=HSP-6460 @env_de + Scenario: Person view has info cards of entities enabled in the system + Given I log in as a Admin User + And I click on the Cases button from navbar + And I click on the NEW CASE button + And I create a new case with mandatory data with person name and "Baden-Württemberg" region and "LK Alb-Donau-Kreis" district for DE version + Then I click on save button in the case popup + Then I collect uuid of the case + And I click on New Sample in German + And I create a new Sample with only required fields for DE version + And I click on save sample button + And I click NEW VACCINATION button for DE + And I change the report vaccination date for minus 17 day from today + And I fill new vaccination data in new Vaccination form for DE + And I remove the vaccination date in displayed vaccination form + And I click SAVE button in new Vaccination form + And I navigate to case person tab + Then I collect person UUID from Edit Case Person page + Then I click on New Contact button in Case Person Tab for DE + And I click on the NEW CONTACT button + And I click CHOOSE CASE button + Then I search for the last created case uuid by UI in the CHOOSE SOURCE Contact window for DE + And I open the first found result in the CHOOSE SOURCE Contact window for De + And I click on SAVE new contact button in the CHOOSE SOURCE popup of Create Contact window + Then I click on the Persons button from navbar + And I open the last new created person by UI in person directory + Then I check that number of displayed cases with "pencil" icon is 1 for Cases Side Card + And I check that SEE CASES FOR THIS PERSON button appears on Edit Person page for DE + Then I check that number of displayed contacts with "pencil" icon is 1 for Contacts Side Card + And I check that SEE CONTACTS FOR THIS PERSON button appears on Edit Person page for DE + Then I check that number of displayed samples with "pencil" icon is 1 for Samples Side Card + And I check if Side card has available "see sample for this person" button for DE + Then I check that number of displayed vaccinations with "pencil" icon is 1 for Vaccinations Side Card + And I click Link Event button on Edit Person Page for DE + And I choose the first found result in Pick or create event window + Then I click on SAVE button in Link Event form from Edit Person page + And I check that number of displayed linked events with "pencil" icon is 1 for Events Side Card + And I check if Side card has available "new travel entry" button for DE + And I click on the Entries button from navbar + Then I apply "Aktive Einreisen" to combobox on Travel Entry Directory Page + And I check if the New Travel Entry button is displayed in Travel Entries directory + Then I apply "Abgeschlossene Einreisen" to combobox on Travel Entry Directory Page + And I check if the New Travel Entry button is displayed in Travel Entries directory \ No newline at end of file diff --git a/sormas-e2e-tests/src/test/resources/features/sanity/web/SharedCases.feature b/sormas-e2e-tests/src/test/resources/features/sanity/web/SharedCases.feature index a49f89a7dde..27b04dff294 100644 --- a/sormas-e2e-tests/src/test/resources/features/sanity/web/SharedCases.feature +++ b/sormas-e2e-tests/src/test/resources/features/sanity/web/SharedCases.feature @@ -1307,7 +1307,7 @@ Feature: Sharing cases between environments tests @tmsLink=HSP=6265 @env_d2s @LoginKeycloak Scenario: S2S - Share a Case created from processed Lab message with: -"Exclude personal data" -"Share reports" - Given API : Login to DEMIS server + Given API : Login to DEMIS server Then I create and send Laboratory Notification And I log in as a S2S Then I click on the Messages button from navbar @@ -1323,12 +1323,12 @@ Feature: Sharing cases between environments tests And I fill comment in surveillance report notification details with random string And I click on Save popup button Then I click on share button - And I select organization to share with "s2s_1" + And I select organization to share with "s2s_3" Then I click to exclude personal data in Share popup And I click to share report data in Share popup And I fill comment in share popup for case with random string Then I click on share button in s2s share popup and wait for share to finish - Then I navigate to "s2s_1" environment in new driver tab + Then I navigate to "s2s_3" environment in new driver tab Given I log in as a S2S And I click on the Shares button from navbar Then I accept first entity from table in Shares Page @@ -1363,11 +1363,11 @@ Feature: Sharing cases between environments tests Then I collect data from surveillance report And I click on Discard popup button And I click on share button - And I select organization to share with "s2s_1" + And I select organization to share with "s2s_3" And I click to share reports of the case in Share popup And I fill comment in share popup for case with random string Then I click on share button in s2s share popup and wait for share to finish - Then I navigate to "s2s_1" environment in new driver tab + Then I navigate to "s2s_3" environment in new driver tab Given I log in as a S2S And I click on the Shares button from navbar And I click on "accept" shared case button with copied case description diff --git a/sormas-ear/pom.xml b/sormas-ear/pom.xml index 68433ca1603..40b2ca0e56a 100644 --- a/sormas-ear/pom.xml +++ b/sormas-ear/pom.xml @@ -3,7 +3,7 @@ de.symeda.sormas sormas-base - 1.92.0 + 1.93.0 ../sormas-base diff --git a/sormas-keycloak-service-provider/pom.xml b/sormas-keycloak-service-provider/pom.xml index d12f755d7fc..98727f20545 100644 --- a/sormas-keycloak-service-provider/pom.xml +++ b/sormas-keycloak-service-provider/pom.xml @@ -3,7 +3,7 @@ sormas-base de.symeda.sormas - 1.92.0 + 1.93.0 ../sormas-base 4.0.0 diff --git a/sormas-rest/pom.xml b/sormas-rest/pom.xml index afd8853eda4..1dd9b635d2f 100644 --- a/sormas-rest/pom.xml +++ b/sormas-rest/pom.xml @@ -3,7 +3,7 @@ de.symeda.sormas sormas-base - 1.92.0 + 1.93.0 ../sormas-base diff --git a/sormas-rest/src/main/webapp/WEB-INF/glassfish-web.xml b/sormas-rest/src/main/webapp/WEB-INF/glassfish-web.xml index ce500d23e61..42730bea6cd 100644 --- a/sormas-rest/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/sormas-rest/src/main/webapp/WEB-INF/glassfish-web.xml @@ -980,4 +980,9 @@ DEV_MODE + + CUSTOMIZABLE_ENUM_MANAGEMENT + CUSTOMIZABLE_ENUM_MANAGEMENT + + diff --git a/sormas-rest/src/main/webapp/WEB-INF/web.xml b/sormas-rest/src/main/webapp/WEB-INF/web.xml index 94091f5b821..c10ef61cd07 100644 --- a/sormas-rest/src/main/webapp/WEB-INF/web.xml +++ b/sormas-rest/src/main/webapp/WEB-INF/web.xml @@ -792,4 +792,8 @@ DEV_MODE + + CUSTOMIZABLE_ENUM_MANAGEMENT + + diff --git a/sormas-rest/swagger.json b/sormas-rest/swagger.json index 068696fa45c..42df2abc89b 100644 --- a/sormas-rest/swagger.json +++ b/sormas-rest/swagger.json @@ -7,7 +7,7 @@ "url" : "https://www.gnu.org/licenses/gpl-3.0.html" }, "title" : "SORMAS REST API", - "version" : "1.92.0-SNAPSHOT" + "version" : "1.93.0-SNAPSHOT" }, "servers" : [ { "url" : "/sormas-rest" @@ -9889,7 +9889,7 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS" ] + "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS", "CUSTOMIZABLE_ENUM_MANAGEMENT" ] } } } @@ -9919,7 +9919,7 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS" ] + "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS", "CUSTOMIZABLE_ENUM_MANAGEMENT" ] } } } @@ -15060,6 +15060,9 @@ "CustomizableEnum" : { "type" : "object", "properties" : { + "allProperties" : { + "type" : "object" + }, "caption" : { "type" : "string" }, @@ -15129,7 +15132,8 @@ "items" : { "type" : "string", "enum" : [ "AFP", "CHOLERA", "CONGENITAL_RUBELLA", "CSM", "DENGUE", "EVD", "GUINEA_WORM", "LASSA", "MEASLES", "MONKEYPOX", "NEW_INFLUENZA", "PLAGUE", "POLIO", "UNSPECIFIED_VHF", "WEST_NILE_FEVER", "YELLOW_FEVER", "RABIES", "ANTHRAX", "CORONAVIRUS", "PNEUMONIA", "MALARIA", "TYPHOID_FEVER", "ACUTE_VIRAL_HEPATITIS", "NON_NEONATAL_TETANUS", "HIV", "SCHISTOSOMIASIS", "SOIL_TRANSMITTED_HELMINTHS", "TRYPANOSOMIASIS", "DIARRHEA_DEHYDRATION", "DIARRHEA_BLOOD", "SNAKE_BITE", "RUBELLA", "TUBERCULOSIS", "LEPROSY", "LYMPHATIC_FILARIASIS", "BURULI_ULCER", "PERTUSSIS", "NEONATAL_TETANUS", "ONCHOCERCIASIS", "DIPHTERIA", "TRACHOMA", "YAWS_ENDEMIC_SYPHILIS", "MATERNAL_DEATHS", "PERINATAL_DEATHS", "INFLUENZA_A", "INFLUENZA_B", "H_METAPNEUMOVIRUS", "RESPIRATORY_SYNCYTIAL_VIRUS", "PARAINFLUENZA_1_4", "ADENOVIRUS", "RHINOVIRUS", "ENTEROVIRUS", "M_PNEUMONIAE", "C_PNEUMONIAE", "ARI", "CHIKUNGUNYA", "POST_IMMUNIZATION_ADVERSE_EVENTS_MILD", "POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE", "FHA", "OTHER", "UNDEFINED" ] - } + }, + "uniqueItems" : true }, "properties" : { "type" : "object", @@ -15154,7 +15158,8 @@ "maxLength" : 1000000, "minLength" : 0 } - } + }, + "required" : [ "caption", "dataType", "value" ] }, "DashboardCaseMeasureDto" : { "type" : "object", @@ -15715,6 +15720,9 @@ "DiseaseVariant" : { "type" : "object", "properties" : { + "allProperties" : { + "type" : "object" + }, "caption" : { "type" : "string" }, @@ -19493,6 +19501,9 @@ "OccupationType" : { "type" : "object", "properties" : { + "allProperties" : { + "type" : "object" + }, "caption" : { "type" : "string" }, @@ -20429,6 +20440,9 @@ "Pathogen" : { "type" : "object", "properties" : { + "allProperties" : { + "type" : "object" + }, "caption" : { "type" : "string" }, @@ -20641,6 +20655,11 @@ "testedPathogen" : { "$ref" : "#/components/schemas/Pathogen" }, + "testedPathogenDetails" : { + "type" : "string", + "maxLength" : 512, + "minLength" : 0 + }, "typingId" : { "type" : "string", "maxLength" : 1000000, @@ -22933,6 +22952,9 @@ "SpecificRisk" : { "type" : "object", "properties" : { + "allProperties" : { + "type" : "object" + }, "caption" : { "type" : "string" }, @@ -24955,6 +24977,9 @@ "region" : { "$ref" : "#/components/schemas/RegionReferenceDto" }, + "showOnlyRestrictedAccessToAssignedEntities" : { + "type" : "boolean" + }, "userRole" : { "$ref" : "#/components/schemas/UserRoleReferenceDto" } @@ -25151,6 +25176,9 @@ "portHealthUser" : { "type" : "boolean" }, + "restrictAccessToAssignedEntities" : { + "type" : "boolean" + }, "smsNotificationTypes" : { "type" : "array", "items" : { @@ -25163,7 +25191,7 @@ "type" : "array", "items" : { "type" : "string", - "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS" ] + "enum" : [ "CASE_VIEW", "CASE_CREATE", "CASE_EDIT", "CASE_ARCHIVE", "CASE_DELETE", "CASE_IMPORT", "CASE_EXPORT", "CASE_INVESTIGATE", "CASE_CLASSIFY", "CASE_CHANGE_DISEASE", "CASE_CHANGE_EPID_NUMBER", "CASE_TRANSFER", "CASE_REFER_FROM_POE", "CASE_MERGE", "CASE_SHARE", "CASE_RESPONSIBLE", "IMMUNIZATION_VIEW", "IMMUNIZATION_CREATE", "IMMUNIZATION_EDIT", "IMMUNIZATION_ARCHIVE", "IMMUNIZATION_DELETE", "PERSON_VIEW", "PERSON_EDIT", "PERSON_DELETE", "PERSON_EXPORT", "PERSON_CONTACT_DETAILS_DELETE", "PERSON_MERGE", "SAMPLE_VIEW", "SAMPLE_CREATE", "SAMPLE_EDIT", "SAMPLE_DELETE", "SAMPLE_EXPORT", "SAMPLE_TRANSFER", "SAMPLE_EDIT_NOT_OWNED", "PERFORM_BULK_OPERATIONS_CASE_SAMPLES", "PATHOGEN_TEST_CREATE", "PATHOGEN_TEST_EDIT", "PATHOGEN_TEST_DELETE", "ADDITIONAL_TEST_VIEW", "ADDITIONAL_TEST_CREATE", "ADDITIONAL_TEST_EDIT", "ADDITIONAL_TEST_DELETE", "CONTACT_VIEW", "CONTACT_CREATE", "CONTACT_EDIT", "CONTACT_ARCHIVE", "CONTACT_DELETE", "CONTACT_IMPORT", "CONTACT_EXPORT", "CONTACT_CONVERT", "CONTACT_REASSIGN_CASE", "CONTACT_MERGE", "CONTACT_RESPONSIBLE", "VISIT_CREATE", "VISIT_EDIT", "VISIT_DELETE", "VISIT_EXPORT", "TASK_VIEW", "TASK_CREATE", "TASK_EDIT", "TASK_DELETE", "TASK_EXPORT", "TASK_ASSIGN", "TASK_ARCHIVE", "ACTION_CREATE", "ACTION_DELETE", "ACTION_EDIT", "EVENT_VIEW", "EVENT_CREATE", "EVENT_EDIT", "EVENT_ARCHIVE", "EVENT_DELETE", "EVENT_IMPORT", "EVENT_EXPORT", "PERFORM_BULK_OPERATIONS_EVENT", "EVENT_RESPONSIBLE", "EVENTPARTICIPANT_VIEW", "EVENTPARTICIPANT_CREATE", "EVENTPARTICIPANT_EDIT", "EVENTPARTICIPANT_ARCHIVE", "EVENTPARTICIPANT_DELETE", "EVENTPARTICIPANT_IMPORT", "PERFORM_BULK_OPERATIONS_EVENTPARTICIPANT", "EVENTGROUP_CREATE", "EVENTGROUP_EDIT", "EVENTGROUP_ARCHIVE", "EVENTGROUP_DELETE", "EVENTGROUP_LINK", "USER_VIEW", "USER_CREATE", "USER_EDIT", "USER_ROLE_VIEW", "USER_ROLE_EDIT", "USER_ROLE_DELETE", "STATISTICS_ACCESS", "STATISTICS_EXPORT", "INFRASTRUCTURE_VIEW", "INFRASTRUCTURE_CREATE", "INFRASTRUCTURE_EDIT", "INFRASTRUCTURE_ARCHIVE", "INFRASTRUCTURE_IMPORT", "INFRASTRUCTURE_EXPORT", "POPULATION_MANAGE", "DASHBOARD_SURVEILLANCE_VIEW", "DASHBOARD_CONTACT_VIEW", "DASHBOARD_CONTACT_VIEW_TRANSMISSION_CHAINS", "DASHBOARD_CAMPAIGNS_VIEW", "DASHBOARD_SAMPLES_VIEW", "CASE_CLINICIAN_VIEW", "THERAPY_VIEW", "PRESCRIPTION_CREATE", "PRESCRIPTION_EDIT", "PRESCRIPTION_DELETE", "TREATMENT_CREATE", "TREATMENT_EDIT", "TREATMENT_DELETE", "CLINICAL_COURSE_VIEW", "CLINICAL_COURSE_EDIT", "CLINICAL_VISIT_CREATE", "CLINICAL_VISIT_EDIT", "CLINICAL_VISIT_DELETE", "PORT_HEALTH_INFO_VIEW", "PORT_HEALTH_INFO_EDIT", "WEEKLYREPORT_VIEW", "WEEKLYREPORT_CREATE", "AGGREGATE_REPORT_VIEW", "AGGREGATE_REPORT_EDIT", "AGGREGATE_REPORT_EXPORT", "SEE_PERSONAL_DATA_IN_JURISDICTION", "SEE_PERSONAL_DATA_OUTSIDE_JURISDICTION", "SEE_SENSITIVE_DATA_IN_JURISDICTION", "SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION", "CAMPAIGN_VIEW", "CAMPAIGN_EDIT", "CAMPAIGN_ARCHIVE", "CAMPAIGN_DELETE", "CAMPAIGN_FORM_DATA_VIEW", "CAMPAIGN_FORM_DATA_EDIT", "CAMPAIGN_FORM_DATA_ARCHIVE", "CAMPAIGN_FORM_DATA_DELETE", "CAMPAIGN_FORM_DATA_EXPORT", "TRAVEL_ENTRY_MANAGEMENT_ACCESS", "TRAVEL_ENTRY_VIEW", "TRAVEL_ENTRY_CREATE", "TRAVEL_ENTRY_EDIT", "TRAVEL_ENTRY_ARCHIVE", "TRAVEL_ENTRY_DELETE", "ENVIRONMENT_VIEW", "ENVIRONMENT_CREATE", "ENVIRONMENT_EDIT", "ENVIRONMENT_ARCHIVE", "ENVIRONMENT_DELETE", "ENVIRONMENT_IMPORT", "ENVIRONMENT_EXPORT", "ENVIRONMENT_SAMPLE_VIEW", "ENVIRONMENT_SAMPLE_CREATE", "ENVIRONMENT_SAMPLE_EDIT", "ENVIRONMENT_SAMPLE_EDIT_DISPATCH", "ENVIRONMENT_SAMPLE_EDIT_RECEIVAL", "ENVIRONMENT_SAMPLE_DELETE", "ENVIRONMENT_SAMPLE_IMPORT", "ENVIRONMENT_SAMPLE_EXPORT", "DOCUMENT_VIEW", "DOCUMENT_UPLOAD", "DOCUMENT_DELETE", "PERFORM_BULK_OPERATIONS", "PERFORM_BULK_OPERATIONS_PSEUDONYM", "QUARANTINE_ORDER_CREATE", "SORMAS_REST", "SORMAS_UI", "DATABASE_EXPORT_ACCESS", "EXPORT_DATA_PROTECTION_DATA", "BAG_EXPORT", "SEND_MANUAL_EXTERNAL_MESSAGES", "MANAGE_EXTERNAL_SYMPTOM_JOURNAL", "EXTERNAL_VISITS", "SORMAS_TO_SORMAS_CLIENT", "SORMAS_TO_SORMAS_SHARE", "SORMAS_TO_SORMAS_PROCESS", "EXTERNAL_SURVEILLANCE_SHARE", "EXTERNAL_SURVEILLANCE_DELETE", "EXTERNAL_MESSAGE_VIEW", "EXTERNAL_MESSAGE_PROCESS", "EXTERNAL_MESSAGE_PUSH", "EXTERNAL_MESSAGE_DELETE", "PERFORM_BULK_OPERATIONS_EXTERNAL_MESSAGES", "OUTBREAK_VIEW", "OUTBREAK_EDIT", "MANAGE_PUBLIC_EXPORT_CONFIGURATION", "DOCUMENT_TEMPLATE_MANAGEMENT", "LINE_LISTING_CONFIGURE", "DEV_MODE", "EMAIL_TEMPLATE_MANAGEMENT", "EXTERNAL_EMAIL_SEND", "EXTERNAL_EMAIL_ATTACH_DOCUMENTS", "CUSTOMIZABLE_ENUM_MANAGEMENT" ] }, "uniqueItems" : true }, diff --git a/sormas-rest/swagger.yaml b/sormas-rest/swagger.yaml index f740e951ffb..e1e459b2084 100644 --- a/sormas-rest/swagger.yaml +++ b/sormas-rest/swagger.yaml @@ -10,7 +10,7 @@ info: name: GPL v3 url: https://www.gnu.org/licenses/gpl-3.0.html title: SORMAS REST API - version: 1.92.0-SNAPSHOT + version: 1.93.0-SNAPSHOT servers: - url: /sormas-rest paths: @@ -7212,6 +7212,7 @@ paths: - EMAIL_TEMPLATE_MANAGEMENT - EXTERNAL_EMAIL_SEND - EXTERNAL_EMAIL_ATTACH_DOCUMENTS + - CUSTOMIZABLE_ENUM_MANAGEMENT description: default response tags: - User Controller @@ -7428,6 +7429,7 @@ paths: - EMAIL_TEMPLATE_MANAGEMENT - EXTERNAL_EMAIL_SEND - EXTERNAL_EMAIL_ATTACH_DOCUMENTS + - CUSTOMIZABLE_ENUM_MANAGEMENT description: default response tags: - User Controller @@ -12964,6 +12966,8 @@ components: CustomizableEnum: type: object properties: + allProperties: + type: object caption: type: string properties: @@ -13080,6 +13084,7 @@ components: - FHA - OTHER - UNDEFINED + uniqueItems: true properties: type: object additionalProperties: @@ -13097,6 +13102,10 @@ components: type: string maxLength: 1000000 minLength: 0 + required: + - caption + - dataType + - value DashboardCaseMeasureDto: type: object properties: @@ -13820,6 +13829,8 @@ components: DiseaseVariant: type: object properties: + allProperties: + type: object caption: type: string hasDetails: @@ -18895,6 +18906,8 @@ components: OccupationType: type: object properties: + allProperties: + type: object caption: type: string hasDetails: @@ -19667,6 +19680,8 @@ components: Pathogen: type: object properties: + allProperties: + type: object caption: type: string hasDetails: @@ -19920,6 +19935,10 @@ components: minLength: 0 testedPathogen: $ref: '#/components/schemas/Pathogen' + testedPathogenDetails: + type: string + maxLength: 512 + minLength: 0 typingId: type: string maxLength: 1000000 @@ -22519,6 +22538,8 @@ components: SpecificRisk: type: object properties: + allProperties: + type: object caption: type: string properties: @@ -24963,6 +24984,8 @@ components: type: string region: $ref: '#/components/schemas/RegionReferenceDto' + showOnlyRestrictedAccessToAssignedEntities: + type: boolean userRole: $ref: '#/components/schemas/UserRoleReferenceDto' UserDto: @@ -25247,6 +25270,8 @@ components: - BAG_USER portHealthUser: type: boolean + restrictAccessToAssignedEntities: + type: boolean smsNotificationTypes: type: array items: @@ -25470,6 +25495,7 @@ components: - EMAIL_TEMPLATE_MANAGEMENT - EXTERNAL_EMAIL_SEND - EXTERNAL_EMAIL_ATTACH_DOCUMENTS + - CUSTOMIZABLE_ENUM_MANAGEMENT uniqueItems: true uuid: type: string diff --git a/sormas-serverlibs/pom.xml b/sormas-serverlibs/pom.xml index bd33f45d0e9..ccd82d554b2 100644 --- a/sormas-serverlibs/pom.xml +++ b/sormas-serverlibs/pom.xml @@ -3,7 +3,7 @@ sormas-base de.symeda.sormas - 1.92.0 + 1.93.0 ../sormas-base 4.0.0 @@ -124,6 +124,10 @@ fr.opensagres.xdocreport fr.opensagres.xdocreport.template.velocity + + fr.opensagres.xdocreport + fr.opensagres.xdocreport.converter.docx.xwpf + io.swagger.core.v3 @@ -285,6 +289,11 @@ spring-context + + org.apache.pdfbox + pdfbox + + diff --git a/sormas-ui/pom.xml b/sormas-ui/pom.xml index 31ed68c143e..43a904c4814 100644 --- a/sormas-ui/pom.xml +++ b/sormas-ui/pom.xml @@ -3,7 +3,7 @@ sormas-base de.symeda.sormas - 1.92.0 + 1.93.0 ../sormas-base 4.0.0 @@ -287,6 +287,12 @@ test + + org.apache.pdfbox + pdfbox + test + + diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/ControllerProvider.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/ControllerProvider.java index 9625ef488e2..9b7f283cb9c 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/ControllerProvider.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/ControllerProvider.java @@ -22,6 +22,7 @@ import de.symeda.sormas.ui.caze.CaseController; import de.symeda.sormas.ui.caze.surveillancereport.SurveillanceReportController; import de.symeda.sormas.ui.clinicalcourse.ClinicalCourseController; +import de.symeda.sormas.ui.configuration.customizableenum.CustomizableEnumController; import de.symeda.sormas.ui.configuration.infrastructure.InfrastructureController; import de.symeda.sormas.ui.configuration.outbreak.OutbreakController; import de.symeda.sormas.ui.contact.ContactController; @@ -93,6 +94,7 @@ public class ControllerProvider extends BaseControllerProvider { private final PermanentDeleteController permanentDeleteController; private final EnvironmentSampleController environmentSampleController; private final ExternalEmailController externalEmailController; + private final CustomizableEnumController customizableEnumController; public ControllerProvider() { super(); @@ -133,6 +135,7 @@ public ControllerProvider() { permanentDeleteController = new PermanentDeleteController(); environmentSampleController = new EnvironmentSampleController(); externalEmailController = new ExternalEmailController(); + customizableEnumController = new CustomizableEnumController(); } protected static ControllerProvider get() { @@ -282,4 +285,8 @@ public static EnvironmentSampleController getEnvironmentSampleController() { public static ExternalEmailController getExternalEmailController() { return get().externalEmailController; } + + public static CustomizableEnumController getCustomizableEnumController() { + return get().customizableEnumController; + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java index f08e6fcac64..8e8996c8b62 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java @@ -957,7 +957,10 @@ public CommitDiscardWrapperComponent getCaseDataEditComponent(fina editView.getWrappedComponent().addButtonListener(CaseDataForm.CASE_REFER_POINT_OF_ENTRY_BTN_LOC, clickListener); } - appendSpecialCommands(caze, editView); + if (UserProvider.getCurrent().getUserRoles().stream().anyMatch(userRoleDto -> !userRoleDto.isRestrictAccessToAssignedEntities()) + || caze.getSurveillanceOfficer().equals(UserProvider.getCurrent().getUserReference())) { + appendSpecialCommands(caze, editView); + } editView.restrictEditableComponentsOnEditView( UserRight.CASE_EDIT, diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java index 0b4b1bbb379..46bc6bb7ff2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java @@ -19,8 +19,6 @@ import de.symeda.sormas.api.EditPermissionType; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; -import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; -import de.symeda.sormas.api.docgeneneration.RootEntityType; import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.feature.FeatureTypeProperty; @@ -34,6 +32,7 @@ import de.symeda.sormas.api.vaccination.VaccinationAssociationType; import de.symeda.sormas.api.vaccination.VaccinationCriteria; import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.SormasUI; import de.symeda.sormas.ui.UiUtil; import de.symeda.sormas.ui.UserProvider; import de.symeda.sormas.ui.caze.messaging.SmsListComponent; @@ -225,14 +224,8 @@ protected void initView(String params) { QuarantineOrderDocumentsComponent.addComponentToLayout(layout, caze, documentList); if (UiUtil.permitted(FeatureType.EXTERNAL_EMAILS, UserRight.EXTERNAL_EMAIL_SEND)) { - ExternalEmailSideComponent externalEmailSideComponent = new ExternalEmailSideComponent( - DocumentWorkflow.CASE_EMAIL, - RootEntityType.ROOT_CASE, - caze.toReference(), - caze.getPerson(), - Strings.messageCasePersonHasNoEmail, - isEditAllowed, - this::showUnsavedChangesPopup); + ExternalEmailSideComponent externalEmailSideComponent = + ExternalEmailSideComponent.forCase(caze, isEditAllowed, SormasUI::refreshView, this::showUnsavedChangesPopup); layout.addSidePanelComponent(new SideComponentLayout(externalEmailSideComponent), EXTERNAL_EMAILS_LOC); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsList.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsList.java index 81c361bb801..9c042702611 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsList.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsList.java @@ -5,10 +5,9 @@ import com.vaadin.ui.Label; import de.symeda.sormas.api.FacadeProvider; -import de.symeda.sormas.api.caze.CaseReferenceDto; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.messaging.ManualMessageLogDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogDto; import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.PersonReferenceDto; import de.symeda.sormas.ui.utils.PaginationList; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListEntry.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListEntry.java index 349a49df8b9..481e6f940a2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListEntry.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/messaging/SmsListEntry.java @@ -6,7 +6,7 @@ import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.messaging.ManualMessageLogDto; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogDto; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.DateFormatHelper; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/AbstractConfigurationView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/AbstractConfigurationView.java index 2e9bc6dcd5e..caed46b5ff3 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/AbstractConfigurationView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/AbstractConfigurationView.java @@ -30,6 +30,7 @@ import de.symeda.sormas.ui.SubMenu; import de.symeda.sormas.ui.UiUtil; import de.symeda.sormas.ui.UserProvider; +import de.symeda.sormas.ui.configuration.customizableenum.CustomizableEnumValuesView; import de.symeda.sormas.ui.configuration.docgeneration.DocumentTemplatesView; import de.symeda.sormas.ui.configuration.docgeneration.emailtemplate.EmailTemplatesView; import de.symeda.sormas.ui.configuration.infrastructure.AreasView; @@ -110,6 +111,10 @@ public static void registerViews(Navigator navigator) { navigator.addView(EmailTemplatesView.VIEW_NAME, EmailTemplatesView.class); } + if (UserProvider.getCurrent().hasUserRight(UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT)) { + navigator.addView(CustomizableEnumValuesView.VIEW_NAME, CustomizableEnumValuesView.class); + } + if (FacadeProvider.getConfigFacade().isDevMode() && UserProvider.getCurrent().hasUserRight(UserRight.DEV_MODE)) { navigator.addView(DevModeView.VIEW_NAME, DevModeView.class); } @@ -223,6 +228,14 @@ public void refreshMenu(SubMenu menu, String params) { false); } + if (UserProvider.getCurrent().hasUserRight(UserRight.CUSTOMIZABLE_ENUM_MANAGEMENT)) { + menu.addView( + CustomizableEnumValuesView.VIEW_NAME, + I18nProperties.getPrefixCaption("View", CustomizableEnumValuesView.VIEW_NAME.replaceAll("/", ".") + ".short", ""), + null, + false); + } + if (FacadeProvider.getConfigFacade().isDevMode() && UserProvider.getCurrent().hasUserRight(UserRight.DEV_MODE)) { menu.addView( DevModeView.VIEW_NAME, diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumController.java new file mode 100644 index 00000000000..2f161c5a77f --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumController.java @@ -0,0 +1,63 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import com.vaadin.ui.Notification; + +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueDto; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.ui.SormasUI; +import de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent; +import de.symeda.sormas.ui.utils.VaadinUiUtil; + +public class CustomizableEnumController { + + public void createCustomizableEnumValue() { + + CustomizableEnumValueCreateForm createForm = new CustomizableEnumValueCreateForm(); + createForm.setValue(CustomizableEnumValueDto.build()); + + final CommitDiscardWrapperComponent cdw = + new CommitDiscardWrapperComponent<>(createForm, createForm.getFieldGroup()); + cdw.addCommitListener(() -> { + FacadeProvider.getCustomizableEnumFacade().save(createForm.getValue()); + Notification.show(I18nProperties.getString(Strings.messageEntryCreated), Notification.Type.ASSISTIVE_NOTIFICATION); + SormasUI.get().getNavigator().navigateTo(CustomizableEnumValuesView.VIEW_NAME); + }); + + VaadinUiUtil.showModalPopupWindow(cdw, I18nProperties.getString(Strings.headingCreateEntry)); + } + + public void editCustomizableEnumValue(String uuid) { + + CustomizableEnumValueDto customizableEnumValue = FacadeProvider.getCustomizableEnumFacade().getByUuid(uuid); + CustomizableEnumValueEditForm editForm = new CustomizableEnumValueEditForm(); + editForm.setValue(customizableEnumValue); + + final CommitDiscardWrapperComponent cdw = + new CommitDiscardWrapperComponent<>(editForm, editForm.getFieldGroup()); + cdw.addCommitListener(() -> { + FacadeProvider.getCustomizableEnumFacade().save(editForm.getValue()); + Notification.show(I18nProperties.getString(Strings.messageCustomizableEnumValueSaved), Notification.Type.ASSISTIVE_NOTIFICATION); + SormasUI.get().getNavigator().navigateTo(CustomizableEnumValuesView.VIEW_NAME); + }); + + VaadinUiUtil.showModalPopupWindow(cdw, I18nProperties.getString(Strings.edit) + " " + customizableEnumValue.getCaption()); + } + +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumDiseasesRenderer.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumDiseasesRenderer.java new file mode 100644 index 00000000000..7b77841b56c --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumDiseasesRenderer.java @@ -0,0 +1,50 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import java.util.Set; +import java.util.stream.Collectors; + +import com.vaadin.ui.renderers.TextRenderer; + +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import elemental.json.JsonValue; + +public class CustomizableEnumDiseasesRenderer extends TextRenderer { + + @Override + public JsonValue encode(Object value) { + + if (!(value instanceof Set)) { + return super.encode(I18nProperties.getCaption(Captions.customizableEnumValueAllDiseases)); + } + + Set diseases = (Set) value; + + if (diseases.size() == 0) { + return super.encode(I18nProperties.getCaption(Captions.customizableEnumValueAllDiseases)); + } + + if (diseases.size() > 10) { + return super.encode(String.format(I18nProperties.getCaption(Captions.customizableEnumValueDiseaseCount), diseases.size())); + } + + return super.encode(diseases.stream().map(Disease::toString).collect(Collectors.joining(", "))); + } + +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumPropertiesRenderer.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumPropertiesRenderer.java new file mode 100644 index 00000000000..a80ea52abab --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumPropertiesRenderer.java @@ -0,0 +1,57 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +import com.vaadin.ui.renderers.TextRenderer; + +import de.symeda.sormas.api.customizableenum.CustomizableEnum; +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import elemental.json.JsonValue; + +public class CustomizableEnumPropertiesRenderer extends TextRenderer { + + public JsonValue encode(Object value) { + + if (!(value instanceof Map)) { + return super.encode(I18nProperties.getCaption(Captions.customizableEnumValueNoProperties)); + } + + Map properties = (Map) value; + + // Remove boolean properties that are set to false + Set propertiesToRemove = properties.keySet().stream().filter(k -> { + Object propertyValue = properties.get(k); + return propertyValue instanceof Boolean && !((Boolean) propertyValue); + }).collect(Collectors.toSet()); + propertiesToRemove.forEach(properties::remove); + + if (properties.size() == 0) { + return super.encode(I18nProperties.getCaption(Captions.customizableEnumValueNoProperties)); + } + + return super.encode( + properties.keySet() + .stream() + .map(k -> I18nProperties.getPrefixCaptionShort(CustomizableEnum.I18N_PREFIX, k)) + .collect(Collectors.joining(", "))); + } + +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueCreateForm.java new file mode 100644 index 00000000000..1fa5a361ef4 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueCreateForm.java @@ -0,0 +1,78 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; + +import com.vaadin.v7.data.Validator; +import com.vaadin.v7.ui.ComboBox; +import com.vaadin.v7.ui.TextField; + +import de.symeda.sormas.api.customizableenum.CustomizableEnumHelper; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueDto; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; +import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; +import de.symeda.sormas.ui.utils.AbstractEditForm; + +public class CustomizableEnumValueCreateForm extends AbstractEditForm { + + private static final String HTML_LAYOUT = fluidRowLocs(CustomizableEnumValueDto.DATA_TYPE) + + fluidRowLocs(CustomizableEnumValueDto.VALUE, CustomizableEnumValueDto.CAPTION) + + fluidRowLocs(CustomizableEnumValueDto.DESCRIPTION); + + public CustomizableEnumValueCreateForm() { + + super( + CustomizableEnumValueDto.class, + CustomizableEnumValueDto.I18N_PREFIX, + true, + FieldVisibilityCheckers.getNoop(), + UiFieldAccessCheckers.getNoop()); + + setWidth(540, Unit.PIXELS); + hideValidationUntilNextCommit(); + } + + @Override + protected void addFields() { + + addField(CustomizableEnumValueDto.DATA_TYPE, ComboBox.class); + TextField tfValue = addField(CustomizableEnumValueDto.VALUE, TextField.class); + addField(CustomizableEnumValueDto.CAPTION, TextField.class); + addField(CustomizableEnumValueDto.DESCRIPTION, TextField.class); + + setRequired(true, CustomizableEnumValueDto.DATA_TYPE, CustomizableEnumValueDto.CAPTION, CustomizableEnumValueDto.VALUE); + + tfValue.addValidator(value -> { + if (!CustomizableEnumHelper.isValidEnumValue((String) value)) { + throw new Validator.InvalidValueException(I18nProperties.getValidationError(Validations.customizableEnumValueAllowedCharacters)); + } + }); + } + + @Override + public void setValue(CustomizableEnumValueDto newFieldValue) { + super.setValue(newFieldValue); + } + + @Override + protected String createHtmlLayout() { + return HTML_LAYOUT; + } + +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueEditForm.java new file mode 100644 index 00000000000..fb35ec99b0d --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValueEditForm.java @@ -0,0 +1,130 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; +import static java.util.function.Predicate.not; + +import java.lang.reflect.InvocationTargetException; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.apache.commons.collections.CollectionUtils; + +import com.vaadin.v7.ui.ComboBox; + +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueDto; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; +import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; +import de.symeda.sormas.ui.utils.AbstractEditForm; +import de.symeda.sormas.ui.utils.components.CheckboxSet; +import de.symeda.sormas.ui.utils.components.CustomizableEnumPropertiesComponent; +import de.symeda.sormas.ui.utils.components.CustomizableEnumTranslationComponent; + +public class CustomizableEnumValueEditForm extends AbstractEditForm { + + private CustomizableEnumPropertiesComponent propertiesComponent; + private CustomizableEnumTranslationComponent translationsComponent; + private CheckboxSet cbsDiseases; + + private static final String HTML_LAYOUT = fluidRowLocs(CustomizableEnumValueDto.DATA_TYPE, CustomizableEnumValueDto.UUID) + + fluidRowLocs(CustomizableEnumValueDto.VALUE, CustomizableEnumValueDto.CAPTION) + + fluidRowLocs(CustomizableEnumValueDto.DESCRIPTION) + + fluidRowLocs(CustomizableEnumValueDto.PROPERTIES) + + fluidRowLocs(CustomizableEnumValueDto.TRANSLATIONS) + + fluidRowLocs(CustomizableEnumValueDto.DISEASES); + + public CustomizableEnumValueEditForm() { + + super( + CustomizableEnumValueDto.class, + CustomizableEnumValueDto.I18N_PREFIX, + true, + FieldVisibilityCheckers.getNoop(), + UiFieldAccessCheckers.getNoop()); + + setWidth(840, Unit.PIXELS); + } + + @Override + protected void addFields() { + + addField(CustomizableEnumValueDto.DATA_TYPE, ComboBox.class); + addFields( + CustomizableEnumValueDto.UUID, + CustomizableEnumValueDto.VALUE, + CustomizableEnumValueDto.CAPTION, + CustomizableEnumValueDto.DESCRIPTION); + + setRequired(true, CustomizableEnumValueDto.CAPTION); + setReadOnly(true, CustomizableEnumValueDto.DATA_TYPE, CustomizableEnumValueDto.UUID); + setEnabled(false, CustomizableEnumValueDto.VALUE); + + propertiesComponent = addField(CustomizableEnumValueDto.PROPERTIES, CustomizableEnumPropertiesComponent.class); + propertiesComponent.setCaption(I18nProperties.getPrefixCaption(CustomizableEnumValueDto.I18N_PREFIX, CustomizableEnumValueDto.PROPERTIES)); + + translationsComponent = addField(CustomizableEnumValueDto.TRANSLATIONS, CustomizableEnumTranslationComponent.class); + translationsComponent + .setCaption(I18nProperties.getPrefixCaption(CustomizableEnumValueDto.I18N_PREFIX, CustomizableEnumValueDto.TRANSLATIONS)); + + cbsDiseases = addField(CustomizableEnumValueDto.DISEASES, CheckboxSet.class); + cbsDiseases.setColumnCount(3); + cbsDiseases.setCaption(I18nProperties.getPrefixCaption(CustomizableEnumValueDto.I18N_PREFIX, CustomizableEnumValueDto.DISEASES)); + } + + private static List getSelectableDiseases(Set selectedDiseases) { + + List diseases = FacadeProvider.getDiseaseConfigurationFacade().getAllDiseases(true, true, true); + if (CollectionUtils.isNotEmpty(selectedDiseases)) { + List inactiveSelectedDiseases = selectedDiseases.stream().filter(not(diseases::contains)).collect(Collectors.toList()); + diseases.addAll(inactiveSelectedDiseases); + } + + return diseases; + } + + @Override + public void setValue(CustomizableEnumValueDto newFieldValue) { + + super.setValue(newFieldValue); + propertiesComponent.setValue(newFieldValue.getProperties()); + try { + propertiesComponent.setAllProperties(newFieldValue.getDataType().getEnumClass().getConstructor().newInstance().getAllProperties()); + if (!propertiesComponent.hasContent()) { + propertiesComponent.setVisible(false); + } + } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) { + throw new RuntimeException(e); + } + + translationsComponent.setValue(newFieldValue.getTranslations()); + + if (cbsDiseases != null) { + Set selectedDiseases = newFieldValue.getDiseases(); + cbsDiseases.setItems(getSelectableDiseases(selectedDiseases), null, null); + } + } + + @Override + protected String createHtmlLayout() { + return HTML_LAYOUT; + } + +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesGrid.java new file mode 100644 index 00000000000..84fc9067ae0 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesGrid.java @@ -0,0 +1,64 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.customizableenum.CustomizableEnumCriteria; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueDto; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueIndexDto; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.utils.FilteredGrid; + +public class CustomizableEnumValuesGrid extends FilteredGrid { + + private static final long serialVersionUID = 8528080770989069026L; + + public CustomizableEnumValuesGrid(CustomizableEnumCriteria criteria) { + + super(CustomizableEnumValueIndexDto.class); + setSizeFull(); + + setLazyDataProvider(FacadeProvider.getCustomizableEnumFacade()::getIndexList, FacadeProvider.getCustomizableEnumFacade()::count); + setCriteria(criteria); + + setColumns( + CustomizableEnumValueIndexDto.DATA_TYPE, + CustomizableEnumValueIndexDto.VALUE, + CustomizableEnumValueIndexDto.CAPTION, + CustomizableEnumValueIndexDto.DISEASES, + CustomizableEnumValueIndexDto.PROPERTIES); + + Column diseaseColumn = getColumn(CustomizableEnumValueIndexDto.DISEASES); + diseaseColumn.setRenderer(new CustomizableEnumDiseasesRenderer()); + diseaseColumn.setSortable(false); + diseaseColumn.setExpandRatio(1); + Column propertiesColumn = getColumn(CustomizableEnumValueIndexDto.PROPERTIES); + propertiesColumn.setRenderer(new CustomizableEnumPropertiesRenderer()); + propertiesColumn.setSortable(false); + propertiesColumn.setWidth(300); + + addEditColumn(e -> ControllerProvider.getCustomizableEnumController().editCustomizableEnumValue(e.getUuid())); + + for (Column column : getColumns()) { + column.setCaption(I18nProperties.getPrefixCaption(CustomizableEnumValueDto.I18N_PREFIX, column.getId(), column.getCaption())); + } + } + + public void reload() { + getDataProvider().refreshAll(); + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesView.java new file mode 100644 index 00000000000..d01baba8c15 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/customizableenum/CustomizableEnumValuesView.java @@ -0,0 +1,154 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.configuration.customizableenum; + +import java.util.Arrays; + +import com.vaadin.icons.VaadinIcons; +import com.vaadin.navigator.ViewChangeListener; +import com.vaadin.shared.ui.ContentMode; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.themes.ValoTheme; + +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.customizableenum.CustomizableEnumCriteria; +import de.symeda.sormas.api.customizableenum.CustomizableEnumType; +import de.symeda.sormas.api.customizableenum.CustomizableEnumValueIndexDto; +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.ViewModelProviders; +import de.symeda.sormas.ui.configuration.AbstractConfigurationView; +import de.symeda.sormas.ui.configuration.infrastructure.components.SearchField; +import de.symeda.sormas.ui.utils.ButtonHelper; +import de.symeda.sormas.ui.utils.CssStyles; +import de.symeda.sormas.ui.utils.VaadinUiUtil; + +public class CustomizableEnumValuesView extends AbstractConfigurationView { + + private static final long serialVersionUID = 6496373389997511056L; + + public static final String VIEW_NAME = ROOT_VIEW_NAME + "/customizableEnums"; + + // Filters + private SearchField searchField; + private ComboBox dataTypeFilter; + private ComboBox diseaseFilter; + + private final CustomizableEnumCriteria criteria; + private final CustomizableEnumValuesGrid grid; + + public CustomizableEnumValuesView() { + + super(VIEW_NAME); + + criteria = ViewModelProviders.of(CustomizableEnumValuesView.class).get(CustomizableEnumCriteria.class, new CustomizableEnumCriteria()); + grid = new CustomizableEnumValuesGrid(criteria); + VerticalLayout gridLayout = new VerticalLayout(); + gridLayout.addComponent(createFilterBar()); + gridLayout.addComponent(grid); + gridLayout.setMargin(true); + gridLayout.setSpacing(false); + gridLayout.setExpandRatio(grid, 1); + gridLayout.setSizeFull(); + gridLayout.setStyleName("crud-main-layout"); + + addHeaderComponent(ButtonHelper.createIconButton(null, VaadinIcons.INFO_CIRCLE, e -> { + VaadinUiUtil.showSimplePopupWindow( + I18nProperties.getString(Strings.headingCustomizableEnumConfigurationInfo), + I18nProperties.getString(Strings.infoCustomizableEnumConfigurationInfo), + ContentMode.HTML, + 640); + })); + + addHeaderComponent( + ButtonHelper.createIconButton( + Captions.actionNewEntry, + VaadinIcons.PLUS_CIRCLE, + e -> ControllerProvider.getCustomizableEnumController().createCustomizableEnumValue(), + ValoTheme.BUTTON_PRIMARY)); + + addComponent(gridLayout); + } + + private HorizontalLayout createFilterBar() { + + HorizontalLayout filterLayout = new HorizontalLayout(); + filterLayout.setMargin(false); + filterLayout.setSpacing(true); + + searchField = new SearchField(); + searchField.setInputPrompt(I18nProperties.getString(Strings.promptCustomizableEnumSearchField)); + searchField.addTextChangeListener(e -> { + criteria.freeTextFilter(e.getText()); + grid.reload(); + }); + filterLayout.addComponent(searchField); + + dataTypeFilter = new ComboBox<>( + I18nProperties.getPrefixCaption(CustomizableEnumValueIndexDto.I18N_PREFIX, CustomizableEnumValueIndexDto.DATA_TYPE), + Arrays.asList(CustomizableEnumType.values())); + dataTypeFilter.addValueChangeListener(e -> { + criteria.dataType(e.getValue()); + grid.reload(); + }); + filterLayout.addComponent(dataTypeFilter); + + diseaseFilter = new ComboBox<>( + I18nProperties.getPrefixCaption(CustomizableEnumValueIndexDto.I18N_PREFIX, CustomizableEnumValueIndexDto.DISEASES), + FacadeProvider.getDiseaseConfigurationFacade().getAllDiseases(true, true, true)); + diseaseFilter.addValueChangeListener(e -> { + criteria.disease(e.getValue()); + grid.reload(); + }); + filterLayout.addComponent(diseaseFilter); + + filterLayout.addComponent(ButtonHelper.createButton(Captions.actionResetFilters, event -> { + ViewModelProviders.of(CustomizableEnumValuesView.class).remove(CustomizableEnumCriteria.class); + navigateTo(null); + }, CssStyles.FORCE_CAPTION)); + + return filterLayout; + } + + @Override + public void enter(ViewChangeListener.ViewChangeEvent event) { + + super.enter(event); + String params = event.getParameters().trim(); + if (params.startsWith("?")) { + params = params.substring(1); + criteria.fromUrlParams(params); + } + updateFilterComponents(); + grid.reload(); + } + + public void updateFilterComponents() { + + applyingCriteria = true; + + searchField.setValue(criteria.getFreeTextFilter()); + dataTypeFilter.setValue(criteria.getDataType()); + diseaseFilter.setValue(criteria.getDisease()); + + applyingCriteria = false; + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java index 5ba60858f85..f1e2b454b8f 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java @@ -687,23 +687,26 @@ public CommitDiscardWrapperComponent getContactDataEditComponen } }); - if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_DELETE)) { - editComponent.addDeleteWithReasonOrRestoreListener( - ContactsView.VIEW_NAME, - getDeleteConfirmationDetails(Collections.singletonList(contact.getUuid())), - I18nProperties.getString(Strings.entityContact), - contactUuid, - FacadeProvider.getContactFacade()); - } + if (UserProvider.getCurrent().getUserRoles().stream().anyMatch(userRoleDto -> !userRoleDto.isRestrictAccessToAssignedEntities()) + || DataHelper.equal(contact.getContactOfficer(), UserProvider.getCurrent().getUserReference())) { + if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_DELETE)) { + editComponent.addDeleteWithReasonOrRestoreListener( + ContactsView.VIEW_NAME, + getDeleteConfirmationDetails(Collections.singletonList(contact.getUuid())), + I18nProperties.getString(Strings.entityContact), + contactUuid, + FacadeProvider.getContactFacade()); + } - // Initialize 'Archive' button - if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_ARCHIVE)) { - ControllerProvider.getArchiveController() - .addArchivingButton( - contact, - ArchiveHandlers.forContact(), - editComponent, - () -> navigateToView(ContactDataView.VIEW_NAME, contact.getUuid(), false)); + // Initialize 'Archive' button + if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_ARCHIVE)) { + ControllerProvider.getArchiveController() + .addArchivingButton( + contact, + ArchiveHandlers.forContact(), + editComponent, + () -> navigateToView(ContactDataView.VIEW_NAME, contact.getUuid(), false)); + } } editComponent.restrictEditableComponentsOnEditView( diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java index 58644256f2b..4048532ff47 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java @@ -31,8 +31,6 @@ import de.symeda.sormas.api.contact.ContactClassification; import de.symeda.sormas.api.contact.ContactDto; import de.symeda.sormas.api.contact.ContactLogic; -import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; -import de.symeda.sormas.api.docgeneneration.RootEntityType; import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.feature.FeatureTypeProperty; @@ -209,7 +207,7 @@ protected void initView(String params) { if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.TASK_MANAGEMENT) && UserProvider.getCurrent().hasUserRight(UserRight.TASK_VIEW)) { TaskListComponent taskList = - new TaskListComponent(TaskContext.CONTACT, getContactRef(), contactDto.getDisease(), this::showUnsavedChangesPopup, editAllowed); + new TaskListComponent(TaskContext.CONTACT, getContactRef(), contactDto.getDisease(), this::showUnsavedChangesPopup, editAllowed); taskList.addStyleName(CssStyles.SIDE_COMPONENT); layout.addSidePanelComponent(taskList, TASKS_LOC); } @@ -218,7 +216,7 @@ protected void initView(String params) { SampleListComponent sampleList = new SampleListComponent( new SampleCriteria().contact(getContactRef()).disease(contactDto.getDisease()).sampleAssociationType(SampleAssociationType.CONTACT), this::showUnsavedChangesPopup, - editAllowed); + editAllowed); SampleListComponentLayout sampleListComponentLayout = new SampleListComponentLayout(sampleList, I18nProperties.getString(Strings.infoCreateNewSampleDiscardsChangesContact)); layout.addSidePanelComponent(sampleListComponentLayout, SAMPLES_LOC); @@ -287,7 +285,7 @@ protected void initView(String params) { getContactRef(), UserRight.CONTACT_EDIT, contactDto.isPseudonymized(), - editAllowed, + editAllowed, isDocumentDeleteAllowed); layout.addSidePanelComponent(new SideComponentLayout(documentList), DOCUMENTS_LOC); } @@ -295,14 +293,8 @@ protected void initView(String params) { QuarantineOrderDocumentsComponent.addComponentToLayout(layout, contactDto, documentList); if (UiUtil.permitted(FeatureType.EXTERNAL_EMAILS, UserRight.EXTERNAL_EMAIL_SEND)) { - ExternalEmailSideComponent externalEmailSideComponent = new ExternalEmailSideComponent( - DocumentWorkflow.CONTACT_EMAIL, - RootEntityType.ROOT_CONTACT, - contactDto.toReference(), - contactDto.getPerson(), - Strings.messageContactPersonHasNoEmail, - editAllowed, - this::showUnsavedChangesPopup); + ExternalEmailSideComponent externalEmailSideComponent = + ExternalEmailSideComponent.forContact(contactDto, editAllowed, this::showUnsavedChangesPopup); layout.addSidePanelComponent(new SideComponentLayout(externalEmailSideComponent), EXTERNAL_EMAILS_LOC); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailController.java index 5ccec7757a8..d4220f2284a 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailController.java @@ -26,6 +26,7 @@ import de.symeda.sormas.api.docgeneneration.DocumentTemplateException; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; import de.symeda.sormas.api.docgeneneration.RootEntityType; +import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.externalemail.ExternalEmailException; import de.symeda.sormas.api.externalemail.ExternalEmailOptionsDto; import de.symeda.sormas.api.i18n.Captions; @@ -41,10 +42,16 @@ public class ExternalEmailController { public void sendEmail( DocumentWorkflow documentWorkflow, RootEntityType rootEntityType, + DocumentRelatedEntityType documentRelatedEntityType, ReferenceDto rootEntityReference, - PersonReferenceDto personReference) { + PersonReferenceDto personReference, + Runnable callback) { PersonDto person = FacadeProvider.getPersonFacade().getByUuid(personReference.getUuid()); - ExternalEmailOptionsForm optionsForm = new ExternalEmailOptionsForm(documentWorkflow, person); + ExternalEmailOptionsForm optionsForm = new ExternalEmailOptionsForm( + documentWorkflow, + documentRelatedEntityType, + person, + FacadeProvider.getExternalEmailFacade().isAttachmentAvailable(personReference)); ExternalEmailOptionsDto defaultValue = new ExternalEmailOptionsDto(documentWorkflow, rootEntityType, rootEntityReference); String presonPrimaryEmail = person.getEmailAddress(true); @@ -68,6 +75,7 @@ public void sendEmail( optionsPopup.close(); Notification.show(null, I18nProperties.getString(Strings.notificationExternalEmailSent), Notification.Type.TRAY_NOTIFICATION); + callback.run(); } catch (DocumentTemplateException | ExternalEmailException e) { Notification.show(I18nProperties.getString(Strings.errorOccurred), e.getMessage(), Notification.Type.ERROR_MESSAGE); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailList.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailList.java new file mode 100644 index 00000000000..d6295c6b3a1 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailList.java @@ -0,0 +1,146 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.email; + +import static de.symeda.sormas.ui.utils.CssStyles.LABEL_BOLD; + +import java.util.List; + +import org.apache.commons.collections.CollectionUtils; + +import com.vaadin.icons.VaadinIcons; +import com.vaadin.ui.Button; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; + +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogIndexDto; +import de.symeda.sormas.api.user.UserReferenceDto; +import de.symeda.sormas.ui.utils.CssStyles; +import de.symeda.sormas.ui.utils.DateFormatHelper; +import de.symeda.sormas.ui.utils.PaginationList; +import de.symeda.sormas.ui.utils.VaadinUiUtil; +import de.symeda.sormas.ui.utils.components.MultilineLabel; +import de.symeda.sormas.ui.utils.components.sidecomponent.SideComponentField; + +public class ExternalEmailList extends PaginationList { + + private static final long serialVersionUID = -8851803923161005416L; + private static final int MAX_DISPLAYED_ENTRIES = 5; + + private final ManualMessageLogCriteria criteria; + private final Label placeHolderLabel; + + public ExternalEmailList(ManualMessageLogCriteria criteria, String placeholderKey) { + super(MAX_DISPLAYED_ENTRIES); + + this.criteria = criteria; + this.placeHolderLabel = new Label(I18nProperties.getString(placeholderKey)); + } + + @Override + public void reload() { + List emails = FacadeProvider.getManualMessageLogFacade().getIndexList(criteria); + + setEntries(emails); + if (!emails.isEmpty()) { + showPage(1); + } else { + listLayout.removeAllComponents(); + updatePaginationLayout(); + listLayout.addComponent(placeHolderLabel); + } + } + + @Override + protected void drawDisplayedEntries() { + for (ManualMessageLogIndexDto messageLog : getDisplayedEntries()) { + ListEntry listEntry = new ListEntry(messageLog); + + listEntry.addViewButton("info-email" + messageLog.getUuid(), (Button.ClickListener) event -> { + showEmailDetailsPopup(messageLog); + }, VaadinIcons.INFO_CIRCLE); + + listLayout.addComponent(listEntry); + } + } + + private static class ListEntry extends SideComponentField { + + private static final long serialVersionUID = 6121787433712938068L; + + public ListEntry(ManualMessageLogIndexDto messageLog) { + VerticalLayout layout = new VerticalLayout(); + layout.setWidth(100, Unit.PERCENTAGE); + layout.setMargin(false); + layout.setSpacing(false); + + layout.addComponent(new Label(DateFormatHelper.formatLocalDateTime(messageLog.getSentDate()))); + layout.addComponent(new Label(messageLog.getUsedTemplate())); + layout.addComponent(buildSendingUserInfo(messageLog.getSendingUser())); + + addComponentToField(layout); + } + + private static HorizontalLayout buildSendingUserInfo(UserReferenceDto sendingUser) { + Label captionLabel = new Label(I18nProperties.getCaption(Captions.externalEmailSentBy) + " "); + + final Label sendingUserLabel; + if (sendingUser != null) { + sendingUserLabel = new Label(sendingUser.getShortCaption()); + } else { + sendingUserLabel = new Label(I18nProperties.getCaption(Captions.inaccessibleValue)); + sendingUserLabel.addStyleNames(CssStyles.INACCESSIBLE_LABEL); + } + + return new HorizontalLayout(captionLabel, sendingUserLabel); + } + } + + private static void showEmailDetailsPopup(ManualMessageLogIndexDto messageLog) { + VerticalLayout verticalLayout = new VerticalLayout(); + verticalLayout.setMargin(false); + verticalLayout.setSpacing(false); + + Label sentToCaptionLabel = new Label(I18nProperties.getCaption(Captions.externalEmailSentTo)); + sentToCaptionLabel.addStyleName(LABEL_BOLD); + if (messageLog.isPseudonymized()) { + sentToCaptionLabel.addStyleName(CssStyles.INACCESSIBLE_LABEL); + } + verticalLayout.addComponent(new HorizontalLayout(sentToCaptionLabel, new Label(messageLog.getEmailAddress()))); + + Label attachmentsCaptionLabel = new Label(I18nProperties.getCaption(Captions.externalEmailAttachedDocuments)); + attachmentsCaptionLabel.addStyleName(LABEL_BOLD); + List attachedDocuments = messageLog.getAttachedDocuments(); + String attachmentsValue = CollectionUtils.isNotEmpty(attachedDocuments) + ? String.join(", ", attachedDocuments) + : I18nProperties.getString(Strings.messageExternalEmailNoAttachments); + verticalLayout.addComponents(attachmentsCaptionLabel, new MultilineLabel(attachmentsValue)); + + VaadinUiUtil.showConfirmationPopup( + I18nProperties.getString(Strings.headingExternalEmailDetails), + verticalLayout, + I18nProperties.getString(Strings.close), + null, + 640, + confirmed -> true); + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailOptionsForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailOptionsForm.java index 6eb5b69e543..5a9787a8007 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailOptionsForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailOptionsForm.java @@ -21,30 +21,50 @@ import org.apache.commons.lang3.StringUtils; +import com.vaadin.icons.VaadinIcons; +import com.vaadin.shared.ui.ContentMode; +import com.vaadin.v7.data.util.converter.Converter; import com.vaadin.v7.ui.ComboBox; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; +import de.symeda.sormas.api.document.DocumentReferenceDto; +import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.externalemail.ExternalEmailOptionsDto; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.ui.utils.AbstractEditForm; +import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.FieldHelper; +import de.symeda.sormas.ui.utils.components.MultiSelect; +import de.symeda.sormas.ui.utils.components.MultilineLabel; public class ExternalEmailOptionsForm extends AbstractEditForm { - private static final String HTML_LAYOUT = - fluidRowLocs(ExternalEmailOptionsDto.TEMPLATE_NAME) + fluidRowLocs(ExternalEmailOptionsDto.RECIPIENT_EMAIL); + private static final String ATTACHMENT_NOT_AVAILABLE_INFO_LOC = "attachmentNotAvailableInfoLoc"; + private static final String HTML_LAYOUT = fluidRowLocs(ExternalEmailOptionsDto.TEMPLATE_NAME) + + fluidRowLocs(ExternalEmailOptionsDto.RECIPIENT_EMAIL) + + fluidRowLocs(ExternalEmailOptionsDto.ATTACHED_DOCUMENTS) + + fluidRowLocs(ATTACHMENT_NOT_AVAILABLE_INFO_LOC); private final DocumentWorkflow documentWorkflow; - + private final DocumentRelatedEntityType documentRelatedEntityType; private final PersonDto person; + private final boolean isAttachmentAvailable; + private MultiSelect attachedDocumentsField; - protected ExternalEmailOptionsForm(DocumentWorkflow documentWorkflow, PersonDto person) { + protected ExternalEmailOptionsForm( + DocumentWorkflow documentWorkflow, + DocumentRelatedEntityType documentRelatedEntityType, + PersonDto person, + boolean isAttachmentAvailable) { super(ExternalEmailOptionsDto.class, ExternalEmailOptionsDto.I18N_PREFIX, false); this.documentWorkflow = documentWorkflow; + this.documentRelatedEntityType = documentRelatedEntityType; this.person = person; + this.isAttachmentAvailable = isAttachmentAvailable; addFields(); hideValidationUntilNextCommit(); @@ -69,7 +89,30 @@ protected void addFields() { String primaryEmailAddress = person.getEmailAddress(true); if (StringUtils.isNotBlank(primaryEmailAddress)) { recipientEmailCombo - .setItemCaption(primaryEmailAddress, primaryEmailAddress + " (" + I18nProperties.getCaption(Captions.primarySuffix) + ")"); + .setItemCaption(primaryEmailAddress, primaryEmailAddress + " (" + I18nProperties.getCaption(Captions.primarySuffix) + ")"); } + + if (documentRelatedEntityType != null) { + attachedDocumentsField = addField(ExternalEmailOptionsDto.ATTACHED_DOCUMENTS, MultiSelect.class); + if (!isAttachmentAvailable) { + attachedDocumentsField.setEnabled(false); + + MultilineLabel attachmentUnavailableInfo = new MultilineLabel( + VaadinIcons.INFO_CIRCLE.getHtml() + " " + I18nProperties.getString(Strings.messageExternalEmailAttachmentNotAvailableInfo), + ContentMode.HTML); + attachmentUnavailableInfo.addStyleNames(CssStyles.VSPACE_2, CssStyles.VSPACE_TOP_4); + getContent().addComponent(attachmentUnavailableInfo, ATTACHMENT_NOT_AVAILABLE_INFO_LOC); + } + } + } + + @Override + public void setValue(ExternalEmailOptionsDto newFieldValue) throws ReadOnlyException, Converter.ConversionException { + super.setValue(newFieldValue); + + if (attachedDocumentsField != null) { + attachedDocumentsField.setItems( + FacadeProvider.getExternalEmailFacade().getAttachableDocuments(documentWorkflow, newFieldValue.getRootEntityReference().getUuid())); + } } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailSideComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailSideComponent.java index ab123aa8a1b..600fa290a81 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailSideComponent.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/email/ExternalEmailSideComponent.java @@ -23,44 +23,149 @@ import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.ReferenceDto; +import de.symeda.sormas.api.caze.CaseDataDto; +import de.symeda.sormas.api.contact.ContactDto; import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; import de.symeda.sormas.api.docgeneneration.RootEntityType; +import de.symeda.sormas.api.document.DocumentRelatedEntityType; +import de.symeda.sormas.api.event.EventParticipantDto; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.manualmessagelog.ManualMessageLogCriteria; +import de.symeda.sormas.api.messaging.MessageType; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.api.person.PersonReferenceDto; +import de.symeda.sormas.api.travelentry.TravelEntryDto; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.UserProvider; import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.components.sidecomponent.SideComponent; public class ExternalEmailSideComponent extends SideComponent { - public ExternalEmailSideComponent( + private static final long serialVersionUID = 3988960053146779975L; + + public static ExternalEmailSideComponent forCase( + CaseDataDto caze, + boolean isEditAllowed, + Runnable callback, + Consumer sendEmailWrapper) { + return new ExternalEmailSideComponent( + DocumentWorkflow.CASE_EMAIL, + RootEntityType.ROOT_CASE, + DocumentRelatedEntityType.CASE, + caze.toReference(), + caze.getPerson(), + Strings.messageCasePersonHasNoEmail, + Strings.messageNoExternalEmailToCaseSent, + new ManualMessageLogCriteria().caze(caze.toReference()), + isEditAllowed, + caze.isInJurisdiction(), + callback, + sendEmailWrapper); + } + + public static ExternalEmailSideComponent forContact(ContactDto contact, boolean isEditAllowed, Consumer sendEmailWrapper) { + return new ExternalEmailSideComponent( + DocumentWorkflow.CONTACT_EMAIL, + RootEntityType.ROOT_CONTACT, + DocumentRelatedEntityType.CONTACT, + contact.toReference(), + contact.getPerson(), + Strings.messageContactPersonHasNoEmail, + Strings.messageNoExternalEmailToContactSent, + new ManualMessageLogCriteria().contact(contact.toReference()), + isEditAllowed, + contact.isInJurisdiction(), + null, + sendEmailWrapper); + } + + public static ExternalEmailSideComponent forEventParticipant( + EventParticipantDto eventParticipant, + boolean isEditAllowed, + Consumer sendEmailWrapper) { + return new ExternalEmailSideComponent( + DocumentWorkflow.EVENT_PARTICIPANT_EMAIL, + RootEntityType.ROOT_EVENT_PARTICIPANT, + null, + eventParticipant.toReference(), + eventParticipant.getPerson().toReference(), + Strings.messageEventParticipantPersonHasNoEmail, + Strings.messageNoExternalEmailToEventParticipantSent, + new ManualMessageLogCriteria().eventParticipant(eventParticipant.toReference()), + isEditAllowed, + eventParticipant.isInJurisdiction(), + null, + sendEmailWrapper); + } + + public static ExternalEmailSideComponent forTravelEntry(TravelEntryDto travelEntry, boolean isEditAllowed, Consumer sendEmailWrapper) { + return new ExternalEmailSideComponent( + DocumentWorkflow.TRAVEL_ENTRY_EMAIL, + RootEntityType.ROOT_TRAVEL_ENTRY, + DocumentRelatedEntityType.TRAVEL_ENTRY, + travelEntry.toReference(), + travelEntry.getPerson(), + Strings.messageTravelEntryPersonHasNoEmail, + Strings.messageNoExternalEmailToTravelEntrySent, + new ManualMessageLogCriteria().travelEntry(travelEntry.toReference()), + isEditAllowed, + travelEntry.isInJurisdiction(), + null, + sendEmailWrapper); + } + + private ExternalEmailList emailList = null; + + private ExternalEmailSideComponent( DocumentWorkflow documentWorkflow, RootEntityType rootEntityType, + DocumentRelatedEntityType documentRelatedEntityType, ReferenceDto rootEntityReference, PersonReferenceDto personRef, String noRecipientStringKey, + String noEmailsStringKey, + ManualMessageLogCriteria baseCriteria, boolean isEditAllowed, - Consumer actionCallback) { - super(I18nProperties.getCaption(Captions.messagesEmails), actionCallback); + boolean isInJurisdiction, + Runnable sendEmailCallback, + Consumer sendEmailWrapper) { + super(I18nProperties.getCaption(Captions.messagesEmails), sendEmailWrapper); - if (isEditAllowed) { + if (isEditAllowed + && (isInJurisdiction && UserProvider.getCurrent().hasUserRight(UserRight.SEE_SENSITIVE_DATA_IN_JURISDICTION) + || !isInJurisdiction && UserProvider.getCurrent().hasUserRight(UserRight.SEE_SENSITIVE_DATA_OUTSIDE_JURISDICTION))) { addCreateButton( - I18nProperties.getCaption(Captions.messagesSendEmail), - () -> ControllerProvider.getExternalEmailController().sendEmail(documentWorkflow, rootEntityType, rootEntityReference, personRef), - UserRight.EXTERNAL_EMAIL_SEND); + I18nProperties.getCaption(Captions.messagesSendEmail), + () -> ControllerProvider.getExternalEmailController() + .sendEmail(documentWorkflow, rootEntityType, documentRelatedEntityType, rootEntityReference, personRef, () -> { + if (sendEmailCallback != null) { + sendEmailCallback.run(); + } else { + emailList.reload(); + } + }), + UserRight.EXTERNAL_EMAIL_SEND); } PersonDto person = FacadeProvider.getPersonFacade().getByUuid(personRef.getUuid()); - if (CollectionUtils.isEmpty(person.getAllEmailAddresses())) { - createButton.setEnabled(false); + if (isEditAllowed && CollectionUtils.isEmpty(person.getAllEmailAddresses())) { + if (createButton != null) { + createButton.setEnabled(false); + } Label noRecipientLabel = new Label(I18nProperties.getString(noRecipientStringKey)); noRecipientLabel.addStyleName(CssStyles.LABEL_WHITE_SPACE_NORMAL); addComponent(noRecipientLabel); } + + emailList = new ExternalEmailList(baseCriteria.withTemplate(true).messageType(MessageType.EMAIL), noEmailsStringKey); + + addComponent(emailList); + emailList.reload(); } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/environment/EnvironmentController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/environment/EnvironmentController.java index f98dfe9eda7..cf59568719d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/environment/EnvironmentController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/environment/EnvironmentController.java @@ -15,6 +15,8 @@ package de.symeda.sormas.ui.environment; +import java.util.Objects; + import com.vaadin.navigator.Navigator; import com.vaadin.ui.Label; import com.vaadin.ui.Notification; @@ -160,24 +162,30 @@ public CommitDiscardWrapperComponent getEnvironmentDataEdit } } - // Initialize 'Delete' button - if (UserProvider.getCurrent().hasUserRight(UserRight.ENVIRONMENT_DELETE)) { - editComponent.addDeleteWithReasonOrRestoreListener( - EnvironmentsView.VIEW_NAME, - null, - I18nProperties.getString(Strings.entityEnvironment), - environmentDto.getUuid(), - FacadeProvider.getEnvironmentFacade()); - } + if (Objects.requireNonNull(UserProvider.getCurrent()) + .getUserRoles() + .stream() + .anyMatch(userRoleDto -> !userRoleDto.isRestrictAccessToAssignedEntities()) + || DataHelper.equal(environmentDto.getResponsibleUser(), UserProvider.getCurrent().getUserReference())) { + // Initialize 'Delete' button + if (UserProvider.getCurrent().hasUserRight(UserRight.ENVIRONMENT_DELETE)) { + editComponent.addDeleteWithReasonOrRestoreListener( + EnvironmentsView.VIEW_NAME, + null, + I18nProperties.getString(Strings.entityEnvironment), + environmentDto.getUuid(), + FacadeProvider.getEnvironmentFacade()); + } - // Initialize 'Archive' button - if (UserProvider.getCurrent().hasUserRight(UserRight.ENVIRONMENT_ARCHIVE)) { - ControllerProvider.getArchiveController() - .addArchivingButton( - environmentDto, - ArchiveHandlers.forEnvironment(), - editComponent, - () -> navigateToEnvironment(environmentDto.getUuid())); + // Initialize 'Archive' button + if (UserProvider.getCurrent().hasUserRight(UserRight.ENVIRONMENT_ARCHIVE)) { + ControllerProvider.getArchiveController() + .addArchivingButton( + environmentDto, + ArchiveHandlers.forEnvironment(), + editComponent, + () -> navigateToEnvironment(environmentDto.getUuid())); + } } editComponent.restrictEditableComponentsOnEditView( diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventController.java index 3b3fe20f0c2..53194d37cc4 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventController.java @@ -24,6 +24,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.function.Consumer; @@ -946,38 +947,46 @@ public CommitDiscardWrapperComponent getEventDataEditComponent(fi } }); - final String uuid = event.getUuid(); - if (UserProvider.getCurrent().hasUserRight(UserRight.EVENT_DELETE)) { - editView.addDeleteWithReasonOrRestoreListener((deleteDetails) -> { - if (!existEventParticipantsLinkedToEvent(event)) { - try { - FacadeProvider.getEventFacade().delete(uuid, deleteDetails); - } catch (ExternalSurveillanceToolRuntimeException e) { - Notification.show( - String.format( - I18nProperties.getString(Strings.ExternalSurveillanceToolGateway_notificationEntryNotDeleted), - DataHelper.getShortUuid(uuid)), - "", - Type.ERROR_MESSAGE); + if (Objects.requireNonNull(UserProvider.getCurrent()) + .getUserRoles() + .stream() + .anyMatch(userRoleDto -> !userRoleDto.isRestrictAccessToAssignedEntities()) + || DataHelper.equal(event.getResponsibleUser(), UserProvider.getCurrent().getUserReference())) { + final String uuid = event.getUuid(); + if (UserProvider.getCurrent().hasUserRight(UserRight.EVENT_DELETE)) { + editView.addDeleteWithReasonOrRestoreListener((deleteDetails) -> { + if (!existEventParticipantsLinkedToEvent(event)) { + try { + FacadeProvider.getEventFacade().delete(uuid, deleteDetails); + } catch (ExternalSurveillanceToolRuntimeException e) { + Notification.show( + String.format( + I18nProperties.getString(Strings.ExternalSurveillanceToolGateway_notificationEntryNotDeleted), + DataHelper.getShortUuid(uuid)), + "", + Type.ERROR_MESSAGE); + } + } else { + VaadinUiUtil.showSimplePopupWindow( + I18nProperties.getString(Strings.headingEventNotDeleted), + I18nProperties.getString(Strings.messageEventsNotDeletedLinkedEntitiesReason)); } - } else { - VaadinUiUtil.showSimplePopupWindow( - I18nProperties.getString(Strings.headingEventNotDeleted), - I18nProperties.getString(Strings.messageEventsNotDeletedLinkedEntitiesReason)); - } - UI.getCurrent().getNavigator().navigateTo(EventsView.VIEW_NAME); - }, getDeleteConfirmationDetails(Collections.singletonList(eventUuid)), (deleteDetails) -> { - FacadeProvider.getEventFacade().restore(uuid); - UI.getCurrent().getNavigator().navigateTo(EventsView.VIEW_NAME); - }, I18nProperties.getString(Strings.entityEvent), uuid, FacadeProvider.getEventFacade()); - } + UI.getCurrent().getNavigator().navigateTo(EventsView.VIEW_NAME); + }, getDeleteConfirmationDetails(Collections.singletonList(eventUuid)), (deleteDetails) -> { + FacadeProvider.getEventFacade().restore(uuid); + UI.getCurrent().getNavigator().navigateTo(EventsView.VIEW_NAME); + }, I18nProperties.getString(Strings.entityEvent), uuid, FacadeProvider.getEventFacade()); + } - // Initialize 'Archive' button - if (UserProvider.getCurrent().hasUserRight(UserRight.EVENT_ARCHIVE)) { - ControllerProvider.getArchiveController().addArchivingButton(event, ArchiveHandlers.forEvent(), editView, () -> { - ViewModelProviders.of(EventParticipantsView.class).get(EventParticipantsViewConfiguration.class).setRelevanceStatusChangedEvent(null); - navigateToData(uuid); - }); + // Initialize 'Archive' button + if (UserProvider.getCurrent().hasUserRight(UserRight.EVENT_ARCHIVE)) { + ControllerProvider.getArchiveController().addArchivingButton(event, ArchiveHandlers.forEvent(), editView, () -> { + ViewModelProviders.of(EventParticipantsView.class) + .get(EventParticipantsViewConfiguration.class) + .setRelevanceStatusChangedEvent(null); + navigateToData(uuid); + }); + } } editView.restrictEditableComponentsOnEditView( diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java index f95cdea92a4..7c8b4735601 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java @@ -189,14 +189,8 @@ protected void initView(String params) { } if (UiUtil.permitted(FeatureType.EXTERNAL_EMAILS, UserRight.EXTERNAL_EMAIL_SEND)) { - ExternalEmailSideComponent externalEmailSideComponent = new ExternalEmailSideComponent( - DocumentWorkflow.EVENT_PARTICIPANT_EMAIL, - RootEntityType.ROOT_EVENT_PARTICIPANT, - eventParticipantRef, - eventParticipant.getPerson().toReference(), - Strings.messageEventParticipantPersonHasNoEmail, - editAllowed, - this::showUnsavedChangesPopup); + ExternalEmailSideComponent externalEmailSideComponent = + ExternalEmailSideComponent.forEventParticipant(eventParticipant, editAllowed, this::showUnsavedChangesPopup); layout.addSidePanelComponent(new SideComponentLayout(externalEmailSideComponent), EXTERNAL_EMAILS_LOC); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantsView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantsView.java index d5f342084f2..7c04d978b57 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantsView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantsView.java @@ -313,7 +313,7 @@ public HorizontalLayout createTopBar() { } private boolean isGridEnabled() { - return !isEventDeleted() && isEditAllowed() && UserProvider.getCurrent().hasUserRight(UserRight.EVENTPARTICIPANT_EDIT); + return !isEventDeleted() && isEditAllowed(); } private boolean shouldDisableButton() { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/eventLink/EventListComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/eventLink/EventListComponent.java index 10f3c83416a..6113d031bc4 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/eventLink/EventListComponent.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/eventLink/EventListComponent.java @@ -143,8 +143,7 @@ private void createEventListComponent( eventLabel.addStyleName(CssStyles.H3); componentHeader.addComponent(eventLabel); - if (UserProvider.getCurrent().hasAllUserRights(UserRight.EVENT_CREATE, UserRight.EVENTPARTICIPANT_CREATE, UserRight.EVENTPARTICIPANT_EDIT) - && isEditAllowed) { + if (UserProvider.getCurrent().hasAllUserRights(UserRight.EVENT_CREATE, UserRight.EVENTPARTICIPANT_CREATE) && isEditAllowed) { createButton = ButtonHelper.createButton(I18nProperties.getCaption(Captions.linkEvent)); createButton.addStyleName(ValoTheme.BUTTON_PRIMARY); createButton.setIcon(VaadinIcons.PLUS_CIRCLE); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java index 7039ea79fd7..09424fdf720 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java @@ -85,6 +85,10 @@ protected void addFields() { PersonContactDetailType.PHONE, false); + // Set initial visibilities & accesses + initializeVisibilitiesAndAllowedVisibilities(); + initializeAccessAndAllowedAccesses(); + addFieldListeners(PersonContactDetailDto.PERSON_CONTACT_DETAILS_TYPE, e -> { final Field contactInformationField = getFieldGroup().getField(PersonContactDetailDto.CONTACT_INFORMATION); final PersonContactDetailType value = (PersonContactDetailType) e.getProperty().getValue(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java index c448bfddb6a..07d54f3b974 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java @@ -47,6 +47,7 @@ import de.symeda.sormas.api.customizableenum.CustomizableEnumType; import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.environment.environmentsample.EnvironmentSampleDto; +import de.symeda.sormas.api.environment.environmentsample.Pathogen; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Validations; @@ -87,7 +88,7 @@ public class PathogenTestForm extends AbstractEditForm { fluidRowLocs(PathogenTestDto.PCR_TEST_SPECIFICATION, "") + fluidRowLocs(PathogenTestDto.TESTED_DISEASE, PathogenTestDto.TESTED_DISEASE_DETAILS) + fluidRowLocs(PathogenTestDto.TESTED_DISEASE_VARIANT, PathogenTestDto.TESTED_DISEASE_VARIANT_DETAILS) + - fluidRowLocs(PathogenTestDto.TESTED_PATHOGEN, "") + + fluidRowLocs(PathogenTestDto.TESTED_PATHOGEN, PathogenTestDto.TESTED_PATHOGEN_DETAILS) + fluidRowLocs(PathogenTestDto.TYPING_ID, "") + fluidRowLocs(PathogenTestDto.TEST_DATE_TIME, PathogenTestDto.LAB) + fluidRowLocs("", PathogenTestDto.LAB_DETAILS) + @@ -256,14 +257,25 @@ protected void addFields() { // Tested Desease or Tested Pathogen, depending on sample type ComboBox diseaseField = addDiseaseField(PathogenTestDto.TESTED_DISEASE, true, create); - TextField diseaseDetailsField = addField(PathogenTestDto.TESTED_DISEASE_DETAILS, TextField.class); + addField(PathogenTestDto.TESTED_DISEASE_DETAILS, TextField.class); ComboBox diseaseVariantField = addField(PathogenTestDto.TESTED_DISEASE_VARIANT, ComboBox.class); diseaseVariantField.setNullSelectionAllowed(true); TextField diseaseVariantDetailsField = addField(PathogenTestDto.TESTED_DISEASE_VARIANT_DETAILS, TextField.class); diseaseVariantDetailsField.setVisible(false); ComboBox testedPathogenField = addField(PathogenTestDto.TESTED_PATHOGEN, ComboBox.class); + TextField testedPathogenDetailsField = addField(PathogenTestDto.TESTED_PATHOGEN_DETAILS, TextField.class); + testedPathogenDetailsField.setVisible(false); FieldHelper.updateItems(testedPathogenField, FacadeProvider.getCustomizableEnumFacade().getEnumValues(CustomizableEnumType.PATHOGEN, null)); + testedPathogenField.addValueChangeListener(e -> { + Pathogen pathogen = (Pathogen) e.getProperty().getValue(); + if (pathogen != null && pathogen.isHasDetails()) { + testedPathogenDetailsField.setVisible(true); + } else { + testedPathogenDetailsField.clear(); + testedPathogenDetailsField.setVisible(false); + } + }); if (environmentSample == null) { diseaseField.setVisible(true); @@ -356,6 +368,7 @@ protected void addFields() { PathogenTestDto.TEST_TYPE, Arrays.asList(PathogenTestType.PCR_RT_PCR, PathogenTestType.DNA_MICROARRAY, PathogenTestType.SEQUENCING), true); + Map> serotypeVisibilityDependencies = new HashMap>() { private static final long serialVersionUID = 1967952323596082247L; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/environmentsample/EnvironmentSampleGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/environmentsample/EnvironmentSampleGrid.java index a6aad5b0c75..c44b69cae82 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/environmentsample/EnvironmentSampleGrid.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/environmentsample/EnvironmentSampleGrid.java @@ -32,6 +32,7 @@ import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.location.LocationDto; import de.symeda.sormas.api.user.UserRight; +import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.DateHelper; import de.symeda.sormas.ui.ControllerProvider; import de.symeda.sormas.ui.UserProvider; @@ -84,7 +85,8 @@ public EnvironmentSampleGrid(EnvironmentSampleCriteria criteria) { Column latestPathogenTestColumn = addColumn(entry -> { if (entry.getLatestTestedPathogen() != null) { - return entry.getLatestTestedPathogen() + ": " + entry.getLatestPathogenTestResult(); + return DataHelper.getPathogenString(entry.getLatestTestedPathogen(), entry.getLatestTestedPathogenDetails()) + ": " + + entry.getLatestPathogenTestResult(); } else { return ""; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestList.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestList.java index b44d6cd49b5..20922e656cd 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestList.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestList.java @@ -20,6 +20,8 @@ import java.util.List; import java.util.function.Consumer; +import org.apache.commons.collections.CollectionUtils; + import com.vaadin.ui.Label; import de.symeda.sormas.api.environment.environmentsample.EnvironmentSampleReferenceDto; @@ -69,7 +71,7 @@ public void reload() { } setEntries(pathogenTests); - if (!pathogenTests.isEmpty()) { + if (CollectionUtils.isNotEmpty(pathogenTests)) { showPage(1); } else { listLayout.removeAllComponents(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java index 96f20156262..ddf14fa0b29 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java @@ -121,7 +121,7 @@ private static String getDiseaseOrPathogenCaption(PathogenTestDto pathogenTest) if (pathogenTest.getTestedDisease() != null) { diseaseOrPathogen = DiseaseHelper.toString(pathogenTest.getTestedDisease(), pathogenTest.getTestedDiseaseDetails()); } else if (pathogenTest.getTestedPathogen() != null) { - diseaseOrPathogen = pathogenTest.getTestedPathogen().getCaption(); + diseaseOrPathogen = DataHelper.getPathogenString(pathogenTest.getTestedPathogen(), pathogenTest.getTestedPathogenDetails()); } else { diseaseOrPathogen = null; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryDataView.java index 8401fc0ab13..e4134706c5a 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryDataView.java @@ -7,12 +7,9 @@ import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; import de.symeda.sormas.api.caze.CaseReferenceDto; -import de.symeda.sormas.api.docgeneneration.DocumentWorkflow; -import de.symeda.sormas.api.docgeneneration.RootEntityType; import de.symeda.sormas.api.document.DocumentRelatedEntityType; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.i18n.Captions; -import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.task.TaskContext; import de.symeda.sormas.api.travelentry.TravelEntryDto; import de.symeda.sormas.api.user.UserRight; @@ -121,14 +118,8 @@ protected void initView(String params) { } if (UiUtil.permitted(FeatureType.EXTERNAL_EMAILS, UserRight.EXTERNAL_EMAIL_SEND)) { - ExternalEmailSideComponent externalEmailSideComponent = new ExternalEmailSideComponent( - DocumentWorkflow.TRAVEL_ENTRY_EMAIL, - RootEntityType.ROOT_TRAVEL_ENTRY, - travelEntryDto.toReference(), - travelEntryDto.getPerson(), - Strings.messageTravelEntryPersonHasNoEmail, - editAllowed, - this::showUnsavedChangesPopup); + ExternalEmailSideComponent externalEmailSideComponent = + ExternalEmailSideComponent.forTravelEntry(travelEntryDto, editAllowed, this::showUnsavedChangesPopup); layout.addSidePanelComponent(new SideComponentLayout(externalEmailSideComponent), EXTERNAL_EMAILS_LOC); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserEditForm.java index e6adb99b4fc..9b625a28deb 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserEditForm.java @@ -248,7 +248,7 @@ public void setValue(UserDto newFieldValue) throws ReadOnlyException, Converter. final OptionGroup userRolesField = (OptionGroup)getFieldGroup().getField(UserDto.USER_ROLES); FieldHelper.updateItems(userRolesField, getFilteredUserRoles(newFieldValue.getUserRoles())); - if(diseasesCheckboxSet != null){ + if (diseasesCheckboxSet != null) { Set limitedDiseases = newFieldValue.getLimitedDiseases(); restrictDiseasesCheckbox.setValue(CollectionUtils.isNotEmpty(limitedDiseases)); diseasesCheckboxSet.setItems(getSelectableDiseases(limitedDiseases), null, null); @@ -266,7 +266,7 @@ private List getFilteredUserRoles(Set getSelectableDiseases(Set limitedDiseases) { List diseases = FacadeProvider.getDiseaseConfigurationFacade().getAllDiseases(true, true, true); - if(CollectionUtils.isNotEmpty(limitedDiseases)){ + if (CollectionUtils.isNotEmpty(limitedDiseases)) { List inactiveSelectedDiseases = limitedDiseases.stream().filter(not(diseases::contains)).collect(Collectors.toList()); diseases.addAll(inactiveSelectedDiseases); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleCreateForm.java index c5782ce46bd..b4182aee86d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleCreateForm.java @@ -48,6 +48,7 @@ public class UserRoleCreateForm extends AbstractEditForm { + fluidRowLocs(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY) + fluidRowLocs(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER) + fluidRowLocs(UserRoleDto.PORT_HEALTH_USER); +// + fluidRowLocs(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES); protected UserRoleCreateForm() { super(UserRoleDto.class, UserRoleDto.I18N_PREFIX); @@ -78,7 +79,8 @@ protected void addFields() { addField(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY).addStyleName(CssStyles.VSPACE_TOP_3); addField(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER).addStyleName(CssStyles.VSPACE_TOP_3); - addField(UserRoleDto.PORT_HEALTH_USER).addStyleNames(CssStyles.VSPACE_TOP_3, CssStyles.VSPACE_3); + addField(UserRoleDto.PORT_HEALTH_USER).addStyleNames(CssStyles.VSPACE_TOP_3); + addField(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES).addStyleNames(CssStyles.VSPACE_TOP_3, CssStyles.VSPACE_3); UserRoleFormHelper.createFieldDependencies(this); } @@ -100,6 +102,8 @@ private void applyTemplateData(UserRoleDto templateRole) { this.> getField(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY).setValue(templateRole.getHasOptionalHealthFacility()); this.> getField(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER).setValue(templateRole.getHasAssociatedDistrictUser()); this.> getField(UserRoleDto.PORT_HEALTH_USER).setValue(templateRole.isPortHealthUser()); + this.> getField(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES) + .setValue(templateRole.isRestrictAccessToAssignedEntities()); } } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleEditForm.java index 8d795a01233..fb51d8cf9ff 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRoleEditForm.java @@ -59,6 +59,7 @@ public class UserRoleEditForm extends AbstractUserRoleForm { + fluidRowLocs(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY) + fluidRowLocs(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER) + fluidRowLocs(UserRoleDto.PORT_HEALTH_USER) +// + fluidRowLocs(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES) + fluidRowLocs(USER_RIGHTS_LABEL_LOC) + fluidRowLocs(UserRoleDto.USER_RIGHTS); @@ -85,6 +86,7 @@ protected void addFields() { addField(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY).addStyleName(CssStyles.VSPACE_TOP_3); addField(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER).addStyleName(CssStyles.VSPACE_TOP_3); addField(UserRoleDto.PORT_HEALTH_USER).addStyleNames(CssStyles.VSPACE_TOP_3, CssStyles.VSPACE_3); + addField(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES).addStyleNames(CssStyles.VSPACE_TOP_3, CssStyles.VSPACE_3); Label userRightsLabel = new Label(I18nProperties.getCaption(Captions.UserRole_userRights), ContentMode.HTML); userRightsLabel.addStyleNames(CssStyles.H2); @@ -145,6 +147,8 @@ void applyTemplateData(UserRoleDto templateRole) { this.> getField(UserRoleDto.HAS_OPTIONAL_HEALTH_FACILITY).setValue(templateRole.getHasOptionalHealthFacility()); this.> getField(UserRoleDto.HAS_ASSOCIATED_DISTRICT_USER).setValue(templateRole.getHasAssociatedDistrictUser()); this.> getField(UserRoleDto.PORT_HEALTH_USER).setValue(templateRole.isPortHealthUser()); + this.> getField(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES) + .setValue(templateRole.isRestrictAccessToAssignedEntities()); } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRolesView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRolesView.java index 9f57534744f..de239534fd9 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRolesView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UserRolesView.java @@ -14,6 +14,7 @@ import com.vaadin.server.StreamResource; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; +import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.Notification; import com.vaadin.ui.VerticalLayout; @@ -55,6 +56,7 @@ public class UserRolesView extends AbstractUserView { private ComboBox userRightsFilter; private ComboBox jurisdictionFilter; private ComboBox enabledFilter; + private CheckBox showOnlyRestrictedAccessToAssignedEntities; private VerticalLayout gridLayout; @@ -165,6 +167,16 @@ public HorizontalLayout createFilterBar() { }); filterLayout.addComponent(jurisdictionFilter); + showOnlyRestrictedAccessToAssignedEntities = new CheckBox(); + showOnlyRestrictedAccessToAssignedEntities.setId(UserRoleDto.RESTRICT_ACCESS_TO_ASSIGNED_ENTITIES); + showOnlyRestrictedAccessToAssignedEntities.setCaption(I18nProperties.getCaption(Captions.userRoleShowOnlyRestrictedAccessToAssignCases)); + showOnlyRestrictedAccessToAssignedEntities.addStyleName(CssStyles.CHECKBOX_FILTER_INLINE); + showOnlyRestrictedAccessToAssignedEntities.addValueChangeListener(e -> { + criteria.setShowOnlyRestrictedAccessToAssignedEntities(e.getValue()); + navigateTo(criteria); + }); + filterLayout.addComponent(showOnlyRestrictedAccessToAssignedEntities); + return filterLayout; } @@ -190,6 +202,10 @@ public void updateFilterComponents() { jurisdictionFilter.setValue(criteria.getJurisdictionLevel() == null ? null : criteria.getJurisdictionLevel()); enabledFilter.setValue(criteria.getEnabled() == null ? ALL_FILTER : criteria.getEnabled() ? ENABLED_FILTER : DISABLED_FILTER); userRightsFilter.setValue(criteria.getUserRight() == null ? null : criteria.getUserRight()); + showOnlyRestrictedAccessToAssignedEntities.setValue( + criteria.getShowOnlyRestrictedAccessToAssignedEntities() == null + ? Boolean.FALSE + : criteria.getShowOnlyRestrictedAccessToAssignedEntities()); applyingCriteria = false; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UsersView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UsersView.java index c46b59c99e5..bbeb0fa7e5e 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UsersView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/user/UsersView.java @@ -21,6 +21,7 @@ import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; import com.vaadin.ui.Alignment; import com.vaadin.ui.Button; +import com.vaadin.ui.CheckBox; import com.vaadin.ui.HorizontalLayout; import com.vaadin.ui.MenuBar; import com.vaadin.ui.VerticalLayout; @@ -81,6 +82,7 @@ public class UsersView extends AbstractUserView { private ComboBox regionFilter; private ComboBox districtFilter; private TextField searchField; + private CheckBox showOnlyRestrictedAccessToAssignedEntities; private RowCount rowsCount; @@ -235,6 +237,16 @@ public HorizontalLayout createFilterBar() { }); filterLayout.addComponent(searchField); + showOnlyRestrictedAccessToAssignedEntities = new CheckBox(); + showOnlyRestrictedAccessToAssignedEntities.setId("showOnly"); + showOnlyRestrictedAccessToAssignedEntities.setCaption(I18nProperties.getCaption(Captions.userRoleShowOnlyRestrictedAccessToAssignCases)); + showOnlyRestrictedAccessToAssignedEntities.addStyleName(CssStyles.CHECKBOX_FILTER_INLINE); + showOnlyRestrictedAccessToAssignedEntities.addValueChangeListener(e -> { + criteria.setShowOnlyRestrictedAccessToAssignedEntities(e.getValue()); + navigateTo(criteria); + }); + filterLayout.addComponent(showOnlyRestrictedAccessToAssignedEntities); + return filterLayout; } @@ -252,14 +264,12 @@ public HorizontalLayout createActionsBar() { actionButtonsLayout.setSpacing(true); bulkOperationsDropdown = MenuBarHelper.createDropDown( - Captions.bulkActions, - new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionEnable), VaadinIcons.CHECK_SQUARE_O, selectedItem -> { - ControllerProvider.getUserController() - .enableAllSelectedItems(grid.asMultiSelect().getSelectedItems(), grid); + Captions.bulkActions, + new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionEnable), VaadinIcons.CHECK_SQUARE_O, selectedItem -> { + ControllerProvider.getUserController().enableAllSelectedItems(grid.asMultiSelect().getSelectedItems(), grid); }, UserProvider.getCurrent().hasUserRight(UserRight.USER_EDIT)), - new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDisable), VaadinIcons.THIN_SQUARE, selectedItem -> { - ControllerProvider.getUserController() - .disableAllSelectedItems(grid.asMultiSelect().getSelectedItems(), grid); + new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.actionDisable), VaadinIcons.THIN_SQUARE, selectedItem -> { + ControllerProvider.getUserController().disableAllSelectedItems(grid.asMultiSelect().getSelectedItems(), grid); }, UserProvider.getCurrent().hasUserRight(UserRight.USER_EDIT))); bulkOperationsDropdown.setVisible(ViewModelProviders.of(UsersView.class).get(ViewConfiguration.class).isInEagerMode()); @@ -296,6 +306,8 @@ public void updateFilterComponents() { activeFilter.setValue(criteria.getActive() == null ? null : criteria.getActive() ? ACTIVE_FILTER : INACTIVE_FILTER); userRolesFilter.setValue(criteria.getUserRole()); regionFilter.setValue(criteria.getRegion()); + showOnlyRestrictedAccessToAssignedEntities.setValue( + criteria.getShowOnlyRestrictedAccessToAssignedEntities() == null ? false : criteria.getShowOnlyRestrictedAccessToAssignedEntities()); if (user.getRegion() != null && user.getDistrict() == null) { districtFilter.addItems(FacadeProvider.getDistrictFacade().getAllActiveByRegion(user.getRegion().getUuid())); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/SormasFieldGroupFieldFactory.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/SormasFieldGroupFieldFactory.java index a9d3a1059c2..ac9cb46b142 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/SormasFieldGroupFieldFactory.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/SormasFieldGroupFieldFactory.java @@ -34,10 +34,11 @@ import de.symeda.sormas.ui.person.PersonContactDetailsField; import de.symeda.sormas.ui.user.UserRoleNotificationCheckboxSet; import de.symeda.sormas.ui.utils.components.CheckboxSet; +import de.symeda.sormas.ui.utils.components.CustomizableEnumPropertiesComponent; +import de.symeda.sormas.ui.utils.components.CustomizableEnumTranslationComponent; import de.symeda.sormas.ui.utils.components.JsonForm; import de.symeda.sormas.ui.utils.components.MultiSelect; import de.symeda.sormas.ui.vaccination.VaccinationsField; -import org.hl7.fhir.r4.model.Claim; public class SormasFieldGroupFieldFactory extends DefaultFieldGroupFieldFactory { @@ -167,7 +168,11 @@ public T createField(Class type, Class fieldType) { return (T) new CheckboxSet(); } else if (UserRoleNotificationCheckboxSet.class.isAssignableFrom(fieldType)) { return (T) new UserRoleNotificationCheckboxSet(); - } else if (UserField.class.isAssignableFrom(fieldType)){ + } else if (CustomizableEnumTranslationComponent.class.isAssignableFrom(fieldType)) { + return (T) new CustomizableEnumTranslationComponent(); + } else if (CustomizableEnumPropertiesComponent.class.isAssignableFrom(fieldType)) { + return (T) new CustomizableEnumPropertiesComponent(); + } else if (UserField.class.isAssignableFrom(fieldType)) { return (T) new UserField(); } return super.createField(type, fieldType); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumPropertiesComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumPropertiesComponent.java new file mode 100644 index 00000000000..5e3a3eccc0b --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumPropertiesComponent.java @@ -0,0 +1,101 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.utils.components; + +import java.util.HashMap; +import java.util.Map; + +import com.vaadin.shared.ui.MarginInfo; +import com.vaadin.ui.CheckBox; +import com.vaadin.ui.Component; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.ui.CustomField; + +import de.symeda.sormas.api.customizableenum.CustomizableEnum; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.ui.utils.CssStyles; + +public class CustomizableEnumPropertiesComponent extends CustomField> { + + private VerticalLayout layout; + private Map> allProperties; + private Map properties; + + @Override + protected Component initContent() { + + layout = new VerticalLayout(); + layout.setWidthFull(); + layout.setMargin(new MarginInfo(false, false, true, false)); + layout.setSpacing(false); + CssStyles.style(layout, CssStyles.VSPACE_TOP_4); + + if (allProperties != null) { + buildPropertyFields(); + } + + return layout; + } + + @Override + public Class> getType() { + //noinspection unchecked,InstantiatingObjectToGetClassObject,InstantiatingObjectToGetClassObject + return (Class>) new HashMap().getClass(); + } + + private void buildPropertyFields() { + + if (layout == null) { + return; + } + + layout.removeAllComponents(); + + allProperties.keySet().forEach(p -> { + if (allProperties.get(p) == boolean.class) { + Boolean value = (Boolean) properties.get(p); + CheckBox checkBox = new CheckBox(I18nProperties.getPrefixCaption(CustomizableEnum.I18N_PREFIX, p), value != null ? value : false); + CssStyles.style(checkBox, CssStyles.VSPACE_NONE); + checkBox.addValueChangeListener(e -> properties.put(p, e.getValue())); + layout.addComponent(checkBox); + } else { + throw new UnsupportedOperationException( + String.format("Class %s is not yet implemented for properties component", allProperties.get(p).getName())); + } + }); + } + + @Override + public void setValue(Map newFieldValue) throws ReadOnlyException, Converter.ConversionException { + super.setValue(newFieldValue); + this.properties = newFieldValue != null ? newFieldValue : new HashMap<>(); + } + + @Override + protected Map getInternalValue() { + return properties != null ? (!properties.isEmpty() ? properties : null) : null; + } + + public void setAllProperties(Map> allProperties) { + this.allProperties = allProperties; + buildPropertyFields(); + } + + public boolean hasContent() { + return !allProperties.isEmpty(); + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumTranslationComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumTranslationComponent.java new file mode 100644 index 00000000000..2d74b981b23 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/CustomizableEnumTranslationComponent.java @@ -0,0 +1,223 @@ +/* + * SORMAS® - Surveillance Outbreak Response Management & Analysis System + * Copyright © 2016-2023 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package de.symeda.sormas.ui.utils.components; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.StringUtils; + +import com.vaadin.icons.VaadinIcons; +import com.vaadin.shared.ui.MarginInfo; +import com.vaadin.ui.Button; +import com.vaadin.ui.Component; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.TextField; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.v7.data.Validator; +import com.vaadin.v7.data.util.converter.Converter; +import com.vaadin.v7.ui.ComboBox; +import com.vaadin.v7.ui.CustomField; + +import de.symeda.sormas.api.Language; +import de.symeda.sormas.api.customizableenum.CustomizableEnumTranslation; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.utils.ButtonHelper; +import de.symeda.sormas.ui.utils.CssStyles; + +public class CustomizableEnumTranslationComponent extends CustomField> { + + private VerticalLayout rowsLayout; + private List rows; + private Label lblNoTranslations; + private List translations; + + @Override + protected Component initContent() { + + VerticalLayout layout = new VerticalLayout(); + layout.setWidthFull(); + layout.setMargin(new MarginInfo(false, false, true, false)); + layout.setSpacing(false); + CssStyles.style(layout, CssStyles.VSPACE_TOP_4); + + lblNoTranslations = new Label(I18nProperties.getString(Strings.infoNoCustomizableEnumTranslations)); + layout.addComponent(lblNoTranslations); + + rowsLayout = new VerticalLayout(); + rowsLayout.setWidthFull(); + rowsLayout.setMargin(false); + rowsLayout.setSpacing(false); + layout.addComponent(rowsLayout); + + if (rows != null) { + buildRowsLayout(); + updateNoTranslationsLabelVisibility(); + } + + Button btnAdd = ButtonHelper + .createIconButtonWithCaption(null, null, VaadinIcons.PLUS, e -> buildTranslationRow(null, null, true), CssStyles.VSPACE_TOP_5); + btnAdd.setHeight(25, Unit.PIXELS); + btnAdd.setWidthFull(); + layout.addComponent(btnAdd); + + return layout; + } + + @Override + public Class> getType() { + //noinspection unchecked,InstantiatingObjectToGetClassObject,InstantiatingObjectToGetClassObject + return (Class>) new ArrayList(0).getClass(); + } + + private void buildRowsLayout() { + + if (rowsLayout == null) { + return; + } + + rowsLayout.removeAllComponents(); + rows.forEach(r -> rowsLayout.addComponent(r)); + } + + private void buildTranslationRows() { + + rows = new ArrayList<>(); + if (translations != null) { + translations.forEach(t -> buildTranslationRow(Language.fromLocaleString(t.getLanguageCode()), t.getValue())); + } + } + + private void buildTranslationRow(Language language, String caption) { + buildTranslationRow(language, caption, false); + } + + private void buildTranslationRow(Language language, String caption, boolean render) { + + TranslationRow row = new TranslationRow(language, caption); + row.setDeleteCallback(() -> { + rows.remove(row); + rowsLayout.removeComponent(row); + updateNoTranslationsLabelVisibility(); + }); + rows.add(row); + updateNoTranslationsLabelVisibility(); + + if (render) { + rowsLayout.addComponent(row); + } + } + + @Override + public void setValue(List newFieldValue) throws ReadOnlyException, Converter.ConversionException { + + super.setValue(newFieldValue); + this.translations = newFieldValue; + buildTranslationRows(); + buildRowsLayout(); + } + + @Override + public void validate() throws Validator.InvalidValueException { + + if (rows.stream().anyMatch(r -> r.getLanguage() == null || StringUtils.isBlank(r.getCaption()))) { + throw new Validator.InvalidValueException(I18nProperties.getValidationError(Validations.customizableEnumValueEmptyTranslations)); + } + Set selectedLanguages = new HashSet<>(); + if (rows.stream().anyMatch(r -> !selectedLanguages.add(r.getLanguage()))) { + throw new Validator.InvalidValueException(I18nProperties.getValidationError(Validations.customizableEnumValueDuplicateLanguage)); + } + } + + @Override + protected List getInternalValue() { + + return rows != null + ? rows.stream() + .map(r -> new CustomizableEnumTranslation(r.getLanguage().getLocale().toString(), r.getCaption())) + .collect(Collectors.toList()) + : null; + } + + private void updateNoTranslationsLabelVisibility() { + + if (lblNoTranslations == null) { + return; + } + + lblNoTranslations.setVisible(CollectionUtils.isEmpty(rows)); + } + + private static final class TranslationRow extends HorizontalLayout { + + private static final long serialVersionUID = 6883911907756570894L; + + private final ComboBox cbLanguage; + private final TextField tfCaption; + + private Runnable deleteCallback; + + public TranslationRow(Language language, String caption) { + + tfCaption = new TextField(); + tfCaption.setWidthFull(); + if (caption != null) { + tfCaption.setValue(caption); + } + tfCaption.setPlaceholder(I18nProperties.getString(Strings.promptCustomizableEnumTranslationLanguage)); + cbLanguage = new ComboBox(null, Arrays.asList(Language.values())); + cbLanguage.setWidth(250, Unit.PIXELS); + cbLanguage.setInputPrompt(I18nProperties.getString(Strings.promptCustomizableEnumTranslationCaption)); + CssStyles.style(CssStyles.VSPACE_NONE, cbLanguage, tfCaption); + CssStyles.style(cbLanguage, CssStyles.COMBO_BOX_WITH_FLAG_ICON); + ControllerProvider.getUserController().setFlagIcons(cbLanguage); + cbLanguage.addValueChangeListener(e -> tfCaption.setEnabled(e.getProperty().getValue() != null)); + if (language != null) { + cbLanguage.setValue(language); + } + Button btnDelete = ButtonHelper.createIconButtonWithCaption(null, null, VaadinIcons.TRASH, e -> deleteCallback.run()); + addComponent(cbLanguage); + addComponent(tfCaption); + addComponent(btnDelete); + setExpandRatio(tfCaption, 1); + + setWidthFull(); + setMargin(false); + CssStyles.style(this, CssStyles.VSPACE_4); + } + + public Language getLanguage() { + return (Language) cbLanguage.getValue(); + } + + public String getCaption() { + return tfCaption.getValue(); + } + + public void setDeleteCallback(Runnable deleteCallback) { + this.deleteCallback = deleteCallback; + } + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/MultiSelect.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/MultiSelect.java index c6e3c4dce08..d4cc689154e 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/MultiSelect.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/MultiSelect.java @@ -1,27 +1,27 @@ /* * SORMAS® - Surveillance Outbreak Response Management & Analysis System * Copyright © 2016-2021 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package de.symeda.sormas.ui.utils.components; +import java.util.ArrayList; +import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.stream.Collectors; import com.vaadin.icons.VaadinIcons; import com.vaadin.shared.ui.MarginInfo; @@ -40,6 +40,7 @@ public class MultiSelect extends CustomField> { private Select selectComponent = new Select(); + private Collection items = new ArrayList<>(); private VerticalLayout labelLayout = new VerticalLayout(); private Map selectedItemsWithCaption = new HashMap<>(); private Map selectedItemsWithLabelComponent = new HashMap<>(); @@ -66,11 +67,13 @@ protected Component initContent() { setValue(new HashSet<>(selectedItemsWithCaption.keySet())); selectComponent.setValue(null); + updateItemsOnSelectionChange(); listSelectedItems(); }); verticalLayout.addComponent(selectComponent); + verticalLayout.setSpacing(false); if (isReadOnly()) { selectComponent.setVisible(false); @@ -78,10 +81,10 @@ protected Component initContent() { } labelLayout.setMargin(false); + labelLayout.setSpacing(false); verticalLayout.addComponent(labelLayout); initFromCurrentValue(); - listSelectedItems(); return verticalLayout; } @@ -91,7 +94,18 @@ public Class> getType() { return (Class) Set.class; } + public void setItems(Collection items) { + this.items = items; + + selectedItemsWithCaption.clear(); + selectComponent.removeAllItems(); + + selectComponent.addItems(items); + listSelectedItems(); + } + public void addItem(T item) { + items.add(item); selectComponent.addItem(item); } @@ -108,6 +122,9 @@ public void setItemCaption(T item, String caption) { public void removeAllItems() { selectComponent.removeAllItems(); + selectedItemsWithCaption.clear(); + + listSelectedItems(); } private void initFromCurrentValue() { @@ -119,6 +136,8 @@ private void initFromCurrentValue() { String caption = selectComponent.getItemCaption(item); selectedItemsWithCaption.put(item, caption != null ? caption : ""); } + + listSelectedItems(); } private void listSelectedItems() { @@ -136,13 +155,13 @@ private void listSelectedItems() { if (!isReadOnly()) { Button removeButton = ButtonHelper.createIconButtonWithCaption( - null, - null, - VaadinIcons.TRASH, - e -> removeItem(itemEntry.getKey()), - ValoTheme.BUTTON_ICON_ONLY, - ValoTheme.BUTTON_BORDERLESS, - ValoTheme.BUTTON_ICON_ALIGN_TOP); + null, + null, + VaadinIcons.TRASH, + e -> removeSelectedItem(itemEntry.getKey()), + ValoTheme.BUTTON_ICON_ONLY, + ValoTheme.BUTTON_BORDERLESS, + ValoTheme.BUTTON_ICON_ALIGN_TOP); itemLayout.addComponent(removeButton); } @@ -152,10 +171,10 @@ private void listSelectedItems() { } } - private void removeItem(T item) { + private void removeSelectedItem(T item) { selectedItemsWithCaption.remove(item); - setValue(new HashSet<>(selectedItemsWithCaption.keySet())); + updateItemsOnSelectionChange(); listSelectedItems(); } @@ -164,4 +183,9 @@ private void removeItem(T item) { public void setValue(Set newFieldValue, boolean ignoreReadOnly) throws ReadOnlyException, Converter.ConversionException { super.setValue(newFieldValue, false, ignoreReadOnly); } + + private void updateItemsOnSelectionChange() { + selectComponent.removeAllItems(); + selectComponent.addItems(items.stream().filter(item -> !selectedItemsWithCaption.containsKey(item)).collect(Collectors.toList())); + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java index d0a3bfe1c67..77fb52b174c 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java @@ -45,8 +45,12 @@ public void addEditButton(String id, Button.ClickListener editClickListener) { } public void addViewButton(String id, Button.ClickListener viewClickListener) { + addViewButton(id, viewClickListener, VaadinIcons.EYE); + } + + public void addViewButton(String id, Button.ClickListener viewClickListener, VaadinIcons icon) { Button viewButton = - ButtonHelper.createIconButtonWithCaption(id, null, VaadinIcons.EYE, viewClickListener, ValoTheme.BUTTON_LINK, CssStyles.BUTTON_COMPACT); + ButtonHelper.createIconButtonWithCaption(id, null, icon, viewClickListener, ValoTheme.BUTTON_LINK, CssStyles.BUTTON_COMPACT); addComponent(viewButton); setComponentAlignment(viewButton, Alignment.TOP_RIGHT); setExpandRatio(viewButton, 0); diff --git a/sormas-ui/src/main/webapp/WEB-INF/glassfish-web.xml b/sormas-ui/src/main/webapp/WEB-INF/glassfish-web.xml index b62a5049fa5..45e701e5bb7 100644 --- a/sormas-ui/src/main/webapp/WEB-INF/glassfish-web.xml +++ b/sormas-ui/src/main/webapp/WEB-INF/glassfish-web.xml @@ -981,4 +981,9 @@ DEV_MODE + + CUSTOMIZABLE_ENUM_MANAGEMENT + CUSTOMIZABLE_ENUM_MANAGEMENT + + diff --git a/sormas-ui/src/main/webapp/WEB-INF/web.xml b/sormas-ui/src/main/webapp/WEB-INF/web.xml index 1892cd1ca57..c43f9b10a09 100644 --- a/sormas-ui/src/main/webapp/WEB-INF/web.xml +++ b/sormas-ui/src/main/webapp/WEB-INF/web.xml @@ -797,4 +797,8 @@ DEV_MODE + + CUSTOMIZABLE_ENUM_MANAGEMENT + + diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java index 71d868fb000..c0237cf250e 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java @@ -33,6 +33,7 @@ import de.symeda.sormas.api.event.EventFacade; import de.symeda.sormas.api.event.EventParticipantFacade; import de.symeda.sormas.api.event.eventimport.EventImportFacade; +import de.symeda.sormas.api.externalemail.ExternalEmailFacade; import de.symeda.sormas.api.externalmessage.ExternalMessageFacade; import de.symeda.sormas.api.feature.FeatureConfigurationFacade; import de.symeda.sormas.api.geo.GeoShapeProvider; @@ -77,6 +78,7 @@ import de.symeda.sormas.backend.event.EventFacadeEjb.EventFacadeEjbLocal; import de.symeda.sormas.backend.event.EventParticipantFacadeEjb.EventParticipantFacadeEjbLocal; import de.symeda.sormas.backend.event.eventimport.EventImportFacadeEjb.EventImportFacadeEjbLocal; +import de.symeda.sormas.backend.externalemail.ExternalEmailFacadeEjb; import de.symeda.sormas.backend.externalmessage.ExternalMessageFacadeEjb; import de.symeda.sormas.backend.feature.FeatureConfigurationFacadeEjb; import de.symeda.sormas.backend.geo.GeoShapeProviderEjb.GeoShapeProviderEjbLocal; @@ -211,6 +213,8 @@ public

P lookupEjbRemote(Class

clazz) { return (P) beanTest.getBean(EnvironmentSampleFacadeEjb.EnvironmentSampleFacadeEjbLocal.class); } else if (EnvironmentImportFacade.class == clazz) { return (P) beanTest.getBean(EnvironmentImportFacadeEjb.EnvironmentImportFacadeEjbLocal.class); + } else if (ExternalEmailFacade.class == clazz) { + return (P) beanTest.getBean(ExternalEmailFacadeEjb.ExternalEmailFacadeEjbLocal.class); } return null; diff --git a/sormas-ui/src/test/resources/META-INF/persistence.xml b/sormas-ui/src/test/resources/META-INF/persistence.xml index 5b1a323f9ab..c94cd481b90 100644 --- a/sormas-ui/src/test/resources/META-INF/persistence.xml +++ b/sormas-ui/src/test/resources/META-INF/persistence.xml @@ -62,7 +62,7 @@ de.symeda.sormas.backend.sormastosormas.share.outgoing.ShareRequestInfo de.symeda.sormas.backend.document.Document de.symeda.sormas.backend.exposure.Exposure - de.symeda.sormas.backend.common.messaging.ManualMessageLog + de.symeda.sormas.backend.manualmessagelog.ManualMessageLog de.symeda.sormas.backend.systemevent.SystemEvent de.symeda.sormas.backend.externalmessage.ExternalMessage de.symeda.sormas.backend.caze.surveillancereport.SurveillanceReport diff --git a/sormas-widgetset/pom.xml b/sormas-widgetset/pom.xml index 07f9f1bfce5..f9ada62161e 100644 --- a/sormas-widgetset/pom.xml +++ b/sormas-widgetset/pom.xml @@ -3,7 +3,7 @@ sormas-base de.symeda.sormas - 1.92.0 + 1.93.0 ../sormas-base 4.0.0