diff --git a/css/style.css b/css/style.css index 5a63f0f..0b52d38 100644 --- a/css/style.css +++ b/css/style.css @@ -4075,55 +4075,18 @@ a.ms1-trad-link.btn-aide-trad{ line-height:1.35; } -.inscr-gestion-list-mates{ - list-style:none; - margin:2px 0 0; - padding:2px 0 0 10px; - border-left:3px solid #c5d8f0; - width:100%; -} - -.inscr-gestion-list-mates__item{ - font-size:12px; - font-weight:500; - color:#495057; - line-height:1.4; - padding:2px 0; -} - -.inscr-gestion-list-mates__row{ - display:flex; - align-items:center; - justify-content:space-between; - gap:8px; - width:100%; -} - -.inscr-gestion-list-mates__link{ - color:inherit; - text-decoration:none; - display:inline-block; - min-width:0; - flex:1 1 auto; -} - -.inscr-gestion-list-mates__link:hover{ - color:#004085; - text-decoration:underline; -} - -.inscr-gestion-list-mates__role{ - color:#6c757d; - font-weight:400; -} - -.inscr-gestion-list-mates__bib{ - flex:0 0 auto; -} - -.inscr-gestion-list-mates__bib .inscr-gestion-list-bib-wrap, -.inscr-gestion-list-mates__bib .inscr-gestion-bib-pill{ +.inscr-gestion-list-item__role{ font-size:11px; + font-weight:600; + color:#6c757d; + text-transform:uppercase; + letter-spacing:.02em; + line-height:1.3; +} + +.inscr-gestion-list-item--teammate .inscr-gestion-list-item__who{ + padding-left:10px; + border-left:3px solid #c5d8f0; } /* MSIN-4405 — la pastille de cause se colle au bord droit de la cellule du nom */ diff --git a/php/inc_fx_inscriptions_gestion.php b/php/inc_fx_inscriptions_gestion.php index 6f14aab..7c5c28c 100644 --- a/php/inc_fx_inscriptions_gestion.php +++ b/php/inc_fx_inscriptions_gestion.php @@ -988,65 +988,20 @@ function fxInscrGestionFetchRows($intEveId, $arrReq) { global $objDatabase; $strWhere = fxInscrGestionBuildWhere($intEveId, $arrReq); - // MSIN-4459 — pec_nom_equipe pour affichage du nom d'équipe en liste (1 ligne = 1 commande). + // MSIN-4459 — 1 ligne = 1 participant (coéquipiers dans les memes colonnes). + // Exclut rol_id 3/4 (benevole / autre) comme le promoteur. $sql = 'SELECT p.no_bib, p.no_bib_remis, p.no_bib_remis_date, p.no_bib_remis_par, p.par_statut_course, p.par_id, p.par_equipe,' . ' p.par_prenom, p.par_nom, e.pec_id_original, e.epr_id, e.eve_id, e.pec_id, e.is_cancelled, e.pec_actif, p.rol_id,' . ' e.no_commande, e.no_panier, e.no_equipe, e.pec_equipe, e.pec_nom_equipe' . ' FROM resultats_epreuves_commandees e, resultats_participants p' - . ' WHERE ' . $strWhere . ' AND p.pec_id = e.pec_id_original' - . ' GROUP BY e.pec_id_original' - . ' ORDER BY p.par_nom, p.par_prenom'; + . ' WHERE ' . $strWhere + . ' AND p.pec_id = e.pec_id_original' + . ' AND p.rol_id NOT IN (3, 4)' + . ' ORDER BY p.par_nom, p.par_prenom, p.par_id'; return $objDatabase->fxGetResults($sql); } -/** - * MSIN-4459 — Membres d'équipe pour enrichir la liste (sous le capitaine). - * Une requête batch par page ; exclut rol_id 3/4 (comme promoteur). - * - * @param array $arrPecIds pec_id_original - * @return array map pec_id => liste de participants (capitaine en premier si present) - */ -function fxInscrGestionFetchTeamMembersByPecs($arrPecIds) { - global $objDatabase; - - $arrIds = array(); - if (is_array($arrPecIds)) { - foreach ($arrPecIds as $intPec) { - $intPec = intval($intPec); - if ($intPec > 0) { - $arrIds[$intPec] = $intPec; - } - } - } - if (count($arrIds) === 0) { - return array(); - } - - $sql = 'SELECT pec_id, par_id, par_nom, par_prenom, rol_id, no_bib, no_bib_remis, par_statut_course' - . ' FROM resultats_participants' - . ' WHERE pec_id IN (' . implode(',', $arrIds) . ')' - . ' AND rol_id NOT IN (3, 4)' - . ' ORDER BY pec_id, CASE WHEN rol_id = 1 THEN 0 ELSE 1 END, par_nom, par_prenom'; - - $tab = $objDatabase->fxGetResults($sql); - $map = array(); - if (!is_array($tab) || count($tab) === 0) { - return $map; - } - - $intNb = count($tab); - for ($i = 1; $i <= $intNb; $i++) { - $intPec = intval($tab[$i]['pec_id']); - if (!isset($map[$intPec])) { - $map[$intPec] = array(); - } - $map[$intPec][] = $tab[$i]; - } - - return $map; -} - function fxInscrGestionFetchRowByPec($intPecId, $intEveId, $intParId = 0) { global $objDatabase; @@ -2175,10 +2130,10 @@ function fxInscrGestionRenderList($intEveId, $strLangue, $strBaseUrl, $arrReq) { echo '