diff --git a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx index f161354..0f80f64 100644 --- a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx +++ b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx @@ -188,106 +188,87 @@ export const CoffinDetailsStep: React.FC = ({ hideHelpBar, sx, }) => { - return ( - - {/* Page heading */} - + // ─── Left panel: Coffin profile (image + specs) ─── + const profilePanel = ( + + {/* Image */} + + + + {coffin.name} + + + {coffin.description && ( + + {coffin.description} + + )} + + {/* Specs */} + {coffin.specs && coffin.specs.length > 0 && ( + + {coffin.specs.map((spec) => ( + + + {spec.label} + + {spec.value} + + ))} + + )} + + {/* Price */} + + ${coffin.price.toLocaleString('en-AU')} + + {coffin.priceNote && ( + + {coffin.priceNote} + + )} + + ); + + // ─── Right panel: Option selectors + CTAs ─── + const optionsPanel = ( + + Coffin details - + {isPrePlanning ? 'These options let you personalise the coffin. You can change these later.' : 'Personalise your chosen coffin with handles, lining, and a name plate.'} - + Each option shows the price impact on your plan total. Options within your package allowance are included at no extra cost. - {/* ─── Coffin profile ─── */} - - - {/* Image */} - - - {/* Details */} - - - {coffin.name} - - - {coffin.description && ( - - {coffin.description} - - )} - - {/* Specs */} - {coffin.specs && coffin.specs.length > 0 && ( - - {coffin.specs.map((spec) => ( - - - {spec.label} - - {spec.value} - - ))} - - )} - - {/* Price */} - - ${coffin.price.toLocaleString('en-AU')} - - {coffin.priceNote && ( - - {coffin.priceNote} - - )} - - - - = ({ onContinue(); }} > - {/* ─── Option sections ─── */} = ({ + + ); + + return ( + + {profilePanel} ); }; diff --git a/src/components/pages/CoffinsStep/CoffinsStep.tsx b/src/components/pages/CoffinsStep/CoffinsStep.tsx index 7d8a074..ef36783 100644 --- a/src/components/pages/CoffinsStep/CoffinsStep.tsx +++ b/src/components/pages/CoffinsStep/CoffinsStep.tsx @@ -147,9 +147,202 @@ export const CoffinsStep: React.FC = ({ onChange({ ...values, [field]: value, page: 1 }); }; + // ─── Sidebar content (filters) ─── + const sidebar = ( + + + Filters + + + + handleFilterChange('categoryFilter', e.target.value)} + fullWidth + > + {categories.map((cat) => ( + + {cat.label} + + ))} + + + handleFilterChange('priceFilter', e.target.value)} + fullWidth + > + {priceRanges.map((range) => ( + + {range.label} + + ))} + + + + ); + + // ─── Main content (card grid) ─── + const mainContent = ( + { + e.preventDefault(); + onContinue(); + }} + > + {/* Page heading */} + + Choose a coffin + + + + {isPrePlanning + ? 'Browse the range to get an idea of styles and pricing. You can change your selection later.' + : 'Browse the range available with your selected provider. Use the filters to narrow your options.'} + + + + Selecting a coffin within your package allowance won't change your total. Coffins + outside the allowance will adjust the price. + + + {/* Results count */} + + Showing {displayCount} coffin{displayCount !== 1 ? 's' : ''} + + + {/* Coffin card grid */} + + {coffins.map((coffin, index) => ( + onChange({ ...values, selectedCoffinId: coffin.id })} + role="radio" + aria-checked={coffin.id === values.selectedCoffinId} + tabIndex={ + values.selectedCoffinId === null + ? index === 0 + ? 0 + : -1 + : coffin.id === values.selectedCoffinId + ? 0 + : -1 + } + sx={{ overflow: 'hidden' }} + > + {/* Image */} + + {coffin.isPopular && ( + + + Most Popular + + + )} + + + {/* Content */} + + + {coffin.name} + + + {coffin.category} + + + ${coffin.price.toLocaleString('en-AU')} + + + + ))} + + + {/* Validation error */} + {errors?.selectedCoffinId && ( + + {errors.selectedCoffinId} + + )} + + {/* Pagination */} + {totalPages > 1 && ( + + onChange({ ...values, page })} + color="primary" + /> + + )} + + + + {/* CTAs */} + + {onSaveAndExit ? ( + + ) : ( + + )} + + + + ); + return ( = ({ onBack={onBack} hideHelpBar={hideHelpBar} sx={sx} + secondaryPanel={mainContent} > - {/* Page heading */} - - Choose a coffin - - - - {isPrePlanning - ? 'Browse the range to get an idea of styles and pricing. You can change your selection later.' - : 'Browse the range available with your selected provider. Use the filters to narrow your options.'} - - - - Selecting a coffin within your package allowance won't change your total. Coffins - outside the allowance will adjust the price. - - - { - e.preventDefault(); - onContinue(); - }} - > - {/* ─── Filters ─── */} - - handleFilterChange('categoryFilter', e.target.value)} - sx={{ minWidth: 200 }} - > - {categories.map((cat) => ( - - {cat.label} - - ))} - - - handleFilterChange('priceFilter', e.target.value)} - sx={{ minWidth: 200 }} - > - {priceRanges.map((range) => ( - - {range.label} - - ))} - - - - {/* ─── Results count ─── */} - - Showing {displayCount} coffin{displayCount !== 1 ? 's' : ''} - - - {/* ─── Coffin card grid ─── */} - - {coffins.map((coffin, index) => ( - onChange({ ...values, selectedCoffinId: coffin.id })} - role="radio" - aria-checked={coffin.id === values.selectedCoffinId} - tabIndex={ - values.selectedCoffinId === null - ? index === 0 - ? 0 - : -1 - : coffin.id === values.selectedCoffinId - ? 0 - : -1 - } - sx={{ overflow: 'hidden' }} - > - {/* Image */} - - {coffin.isPopular && ( - - - Most Popular - - - )} - - - {/* Content */} - - - {coffin.name} - - - {coffin.category} - - - ${coffin.price.toLocaleString('en-AU')} - - - - ))} - - - {/* Validation error */} - {errors?.selectedCoffinId && ( - - {errors.selectedCoffinId} - - )} - - {/* Pagination */} - {totalPages > 1 && ( - - onChange({ ...values, page })} - color="primary" - /> - - )} - - - - {/* CTAs */} - - {onSaveAndExit ? ( - - ) : ( - - )} - - - + {sidebar} ); }; diff --git a/src/components/pages/VenueStep/VenueStep.tsx b/src/components/pages/VenueStep/VenueStep.tsx index 4391444..c4a39fc 100644 --- a/src/components/pages/VenueStep/VenueStep.tsx +++ b/src/components/pages/VenueStep/VenueStep.tsx @@ -13,7 +13,6 @@ import { Collapse } from '../../atoms/Collapse'; import { Chip } from '../../atoms/Chip'; import { Typography } from '../../atoms/Typography'; import { Button } from '../../atoms/Button'; -import { Divider } from '../../atoms/Divider'; // ─── Types ─────────────────────────────────────────────────────────────────── @@ -86,6 +85,8 @@ export interface VenueStepProps { locationName?: string; /** Whether this is a pre-planning flow */ isPrePlanning?: boolean; + /** Map panel content — slot for map integration */ + mapPanel?: React.ReactNode; /** Navigation bar — passed through to WizardLayout */ navigation?: React.ReactNode; /** Progress stepper — passed through to WizardLayout */ @@ -131,6 +132,7 @@ export const VenueStep: React.FC = ({ ], locationName, isPrePlanning = false, + mapPanel, navigation, progressStepper, runningTotal, @@ -162,7 +164,7 @@ export const VenueStep: React.FC = ({ return ( = ({ onBack={onBack} hideHelpBar={hideHelpBar} sx={sx} + secondaryPanel={ + mapPanel || ( + + + Map coming soon + + + ) + } > {/* Page heading */} - + Where would you like the service? - + {isPrePlanning ? 'Browse available venues. Your choice can be changed later.' : 'Choose a venue for the funeral service. You can filter by location, features, and religion.'} @@ -230,15 +251,7 @@ export const VenueStep: React.FC = ({ {venues.map((venue, index) => ( = ({ - - {/* CTAs */} - - {onSaveAndExit ? ( + + {onSaveAndExit && ( - ) : ( - )}