diff --git a/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/FightSummary.java b/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/FightSummary.java index 112eb3aa..cd06d137 100644 --- a/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/FightSummary.java +++ b/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/FightSummary.java @@ -236,7 +236,8 @@ public void createBodyRows(Document document, PdfPTable mainTable, float width, } for (final FightDTO fight : fights) { - if (groupsOfLevel.get(i).getFights().contains(fight)) { + if (i < groupsOfLevel.size() && groupsOfLevel.get(i).getFights() != null + && groupsOfLevel.get(i).getFights().contains(fight)) { final PdfPCell cell = new PdfPCell(fightTable(fight, true)); cell.setBorderWidth(BORDER_WIDTH); cell.setColspan(getTableWidths().length); diff --git a/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/GroupList.java b/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/GroupList.java index 6e985c4e..1257f1b0 100644 --- a/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/GroupList.java +++ b/backend/kendo-tournament-pdf/src/main/java/com/softwaremagico/kt/pdf/lists/GroupList.java @@ -39,6 +39,7 @@ import com.softwaremagico.kt.pdf.EmptyPdfBodyException; import com.softwaremagico.kt.pdf.ParentList; import com.softwaremagico.kt.utils.GroupUtils; +import com.softwaremagico.kt.utils.ShiaijoName; import org.springframework.context.MessageSource; import java.util.List; @@ -75,7 +76,9 @@ public void setTableProperties(PdfPTable mainTable) { public PdfPTable groupTable(GroupDTO groupDTO) { final PdfPTable teamTable = new PdfPTable(1); - teamTable.addCell(getHeader4(messageSource.getMessage("tournament.group", null, locale) + " " + (groupDTO.getIndex() + 1), 0)); + teamTable.addCell(getHeader4(messageSource.getMessage("tournament.group", null, locale) + " " + (groupDTO.getIndex() + 1) + + (tournament.getShiaijos() > 1 ? " (" + messageSource.getMessage("tournament.shiaijo", null, locale) + ": " + + ShiaijoName.getShiaijoName(groupDTO.getShiaijo()) + ")" : ""), 0)); for (final TeamDTO teamDTO : groupDTO.getTeams()) { teamTable.addCell(getCell(teamDTO.getName()));