MSIN-4451 — Add participant count under the "entries sold" KPI in the promoteur hub. Introduce new CSS styles for displaying participant information and update SQL queries to calculate unique participants. Increment version code to 4.72.834.
This commit is contained in:
@ -553,6 +553,7 @@ function fxPromoteurHubStaticFallback($clef, $strLangParam = '')
|
||||
'promoteur_hub_menu_features' => array('fr' => 'Menu des fonctionnalités', 'en' => 'Features menu'),
|
||||
// MSIN-4451 — total = somme des inscriptions par épreuve (pas d'humains uniques)
|
||||
'promoteur_hub_flash_inscrits' => array('fr' => 'épreuves vendues', 'en' => 'entries sold'),
|
||||
'promoteur_hub_flash_participants' => array('fr' => 'participants', 'en' => 'participants'),
|
||||
'promoteur_hub_flash_rempli' => array('fr' => 'rempli', 'en' => 'filled'),
|
||||
'promoteur_hub_flash_places' => array('fr' => 'places restantes', 'en' => 'spots left'),
|
||||
'promoteur_hub_flash_revenus' => array('fr' => 'revenus est.', 'en' => 'est. revenue'),
|
||||
@ -979,6 +980,26 @@ function fxPromoteurHubGetEpreuveStats($intEveId, $strLangue = 'fr')
|
||||
}
|
||||
}
|
||||
|
||||
// MSIN-4451 — Humains uniques (même personne sur 2 épreuves = 1).
|
||||
// Clé : courriel normalisé ; sans courriel → par_id_original (pas de fusion).
|
||||
$intFlashParticipants = 0;
|
||||
$sqlParticipants = "
|
||||
SELECT COUNT(DISTINCT
|
||||
CASE
|
||||
WHEN TRIM(IFNULL(p.par_courriel, '')) <> '' THEN LOWER(TRIM(p.par_courriel))
|
||||
ELSE CONCAT('id:', p.par_id_original)
|
||||
END
|
||||
) AS nb
|
||||
FROM resultats_epreuves_commandees e
|
||||
JOIN resultats_participants p
|
||||
ON p.epr_id = e.epr_id AND p.pec_id = e.pec_id_original
|
||||
WHERE p.is_cancelled = 0 AND p.epr_id IN (" . $strIds . ")
|
||||
";
|
||||
$tabParticipants = $objDatabase->fxGetResults($sqlParticipants);
|
||||
if (is_array($tabParticipants) && isset($tabParticipants[1]['nb'])) {
|
||||
$intFlashParticipants = intval($tabParticipants[1]['nb']);
|
||||
}
|
||||
|
||||
// ---- Check-in (dossards remis) ----
|
||||
$arrCheckin = array();
|
||||
$sqlCheckin = "
|
||||
@ -1184,6 +1205,7 @@ function fxPromoteurHubGetEpreuveStats($intEveId, $strLangue = 'fr')
|
||||
|
||||
$arrFlash = array(
|
||||
'total_vendus' => $intFlashVendus,
|
||||
'total_participants' => $intFlashParticipants,
|
||||
'total_max' => $intFlashMax,
|
||||
'total_restant' => max(0, $intFlashMax - $intFlashVendus),
|
||||
'pct_global' => $intPctGlobal,
|
||||
@ -1214,9 +1236,14 @@ function fxPromoteurHubRenderFlash($arrStats, $strLangue = 'fr')
|
||||
// ---- Bande flash ----
|
||||
$html .= '<div class="promoteur-hub-flash">';
|
||||
|
||||
// MSIN-4451 — Duo : épreuves vendues (KPI) + participants uniques (sous-ligne)
|
||||
$html .= '<div class="phub-flash-item phub-flash-main">';
|
||||
$html .= '<span class="phub-flash-num">' . intval($arrFlash['total_vendus']) . '</span>';
|
||||
$html .= '<span class="phub-flash-lbl">' . fxPromoteurHubEsc(fxPromoteurHubTexte('promoteur_hub_flash_inscrits', 0)) . '</span>';
|
||||
$html .= '<span class="phub-flash-sub">'
|
||||
. intval($arrFlash['total_participants']) . ' '
|
||||
. fxPromoteurHubEsc(fxPromoteurHubTexte('promoteur_hub_flash_participants', 0))
|
||||
. '</span>';
|
||||
$html .= '</div>';
|
||||
|
||||
if (intval($arrFlash['total_max']) > 0) {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Constantes *
|
||||
*
|
||||
**************/
|
||||
define('_VERSION_CODE', '4.72.833');
|
||||
define('_VERSION_CODE', '4.72.834');
|
||||
define('_DATE_CODE', '2026-07-16');
|
||||
//MSIN-4290
|
||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||
|
||||
Reference in New Issue
Block a user