From f0ee50533973d804fa4e9395760b33a1484ea0ae Mon Sep 17 00:00:00 2001 From: kayela Date: Mon, 2 Feb 2026 16:36:52 -0600 Subject: [PATCH] restructured layout --- src/pages/admin/AdminRegistrationBuilder.js | 254 +++++++++----------- 1 file changed, 115 insertions(+), 139 deletions(-) diff --git a/src/pages/admin/AdminRegistrationBuilder.js b/src/pages/admin/AdminRegistrationBuilder.js index 104c60d..a119297 100644 --- a/src/pages/admin/AdminRegistrationBuilder.js +++ b/src/pages/admin/AdminRegistrationBuilder.js @@ -498,12 +498,13 @@ const AdminRegistrationBuilder = () => {

Steps

-
-
+
{sortedSteps.map((step, index) => (
{ >
-
Step:
- {step.title} +
Step: {index + 1}
{/* Mod Buttons */}
@@ -548,10 +548,11 @@ const AdminRegistrationBuilder = () => { > */} +
-
- {sortedSections.map((section) => ( -
+ {sortedSections.map((section) => { + const sortedFields = section.fields?.sort((a, b) => a.order - b.order) || []; + + return (
{ setSelectedSection(section.id); setSelectedField(null); }} > -
- {section.title} +
+
+ {section.title} + {section.description && ( +

{section.description}

+ )} +
+
-
- ))} +
+
+ +
test
+ + +
+ {/* Fields */} +
+

title

+ +

{section.description}

+ + + {/* Fields */} +
+ {sortedFields.map((field) => { + const IconComponent = FIELD_TYPE_ICONS[field.type] || Type; + return ( +
{ + e.stopPropagation(); + setSelectedSection(section.id); + setSelectedField(field.id); + }} + > +
+
+ + +
+ + {field.label} + {field.required && *} + + + ({FIELD_TYPE_LABELS[field.type] || field.type}) + +
+ {field.is_fixed && ( + + )} +
+ {!field.is_fixed && ( + + )} +
+ +
+ ); + })} + + + {sortedFields.length === 0 && ( +
+ No fields in this section. Click "Add Field" to add one. +
+ )} +
+
+
+
) + } + )}
)} @@ -611,125 +702,10 @@ const AdminRegistrationBuilder = () => {
- {/* Center - Form Canvas */} -
- - - -
-
- - -

- {currentStep?.title || 'Select a step'} -

-
- {selectedSection && ( - - )} -
- - {currentStep?.description && ( -

{currentStep.description}

- )} - - {/* Sections and Fields */} - {sortedSections.map((section) => { - const sortedFields = section.fields?.sort((a, b) => a.order - b.order) || []; - - return ( -
setSelectedSection(section.id)} - > -

{section.title}

- {section.description && ( -

{section.description}

- )} - - {/* Fields */} -
- {sortedFields.map((field) => { - const IconComponent = FIELD_TYPE_ICONS[field.type] || Type; - return ( -
{ - e.stopPropagation(); - setSelectedSection(section.id); - setSelectedField(field.id); - }} - > -
-
- - -
- - {field.label} - {field.required && *} - - - ({FIELD_TYPE_LABELS[field.type] || field.type}) - -
- {field.is_fixed && ( - - )} -
- {!field.is_fixed && ( - - )} -
-
- ); - })} - - {sortedFields.length === 0 && ( -
- No fields in this section. Click "Add Field" to add one. -
- )} -
-
- ); - })} - - {sortedSections.length === 0 && ( -
- No sections in this step. Add a section from the left sidebar. -
- )} -
- - -
- {/* Right Sidebar - Field Properties */}
-

Field Properties

+

Edit Options

{selectedFieldData ? (
@@ -1038,7 +1014,7 @@ const AdminRegistrationBuilder = () => {