From 3b6d99c825edf8cc22b8324602618a0f963b8a2e Mon Sep 17 00:00:00 2001 From: Louis Mazin Date: Tue, 15 Sep 2026 19:51:06 +0200 Subject: [PATCH] nice --- frontend/src/pages/TimeClockPage.css | 1 + frontend/src/pages/TimeClockPage.jsx | 120 +++++++++++++++++---------- 2 files changed, 78 insertions(+), 43 deletions(-) diff --git a/frontend/src/pages/TimeClockPage.css b/frontend/src/pages/TimeClockPage.css index 2758bcd..759d96a 100644 --- a/frontend/src/pages/TimeClockPage.css +++ b/frontend/src/pages/TimeClockPage.css @@ -90,6 +90,7 @@ .time-entry-form { background-color: #f8f9fa; padding: 20px; + border: 1px solid var(--accent); border-radius: 8px; margin: 20px 0; } diff --git a/frontend/src/pages/TimeClockPage.jsx b/frontend/src/pages/TimeClockPage.jsx index cd74f67..ab2befa 100644 --- a/frontend/src/pages/TimeClockPage.jsx +++ b/frontend/src/pages/TimeClockPage.jsx @@ -256,13 +256,6 @@ const TimeClockPage = () => { )} - {scanResult && ( -
- QR code détecté : {scanResult} - Le pointage sera relié à votre session dans la prochaine étape. -
- )} - {/* Time tracking section */}
@@ -271,42 +264,83 @@ const TimeClockPage = () => {

Heure actuelle: {currentTime.toLocaleTimeString('fr-FR')}

- {/* Add new entry form */} - {isAdmin && ( -
-

Ajouter un pointage manuel

-
-
- - setNewEntry({...newEntry, date: e.target.value})} - required - /> -
-
- - setNewEntry({...newEntry, start_time: e.target.value})} - required - /> -
-
- - setNewEntry({...newEntry, end_time: e.target.value})} - required - /> -
- -
-
- )} + { (isAdmin && editingEntry) ? + ( +
+

Modifier le pointage du {formatDate(editingEntry.date)}

+
+
+ + setEditForm({ ...editForm, start_time: e.target.value })} + required + /> +
+
+ + setEditForm({ ...editForm, end_time: e.target.value })} + required + /> +
+
+ + +
+
+
+ ) + : + ( +
+ {isAdmin && + ( +
+

Ajouter un pointage manuel

+
+
+ + setNewEntry({...newEntry, date: e.target.value})} + required + /> +
+
+ + setNewEntry({...newEntry, start_time: e.target.value})} + required + /> +
+
+ + setNewEntry({...newEntry, end_time: e.target.value})} + required + /> +
+ +
+
+ ) + } +
+ ) + } {/* Time entries list */}