From 19e8fa8f19ce12c2fb138ffe2ddcc52fb581596b Mon Sep 17 00:00:00 2001 From: moh Date: Sun, 20 Sep 2026 17:40:45 +0200 Subject: [PATCH] STYLED - Two-column project form, drop the redundant header card - Remove the project summary/header card (project name, badges, progress); it added no value while creating a project. Move the on-submit validation alert down to the action bar. - Lay the whole form out in two columns: Basic Information + Localized Content, then Sections + Cover/Assets. Basic Information fields cap at two columns and the Cover/Assets card stacks inside its column. All 375 tests pass; tsc and eslint clean. --- components/admin/portfolio-project-form.tsx | 77 +++++---------------- 1 file changed, 18 insertions(+), 59 deletions(-) diff --git a/components/admin/portfolio-project-form.tsx b/components/admin/portfolio-project-form.tsx index 5218648..217a0f6 100644 --- a/components/admin/portfolio-project-form.tsx +++ b/components/admin/portfolio-project-form.tsx @@ -7,7 +7,6 @@ import { BookOpenText, BriefcaseBusiness, CalendarDays, - CheckCircle2, CircleAlert, FolderTree, Grid2x2, @@ -533,14 +532,6 @@ export function PortfolioProjectForm({ })), }); const firstIncompleteStep = getFirstIncompleteWizardStep(progress); - const selectedCategory = - availableCategories.find((category) => category.id === projectState.categoryId) ?? null; - const projectLabel = - projectState.titleDe.trim() || - projectState.titleEn.trim() || - projectState.titleAr.trim() || - projectState.slug.trim() || - "Untitled Project"; useEffect(() => { sectionsInputRef.current?.dispatchEvent(new Event("input", { bubbles: true })); @@ -603,53 +594,7 @@ export function PortfolioProjectForm({ - -
-
-
-
- - {projectState.isPublished ? "Published" : "Draft"} - - {projectState.isFeatured ? Featured : null} - {!selectedCategory?.isActive ? Inactive Category : null} -
-
-

{projectLabel}

-

- {selectedCategory ? `${selectedCategory.name.de || selectedCategory.name.en || selectedCategory.name.ar}` : "No category selected"} -

-
-
- -
- -
-

Fortschritt

-

- {progress.filter((step) => step.complete).length}/{progress.length} bereit -

-
-
-
- - {showValidation && firstIncompleteStep ? ( -
-
- -
-

Some required fields are still missing.

-

- Fill the Basics and Localized Content fields below, then save. -

-
-
-
- ) : null} -
-
- -
+
@@ -658,7 +603,7 @@ export function PortfolioProjectForm({ description="Choose the category and the stable project metadata first." /> -
+
@@ -1071,7 +1016,7 @@ export function PortfolioProjectForm({
-
+
- + + {showValidation && firstIncompleteStep ? ( +
+
+ +
+

Some required fields are still missing.

+

+ Fill the Basics and Localized Content fields, then save. +

+
+
+
+ ) : null} +
{firstIncompleteStep ? (