diff --git a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/PairgothTool.kt b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/PairgothTool.kt index 60e9bdd..d73e5de 100644 --- a/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/PairgothTool.kt +++ b/view-webapp/src/main/kotlin/org/jeudego/pairgoth/view/PairgothTool.kt @@ -74,6 +74,11 @@ class PairgothTool { } } + fun getMmsPlayersMap(pairables: Collection) = + pairables.associate { part -> + Pair(part.getLong("id"), part.getDouble("MMS")?.toLong()) + } + fun removeBye(games: Collection) = games.filter { it.getInt("b")!! != 0 && it.getInt("w")!! != 0 diff --git a/view-webapp/src/main/sass/main.scss b/view-webapp/src/main/sass/main.scss index 8c25b7d..8062ff0 100644 --- a/view-webapp/src/main/sass/main.scss +++ b/view-webapp/src/main/sass/main.scss @@ -545,7 +545,7 @@ margin-top: 0.1em !important; } - #header, #logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview, .tables-exclusion { + #header, #logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview, .tables-exclusion, .button { display: none !important; } diff --git a/view-webapp/src/main/webapp/tour-registration.inc.html b/view-webapp/src/main/webapp/tour-registration.inc.html index 348009e..d784246 100644 --- a/view-webapp/src/main/webapp/tour-registration.inc.html +++ b/view-webapp/src/main/webapp/tour-registration.inc.html @@ -6,6 +6,26 @@ #set($pmap = $utils.toMap($teams)) #end +## CB TODO - why limit to INDIVIDUAL here? +#if($tour.type == 'INDIVIDUAL' && $tour.pairing.type == 'MAC_MAHON') + #set($mmbase = $api.get("tour/${params.id}/standings/0")) + #if($mmbase.isObject() && ($mmbase.error || $mmbase.message)) + #if($mmbase.error) + #set($error = $mmbase.error) + #else + #set($error = $mmbase.message) + #end + + #set($mmbase = []) + #end + #set($mmsMap = $utils.getMmsMap($mmbase)) + #set($mmsPlayersMap = $utils.getMmsPlayersMap($mmbase)) +#end +
@@ -41,6 +61,9 @@ Rank ## TableSort bug which inverts specified sort... Rating +#if($tour.pairing.type == 'MAC_MAHON') + MMS +#end Participation @@ -61,6 +84,9 @@ #end #rank($part.rank)#if($part.mmsCorrection) (#if($part.mmsCorrection > 0)+#end$part.mmsCorrection)#end $part.rating +#if($tour.pairing.type == 'MAC_MAHON') + $mmsPlayersMap[$part.id] +#end
#foreach($round in [1..$tour.rounds]) @@ -249,21 +275,6 @@
#if($tour.type == 'INDIVIDUAL' && $tour.pairing.type == 'MAC_MAHON') - #set($mmbase = $api.get("tour/${params.id}/standings/0")) - #if($mmbase.isObject() && ($mmbase.error || $mmbase.message)) - #if($mmbase.error) - #set($error = $mmbase.error) - #else - #set($error = $mmbase.message) - #end - - #set($mmbase = []) - #end - #set($mmsMap = $utils.getMmsMap($mmbase))