';
- echo ' ';
- echo 'Supprime toutes les entries CT de cet événement (MS1 intact).';
+ echo ' ';
+ echo '';
+ echo 'DELETE /api/entry/{id} — doc CT : une entry à la fois, seulement celles visibles par ';
+ echo 'GET event/{id}/entry. Import manuel CT ou autre événement : pas effaçable ici. ';
+ echo 'MS1 intact.';
echo '
';
echo '';
echo '';
@@ -751,13 +754,16 @@ function fxChronotrackApiAdminRenderPageScript($intEveId, $arrConfig, $blnClosed
$sum.html(html);
renderBlockedPanel(res);
$btn.prop('disabled', intTransfer <= 0);
+ $('#ct_api_btn_ct_wipe').prop('disabled', intCtTotal <= 0);
}
function renderPushResult(res, strTitle) {
var $res = $('#ct_api_push_result');
var strHeading = strTitle || 'Résultat du push';
var strClass = 'text-danger';
- if (res && (res.state === 'ok' || res.state === 'partial')) {
+ if (res && res.state === 'warning') {
+ strClass = 'text-warning';
+ } else if (res && (res.state === 'ok' || res.state === 'partial')) {
strClass = res.state === 'ok' ? 'text-success' : 'text-warning';
}
var strHtml = '
' + escHtml(strHeading) + ' — '
@@ -832,10 +838,11 @@ function fxChronotrackApiAdminRenderPageScript($intEveId, $arrConfig, $blnClosed
$('#ct_api_btn_ct_wipe').on('click', function () {
var intCtId = (objPushPreview && objPushPreview.ct_event_id) ? objPushPreview.ct_event_id : intLinkedCtEventId;
var intCtTotal = (objPushPreview && objPushPreview.ct_total) ? objPushPreview.ct_total : 0;
- var strConfirm = 'SUPPRIMER toutes les inscriptions ChronoTrack Live de cet événement ?\n\n';
+ var strConfirm = 'Supprimer via l\'API ChronoTrack toutes les entries listées par GET ?\n\n';
strConfirm += 'Event CT ID : ' + intCtId + '\n';
- strConfirm += 'Entries actuelles : ' + intCtTotal + '\n\n';
- strConfirm += 'Irréversible côté ChronoTrack. MS1 ne sera pas modifié.';
+ strConfirm += 'Entries visibles par l\'API : ' + intCtTotal + '\n\n';
+ strConfirm += 'Ne supprime PAS les inscrits visibles seulement dans l\'interface CT (import manuel, autre event).\n';
+ strConfirm += 'MS1 ne sera pas modifié.';
if (!window.confirm(strConfirm)) {
return;
}
diff --git a/php/chronotrack_api/fx_chronotrack_sync.php b/php/chronotrack_api/fx_chronotrack_sync.php
index 3c95851..3a2b89d 100644
--- a/php/chronotrack_api/fx_chronotrack_sync.php
+++ b/php/chronotrack_api/fx_chronotrack_sync.php
@@ -686,9 +686,11 @@ function fxChronotrackApiSyncWipeCtEvent($intEveId) {
if ($intFoundBefore === 0) {
return array(
- 'state' => 'ok',
+ 'state' => 'warning',
'message' => 'L\'API ne voit aucune entry pour l\'événement CT #' . $intCtEventId
- . '. Si des inscrits apparaissent encore dans l\'interface ChronoTrack, vérifiez que c\'est le même événement (ID).',
+ . '. Rien n\'a été supprimé. Si des inscrits apparaissent dans l\'interface ChronoTrack, '
+ . 'ils ne sont probablement pas accessibles via GET event/' . $intCtEventId . '/entry '
+ . '(import manuel, autre événement, ou compte API différent). Effacement manuel dans CT Live requis.',
'ct_event_id' => $intCtEventId,
'found_before' => 0,
'deleted_ok' => 0,