FIXED - Make adding a portfolio project simpler and actually saveable
- Fix critical bug: TabsContent unmounted inactive panels, so the project form only submitted the active tab's fields and could never save; add an opt-in forceMount that keeps panels mounted (hidden) and use it on all four project-form tabs - Make Sections and Assets optional: a project saves with just Basics and Localized Content; new projects start with no sections/assets, and the last one can now be removed - Update wizard progress so empty sections/assets steps count as complete - Update save hint copy and step labels to reflect the optional steps - Correct .claude/launch.json dev port to 3014 - Update portfolio-form-progress tests for the optional-steps behaviour
This commit is contained in:
@@ -136,13 +136,21 @@ export function getPortfolioWizardProgress(
|
||||
},
|
||||
{
|
||||
key: "sections",
|
||||
complete: input.sections.length > 0 && completedSections === input.sections.length,
|
||||
summary: `${completedSections}/${input.sections.length} sections ready.`,
|
||||
// Optional: no sections is valid. If sections were added, each must be ready.
|
||||
complete: completedSections === input.sections.length,
|
||||
summary:
|
||||
input.sections.length === 0
|
||||
? "Optional — no sections added."
|
||||
: `${completedSections}/${input.sections.length} sections ready.`,
|
||||
},
|
||||
{
|
||||
key: "assets",
|
||||
complete: input.assets.length > 0 && completedAssets === input.assets.length,
|
||||
summary: `${completedAssets}/${input.assets.length} assets ready.`,
|
||||
// Optional: no gallery assets is valid. If assets were added, each must be ready.
|
||||
complete: completedAssets === input.assets.length,
|
||||
summary:
|
||||
input.assets.length === 0
|
||||
? "Optional — no gallery assets added."
|
||||
: `${completedAssets}/${input.assets.length} assets ready.`,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user