From 09ba3aabe5f51b54839c965bf840feabb0a1b90a Mon Sep 17 00:00:00 2001 From: ponchimeow Date: Wed, 15 Nov 2023 12:25:56 +0800 Subject: [PATCH] fix: limit amount when reservation type is hour --- src/components/appointment/AppointmentPlanBasicForm.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/appointment/AppointmentPlanBasicForm.tsx b/src/components/appointment/AppointmentPlanBasicForm.tsx index a90781ec3..fdb86e958 100644 --- a/src/components/appointment/AppointmentPlanBasicForm.tsx +++ b/src/components/appointment/AppointmentPlanBasicForm.tsx @@ -83,6 +83,7 @@ const AppointmentPlanBasicForm: React.FC<{ const [meetGenerationMethod, setMeetGenerationMethod] = useState<'manual' | 'auto'>( appointmentPlanAdmin?.meetGenerationMethod as 'auto' | 'manual', ) + const [reservationType, setReservationType] = useState(appointmentPlanAdmin?.reservationType as ReservationType) if (!appointmentPlanAdmin) { return @@ -183,7 +184,7 @@ const AppointmentPlanBasicForm: React.FC<{ }, ]} > - + - setReservationType(v as 'hour' | 'day')}> {formatMessage(messages.hoursAgo)}