Skip to content

Commit 6991332

Browse files
Merge pull request #13358 from SORMAS-Foundation/bugfix-13356_notification_box_should_always_be_visible
#13356 - Notification box will always be visible
2 parents 85844d0 + 908f600 commit 6991332

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2154,6 +2154,7 @@ public interface Captions {
21542154
String nationalHealthId = "nationalHealthId";
21552155
String notAvailableShort = "notAvailableShort";
21562156
String Notification_dateOfNotification = "Notification.dateOfNotification";
2157+
String Notification_noNotification = "Notification.noNotification";
21572158
String notificationType = "notificationType";
21582159
String notificationType_caption = "notificationType.caption";
21592160
String notificationType_description = "notificationType.description";

sormas-api/src/main/resources/captions.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3484,4 +3484,5 @@ SystemConfigurationValue.General = General
34843484

34853485
# Notifier
34863486
Notifier.notification = Notification
3487-
Notification.dateOfNotification = Date of notification
3487+
Notification.dateOfNotification = Date of notification
3488+
Notification.noNotification = There are no notifications

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ protected void initView(String params) {
134134
final EditPermissionType caseEditAllowed = FacadeProvider.getCaseFacade().getEditPermissionType(uuid);
135135
boolean isEditAllowed = isEditAllowed();
136136

137-
if (UiUtil.enabled(FeatureType.SURVEILLANCE_REPORTS) && caze.getNotifier() != null) {
137+
if (UiUtil.enabled(FeatureType.SURVEILLANCE_REPORTS)) {
138138
CaseNotifierSideViewComponent notifierSideViewComponent =
139139
new CaseNotifierSideViewComponent(caze);
140140
notifierSideViewComponent.addStyleNames(CssStyles.SIDE_COMPONENT);

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/notifier/CaseNotifierSideViewComponent.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import com.vaadin.icons.VaadinIcons;
1919
import com.vaadin.ui.Button;
20+
import com.vaadin.ui.Label;
2021
import com.vaadin.ui.themes.ValoTheme;
2122

2223
import de.symeda.sormas.api.caze.CaseDataDto;
@@ -50,12 +51,13 @@ public CaseNotifierSideViewComponent(CaseDataDto caze) {
5051
if (caze.getNotifier() != null) {
5152
var component = ControllerProvider.getCaseNotifierSideViewController().getNotifierComponent(caze);
5253
addComponent(component);
53-
}
54-
55-
Button notficationButton = ButtonHelper.createIconButton(Captions.Notifier_notification, VaadinIcons.BOOK, e -> {
56-
}, ValoTheme.BUTTON_PRIMARY);
54+
Button notficationButton = ButtonHelper.createIconButton(Captions.Notifier_notification, VaadinIcons.BOOK, e -> {
55+
}, ValoTheme.BUTTON_PRIMARY);
5756

58-
addCreateButton(notficationButton);
57+
addCreateButton(notficationButton);
58+
} else {
59+
addComponent(new Label(I18nProperties.getCaption(Captions.Notification_noNotification)));
60+
}
5961

6062
}
6163

0 commit comments

Comments
 (0)