From 1d995faf8e35c8db9d4e7fb77f6676e5e58e973d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20H=C3=A1jek?= <mikrop@centrum.cz>
Date: Wed, 15 Jan 2025 00:34:47 +0100
Subject: [PATCH] =?UTF-8?q?Odfiltrovat=20ze=20selectboxu=20pro=20v=C3=BDb?=
 =?UTF-8?q?=C4=9Br=20preferovan=C3=A9ho=20odchodu=20=C4=8Dasy=20z=20minulo?=
 =?UTF-8?q?sti?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 client/src/App.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/src/App.tsx b/client/src/App.tsx
index 6ab5167..c5cd8db 100644
--- a/client/src/App.tsx
+++ b/client/src/App.tsx
@@ -20,7 +20,7 @@ import { faChainBroken, faChevronLeft, faChevronRight, faGear, faSatelliteDish,
 import Loader from './components/Loader';
 import { getData, errorHandler, getQrUrl } from './api/Api';
 import { addChoice, removeChoices, removeChoice, changeDepartureTime, jdemeObed, updateNote } from './api/FoodApi';
-import { getHumanDateTime } from './Utils';
+import { getHumanDateTime, isInTheFuture } from './Utils';
 import NoteModal from './components/modals/NoteModal';
 import { useEasterEgg } from './context/eggs';
 import { getImage } from './api/EasterEggApi';
@@ -446,7 +446,9 @@ function App() {
                   <p style={{ marginTop: "10px" }}>V kolik hodin preferuješ odchod?</p>
                   <Form.Select ref={departureChoiceRef} onChange={handleChangeDepartureTime}>
                     <option></option>
-                    {Object.values(DepartureTime).map(time => <option key={time} value={time}>{time}</option>)}
+                    {Object.values(DepartureTime)
+                        .filter(time => isInTheFuture(time))
+                        .map(time => <option key={time} value={time}>{time}</option>)}
                   </Form.Select>
                 </>}
               </>}