From 3e33c97efbd73b15dab9ca18e73c3b148ba86207 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Thu, 1 Aug 2024 08:50:29 +0200 Subject: [PATCH] Fix missing result sheets bug --- view-webapp/src/main/webapp/result-sheets.html | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/view-webapp/src/main/webapp/result-sheets.html b/view-webapp/src/main/webapp/result-sheets.html index 44dd75e..c8aeb4a 100644 --- a/view-webapp/src/main/webapp/result-sheets.html +++ b/view-webapp/src/main/webapp/result-sheets.html @@ -28,12 +28,18 @@ #end #set($games = $utils.removeBye($roundPairing.games)) #set($pages = ($games.size() + 3) / 4) -#foreach($i in [1..$games.size()]) +#set($items = $pages * 4) +#foreach($i in [1..$items]) #set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages) #if($j < $games.size()) - #set($game = $games[$j]) - #set($white = $pmap[$game.w]) - #set($black = $pmap[$game.b]) + #set($game = $games[$j]) + #set($white = $pmap[$game.w]) + #set($black = $pmap[$game.b]) + #else + #set($game = { 't': 'xxx', 'h': 'xxx' }) + #set($white = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) + #set($black = { 'name': 'xxx', 'firstname': 'xxx', 'rank': -99, 'country': 'XX', 'club': 'xxx' }) + #end #if($foreach.index % 4 == 0)
#end @@ -75,7 +81,6 @@
#end #end -#end