Skip to content

Commit

Permalink
Merge pull request #8368 from hzi-braunschweig/bugfix-8111-symptoms-t…
Browse files Browse the repository at this point in the history
…ab-cannot-be-saved-if-date-of-symptom-onset-is-in-the-future

#8111 - Clear Date of symptom onset when there are no symptoms selected
  • Loading branch information
BarnaBartha committed Mar 14, 2022
2 parents fcce227 + c38330f commit a29b2cd
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -1026,7 +1026,11 @@ private void addListenerForOnsetFields(ComboBox onsetSymptom, DateField onsetDat
onsetDateField.setEnabled(true);
} else {
onsetSymptom.removeItem(sourceField.getCaption());
onsetDateField.setEnabled(isAnySymptomSetToYes(getFieldGroup(), allPropertyIds, Arrays.asList(SymptomState.YES)));
boolean isOnsetDateFieldEnabled = isAnySymptomSetToYes(getFieldGroup(), allPropertyIds, Arrays.asList(SymptomState.YES));
onsetDateField.setEnabled(isOnsetDateFieldEnabled);
if (!isOnsetDateFieldEnabled) {
onsetDateField.setValue(null);
}
}
onsetSymptom.setEnabled(!onsetSymptom.getItemIds().isEmpty());
});
Expand Down

0 comments on commit a29b2cd

Please sign in to comment.