|
|
|
|
@ -63,6 +63,27 @@ function fxInscrGestionCanDo($intComId, $intEveId, $strActionPerm) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Badge cadenas (mode inspecteur super admin) sur la fiche de gestion. */
|
|
|
|
|
function fxInscrGestionPermInspectEcho($strPermKey) {
|
|
|
|
|
if (!function_exists('fxAdminPermInspectModeActive') || !fxAdminPermInspectModeActive()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fxInscrGestionLoadEveAcces();
|
|
|
|
|
echo ' ' . fxEveAccesPermInspectBadge($strPermKey, 'inscr_gestion');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** Badge + libelle pour un controle masque par les droits (mode inspecteur). */
|
|
|
|
|
function fxInscrGestionPermInspectEchoHidden($strPermKey, $strLabel) {
|
|
|
|
|
if (!function_exists('fxAdminPermInspectModeActive') || !fxAdminPermInspectModeActive()) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
fxInscrGestionLoadEveAcces();
|
|
|
|
|
echo '<span class="ms1-perm-inspect-slot">';
|
|
|
|
|
echo fxEveAccesPermInspectBadge($strPermKey, 'inscr_gestion');
|
|
|
|
|
echo ' <span class="text-muted small">' . fxInscrGestionEsc($strLabel) . '</span>';
|
|
|
|
|
echo '</span> ';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function fxInscrGestionLoadEveAcces() {
|
|
|
|
|
require_once __DIR__ . '/inc_fx_eve_acces.php';
|
|
|
|
|
}
|
|
|
|
|
@ -1365,6 +1386,7 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
$blnCanRefund = fxInscrGestionCanDo($intComId, $intRowEveId, 'inscriptions_gestion.refund');
|
|
|
|
|
$blnHasEditable = ($blnCanStatut || $blnCanBib || $blnCanRemis);
|
|
|
|
|
$blnHasGestion = ($blnCanEdit || $blnCanCancel || $blnCanRestore || $blnCanRefund);
|
|
|
|
|
$blnInspect = function_exists('fxAdminPermInspectModeActive') && fxAdminPermInspectModeActive();
|
|
|
|
|
|
|
|
|
|
$strListUrl = fxInscrGestionBuildUrl($strBaseUrl, $intEveId, $arrReq, array('pec_id' => null, 'pg' => $arrReq['pg']));
|
|
|
|
|
$strEveCode = fxGetEvenementsUrl($arrRow['eve_id']);
|
|
|
|
|
@ -1429,7 +1451,7 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
// Libelle du bouton de renvoi (facture/invitation) : passe par la table info pour etre editable.
|
|
|
|
|
$strRenvoi = fxInscrGestionT('inscr_gestion_renvoi');
|
|
|
|
|
|
|
|
|
|
if ($blnHasGestion) {
|
|
|
|
|
if ($blnHasGestion || $blnInspect) {
|
|
|
|
|
fxInscrGestionRenderFicheSectionStart('gestion', fxInscrGestionT('inscr_gestion_section_management'), 'fa-cog', !$blnFromQr);
|
|
|
|
|
echo '<div class="inscr-gestion-gestion-actions">';
|
|
|
|
|
// Libelle devant le bouton facture (numero de commande) — invite a afficher la facture.
|
|
|
|
|
@ -1448,6 +1470,9 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
. ' id="modifier_fiche" data-eve_code="' . fxInscrGestionEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_modifier_participant')) . '</button>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.edit');
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.edit', fxInscrGestionT('inscr_gestion_modifier_participant'));
|
|
|
|
|
}
|
|
|
|
|
if ($blnCanRefund) {
|
|
|
|
|
// Bouton bascule : ouvre/ferme le panneau de remboursement et declenche le chargement AJAX du formulaire.
|
|
|
|
|
@ -1457,18 +1482,27 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
. ' data-eve_id="' . (int)$intRowEveId . '"'
|
|
|
|
|
. ' data-refund-target="#inscr-gestion-refund-panel"'
|
|
|
|
|
. ' aria-expanded="false">' . fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_remboursement')) . '</button>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.refund');
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.refund', fxInscrGestionT('inscr_gestion_remboursement'));
|
|
|
|
|
}
|
|
|
|
|
if ($blnCanCancel) {
|
|
|
|
|
echo '<button class="btn btn-secondary btn-sm rounded-0 btn_cancel_event_promo' . $strStyleCancel . '" type="button"'
|
|
|
|
|
. ' id="annuler_fiche" data-eve_code="' . fxInscrGestionEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrGestionEsc(fxInscrGestionT('btn_annulerinscriptions')) . '</button>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.cancel');
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.cancel', fxInscrGestionT('btn_annulerinscriptions'));
|
|
|
|
|
}
|
|
|
|
|
if ($blnCanRestore) {
|
|
|
|
|
echo '<button class="btn btn-secondary btn-sm rounded-0 btn_retablir_event_promo' . $strStyleRetablir . '" type="button"'
|
|
|
|
|
. ' id="retablir_fiche" data-eve_code="' . fxInscrGestionEsc($strEveCode) . '"'
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '" data-eve_id="' . (int)$arrRow['eve_id'] . '"'
|
|
|
|
|
. ' value="' . (int)$arrRow['pec_id_original'] . '">' . fxInscrGestionEsc(fxInscrGestionT('btn_retablirinscriptions')) . '</button>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.restore');
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.restore', fxInscrGestionT('btn_retablirinscriptions'));
|
|
|
|
|
}
|
|
|
|
|
// RENVOI place en dernier (MSIN-4403) : retourne la confirmation au participant.
|
|
|
|
|
echo '<button class="btn btn-primary btn-sm rounded-0 link_confirmation" type="button"'
|
|
|
|
|
@ -1492,7 +1526,7 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
fxInscrGestionRenderFicheSectionEnd();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($blnHasEditable) {
|
|
|
|
|
if ($blnHasEditable || $blnInspect) {
|
|
|
|
|
fxInscrGestionRenderFicheSectionStart('editable', fxInscrGestionT('inscr_gestion_section_editable'), 'fa-pencil-square-o', true);
|
|
|
|
|
|
|
|
|
|
if ($blnCanBib) {
|
|
|
|
|
@ -1520,15 +1554,21 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
. ' data-epr_id="' . (int)$arrRow['epr_id'] . '"'
|
|
|
|
|
. ' data-par_id="' . (int)$intParId . '"'
|
|
|
|
|
. ' data-pec_id="' . (int)$arrRow['pec_id_original'] . '">OK</button>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.bib_edit');
|
|
|
|
|
echo '</div>';
|
|
|
|
|
echo '</div>';
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.bib_edit', fxInscrGestionT('promoteur_bib_number'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($blnCanStatut) {
|
|
|
|
|
echo '<div class="inscr-gestion-field-block inscr-gestion-field-block--statut" data-inscr-field="statut">';
|
|
|
|
|
echo '<div class="inscr-gestion-field-block__label">' . fxInscrGestionEsc(fxInscrGestionT('inscr_gestion_statut_label')) . '</div>';
|
|
|
|
|
fxInscrGestionRenderStatutField($intParId, $arrRow['par_statut_course'] ?? '', $arrRow['eve_id'], $strLangue);
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.statut_edit');
|
|
|
|
|
echo '</div>';
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.statut_edit', fxInscrGestionT('inscr_gestion_statut_label'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$strRemisDate = trim((string)$arrRow['no_bib_remis_date']);
|
|
|
|
|
@ -1556,6 +1596,9 @@ function fxInscrGestionRenderFiche($intEveId, $strLangue, $strBaseUrl, $arrReq,
|
|
|
|
|
}
|
|
|
|
|
echo '<span id="par_' . (int)$intParId . '">' . fxInscrGestionEsc($strRemisPar) . '</span>';
|
|
|
|
|
echo '</div></div></div>';
|
|
|
|
|
fxInscrGestionPermInspectEcho('inscriptions_gestion.bib_remis');
|
|
|
|
|
} elseif ($blnInspect) {
|
|
|
|
|
fxInscrGestionPermInspectEchoHidden('inscriptions_gestion.bib_remis', fxInscrGestionT('promoteur_bib_enregistre'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fxInscrGestionRenderFicheSectionEnd();
|
|
|
|
|
|