From c2b3c8739abcfa028a0c87b797552a473ed1d392 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Thu, 11 Apr 2024 22:32:39 +0200 Subject: [PATCH] EGF format uses handicap correction for file extension --- view-webapp/src/main/webapp/js/tour-standings.inc.js | 2 +- view-webapp/src/main/webapp/tour.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/view-webapp/src/main/webapp/js/tour-standings.inc.js b/view-webapp/src/main/webapp/js/tour-standings.inc.js index f334e0d..9a64f2d 100644 --- a/view-webapp/src/main/webapp/js/tour-standings.inc.js +++ b/view-webapp/src/main/webapp/js/tour-standings.inc.js @@ -80,7 +80,7 @@ onLoad(() => { publish('application/ffg', 'tou'); }); $('.publish-egf').on('click', e => { - publish('application/egf', 'h9'); + publish('application/egf', 'h' + (typeof(correction) === 'number' && correction > 0 ? correction : 9 )); }); $('.publish-csv').on('click', e => { publish('text/csv', 'csv'); diff --git a/view-webapp/src/main/webapp/tour.html b/view-webapp/src/main/webapp/tour.html index bb5af02..d535365 100644 --- a/view-webapp/src/main/webapp/tour.html +++ b/view-webapp/src/main/webapp/tour.html @@ -50,6 +50,7 @@ const tour_id = ${tour.id}; const tour_rounds = ${tour.rounds}; let activeRound = ${round}; + let correction = #if($tour.pairing.type == 'MAC_MAHON')${tour.pairing.handicap.correction}#{else}0#end; let standingsUpToDate = true; let pairablesUpToDate = true; // $params