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.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
@ -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'] ?? ''));
|
||||
?>
|
||||
|
||||
<div class="bib-view-row<?php echo (int)($p['is_cancelled'] ?? 0) === 1 ? ' bib-view-row--cancelled' : ''; ?>">
|
||||
<div class="bib-view-row<?php echo $blnCancelled ? ' bib-view-row--cancelled' : ''; ?>">
|
||||
|
||||
<!-- Épreuve -->
|
||||
<div class="bib-view-race">
|
||||
@ -4995,7 +5007,7 @@ if ($title != '') {
|
||||
<!-- Participant -->
|
||||
<div class="bib-view-name">
|
||||
<?php echo fxBibEsc($p['par_prenom'] . ' ' . $p['par_nom']); ?>
|
||||
<?php if ((int)($p['is_cancelled'] ?? 0) === 1) { ?>
|
||||
<?php if ($blnCancelled) { ?>
|
||||
<span class="bib-view-cancelled-label"><?php fxBibTexte('bib_v4_view_cancelled', 1); ?></span>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@ -5022,7 +5034,7 @@ echo $p['no_equipe'];
|
||||
<?php } ?>
|
||||
<!-- Numéro -->
|
||||
<div class="bib-view-number">
|
||||
<?php echo $p['no_bib']; ?>
|
||||
<strong><?php echo $strNoBib !== '' && $strNoBib !== '0' ? fxBibEsc($strNoBib) : '—'; ?></strong>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@ -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');
|
||||
|
||||
Reference in New Issue
Block a user