Update ChronoTrack API entry wipe functionality and enhance user feedback

This commit modifies the entry wipe functionality in the ChronoTrack API admin interface. The wipe button is now disabled when there are no entries to delete, and the confirmation prompt has been updated to clarify the action's scope. Additionally, the API response for the wipe action now returns a warning state when no entries are found, providing clearer messaging about the visibility of entries. These changes aim to improve user experience and ensure accurate communication regarding entry management.
This commit is contained in:
2026-07-03 12:16:48 -04:00
parent 88f0e8138e
commit 3a0161a0bb
2 changed files with 18 additions and 9 deletions

View File

@ -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,