- #47: Remove misleading asterisk from Budget (EUR) label in project wizard — budget is optional per canGoNext() logic - #48: Parse Zod validation JSON in wizard submit error handler so users see "Responsible person is required" instead of raw JSON array - #45: Expose isEntriesError from timeline query context; TimelineView now renders an explicit error message instead of a silent empty canvas when the getEntriesView query fails Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
@@ -423,7 +423,7 @@ function Step2({ state, onChange }: Step2Props) {
|
||||
|
||||
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<div>
|
||||
<label className={LABEL_CLS}>Budget (EUR) *<InfoTooltip content="Total project budget in EUR. Stored internally as cents. Used to track spending against assignments." /></label>
|
||||
<label className={LABEL_CLS}>Budget (EUR)<InfoTooltip content="Total project budget in EUR. Stored internally as cents. Used to track spending against assignments." /></label>
|
||||
<input
|
||||
type="number"
|
||||
min={0}
|
||||
@@ -1160,7 +1160,23 @@ export function ProjectWizard({ open, onClose }: ProjectWizardProps) {
|
||||
handleClose();
|
||||
}, 1200);
|
||||
} catch (err) {
|
||||
setSubmitError(err instanceof Error ? err.message : "Failed to create project");
|
||||
let errorMessage = "Failed to create project";
|
||||
if (err instanceof Error) {
|
||||
try {
|
||||
const parsed: unknown = JSON.parse(err.message);
|
||||
if (Array.isArray(parsed) && parsed.length > 0) {
|
||||
errorMessage = (parsed as { message?: string }[])
|
||||
.map((e) => e.message)
|
||||
.filter(Boolean)
|
||||
.join("; ");
|
||||
} else {
|
||||
errorMessage = err.message;
|
||||
}
|
||||
} catch {
|
||||
errorMessage = err.message;
|
||||
}
|
||||
}
|
||||
setSubmitError(errorMessage);
|
||||
} finally {
|
||||
setIsSubmitting(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user