diff --git a/frontend/src/pages/TimeClockPage.jsx b/frontend/src/pages/TimeClockPage.jsx index ecd0f1c..7ee33e0 100644 --- a/frontend/src/pages/TimeClockPage.jsx +++ b/frontend/src/pages/TimeClockPage.jsx @@ -1378,10 +1378,18 @@ const TimeClockPage = () => { scanConflict.scanTime; } - await timeApi.scanTimeEntry(scanConflict.code, options); + const resolutionResponse = await timeApi.scanTimeEntry(scanConflict.code, options); resolved = true; - // La résolution ne rejoue pas le scan qui a déclenché le conflit. + // complete_missing_entry renseigne l'entrée et applique déjà la sortie scannée. + if (scanConflict.type === 'missing_entry') { + setScanMessage(resolutionResponse.message || 'Sortie enregistrée.'); + setScanConflict(null); + await loadTimeEntries(); + return; + } + + // Les autres conflits nécessitent un nouveau pointage après résolution. const scanOptions = {}; if (scanConflict.scanDate) { scanOptions.scan_date = scanConflict.scanDate;