Allow meeting planner polls with a single date/time option

Bunker Admin
This commit is contained in:
bunker-admin 2026-03-01 18:47:26 -07:00
parent e95bc8883e
commit 92dc0448ac
2 changed files with 2 additions and 3 deletions

View File

@ -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>

View File

@ -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({