This repository was archived by the owner on May 5, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
sormas-ui/src/main/java/de/symeda/sormas/ui/events Expand file tree Collapse file tree Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments