Skip to content

Commit 46ba946

Browse files
authored
Merge pull request #13822 from SORMAS-Foundation/task-13377-update_vaccine_status_fixed_icon_visibility
#13377 - Fixed issue with vaccin status info icon visibility
2 parents 7a69999 + ded44e8 commit 46ba946

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ public class CaseDataForm extends AbstractEditForm<CaseDataDto> {
332332
private FollowUpPeriodDto expectedFollowUpPeriodDto;
333333
private boolean ignoreDifferentPlaceOfStayJurisdiction = false;
334334
private CheckBox postMortemCB;
335+
private Label vaccinationStatusInfoLabel;
335336

336337
public CaseDataForm(
337338
String caseUuid,
@@ -1012,7 +1013,7 @@ protected void addFields() {
10121013
vaccinationStatusField.setDescription(I18nProperties.getString(Strings.infoDeterminedVaccinationStatusReadOnly));
10131014

10141015
// Add info icon with explanation of automatic computation
1015-
final Label vaccinationStatusInfoLabel = new Label(VaadinIcons.INFO_CIRCLE.getHtml(), ContentMode.HTML);
1016+
vaccinationStatusInfoLabel = new Label(VaadinIcons.INFO_CIRCLE.getHtml(), ContentMode.HTML);
10161017
CssStyles.style(vaccinationStatusInfoLabel, CssStyles.LABEL_XLARGE, CssStyles.VSPACE_TOP_3);
10171018

10181019
// Build detailed explanation based on the outline document
@@ -1035,7 +1036,10 @@ protected void addFields() {
10351036
I18nProperties.getString(Strings.infoDoseCountFromVaccinationEntries));
10361037

10371038
vaccinationStatusInfoLabel.setDescription(infoText, ContentMode.HTML);
1039+
// Set the initial visibility of the info label to false it will be set to true in the medical information section
1040+
vaccinationStatusInfoLabel.setVisible(false);
10381041
getContent().addComponent(vaccinationStatusInfoLabel, VACCINATION_STATUS_INFO_LOC);
1042+
10391043
}
10401044
addFields(CaseDataDto.SMALLPOX_VACCINATION_SCAR, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED);
10411045
addDateField(CaseDataDto.SMALLPOX_LAST_VACCINATION_DATE, DateField.class, 0);
@@ -1270,6 +1274,11 @@ && isVisibleAllowed(CaseDataDto.CASE_CLASSIFICATION)) {
12701274
}
12711275
}
12721276

1277+
// Sync visibility of info label with vaccination status field
1278+
if (vaccinationStatusInfoLabel != null && isVisibleAllowed(CaseDataDto.VACCINATION_STATUS)) {
1279+
vaccinationStatusInfoLabel.setVisible(true);
1280+
}
1281+
12731282
if (isVisibleAllowed(CaseDataDto.OUTCOME_DATE)) {
12741283
FieldHelper.setVisibleWhen(
12751284
getFieldGroup(),

0 commit comments

Comments
 (0)