Skip to content

Commit

Permalink
SORMAS-Foundation#11919 - Display correct information on hospitalizat…
Browse files Browse the repository at this point in the history
…ion change (SORMAS-Foundation#12968)
  • Loading branch information
MateStrysewske authored and daveotengo committed Feb 17, 2024
1 parent 58307a3 commit 723f6e4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Collections;

import com.vaadin.ui.Label;
import com.vaadin.v7.data.util.converter.Converter;
import com.vaadin.v7.ui.CheckBox;
import com.vaadin.v7.ui.ComboBox;
import com.vaadin.v7.ui.TextField;
Expand Down Expand Up @@ -192,4 +193,12 @@ private void updateFacility() {
facilityCombo.setEnabled(false);
}
}

@Override
public void setValue(CaseDataDto newFieldValue) throws ReadOnlyException, Converter.ConversionException {
super.setValue(newFieldValue);
if (newFieldValue.getRegion() != null && newFieldValue.getRegion().getUuid() != newFieldValue.getResponsibleRegion().getUuid()) {
differentPlaceOfStayJurisdiction.setValue(true);
}
}
}

0 comments on commit 723f6e4

Please sign in to comment.