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 @@ -206,9 +206,17 @@ private CommitDiscardWrapperComponent<EventParticipantEditForm> createEventParti
206206 if (!editForm .getFieldGroup ().isModified ()) {
207207
208208 EventParticipantDto dto = editForm .getValue ();
209+ EventDto eventDto = FacadeProvider .getEventFacade ().getEventByUuid (dto .getEvent ().getUuid ());
209210 UserDto user = UserProvider .getCurrent ().getUser ();
210- if ((user .getRegion () != null && !user .getRegion ().equals (dto .getRegion ()))
211- || (user .getDistrict () != null && !user .getDistrict ().equals (dto .getDistrict ()))) {
211+ if ((user .getRegion () != null && dto .getRegion () != null && !user .getRegion ().equals (dto .getRegion ()))
212+ || (user .getDistrict () != null && dto .getDistrict () != null && !user .getDistrict ().equals (dto .getDistrict ()))
213+ || (dto .getRegion () == null
214+ && dto .getDistrict () == null
215+ && (user .getRegion () != null && !user .getRegion ().equals (eventDto .getEventLocation ().getRegion ())
216+ || user .getDistrict () != null && !user .getDistrict ().equals (eventDto .getEventLocation ().getDistrict ())))
217+ || ((dto .getRegion () == null || dto .getDistrict () == null )
218+ && (user .getRegion () != null && !user .getRegion ().equals (dto .getRegion ())
219+ || user .getDistrict () != null && !user .getDistrict ().equals (dto .getDistrict ())))) {
212220 VaadinUiUtil .showConfirmationPopup (
213221 I18nProperties .getString (Strings .headingEventParticipantResponsibleJurisdictionUpdated ),
214222 new Label (I18nProperties .getString (Strings .messageEventParticipantResponsibleJurisdictionUpdated )),
You can’t perform that action at this time.
0 commit comments