diff --git a/src/components/pages/VenueDetailStep/VenueDetailStep.tsx b/src/components/pages/VenueDetailStep/VenueDetailStep.tsx index f900dcd..b8f5ccf 100644 --- a/src/components/pages/VenueDetailStep/VenueDetailStep.tsx +++ b/src/components/pages/VenueDetailStep/VenueDetailStep.tsx @@ -1,10 +1,13 @@ import React from 'react'; import Box from '@mui/material/Box'; import LocationOnOutlinedIcon from '@mui/icons-material/LocationOnOutlined'; +import HomeWorkOutlinedIcon from '@mui/icons-material/HomeWorkOutlined'; +import PeopleOutlinedIcon from '@mui/icons-material/PeopleOutlined'; import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; import type { SxProps, Theme } from '@mui/material/styles'; import { WizardLayout } from '../../templates/WizardLayout'; import { AddOnOption } from '../../molecules/AddOnOption'; +import { Card } from '../../atoms/Card'; import { Chip } from '../../atoms/Chip'; import { Typography } from '../../atoms/Typography'; import { Button } from '../../atoms/Button'; @@ -21,6 +24,7 @@ export interface VenueDetail { venueType?: string; capacity?: number; price?: number; + /** Explanation of how the price affects the plan total */ priceNote?: string; description?: string; features?: string[]; @@ -75,16 +79,31 @@ export interface VenueDetailStepProps { sx?: SxProps; } +// ─── Helper ───────────────────────────────────────────────────────────────── + +/** Compact icon + text row used for venue metadata */ +const MetaRow: React.FC<{ icon: React.ReactNode; children: React.ReactNode }> = ({ + icon, + children, +}) => ( + + {icon} + + {children} + + +); + // ─── Component ─────────────────────────────────────────────────────────────── /** * Venue Detail page for the FA arrangement wizard. * - * Detail-toggles layout: venue image + description on the left, - * venue info, price, CTA, and service toggles on the right. + * Detail-toggles layout: scrollable left panel with image, description, + * features, location, and address. Sticky right panel with venue info, + * price, CTA, supported religions, and service toggles. * - * Reached by clicking a venue card on VenueStep. User reviews - * the venue and clicks "Add Venue" to select it. + * Reached by clicking a venue card on VenueStep. * * Pure presentation component — props in, callbacks out. * @@ -126,41 +145,42 @@ export const VenueDetailStep: React.FC = ({ hideHelpBar={hideHelpBar} sx={sx} secondaryPanel={ - - {/* Venue name */} - + + {/* ─── Venue name ─── */} + {venue.name} - {/* Location */} - - - - {venue.location} - + {/* ─── Meta: location, type, capacity ─── */} + + }>{venue.location} + {venue.venueType && ( + }> + {venue.venueType} + + )} + {venue.capacity != null && ( + }> + Seats up to {venue.capacity} guests + + )} - {/* Venue type */} - {venue.venueType && ( - - {venue.venueType} - - )} - - {/* Price */} + {/* ─── Price ─── */} {venue.price != null && ( - - ${venue.price.toLocaleString('en-AU')} - + + + ${venue.price.toLocaleString('en-AU')} + + {venue.priceNote && ( + + {venue.priceNote} + + )} + )} - {venue.priceNote && ( - - {venue.priceNote} - - )} - - {/* Add Venue CTA */} + {/* ─── Add Venue CTA ─── */} = ({ if (!loading) onAddVenue(); }} > - @@ -188,42 +201,48 @@ export const VenueDetailStep: React.FC = ({ color="secondary" fullWidth onClick={onSaveAndExit} - sx={{ mb: 3 }} + sx={{ mt: 1 }} > Save and continue later )} - {/* Address */} + + + {/* ─── Address ─── */} {venue.address && ( - <> + Address - - {venue.address} - - + + + {venue.address} + + )} - {/* Supported religions */} + {/* ─── Supported religions / service styles ─── */} {venue.religions && venue.religions.length > 0 && ( - <> + Supported service styles - + {venue.religions.map((r) => ( ))} - + )} - {/* Service toggles */} + {/* ─── Service toggles ─── */} {services.length > 0 && ( <> - + Venue services @@ -257,13 +276,15 @@ export const VenueDetailStep: React.FC = ({ } > - {/* Left panel: image + description + features */} + {/* ═══════ LEFT PANEL: scrollable content ═══════ */} + + {/* ─── Hero image ─── */} = ({ }} /> + {/* ─── Description ─── */} {venue.description && ( - + {venue.description} )} - {/* Features */} + {/* ─── Features ─── */} {venue.features && venue.features.length > 0 && ( - - + <> + + Venue features - + {venue.features.map((feature) => ( - + {feature} ))} + + )} + + {/* ─── Location (map placeholder) ─── */} + + + Location + + + + + Map coming soon + + + + + {/* ─── Address (left panel) ─── */} + {venue.address && ( + + + + {venue.address} + )} diff --git a/src/components/templates/WizardLayout/WizardLayout.tsx b/src/components/templates/WizardLayout/WizardLayout.tsx index 142274a..149a30b 100644 --- a/src/components/templates/WizardLayout/WizardLayout.tsx +++ b/src/components/templates/WizardLayout/WizardLayout.tsx @@ -257,24 +257,68 @@ const GridSidebarLayout: React.FC<{ ); -/** Detail + Toggles: two-column hero (image left / info right), full-width section below */ +/** Detail + Toggles: scrollable left (image/desc) / sticky right (info/CTA) */ const DetailTogglesLayout: React.FC<{ children: React.ReactNode; secondaryPanel?: React.ReactNode; -}> = ({ children, secondaryPanel }) => ( - + backLink?: React.ReactNode; +}> = ({ children, secondaryPanel, backLink }) => ( + + {/* Left panel — scrollable content */} - {children} - {secondaryPanel} + {backLink && {backLink}} + {children} - + {/* Right panel — sticky info */} + + {secondaryPanel} + + ); // ─── Variant map ───────────────────────────────────────────────────────────── @@ -343,8 +387,8 @@ export const WizardLayout = React.forwardRef( flexDirection: 'column', minHeight: '100vh', bgcolor: 'background.default', - // list-map: lock to viewport so only the left panel scrolls - ...(variant === 'list-map' && { + // list-map + detail-toggles: lock to viewport so panels scroll independently + ...((variant === 'list-map' || variant === 'detail-toggles') && { height: '100vh', overflow: 'hidden', }), @@ -358,8 +402,8 @@ export const WizardLayout = React.forwardRef( {/* Stepper + running total bar (grid-sidebar, detail-toggles only) */} {showStepper && } - {/* Back link — inside left panel for list-map, above content for others */} - {showBackLink && variant !== 'list-map' && ( + {/* Back link — inside left panel for list-map/detail-toggles, above content for others */} + {showBackLink && variant !== 'list-map' && variant !== 'detail-toggles' && ( (