Add new functionality for managing event V2 in promoteur panel
This commit introduces a new section in the promoteur panel for managing event V2, including a dedicated function to display event details and readonly quantities. The UI has been updated with new CSS styles for better layout and presentation. Additionally, a new navigation item has been added for accessing the V2 management interface. The version code has been incremented to 4.72.649 to reflect these changes.
This commit is contained in:
@ -720,6 +720,10 @@ require_once("inc_header.php");
|
||||
$blnBoutonRetour = false;
|
||||
include("inc_tableau_epreuves.php");
|
||||
break;
|
||||
case 'compte_inc_tableau_epreuves_v2':
|
||||
$blnBoutonRetour = false;
|
||||
include("inc_tableau_epreuves_v2.php");
|
||||
break;
|
||||
|
||||
case 'compte_inc_tableau_liste_attente':
|
||||
|
||||
|
||||
@ -1053,6 +1053,17 @@ ul.ms1-menu-compte li a:hover, ul.ms1-menu-compte li a:active {
|
||||
min-width:0;
|
||||
}
|
||||
|
||||
.epr-gestion-v2-list{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
gap:16px;
|
||||
padding:12px 0;
|
||||
}
|
||||
|
||||
.epr-gestion-v2-item .epr-header{
|
||||
margin-bottom:8px;
|
||||
}
|
||||
|
||||
.epr-gestion-panel{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
|
||||
50
inc_tableau_epreuves_v2.php
Normal file
50
inc_tableau_epreuves_v2.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
include_once("php/inc_fx_modifierinscriptions.php");
|
||||
include_once("php/inc_fx_memberships.php");
|
||||
include_once("php/inc_fx_promoteur.php");
|
||||
require_once('superadm/php/inc_manager.php');
|
||||
require_once('php/inc_fx_liste_attente.php');
|
||||
|
||||
global $objDatabase, $vDomaine, $strLangue;
|
||||
|
||||
if (!isset($_SESSION['usa_id'])) {
|
||||
header('Location: ' . $vDomaine . '/compte/inc_tableau_promoteur' . (!empty($_GET['promoteur_eve_id']) ? '?promoteur_eve_id=' . urlencode($_GET['promoteur_eve_id']) : ''));
|
||||
exit;
|
||||
}
|
||||
|
||||
$intEveId = 0;
|
||||
|
||||
if ($strLangue == 'fr') {
|
||||
$strPage = '/compte';
|
||||
} else {
|
||||
$strPage = '/account';
|
||||
}
|
||||
|
||||
if (isset($_GET['promoteur_eve_id'])) {
|
||||
$intEveId = base64_decode(urldecode($_GET['promoteur_eve_id']));
|
||||
}
|
||||
|
||||
?>
|
||||
<a class="btn btn-primary rounded-pill" id="link_back" href="<?php echo $vDomaine . $strPage . "/inc_tableau_promoteur?promoteur_eve_id=" . urlencode(base64_encode($intEveId)); ?>">
|
||||
<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>
|
||||
<?php afficheTexte('promoteur_back'); ?>
|
||||
</a>
|
||||
<br><br>
|
||||
<?php
|
||||
|
||||
if ($intEveId != 0) {
|
||||
echo fxShowGestionEpreuvesV2($intEveId, $strLangue);
|
||||
?>
|
||||
<a class="btn btn-primary rounded-pill mt-3" href="<?php echo $vDomaine . $strPage . "/inc_tableau_promoteur?promoteur_eve_id=" . urlencode(base64_encode($intEveId)); ?>">
|
||||
<i class="fa fa-chevron-left mr-2" aria-hidden="true"></i>
|
||||
<?php afficheTexte('promoteur_back'); ?>
|
||||
</a>
|
||||
<?php
|
||||
} else {
|
||||
if ($strLangue == 'fr') {
|
||||
echo "Une erreur quelconque est survenue.";
|
||||
} else {
|
||||
echo "A generic error occurred.";
|
||||
}
|
||||
}
|
||||
@ -218,9 +218,22 @@ if ($intEveId != 0) {
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
$strBibCode = $strPage;
|
||||
// afficher l'outil de no. equipe/no. dossard
|
||||
|
||||
if (isset($_SESSION['usa_id'])) {
|
||||
?>
|
||||
<li class="nav-item">
|
||||
<a class="nav-list"
|
||||
href="<?php echo $vDomaine; ?>/compte/inc_tableau_epreuves_v2?promoteur_eve_id=<?php echo urlencode(base64_encode($intEveId)); ?>&lng=<?php echo $strLangue; ?>">
|
||||
<i class="fa fa-pencil-square-o" aria-hidden="true"></i>
|
||||
<?php
|
||||
$strMenuEpreuvesV2 = afficheTexte('tableau_promoteur_menuepreuves_v2', 0, 0);
|
||||
echo (strpos($strMenuEpreuvesV2, '*tableau_promoteur_menuepreuves_v2*') !== false)
|
||||
? 'Gestion des épreuves V2'
|
||||
: $strMenuEpreuvesV2;
|
||||
?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
|
||||
$sqlQteLimitee = "SELECT eve_qte_modifiable FROM inscriptions_evenements WHERE eve_id = " . intval($intEveId);
|
||||
$qryQteLimitee = $objDatabase->fxGetVar($sqlQteLimitee);
|
||||
|
||||
@ -2999,6 +2999,55 @@ function renderBibAssignActions($tabBibAssignments, $strLangue, $infoBib, $blnAu
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Page promoteur — Gestion des épreuves V2 (rollout superadm).
|
||||
* Une carte par épreuve : quantités lecture seule + liste d'attente.
|
||||
*/
|
||||
function fxShowGestionEpreuvesV2($int_eve_id, $strLangue) {
|
||||
global $objDatabase;
|
||||
|
||||
$sqlEpreuves = "SELECT * FROM inscriptions_epreuves WHERE eve_id = " . intval($int_eve_id) . " AND epr_actif = 1 ORDER BY epr_id";
|
||||
$tabEpreuves = $objDatabase->fxGetResults($sqlEpreuves);
|
||||
|
||||
ob_start();
|
||||
?>
|
||||
<div class="card-header">
|
||||
<h2><?php
|
||||
$strTitre = afficheTexte('tableau_promoteur_menuepreuves_v2', 0, 0);
|
||||
echo fxBibEsc((strpos($strTitre, '*tableau_promoteur_menuepreuves_v2*') !== false) ? 'Gestion des épreuves V2' : $strTitre);
|
||||
?></h2>
|
||||
</div>
|
||||
|
||||
<div class="epr-gestion-v2-list">
|
||||
<?php for ($i = 1; $i <= count($tabEpreuves); $i++) {
|
||||
$tabEpreuve = $tabEpreuves[$i];
|
||||
$epr_id = (int)$tabEpreuve['epr_id'];
|
||||
?>
|
||||
<section class="epr-block epr-block-gestion epr-gestion-v2-item">
|
||||
<div class="epr-header">
|
||||
<span class="epr-header-label">
|
||||
<?php
|
||||
if (trim($tabEpreuve['epr_categorie_' . $strLangue]) != '') {
|
||||
echo fxBibEsc($tabEpreuve['epr_categorie_' . $strLangue]) . ' — ';
|
||||
}
|
||||
echo fxBibEsc($tabEpreuve['epr_type_' . $strLangue]);
|
||||
if (trim($tabEpreuve['epr_nom_' . $strLangue]) != '') {
|
||||
echo ' — ' . fxBibEsc($tabEpreuve['epr_nom_' . $strLangue]);
|
||||
}
|
||||
echo ' <span class="text-muted">(' . $epr_id . ')</span>';
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="epr-content">
|
||||
<?php echo renderBibGestionEpreuve($epr_id, (int)$int_eve_id, $strLangue); ?>
|
||||
</div>
|
||||
</section>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<?php
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
function fxShowBibTool4($str_code, $int_eve_id, $strLangue){
|
||||
global $objDatabase, $vDomaine;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Constantes *
|
||||
*
|
||||
**************/
|
||||
define('_VERSION_CODE', '4.72.648');
|
||||
define('_VERSION_CODE', '4.72.649');
|
||||
define('_DATE_CODE', '2026-06-17');
|
||||
//MSIN-4290
|
||||
define('QR_SECRET_KEY', 'ms1_qr_2026_cle_secrete_longue_et_fixe');
|
||||
|
||||
12
sql/MSIN-4379-menuepreuves-v2.sql
Normal file
12
sql/MSIN-4379-menuepreuves-v2.sql
Normal file
@ -0,0 +1,12 @@
|
||||
-- Libellé menu promoteur — Gestion des épreuves V2 (rollout superadm)
|
||||
DELETE FROM info WHERE info_clef = 'tableau_promoteur_menuepreuves_v2' 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) VALUES
|
||||
('tableau_promoteur_menuepreuves_v2', 'fr', 'Gestion des épreuves V2', 'Nouvelle interface en test — visible aux superadmins seulement.', 'compte.php', '', 0, 1, '', '', '', NOW()),
|
||||
('tableau_promoteur_menuepreuves_v2', 'en', 'Race management V2', 'New interface in testing — superadmins only.', 'compte.php', '', 0, 1, '', '', '', NOW());
|
||||
|
||||
-- Page compte (routing /compte/inc_tableau_epreuves_v2)
|
||||
DELETE FROM inscriptions_pages WHERE pag_code = 'compte_inc_tableau_epreuves_v2';
|
||||
|
||||
INSERT INTO inscriptions_pages (pag_code, pag_label_fr, pag_label_en, pag_titre_fr, pag_titre_en, pag_texte_fr, pag_texte_en, pag_keywords_fr, pag_keywords_en, pag_tri, pag_maj, pag_menu, pag_actif) VALUES
|
||||
('compte_inc_tableau_epreuves_v2', 'Gestion épreuves V2', 'Race mgmt V2', 'Gestion des épreuves V2', 'Race management V2', '', '', '', '', 0, NOW(), 0, 1);
|
||||
Reference in New Issue
Block a user