Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 4460ebe

Browse files
SORMAS-Foundation#2902 - extend event participant jurisdiction calculation
1 parent 37da97d commit 4460ebe

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantsController.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,23 @@ private CommitDiscardWrapperComponent<EventParticipantEditForm> createEventParti
217217
500,
218218
confirmed -> {
219219
if (confirmed) {
220-
personFacade.savePerson(dto.getPerson());
221-
eventParticipantFacade.saveEventParticipant(dto);
222-
Notification.show(I18nProperties.getString(Strings.messageEventParticipantSaved), Type.WARNING_MESSAGE);
223-
if (doneConsumer != null)
224-
doneConsumer.accept(null);
225-
SormasUI.refreshView();
220+
savePersonAndEventParticipant(doneConsumer, dto);
226221
}
227222
});
223+
} else {
224+
savePersonAndEventParticipant(doneConsumer, dto);
228225
}
229226
}
230227
});
231228
return editComponent;
232229
}
230+
231+
private void savePersonAndEventParticipant(Consumer<EventParticipantReferenceDto> doneConsumer, EventParticipantDto dto) {
232+
personFacade.savePerson(dto.getPerson());
233+
eventParticipantFacade.saveEventParticipant(dto);
234+
Notification.show(I18nProperties.getString(Strings.messageEventParticipantSaved), Type.WARNING_MESSAGE);
235+
if (doneConsumer != null)
236+
doneConsumer.accept(null);
237+
SormasUI.refreshView();
238+
}
233239
}

0 commit comments

Comments
 (0)