Skip to content

Commit

Permalink
#12901 - Hide jurisdiction fields for ep line listing (#12907)
Browse files Browse the repository at this point in the history
  • Loading branch information
MateStrysewske authored Jan 25, 2024
1 parent 7c4fdab commit 9462aca
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@
import de.symeda.sormas.api.caze.CaseDataDto;
import de.symeda.sormas.api.event.EventDto;
import de.symeda.sormas.api.event.EventParticipantDto;
import de.symeda.sormas.api.feature.FeatureType;
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.infrastructure.district.DistrictReferenceDto;
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
import de.symeda.sormas.api.person.PersonDto;
import de.symeda.sormas.api.utils.ValidationRuntimeException;
import de.symeda.sormas.ui.UiUtil;
import de.symeda.sormas.ui.UserProvider;
import de.symeda.sormas.ui.utils.ButtonHelper;
import de.symeda.sormas.ui.utils.CssStyles;
Expand Down Expand Up @@ -102,6 +104,12 @@ public LineListingLayout(Window window, EventDto eventDto) {
region.setItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry());
}

if (UiUtil.enabled(FeatureType.HIDE_JURISDICTION_FIELDS)) {
region.setValue(FacadeProvider.getRegionFacade().getDefaultInfrastructureReference());
district.setValue(FacadeProvider.getDistrictFacade().getDefaultInfrastructureReference());
sharedInformationComponent.setVisible(false);
}

HorizontalLayout actionBar = new HorizontalLayout();
Button addLine = ButtonHelper.createIconButton(Captions.lineListingAddLine, VaadinIcons.PLUS, e -> {
EventParticipantLineLayout newLine = buildNewLine(lineComponent);
Expand Down

0 comments on commit 9462aca

Please sign in to comment.