Skip to content

Commit

Permalink
Merge branch 'develop' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
aniku777tw committed Nov 16, 2023
2 parents 79042fa + 09ba3aa commit a63e320
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/appointment/AppointmentPlanBasicForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Skeleton active />
Expand Down Expand Up @@ -183,7 +184,7 @@ const AppointmentPlanBasicForm: React.FC<{
},
]}
>
<InputNumber min={0} />
<InputNumber min={1} max={reservationType === 'hour' ? 23 : undefined} />
</Form.Item>

<Form.Item
Expand All @@ -197,7 +198,7 @@ const AppointmentPlanBasicForm: React.FC<{
},
]}
>
<Select style={{ width: '150px' }}>
<Select style={{ width: '150px' }} onChange={v => setReservationType(v as 'hour' | 'day')}>
<Select.Option key="hour" value="hour">
{formatMessage(messages.hoursAgo)}
</Select.Option>
Expand Down

0 comments on commit a63e320

Please sign in to comment.