@@ -94,16 +94,22 @@ public void refreshMenu(SubMenu menu, Label infoLabel, Label infoLabelSub, Strin
9494 I18nProperties .getPrefixCaption ("View" , CommunitiesView .VIEW_NAME .replaceAll ("/" , "." ) + ".short" , "" ),
9595 null ,
9696 false );
97- menu .addView (
98- FacilitiesView .VIEW_NAME ,
99- I18nProperties .getPrefixCaption ("View" , FacilitiesView .VIEW_NAME .replaceAll ("/" , "." ) + ".short" , "" ),
100- null ,
101- false );
102- menu .addView (
103- PointsOfEntryView .VIEW_NAME ,
104- I18nProperties .getPrefixCaption ("View" , PointsOfEntryView .VIEW_NAME .replaceAll ("/" , "." ) + ".short" , "" ),
105- null ,
106- false );
97+ if (FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .CASE_SURVEILANCE )
98+ || FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .EVENT_SURVEILLANCE )
99+ || FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .AGGREGATE_REPORTING )) {
100+ menu .addView (
101+ FacilitiesView .VIEW_NAME ,
102+ I18nProperties .getPrefixCaption ("View" , FacilitiesView .VIEW_NAME .replaceAll ("/" , "." ) + ".short" , "" ),
103+ null ,
104+ false );
105+ }
106+ if (FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .CASE_SURVEILANCE )) {
107+ menu .addView (
108+ PointsOfEntryView .VIEW_NAME ,
109+ I18nProperties .getPrefixCaption ("View" , PointsOfEntryView .VIEW_NAME .replaceAll ("/" , "." ) + ".short" , "" ),
110+ null ,
111+ false );
112+ }
107113
108114 if (UserProvider .getCurrent ().hasUserRight (UserRight .POPULATION_MANAGE )) {
109115 menu .addView (
@@ -158,8 +164,14 @@ public static void registerViews(Navigator navigator) {
158164 navigator .addView (RegionsView .VIEW_NAME , RegionsView .class );
159165 navigator .addView (DistrictsView .VIEW_NAME , DistrictsView .class );
160166 navigator .addView (CommunitiesView .VIEW_NAME , CommunitiesView .class );
161- navigator .addView (FacilitiesView .VIEW_NAME , FacilitiesView .class );
162- navigator .addView (PointsOfEntryView .VIEW_NAME , PointsOfEntryView .class );
167+ if (FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .CASE_SURVEILANCE )
168+ || FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .EVENT_SURVEILLANCE )
169+ || FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .AGGREGATE_REPORTING )) {
170+ navigator .addView (FacilitiesView .VIEW_NAME , FacilitiesView .class );
171+ }
172+ if (FacadeProvider .getFeatureConfigurationFacade ().isFeatureEnabled (FeatureType .CASE_SURVEILANCE )) {
173+ navigator .addView (PointsOfEntryView .VIEW_NAME , PointsOfEntryView .class );
174+ }
163175
164176 if (UserProvider .getCurrent ().hasUserRight (UserRight .POPULATION_MANAGE )) {
165177 navigator .addView (PopulationDataView .VIEW_NAME , PopulationDataView .class );
0 commit comments