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 = ({
- {/* Sélection centrale */}
{/* HEURES */} @@ -680,6 +672,7 @@ const TimePicker = ({ ); }; + /* ========================================================= PAGE ========================================================= */ @@ -2461,16 +2454,20 @@ const TimeClockPage = () => { getScanConflictConfig(); return ( - + - + Pointage - + {/* IMPORTANT : + flex + flex-col + min-h-0 permettent à la grille + de récupérer la hauteur restante sur desktop. + Mobile garde le scroll global. */} + {/* ========================= ALERTES @@ -2479,7 +2476,7 @@ const TimeClockPage = () => { {error && ( {error} @@ -2489,7 +2486,7 @@ const TimeClockPage = () => { {cameraPermissionError && ( -
+
@@ -2711,13 +2708,13 @@ const TimeClockPage = () => { GESTION + HISTORIQUE ====================================================== */} -
+
{/* ================================================= COLONNE GAUCHE ================================================== */} -
+
{isAdmin && ( @@ -3176,9 +3173,9 @@ const TimeClockPage = () => { HISTORIQUE ================================================== */} -
+
- + @@ -3191,7 +3188,11 @@ const TimeClockPage = () => { - + {/* DESKTOP : SEUL CETTE ZONE SCROLLE + MOBILE : LE SCROLL EST GÉRÉ PAR LE CARD + PRINCIPAL */} + + {loading ? (

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