Enhance bib event configuration with inter-epreuve option and update version code to 4.72.754

This commit introduces a new feature allowing the same bib numbers across different epreuves, enhancing event management flexibility. It includes updates to the CSS for improved layout, JavaScript functions to manage visibility of configuration notes, and new database entries for the inter-epreuve setting. The version code is incremented to reflect these changes.
This commit is contained in:
2026-07-08 10:32:03 -04:00
parent 5184544d6f
commit 7d342216f8
5 changed files with 71 additions and 4 deletions

View File

@ -1064,6 +1064,15 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
line-height:1.45; line-height:1.45;
} }
/* MSIN-4424 — Blocs repliables en tête du module bib : espacement serré. */
#module-bib.epr-wrapper{
gap:6px;
}
#module-bib > .epr-row:first-of-type{
margin-top:10px;
}
/* MSIN-4424 — ancien bandeau remplacé par panneau repliable .bib-event-config-panel */ /* MSIN-4424 — ancien bandeau remplacé par panneau repliable .bib-event-config-panel */
@ -1076,7 +1085,8 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
border:1px solid #c8d6e5; border:1px solid #c8d6e5;
border-radius:8px; border-radius:8px;
background:#f4f8fc; background:#f4f8fc;
padding:12px 14px; padding:10px 12px;
margin:0;
} }
.bib-global-batch__header{ .bib-global-batch__header{
display:flex; display:flex;
@ -2512,6 +2522,19 @@ a.ms1-trad-link.btn-aide-trad{
} }
/* MSIN-4424 — Panneau configuration globale (contenu dans .epr-content). */ /* MSIN-4424 — Panneau configuration globale (contenu dans .epr-content). */
.bib-event-config-header-actions{
display:inline-flex;
align-items:center;
gap:8px;
flex-shrink:0;
}
.bib-event-config-note{
font-size:12px;
font-weight:700;
white-space:nowrap;
}
.bib-event-config-content{ .bib-event-config-content{
background:#fff; background:#fff;
} }
@ -2614,13 +2637,22 @@ a.ms1-trad-link.btn-aide-trad{
vertical-align:middle; vertical-align:middle;
} }
.bib-qty-summary-table tbody tr:nth-child(odd){
background-color:#f1f3f5;
}
.bib-qty-summary-table tbody tr:nth-child(odd) th,
.bib-qty-summary-table tbody tr:nth-child(odd) td{
background-color:#f1f3f5;
}
.bib-qty-summary-by-epr{ .bib-qty-summary-by-epr{
border-top:1px solid #e9ecef; border-top:1px solid #e9ecef;
padding-top:14px; padding-top:14px;
} }
.bib-anomalies-panel{ .bib-anomalies-panel{
margin-bottom:14px; margin-bottom:0;
border:1px solid #ced4da; border:1px solid #ced4da;
border-radius:4px; border-radius:4px;
overflow:hidden; overflow:hidden;

View File

@ -2778,6 +2778,15 @@
}); });
}); });
function syncBibEventConfigHeaderNote() {
let note = document.querySelector('[data-bib-inter-epr-note]');
let chk = moduleBib.querySelector('.bib-event-allow-inter-epr');
if (!note || !chk) {
return;
}
note.classList.toggle('bib-ui-hidden', !chk.checked);
}
// MSIN-4424 — Autoriser mêmes numéros entre épreuves (réglage événement). // MSIN-4424 — Autoriser mêmes numéros entre épreuves (réglage événement).
let chkAllowInterEpr = moduleBib.querySelector('.bib-event-allow-inter-epr'); let chkAllowInterEpr = moduleBib.querySelector('.bib-event-allow-inter-epr');
if (chkAllowInterEpr) { if (chkAllowInterEpr) {
@ -2807,6 +2816,7 @@
} }
moduleBib.dataset.allowInterEpr = data.allow_inter_epr ? '1' : '0'; moduleBib.dataset.allowInterEpr = data.allow_inter_epr ? '1' : '0';
syncBibEventConfigHeaderNote();
let mount = document.getElementById('bib-anomalies-mount'); let mount = document.getElementById('bib-anomalies-mount');
if (mount && data.anomalies_html) { if (mount && data.anomalies_html) {

View File

@ -2998,6 +2998,7 @@ function fxBibStaticFallback($clef) {
'bib_v4_global_batch_plan_invalid' => ['fr' => 'Sélection invalide : choisissez au moins une épreuve solo et des séquences.', 'en' => 'Invalid selection: pick at least one solo race and sequences.'], 'bib_v4_global_batch_plan_invalid' => ['fr' => 'Sélection invalide : choisissez au moins une épreuve solo et des séquences.', 'en' => 'Invalid selection: pick at least one solo race and sequences.'],
'bib_v4_global_batch_need_two' => ['fr' => "L'assignation globale nécessite au moins deux épreuves solo avec des séquences disponibles.", 'en' => 'Global assignment requires at least two solo races with available sequences.'], 'bib_v4_global_batch_need_two' => ['fr' => "L'assignation globale nécessite au moins deux épreuves solo avec des séquences disponibles.", 'en' => 'Global assignment requires at least two solo races with available sequences.'],
'bib_v4_event_config_title' => ['fr' => "Configuration globale pour l'assignation de dossard", 'en' => 'Global bib assignment settings'], 'bib_v4_event_config_title' => ['fr' => "Configuration globale pour l'assignation de dossard", 'en' => 'Global bib assignment settings'],
'bib_v4_event_config_inter_epr_on' => ['fr' => 'Inter épreuve', 'en' => 'Inter-race'],
'bib_v4_qty_summary_title' => ['fr' => 'Sommaire des quantités', 'en' => 'Quantity summary'], 'bib_v4_qty_summary_title' => ['fr' => 'Sommaire des quantités', 'en' => 'Quantity summary'],
'bib_v4_qty_summary_a_assigner' => ['fr' => 'À assigner', 'en' => 'To assign'], 'bib_v4_qty_summary_a_assigner' => ['fr' => 'À assigner', 'en' => 'To assign'],
'bib_v4_qty_summary_bib_restant' => ['fr' => 'Dossards restants', 'en' => 'Bibs remaining'], 'bib_v4_qty_summary_bib_restant' => ['fr' => 'Dossards restants', 'en' => 'Bibs remaining'],
@ -5147,9 +5148,22 @@ function renderBibEventConfigPanelContent($int_eve_id) {
return ob_get_clean(); return ob_get_clean();
} }
/** MSIN-4424 — Pastille en-tête quand l'option inter-épreuves est active. */
function renderBibEventConfigHeaderNote($blnAllow) {
$strLabel = fxBibTexte('bib_v4_event_config_inter_epr_on', 0);
return '<span class="epr-header-summary bib-event-config-note'
. fxBibUiHiddenClass((bool)$blnAllow)
. '" data-bib-inter-epr-note="1"'
. ' title="' . fxBibEsc(fxBibTexte('bib_v4_allow_inter_epr', 0)) . '">'
. fxBibEsc($strLabel)
. '</span>';
}
/** MSIN-4424 — Panneau repliable : configuration globale assignation dossards (événement). */ /** MSIN-4424 — Panneau repliable : configuration globale assignation dossards (événement). */
function renderBibEventConfigPanel($int_eve_id, $strLangue = 'fr') { function renderBibEventConfigPanel($int_eve_id, $strLangue = 'fr') {
$int_eve_id = (int)$int_eve_id; $int_eve_id = (int)$int_eve_id;
$blnAllow = fxBibEventAllowsInterEprDuplicates($int_eve_id);
ob_start(); ob_start();
?> ?>
@ -5161,7 +5175,10 @@ function renderBibEventConfigPanel($int_eve_id, $strLangue = 'fr') {
<?php echo fxBibEsc(fxBibTexte('bib_v4_event_config_title', 0)); ?> <?php echo fxBibEsc(fxBibTexte('bib_v4_event_config_title', 0)); ?>
<?php echo fxBibAideButton('bib_v4_event_config_title'); ?> <?php echo fxBibAideButton('bib_v4_event_config_title'); ?>
</span> </span>
<?php echo fxBibBlockCollapseToggle($strLangue, true); ?> <span class="bib-event-config-header-actions">
<?php echo renderBibEventConfigHeaderNote($blnAllow); ?>
<?php echo fxBibBlockCollapseToggle($strLangue, true); ?>
</span>
</div> </div>
<div class="epr-content bib-event-config-content"> <div class="epr-content bib-event-config-content">
<?php echo renderBibEventConfigPanelContent($int_eve_id); ?> <?php echo renderBibEventConfigPanelContent($int_eve_id); ?>

View File

@ -7,7 +7,7 @@
* Constantes * * Constantes *
* *
**************/ **************/
define('_VERSION_CODE', '4.72.751'); define('_VERSION_CODE', '4.72.754');
define('_DATE_CODE', '2026-07-08'); define('_DATE_CODE', '2026-07-08');
//MSIN-4290 //MSIN-4290
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe'); define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');

View File

@ -34,6 +34,14 @@ SELECT 'bib_v4_anomalies_inter_epr_dupes_title', 'fr', 'Dossards en double entre
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_inter_epr_dupes_title' AND info_langue = 'fr' AND info_prg = 'compte.php'); FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_anomalies_inter_epr_dupes_title' AND info_langue = 'fr' AND info_prg = 'compte.php');
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
SELECT 'bib_v4_event_config_inter_epr_on', 'fr', 'Inter épreuve', 'Indique que les mêmes numéros de dossard sont autorisés entre épreuves.', 'compte.php', '', 0, 1, '', '', '', NOW()
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_event_config_inter_epr_on' AND info_langue = 'fr' AND info_prg = 'compte.php');
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
SELECT 'bib_v4_event_config_inter_epr_on', 'en', 'Inter-race', 'Indicates that the same bib numbers are allowed across races.', 'compte.php', '', 0, 1, '', '', '', NOW()
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_event_config_inter_epr_on' AND info_langue = 'en' AND info_prg = 'compte.php');
INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation) INSERT INTO info (info_clef, info_langue, info_texte, info_aide, info_prg, info_description, info_trie, info_actif, info_option1, info_option2, info_option3, info_creation)
SELECT 'bib_v4_event_config_title', 'fr', 'Configuration globale pour l''assignation de dossard', 'Réglages applicables à tout l''événement (ex. autorisation des mêmes numéros entre épreuves).', 'compte.php', '', 0, 1, '', '', '', NOW() SELECT 'bib_v4_event_config_title', 'fr', 'Configuration globale pour l''assignation de dossard', 'Réglages applicables à tout l''événement (ex. autorisation des mêmes numéros entre épreuves).', 'compte.php', '', 0, 1, '', '', '', NOW()
FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_event_config_title' AND info_langue = 'fr' AND info_prg = 'compte.php'); FROM DUAL WHERE NOT EXISTS (SELECT 1 FROM info WHERE info_clef = 'bib_v4_event_config_title' AND info_langue = 'fr' AND info_prg = 'compte.php');