Search in sources :

Example 1 with TitleLayout

use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.

the class CaseController method getCaseViewTitleLayout.

public TitleLayout getCaseViewTitleLayout(CaseDataDto caseData) {
    TitleLayout titleLayout = new TitleLayout();
    titleLayout.addRow(DiseaseHelper.toString(caseData.getDisease(), caseData.getDiseaseDetails()));
    titleLayout.addRow(caseData.getCaseClassification().toString());
    String shortUuid = DataHelper.getShortUuid(caseData.getUuid());
    PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(caseData.getPerson().getUuid());
    StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(person);
    mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
    titleLayout.addMainRow(mainRowText.toString());
    return titleLayout;
}
Also used : TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout) PersonDto(de.symeda.sormas.api.person.PersonDto)

Example 2 with TitleLayout

use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.

the class PersonController method getPersonViewTitleLayout.

public TitleLayout getPersonViewTitleLayout(PersonDto personDto) {
    final TitleLayout titleLayout = new TitleLayout();
    final String shortUuid = DataHelper.getShortUuid(personDto.getUuid());
    final StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(personDto);
    mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
    titleLayout.addMainRow(mainRowText.toString());
    return titleLayout;
}
Also used : TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout)

Example 3 with TitleLayout

use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.

the class SampleController method getSampleViewTitleLayout.

public TitleLayout getSampleViewTitleLayout(SampleDto sample) {
    TitleLayout titleLayout = new TitleLayout();
    titleLayout.addRow(DataHelper.getShortUuid(sample.getUuid()));
    titleLayout.addRow(DateFormatHelper.formatDate(sample.getSampleDateTime()));
    String mainRowText = SampleReferenceDto.buildCaption(sample.getSampleMaterial(), sample.getAssociatedCase() != null ? sample.getAssociatedCase().getUuid() : null, sample.getAssociatedContact() != null ? sample.getAssociatedContact().getUuid() : null, sample.getAssociatedEventParticipant() != null ? sample.getAssociatedEventParticipant().getUuid() : null);
    titleLayout.addMainRow(mainRowText);
    return titleLayout;
}
Also used : TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout)

Example 4 with TitleLayout

use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.

the class EventController method getEventViewTitleLayout.

public TitleLayout getEventViewTitleLayout(String uuid) {
    EventDto event = findEvent(uuid);
    TitleLayout titleLayout = new TitleLayout();
    titleLayout.addRow(event.getEventStatus().toString());
    if (event.getStartDate() != null) {
        String eventStartDateLabel = event.getEndDate() != null ? DateFormatHelper.buildPeriodString(event.getStartDate(), event.getEndDate()) : DateFormatHelper.formatDate(event.getStartDate());
        titleLayout.addRow(eventStartDateLabel);
    }
    String shortUuid = DataHelper.getShortUuid(event.getUuid());
    String eventTitle = event.getEventTitle();
    String mainRowText = StringUtils.isNotBlank(eventTitle) ? eventTitle + " (" + shortUuid + ")" : shortUuid;
    titleLayout.addMainRow(mainRowText);
    return titleLayout;
}
Also used : TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout) EventDto(de.symeda.sormas.api.event.EventDto)

Example 5 with TitleLayout

use of de.symeda.sormas.ui.utils.components.page.title.TitleLayout in project SORMAS-Project by hzi-braunschweig.

the class ImmunizationController method getImmunizationViewTitleLayout.

public TitleLayout getImmunizationViewTitleLayout(String uuid) {
    ImmunizationDto immunizationDto = findImmunization(uuid);
    TitleLayout titleLayout = new TitleLayout();
    String shortUuid = DataHelper.getShortUuid(immunizationDto.getUuid());
    PersonDto person = FacadeProvider.getPersonFacade().getPersonByUuid(immunizationDto.getPerson().getUuid());
    StringBuilder mainRowText = TitleLayoutHelper.buildPersonString(person);
    mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid);
    titleLayout.addMainRow(mainRowText.toString());
    return titleLayout;
}
Also used : ImmunizationDto(de.symeda.sormas.api.immunization.ImmunizationDto) TitleLayout(de.symeda.sormas.ui.utils.components.page.title.TitleLayout) PersonDto(de.symeda.sormas.api.person.PersonDto)

Aggregations

TitleLayout (de.symeda.sormas.ui.utils.components.page.title.TitleLayout)9 PersonDto (de.symeda.sormas.api.person.PersonDto)4 EventDto (de.symeda.sormas.api.event.EventDto)2 EventGroupDto (de.symeda.sormas.api.event.EventGroupDto)1 ImmunizationDto (de.symeda.sormas.api.immunization.ImmunizationDto)1 TravelEntryDto (de.symeda.sormas.api.travelentry.TravelEntryDto)1 RowLayout (de.symeda.sormas.ui.utils.components.page.title.RowLayout)1