Allow meeting planner polls with a single date/time option
Bunker Admin
This commit is contained in:
parent
e95bc8883e
commit
92dc0448ac
@ -449,7 +449,6 @@ export default function MeetingPlannerPage() {
|
||||
notifyOnVote: true,
|
||||
options: [
|
||||
{ date: null, startTime: null, endTime: null },
|
||||
{ date: null, startTime: null, endTime: null },
|
||||
],
|
||||
}}
|
||||
>
|
||||
@ -487,7 +486,7 @@ export default function MeetingPlannerPage() {
|
||||
</Space>
|
||||
</Col>
|
||||
<Col>
|
||||
{fields.length > 2 && (
|
||||
{fields.length > 1 && (
|
||||
<Button size="small" danger icon={<DeleteOutlined />} onClick={() => remove(name)} />
|
||||
)}
|
||||
</Col>
|
||||
|
||||
@ -13,7 +13,7 @@ export const createPollSchema = z.object({
|
||||
date: z.string().regex(/^\d{4}-\d{2}-\d{2}$/, 'Date must be YYYY-MM-DD'),
|
||||
startTime: z.string().regex(/^\d{2}:\d{2}$/, 'Start time must be HH:MM'),
|
||||
endTime: z.string().regex(/^\d{2}:\d{2}$/, 'End time must be HH:MM'),
|
||||
})).min(2, 'At least 2 options required').max(20, 'Maximum 20 options'),
|
||||
})).min(1, 'At least 1 option required').max(20, 'Maximum 20 options'),
|
||||
});
|
||||
|
||||
export const updatePollSchema = z.object({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user