use of de.symeda.sormas.app.event.eventparticipant.EventParticipantSection in project SORMAS-Project by hzi-braunschweig.
the class EventParticipantEditActivity method buildEditFragment.
@Override
protected BaseEditFragment buildEditFragment(PageMenuItem menuItem, EventParticipant activityRootData) {
EventParticipantSection section = EventParticipantSection.fromOrdinal(menuItem.getPosition());
BaseEditFragment fragment;
switch(section) {
case EVENT_PARTICIPANT_INFO:
fragment = EventParticipantEditFragment.newInstance(activityRootData);
break;
case PERSON_INFO:
fragment = PersonEditFragment.newInstance(activityRootData);
break;
case IMMUNIZATIONS:
fragment = EventParticipantEditImmunizationListFragment.newInstance(activityRootData);
break;
case VACCINATIONS:
fragment = EventParticipantEditVaccinationListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.event.eventparticipant.EventParticipantSection in project SORMAS-Project by hzi-braunschweig.
the class EventParticipantReadActivity method buildReadFragment.
@Override
protected BaseReadFragment buildReadFragment(PageMenuItem menuItem, EventParticipant activityRootData) {
EventParticipantSection section = EventParticipantSection.fromOrdinal(menuItem.getPosition());
BaseReadFragment fragment;
switch(section) {
case EVENT_PARTICIPANT_INFO:
fragment = EventParticipantReadFragment.newInstance(activityRootData);
break;
case PERSON_INFO:
fragment = PersonReadFragment.newInstance(activityRootData);
break;
case IMMUNIZATIONS:
fragment = EventParticipantReadImmunizationListFragment.newInstance(activityRootData);
break;
case VACCINATIONS:
fragment = EventParticipantReadVaccinationListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.event.eventparticipant.EventParticipantSection in project SORMAS-Project by hzi-braunschweig.
the class EventParticipantReadActivity method goToEditView.
@Override
public void goToEditView() {
EventParticipantSection section = EventParticipantSection.fromOrdinal(getActivePage().getPosition());
EventParticipantEditActivity.startActivity(this, getRootUuid(), eventUuid, section);
}
Aggregations