correction MSIN-4370

This commit is contained in:
2026-05-16 10:21:16 -04:00
parent 182083b6ce
commit 722488006d
2 changed files with 22 additions and 8 deletions

View File

@ -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;
}

View File

@ -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;
// =====================