diff --git a/css/style.css b/css/style.css index d66d4bf..9fc7316 100644 --- a/css/style.css +++ b/css/style.css @@ -1182,6 +1182,3 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active { .team-mode-option input[type="radio"]{ margin-top:2px; } -.bib-view-header{ - background:red !important; -} \ No newline at end of file diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 47e2e6d..0558ff8 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -3367,10 +3367,11 @@ function fxGetParticipantsForBatchAssign($epr_id, $ba_id) { // - aucune écriture DB ici // ===================== $sql = " - SELECT - p.*, - c.pec_nom_equipe, - c.no_equipe + SELECT + p.*, + p.pec_id, + c.pec_nom_equipe, + c.no_equipe FROM resultats_participants p LEFT JOIN resultats_epreuves_commandees c @@ -3498,7 +3499,8 @@ function fxProcessBatchAssignments($epr_id, $participants, $tabRanges, $mode = ' global $objDatabase; $assignments = []; - +$teamMap = []; +$nextTeamNumber = 1; if (empty($participants) || empty($tabRanges)) { return $assignments; } @@ -3535,6 +3537,21 @@ function fxProcessBatchAssignments($epr_id, $participants, $tabRanges, $mode = ' foreach ($participants as $p) { $par_id = (int)$p['par_id']; + $teamKey = (int)($p['pec_id'] ?? 0); + +if ($teamKey > 0) { + + if (!isset($teamMap[$teamKey])) { + $teamMap[$teamKey] = $nextTeamNumber; + $nextTeamNumber++; + } + + $teamNumber = $teamMap[$teamKey]; + +} else { + + $teamNumber = 0; +} $foundBib = null; // =====================