diff --git a/admin/src/components/DatePicker/index.tsx b/admin/src/components/DatePicker/index.tsx index b35fe66f..f02e9cb9 100644 --- a/admin/src/components/DatePicker/index.tsx +++ b/admin/src/components/DatePicker/index.tsx @@ -2,10 +2,11 @@ import { ChangeEvent } from "react"; interface DatePickerProps { date: string; + disabled?: boolean; onChangeDate: (date: string) => void; } -export default function DatePicker({ date, onChangeDate }: DatePickerProps) { +export default function DatePicker({ date, disabled = false, onChangeDate }: DatePickerProps) { const handleChange = (e: ChangeEvent) => { onChangeDate(e.target.value); }; @@ -17,6 +18,7 @@ export default function DatePicker({ date, onChangeDate }: DatePickerProps) { void; } -export default function TimePicker({ time, onChangeTime }: TimePickerProps) { +export default function TimePicker({ time, disabled = false, onChangeTime }: TimePickerProps) { const handleChange = (e: ChangeEvent) => { onChangeTime(e.target.value); }; @@ -31,6 +32,7 @@ export default function TimePicker({ time, onChangeTime }: TimePickerProps) { { return rushList.map((item, idx) => { + const canEdit = item.status !== EVENT_STATUS.BEFORE; return [ item.rushEventId, handleChangeItem("eventDate", idx, date)} />, handleChangeItem("openTime", idx, time)} />, handleChangeItem("closeTime", idx, time)} />, getTimeDifference(item.openTime, item.closeTime), , ,
handleChangeItem("winnerCount", idx, parseInt(e.target.value) || 0)