fix(timeline): preserve date/precision/end across a fail(400)
preservedFormFields echoed back only title/type/description/pickers, and EventForm seeded dateIso/precision/endDateIso solely from `event` (undefined on /new). So a no-JS validation-error reload silently dropped the entire When-section the curator had entered, while every other field survived. Echo eventDate/precision/eventDateEnd in the fail payload and seed the date controls from `form` ahead of `event`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -90,6 +90,11 @@ export function preservedFormFields(parsed: ParsedEventForm) {
|
||||
title: parsed.title,
|
||||
description: parsed.description,
|
||||
type: parsed.type,
|
||||
// The When-section too, so a no-JS full reload re-seeds the date controls
|
||||
// instead of dropping the curator's date/precision/end-date.
|
||||
eventDate: parsed.eventDate,
|
||||
precision: parsed.precision,
|
||||
eventDateEnd: parsed.eventDateEnd,
|
||||
personIds: parsed.personIds,
|
||||
documentIds: parsed.documentIds
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user