File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/sample/components Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ protected void addComponents() {
6161 displayedHumanSamples =
6262 new HashSet <>(Arrays .asList (SampleAssociationType .CASE , SampleAssociationType .CONTACT , SampleAssociationType .EVENT_PARTICIPANT ));
6363 if (UiUtil .permitted (FeatureType .ENVIRONMENT_MANAGEMENT , UserRight .ENVIRONMENT_SAMPLE_VIEW )) {
64- showEnvironmentalSamples = true ;
64+ showEnvironmentalSamples = false ; // Changed to false: environment samples are OFF by default
6565 }
6666
6767 super .addComponents ();
@@ -243,14 +243,9 @@ protected void addLayerOptions(VerticalLayout layersLayout) {
243243 CheckBox showEnvironmentSamplesCheckBox = new CheckBox ();
244244 showEnvironmentSamplesCheckBox .setId (Captions .sampleDashboardShowEnvironmentSamples );
245245 showEnvironmentSamplesCheckBox .setCaption (I18nProperties .getCaption (Captions .sampleDashboardShowEnvironmentSamples ));
246- showEnvironmentSamplesCheckBox .setValue (shouldShowEventParticipantSamples ());
246+ showEnvironmentSamplesCheckBox .setValue (showEnvironmentalSamples ); // Use the correct state!
247247 showEnvironmentSamplesCheckBox .addValueChangeListener (e -> {
248- if ((boolean ) e .getProperty ().getValue ()) {
249- showEnvironmentalSamples = true ;
250- } else {
251- showEnvironmentalSamples = false ;
252- }
253-
248+ showEnvironmentalSamples = (boolean ) e .getProperty ().getValue ();
254249 refreshMap (true );
255250 });
256251 layersLayout .addComponent (showEnvironmentSamplesCheckBox );
You can’t perform that action at this time.
0 commit comments