* Showing used sets also for finished tournaments, showing start time of match or tournament in table view creation time column as the match or tournament is started.

This commit is contained in:
LevelX2 2013-10-09 17:10:19 +02:00
parent d34779fa68
commit a26b8947d0
2 changed files with 10 additions and 2 deletions

View file

@ -86,7 +86,7 @@ public class MatchView implements Serializable {
this.matchId = table.getTournament().getId();
this.matchName = table.getName();
this.gameType = table.getGameType();
this.deckType = table.getDeckType();
this.deckType = new StringBuilder(table.getDeckType()).append(" ").append(table.getTournament().getSetsFormatedShort()).toString();
StringBuilder sb1 = new StringBuilder();
for (TournamentPlayer tPlayer : table.getTournament().getPlayers()) {

View file

@ -66,8 +66,16 @@ public class TableView implements Serializable {
this.gameType = table.getGameType();
this.tableName = table.getName();
this.controllerName = table.getControllerName();
this.createTime = table.getCreateTime();
this.tableState = table.getState();
if (table.getState().equals(TableState.WAITING) || table.getState().equals(TableState.WAITING)) {
this.createTime = table.getCreateTime();
} else {
if (table.isTournament()) {
this.createTime = table.getTournament().getStartTime();
} else {
this.createTime = table.getMatch().getStartTime();
}
}
this.isTournament = table.isTournament();
for (Seat seat: table.getSeats()) {
seats.add(new SeatView(seat));