diff --git a/php/chronotrack_api/fx_chronotrack_admin.php b/php/chronotrack_api/fx_chronotrack_admin.php index e1b241a..ae5a040 100644 --- a/php/chronotrack_api/fx_chronotrack_admin.php +++ b/php/chronotrack_api/fx_chronotrack_admin.php @@ -101,18 +101,37 @@ function fxChronotrackApiAdminRenderEventPage($intEveId, $strLangue = 'fr', $bln fxChronotrackApiAdminRenderEventLinkPicker($blnClosed); } - if ($arrConfig !== null) { - fxChronotrackApiAdminRenderStatusActions($intEveId, $strStatus, $blnEventLinked); - } - - if ($arrConfig !== null) { - fxChronotrackApiAdminRenderRaceMapping($intEveId, $arrConfig, $strLangue, $blnClosed, $blnEventLinked); - } - + // Sync d’abord (usage courant) ; config repliable ensuite. MSIN-4328 if ($arrConfig !== null && $blnEventLinked && $blnConfigured) { fxChronotrackApiAdminRenderPushPanel($intEveId, $blnClosed); } + if ($arrConfig !== null && $blnEventLinked) { + $blnHasSavedMapping = false; + $arrMapRows = fxChronotrackApiRaceMapGetForEvent($intEveId); + foreach ($arrMapRows as $arrMapRow) { + if (intval($arrMapRow['ct_race_id'] ?? 0) > 0) { + $blnHasSavedMapping = true; + break; + } + } + $strConfigExpanded = $blnHasSavedMapping ? '' : ' show'; + echo '
Activer avant la course ; Terminer après la course pour bloquer la sync auto et les changements de config.
'; + echo 'Activer avant la course ; Terminer après pour bloquer la sync auto ' + . 'et les changements de config. (La sync auto différentielle viendra ensuite.)
'; echo 'Aucune épreuve MS1 pour cet événement.
Push manuel · External ID = par_id_original · Pas de sync auto.
Push différentiel MS1 → ChronoTrack '
+ . '(nouveaux / modifiés depuis le dernier push OK). External ID = par_id_original.
Utilise les credentials MS1 déjà configurés (OAuth en cache). ';
- echo 'Sonde event/{id}/race, entry (5 premières inscriptions), ';
- echo 'event et reg_choice. Copie le rapport pour le développement.
Outils de support (credentials MS1 / OAuth en cache). ' + . 'Pas nécessaire pour une course en production.
'; echo ' '; + echo ' '; echo ''; - echo '