From 16b86371925f0327e29d3f6aafc428b9d2ffdace Mon Sep 17 00:00:00 2001 From: stephan Date: Fri, 19 Jun 2026 11:09:47 -0400 Subject: [PATCH] Enhance cancellation handling in bib view and update SQL queries for participant retrieval; increment version code to 4.72.687 This commit improves the handling of cancelled participants in the bib view by refining the logic for displaying cancellation status and updating the associated SQL queries for participant retrieval. The version code is incremented to reflect these changes, ensuring consistency in versioning. --- css/style.css | 4 ++++ php/inc_fx_promoteur.php | 26 +++++++++++++++++++------- php/inc_settings.php | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/css/style.css b/css/style.css index d8b5e3a3..206d4928 100644 --- a/css/style.css +++ b/css/style.css @@ -2122,6 +2122,10 @@ a.ms1-trad-link.btn-aide-trad{ vertical-align: middle; } +.bib-view-row--cancelled .bib-view-number strong { + color: #842029; +} + .bib-view-row:nth-of-type(odd) { background: #f3f3f3; } diff --git a/php/inc_fx_promoteur.php b/php/inc_fx_promoteur.php index 567805ca..c4b6e091 100644 --- a/php/inc_fx_promoteur.php +++ b/php/inc_fx_promoteur.php @@ -4903,18 +4903,27 @@ if (!empty($data)) { // 👉 mode normal (DB) $sqlBibNumP = fxBibSqlNoBibUnsigned('p.no_bib'); +$strWhereView = "p.epr_id = " . intval($epr_id); +if ($hasRange) { + $strWhereView .= " AND $sqlBibNumP > 0 AND $sqlBibNumP BETWEEN $start AND $end"; +} else { + $strWhereView .= " AND ( + (COALESCE(p.is_cancelled, 0) = 0 AND COALESCE(c.is_cancelled, 0) = 0) + OR $sqlBibNumP > 0 + )"; +} $sqlParticipants = " SELECT p.*, c.pec_nom_equipe, - c.no_equipe + c.no_equipe, + c.is_cancelled AS pec_is_cancelled FROM resultats_participants p LEFT JOIN resultats_epreuves_commandees c ON c.pec_id_original = p.pec_id AND c.epr_id = p.epr_id - WHERE p.epr_id = " . intval($epr_id) . " - " . ($hasRange ? "AND $sqlBibNumP BETWEEN $start AND $end" : "") . " - ORDER BY $sqlBibNumP"; + WHERE $strWhereView + ORDER BY $sqlBibNumP, p.par_nom, p.par_prenom"; $tabParticipants = $objDatabase->fxGetResults($sqlParticipants); } @@ -4975,9 +4984,12 @@ if ($title != '') { if ($p['rol_id'] == 3 || $p['rol_id'] == 4) { continue; } + + $blnCancelled = (int)($p['is_cancelled'] ?? 0) === 1 || (int)($p['pec_is_cancelled'] ?? 0) === 1; + $strNoBib = trim((string)($p['no_bib'] ?? '')); ?> -
+
@@ -4995,7 +5007,7 @@ if ($title != '') {
- +
@@ -5022,7 +5034,7 @@ echo $p['no_equipe'];
- +
diff --git a/php/inc_settings.php b/php/inc_settings.php index dd78b158..10c35059 100644 --- a/php/inc_settings.php +++ b/php/inc_settings.php @@ -7,7 +7,7 @@ * Constantes * * **************/ -define('_VERSION_CODE', '4.72.686'); +define('_VERSION_CODE', '4.72.687'); define('_DATE_CODE', '2026-06-18'); //MSIN-4290 define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');