From e04d7b5d74bad12c30fb6d65df22e85113aa0994 Mon Sep 17 00:00:00 2001 From: darkdulgi Date: Thu, 22 Aug 2024 17:45:36 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EC=96=B4=EB=93=9C=EB=AF=BC=20=EC=84=A0?= =?UTF-8?q?=EC=B0=A9=EC=88=9C=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95/=EC=83=9D=EC=84=B1=EC=97=90=EC=84=9C=20=ED=98=84?= =?UTF-8?q?=EC=9E=AC=EB=82=A0=EC=A7=9C=EB=B3=B4=EB=8B=A4=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=84/=EA=B0=99=EC=9D=80=20=EB=82=A0=EC=A7=9C=EB=A1=9C=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=ED=95=98=EB=8A=94=20=EA=B2=83=EC=9D=84=20?= =?UTF-8?q?=EB=A7=89=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../features/eventEdit/FcfsInput/FcfsItemInput.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/adminPage/features/eventEdit/FcfsInput/FcfsItemInput.jsx b/src/adminPage/features/eventEdit/FcfsInput/FcfsItemInput.jsx index 836b142f..94825ca5 100644 --- a/src/adminPage/features/eventEdit/FcfsInput/FcfsItemInput.jsx +++ b/src/adminPage/features/eventEdit/FcfsInput/FcfsItemInput.jsx @@ -3,8 +3,9 @@ import { EventEditDispatchContext } from "../businessLogic/context.js"; import { Input } from "@admin/components/SmallInput.jsx"; import DateInput from "@admin/components/DateInput"; import DeleteButton from "@admin/components/DeleteButton"; -import { formatDate, padNumber } from "@common/utils.js"; +import { formatDate, padNumber, getDayDifference } from "@common/utils.js"; import fcfsInputGridStyle from "./tableStyle.js"; +import serverTimeStore from "@admin/serverTime/store.js"; const MINUTE = 60; @@ -34,9 +35,10 @@ function FcfsItemInput({ uniqueKey, date, start, end, participantCount, prizeInf ) : ( - dispatch({ type: "modify_fcfs_item", key: uniqueKey, value: { date } }) - } + setDate={(date) => { + if (getDayDifference(serverTimeStore.getState().serverTime, date) <= 0) return; + dispatch({ type: "modify_fcfs_item", key: uniqueKey, value: { date } }); + }} required size="4" />