This commit is contained in:
Louis Mazin 2026-09-25 16:54:01 +02:00
parent 30eab16473
commit 0fd446fc24

View File

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