From 7dd650e9ba91e8dca6cbfe80ffd16602bcb1a9db Mon Sep 17 00:00:00 2001 From: vickytechkey Date: Thu, 17 Sep 2026 22:22:20 +0530 Subject: [PATCH] feat: build Step 6 Products form with upload grid, all form fields, and action buttons --- src/pages/OnboardingPage.tsx | 421 ++++++++++++++++++++++++++++++++++- 1 file changed, 410 insertions(+), 11 deletions(-) diff --git a/src/pages/OnboardingPage.tsx b/src/pages/OnboardingPage.tsx index c2f5fc9..b9391ba 100644 --- a/src/pages/OnboardingPage.tsx +++ b/src/pages/OnboardingPage.tsx @@ -28,7 +28,10 @@ import { Gem, Paintbrush, Leaf, - Scissors + Scissors, + Plus, + Play, + IndianRupee } from 'lucide-react'; export const OnboardingPage: React.FC = () => { @@ -110,6 +113,36 @@ export const OnboardingPage: React.FC = () => { } }; + // Step 6 Specific State — Products form + const [step6ProductName, setStep6ProductName] = useState(''); + const [step6Category, setStep6Category] = useState('Handicrafts'); + const [step6SubCategory, setStep6SubCategory] = useState(''); + const [step6About, setStep6About] = useState(''); + const [step6Color, setStep6Color] = useState(''); + const [step6Material, setStep6Material] = useState(''); + const [step6Brand, setStep6Brand] = useState(''); + const [step6Warranty, setStep6Warranty] = useState(''); + const [step6ManufacturerInfo, setStep6ManufacturerInfo] = useState(''); + const [step6Specification, setStep6Specification] = useState(''); + const [step6Showcase, setStep6Showcase] = useState(''); + const [step6Price, setStep6Price] = useState(''); + const [step6Stock, setStep6Stock] = useState(''); + const [step6Sku] = useState('TRDX-' + Math.random().toString(36).substring(2, 8).toUpperCase()); + const [step6Weight, setStep6Weight] = useState(''); + const [step6MadeToOrder, setStep6MadeToOrder] = useState(false); + const step6SubCategoryMap: Record = { + 'Handicrafts': ['Wall Hangings', 'Decorative Figurines', 'Gift Sets', 'Handmade Toys'], + 'Home & decor': ['Table Decor', 'Cushion Covers', 'Curtains', 'Storage Baskets'], + 'Handloom & Textiles': ['Sarees', 'Dupattas', 'Stoles', 'Yardage Fabric'], + 'Pottery & Ceramics': ['Mugs & Cups', 'Bowls', 'Vases', 'Plates'], + 'Brass & Metal Craft': ['Idols & Statues', 'Lamps & Diyas', 'Cookware', 'Wall Art'], + 'Woodcraft & Carvings': ['Furniture', 'Photo Frames', 'Kitchen Accessories', 'Sculptures'], + 'Jewellery & Ornaments': ['Necklaces', 'Earrings', 'Bangles', 'Anklets'], + 'Paintings & Folk Art': ['Canvas Paintings', 'Madhubani', 'Warli', 'Miniature Art'], + 'Jute & Eco-Fibers': ['Bags & Totes', 'Baskets', 'Mats & Rugs', 'Plant Holders'], + 'Zari & Embroidery': ['Embroidered Tops', 'Lehengas', 'Bed Covers', 'Table Runners'], + }; + // Step 7 Specific State matching stitch wireframe const [step7StoreUrl, setStep7StoreUrl] = useState(onboarding.storeSlug ? `tradhox.com/store/${onboarding.storeSlug}` : 'tradhox.com/store/heritage-crafts'); const [step7Tagline, setStep7Tagline] = useState('Authentic Handcrafted Treasures from Master Artisans'); @@ -2630,16 +2663,382 @@ export const OnboardingPage: React.FC = () => { {/* STEP 6: Products Wireframe matching stitch reference */} {/* =================================================================== */} {onboardingStep === 6 && ( -
- {/* Clean wireframe canvas matching stitch reference */} +
+
+ {/* Form header */} +
+

+ STEP 6 OF 7 · ADD YOUR FIRST PRODUCT +

+

+ add your first product · you can add the rest after you go live +

+
+ + {/* ── Photo / Video Upload Grid ── */} +
+

Product photos & video

+
+ {/* Box 1 — Cover photo */} +
+ + Add cover +
+ {/* Boxes 2–4 — Extra photos */} + {[2, 3, 4].map(n => ( +
+ +
+ ))} + {/* Box 5 — Video */} +
+ + Add video +
+
+

+ up to 6 photos + 1 video (max 10 seconds) · first photo is your cover image +

+
+ +
+ + {/* ── Form Fields ── */} +
+ + {/* Product name — full width */} +
+ + setStep6ProductName(e.target.value)} + style={{ borderRadius: '10px', border: '1px solid #E5E7EB', fontSize: '0.88rem', height: '42px', boxShadow: 'none' }} + /> +
+ + {/* Category */} +
+ +
+ +
+
+ + {/* Sub-category */} +
+ +
+ +
+
+ + {/* About — full width */} +
+ +