diff --git a/frontend/src/pages/TimeClockPage.jsx b/frontend/src/pages/TimeClockPage.jsx index 15a75d9..435b80b 100644 --- a/frontend/src/pages/TimeClockPage.jsx +++ b/frontend/src/pages/TimeClockPage.jsx @@ -13,6 +13,7 @@ import { import { Label } from '@/components/ui/label'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; + import { Alert, AlertDescription, @@ -60,9 +61,11 @@ const getTodayValue = () => { const date = new Date(); const year = date.getFullYear(); + const month = String( date.getMonth() + 1, ).padStart(2, '0'); + const day = String( date.getDate(), ).padStart(2, '0'); @@ -462,23 +465,14 @@ const TimePicker = ({ const touch = event.touches[0]; const currentY = touch.clientY; - // Distance parcourue depuis le dernier mouvement const deltaY = touchState.current.lastY - currentY; touchState.current.lastY = currentY; - // On accumule le déplacement touchState.current.accumulated += deltaY; - /* - * Distance nécessaire pour changer - * d'une unité. - * - * Plus petit = plus sensible - * Plus grand = plus lent - */ const pixelsPerUnit = 18; const steps = Math.trunc( @@ -490,7 +484,6 @@ const TimePicker = ({ return; } - // On retire uniquement les unités déjà consommées touchState.current.accumulated -= steps * pixelsPerUnit; @@ -556,7 +549,6 @@ const TimePicker = ({
@@ -3373,7 +3374,7 @@ const TimeClockPage = () => { )} au ${formatDate( entry.end_date, )} ?` - : 'Êtes-vous sûr de vouloir supprimer ce pointage ?' + : 'Êtes-vous sûr de vouloir supprimer le pointage ?' } onConfirm={() => handleDeleteEntry( @@ -3422,5 +3423,4 @@ const TimeClockPage = () => { ); }; - export default TimeClockPage; \ No newline at end of file