Enhance bib range handling and update version code to 4.72.749
This commit introduces a new parameter to the `fxInfosBibRange` function to conditionally include gaps in the statistics calculation, improving data accuracy. Additionally, the AJAX handler is updated to support a 'lite' mode for optimized data retrieval. JavaScript functions are modified to pass this new option, enhancing the overall functionality of the bib assignments. The version code is incremented to reflect these changes.
This commit is contained in:
@ -4415,12 +4415,14 @@ function fxInfosBibRange($epr_id = 0, $epr_bib_id = 0, $blnIncludeGaps = true){
|
||||
SELECT MAX($sqlBibNumRp)
|
||||
FROM resultats_participants rp
|
||||
WHERE rp.epr_id = b.epr_id
|
||||
AND rp.is_cancelled = 0
|
||||
AND $sqlBibNumRp BETWEEN b.epr_bib_start AND b.epr_bib_finish
|
||||
), b.epr_bib_start - 1)
|
||||
AND t.num NOT IN (
|
||||
SELECT $sqlBibNumRp
|
||||
FROM resultats_participants rp
|
||||
WHERE rp.epr_id = b.epr_id
|
||||
AND rp.is_cancelled = 0
|
||||
AND $sqlBibNumRp > 0
|
||||
)
|
||||
) AS nb_trous,
|
||||
@ -4447,12 +4449,14 @@ function fxInfosBibRange($epr_id = 0, $epr_bib_id = 0, $blnIncludeGaps = true){
|
||||
SELECT MAX($sqlBibNumRp)
|
||||
FROM resultats_participants rp
|
||||
WHERE rp.epr_id = b.epr_id
|
||||
AND rp.is_cancelled = 0
|
||||
AND $sqlBibNumRp BETWEEN b.epr_bib_start AND b.epr_bib_finish
|
||||
), b.epr_bib_start - 1)
|
||||
AND t.num NOT IN (
|
||||
SELECT $sqlBibNumRp
|
||||
FROM resultats_participants rp
|
||||
WHERE rp.epr_id = b.epr_id
|
||||
AND rp.is_cancelled = 0
|
||||
AND $sqlBibNumRp > 0
|
||||
)
|
||||
) AS liste_trous,
|
||||
@ -5720,12 +5724,12 @@ if (!$blnRangeLocked && (
|
||||
|
||||
</div>
|
||||
|
||||
<div class="bib-error text-danger small mb-2" style="<?php echo (!empty($range['liste_trous']) || !empty($range['liste_doublons'])) ? 'display:block;' : 'display:none;'; ?>">
|
||||
<?php if (!empty($range['liste_trous'])) { ?>
|
||||
<div class="bib-error text-danger small mb-2" style="<?php echo ((int)($range['nb_utilises'] ?? 0) > 0 && (!empty($range['liste_trous']) || !empty($range['liste_doublons']))) ? 'display:block;' : 'display:none;'; ?>">
|
||||
<?php if ((int)($range['nb_utilises'] ?? 0) > 0 && !empty($range['liste_trous'])) { ?>
|
||||
<div><?php fxBibTexteTrad('bib_v4_err_gaps', 1); ?> <?php echo fxBibEsc($range['liste_trous']); ?></div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (!empty($range['liste_doublons'])) { ?>
|
||||
<?php if ((int)($range['nb_utilises'] ?? 0) > 0 && !empty($range['liste_doublons'])) { ?>
|
||||
<div><?php fxBibTexteTrad('bib_v4_err_dupes', 1); ?> <?php echo fxBibEsc($range['liste_doublons']); ?></div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user