Skip to content

Commit 243370d

Browse files
authored
Merge pull request #13474 from SORMAS-Foundation/bugfix-13430-error-occurred-after-clicking-the-adverse-events-menu
bugfix 13430-error-occurred-after-clicking-the-adverse-events-menu
2 parents 16f23b1 + a805695 commit 243370d

File tree

3 files changed

+32
-19
lines changed

3 files changed

+32
-19
lines changed

sormas-api/src/main/java/de/symeda/sormas/api/adverseeventsfollowingimmunization/AefiCriteria.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ public class AefiCriteria extends BaseCriteria implements Serializable {
7171
private Date toDate;
7272
private EntityRelevanceStatus relevanceStatus;
7373

74-
private boolean showSeriousAefiForMap;
75-
private boolean showNonSeriousAefiForMap;
74+
private Boolean showSeriousAefiForMap = false;
75+
private Boolean showNonSeriousAefiForMap = false;
7676

7777
public Disease getDisease() {
7878
return disease;
@@ -230,21 +230,21 @@ public AefiCriteria aefiType(AefiType aefiType) {
230230
return this;
231231
}
232232

233-
public AefiCriteria showSeriousAefiForMap(boolean showSeriousAefi) {
233+
public AefiCriteria showSeriousAefiForMap(Boolean showSeriousAefi) {
234234
this.showSeriousAefiForMap = showSeriousAefi;
235235
return this;
236236
}
237237

238-
public AefiCriteria showNonSeriousAefiForMap(boolean showNonSeriousAefi) {
238+
public AefiCriteria showNonSeriousAefiForMap(Boolean showNonSeriousAefi) {
239239
this.showNonSeriousAefiForMap = showNonSeriousAefi;
240240
return this;
241241
}
242242

243-
public boolean isShowSeriousAefiForMap() {
243+
public Boolean isShowSeriousAefiForMap() {
244244
return showSeriousAefiForMap;
245245
}
246246

247-
public boolean isShowNonSeriousAefiForMap() {
247+
public Boolean isShowNonSeriousAefiForMap() {
248248
return showNonSeriousAefiForMap;
249249
}
250250
}

sormas-backend/src/main/resources/sql/sormas_schema.sql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13862,11 +13862,7 @@ DROP TRIGGER IF EXISTS versioning_trigger ON events_environments;
1386213862
CREATE TRIGGER versioning_trigger BEFORE INSERT OR UPDATE OR DELETE ON events_environments
1386313863
FOR EACH ROW EXECUTE PROCEDURE versioning('sys_period', 'events_environments_history','true');
1386413864

13865-
INSERT INTO userroles_userrights
13866-
(userright, sys_period, userrole_id)
13867-
VALUES('ENVIRONMENT_LINK', tstzrange(
13868-
CURRENT_TIMESTAMP, CURRENT_TIMESTAMP + INTERVAL '1 hour', '[)'
13869-
), 1);
13865+
INSERT INTO userroles_userrights (userrole_id, userright) SELECT id, 'ENVIRONMENT_LINK' FROM public.userroles WHERE userroles.linkeddefaultuserrole in ('ADMIN','NATIONAL_USER');
1387013866

1387113867
INSERT INTO schema_version (version_number, comment) VALUES (563, 'Events and environment linkage #13266');
1387213868

sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/gis/GisDashboardMapComponent.java

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,31 @@ protected void addComponents() {
182182
}
183183

184184
protected void updateEntityLoadingStatus() {
185-
loadCases = showCasesCheckBox.getValue();
186-
loadContacts = showContactsCheckBox.getValue();
187-
loadSamples = showCaseSamplesCheckBox.getValue()
188-
|| showContactSamplesCheckBox.getValue()
189-
|| showEventParticipantSamplesCheckBox.getValue()
190-
|| showEnvironmentSamplesCheckBox.getValue();
191-
loadAefi = showSeriousAefiCheckBox.getValue() || showNonSeriousAefiCheckBox.getValue();
192-
loadEvents = showEventsCheckBox.getValue();
185+
if (showCasesCheckBox != null) {
186+
loadCases = showCasesCheckBox.getValue();
187+
}
188+
189+
if (showContactsCheckBox != null) {
190+
loadContacts = showContactsCheckBox.getValue();
191+
}
192+
193+
if (showCaseSamplesCheckBox != null
194+
&& showContactSamplesCheckBox != null
195+
&& showEventParticipantSamplesCheckBox != null
196+
&& showEnvironmentSamplesCheckBox != null) {
197+
loadSamples = showCaseSamplesCheckBox.getValue()
198+
|| showContactSamplesCheckBox.getValue()
199+
|| showEventParticipantSamplesCheckBox.getValue()
200+
|| showEnvironmentSamplesCheckBox.getValue();
201+
}
202+
203+
if (showSeriousAefiCheckBox != null && showNonSeriousAefiCheckBox != null) {
204+
loadAefi = showSeriousAefiCheckBox.getValue() || showNonSeriousAefiCheckBox.getValue();
205+
}
206+
207+
if (showEventsCheckBox != null) {
208+
loadEvents = showEventsCheckBox.getValue();
209+
}
193210
}
194211

195212
@Override

0 commit comments

Comments
 (0)