Skip to content

Commit 376596d

Browse files
authored
Merge pull request #13650 from SORMAS-Foundation/bugfix-system_config_ui_field_sorting
Further fixes for system configuration UI and reverted IPI follow-up …
2 parents 697a49b + a3e23f7 commit 376596d

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/Disease.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public enum Disease
8686
POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, true, false, 0, true, false, false),
8787
POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, true, false, 0, true, false, false),
8888
FHA(true, false, false, true, false, 0, true, false, false),
89-
INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false),
89+
INVASIVE_PNEUMOCOCCAL_INFECTION(true, true, true, false, false, 0, false, false, false),
9090
INVASIVE_MENINGOCOCCAL_INFECTION(true, true, true, false, true, 7, false, false, false),
9191
GIARDIASIS(true, true, true, false, true, 14, false, false, false),
9292
CRYPTOSPORIDIOSIS(true, true, true, false, true, 14, false, false, false),

sormas-api/src/main/java/de/symeda/sormas/api/systemconfiguration/SystemConfigurationValueIndexDto.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ public class SystemConfigurationValueIndexDto extends EntityDto {
3030
public static final String VALUE_PROPERTY_NAME = "value";
3131
public static final String DESCRIPTION_PROPERTY_NAME = "description";
3232
public static final String ENCRYPTED_PROPERTY_NAME = "encrypted";
33-
public static final String CATEGORY_NAME_PROPERTY_NAME = "categoryName";
33+
public static final String CATEGORY_NAME_PROPERTY_NAME = "category";
3434
public static final String CATEGORY_CAPTION_PROPERTY_NAME = "categoryCaption";
3535
public static final String CATEGORY_DESCRIPTION_PROPERTY_NAME = "categoryDescription";
3636

3737
private String value;
3838
private String key;
3939
private String description;
4040
private boolean encrypted;
41-
private String categoryName;
41+
private String category;
4242
private String categoryCaption;
4343
private String categoryDescription;
4444

@@ -123,18 +123,18 @@ public void setDescription(String description) {
123123
*
124124
* @return the category name
125125
*/
126-
public String getCategoryName() {
127-
return categoryName;
126+
public String getCategory() {
127+
return category;
128128
}
129129

130130
/**
131131
* Sets the category name of the configuration.
132132
*
133-
* @param categoryName
133+
* @param category
134134
* the category name to set
135135
*/
136-
public void setCategoryName(String categoryName) {
137-
this.categoryName = categoryName;
136+
public void setCategory(String category) {
137+
this.category = category;
138138
}
139139

140140
/**

sormas-backend/src/main/java/de/symeda/sormas/backend/systemconfiguration/SystemConfigurationValueEjb.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ public List<SystemConfigurationValueIndexDto> getIndexList(
263263
final List<Order> order = sortProperties.stream().map(sortProperty -> {
264264
final Expression<?> expression;
265265
switch (sortProperty.propertyName) {
266+
case SystemConfigurationValue.CATEGORY_FIELD_NAME:
267+
expression = root.get(sortProperty.propertyName);
268+
break;
266269
case SystemConfigurationValue.KEY_FIELD_NAME:
267270
expression = cb.lower(root.get(sortProperty.propertyName));
268271
break;
@@ -524,7 +527,7 @@ private SystemConfigurationValueIndexDto toIndexDto(final SystemConfigurationVal
524527
dto.setKey(entity.getKey());
525528
dto.setDescription(entity.getDescription());
526529
dto.setEncrypted(entity.getEncrypt()); // encrypt needed for list view
527-
dto.setCategoryName(entity.getCategory() != null ? entity.getCategory().getName() : null);
530+
dto.setCategory(entity.getCategory() != null ? entity.getCategory().getName() : null);
528531
dto.setCategoryCaption(entity.getCategory() != null ? entity.getCategory().getCaption() : null);
529532
dto.setCategoryDescription(entity.getCategory() != null ? entity.getCategory().getDescription() : null);
530533

0 commit comments

Comments
 (0)