diff --git a/src/components/pages/AdditionalServicesStep/AdditionalServicesStep.tsx b/src/components/pages/AdditionalServicesStep/AdditionalServicesStep.tsx index 2813f41..56735c8 100644 --- a/src/components/pages/AdditionalServicesStep/AdditionalServicesStep.tsx +++ b/src/components/pages/AdditionalServicesStep/AdditionalServicesStep.tsx @@ -151,9 +151,10 @@ export const AdditionalServicesStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Section 1: Complimentary inclusions ─── */} diff --git a/src/components/pages/AuthGateStep/AuthGateStep.tsx b/src/components/pages/AuthGateStep/AuthGateStep.tsx index c7633fb..c22bb90 100644 --- a/src/components/pages/AuthGateStep/AuthGateStep.tsx +++ b/src/components/pages/AuthGateStep/AuthGateStep.tsx @@ -156,9 +156,10 @@ export const AuthGateStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Sub-step 1: SSO + Email ─── */} diff --git a/src/components/pages/CemeteryStep/CemeteryStep.tsx b/src/components/pages/CemeteryStep/CemeteryStep.tsx index f5d8dbd..8326f25 100644 --- a/src/components/pages/CemeteryStep/CemeteryStep.tsx +++ b/src/components/pages/CemeteryStep/CemeteryStep.tsx @@ -159,9 +159,10 @@ export const CemeteryStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Burial plot question ─── */} @@ -177,7 +178,11 @@ export const CemeteryStep: React.FC = ({ } label="No, we need to find one" /> {errors?.burialOwn && ( - + {errors.burialOwn} )} @@ -201,7 +206,11 @@ export const CemeteryStep: React.FC = ({ /> {errors?.burialCustom && ( - + {errors.burialCustom} )} @@ -257,7 +266,11 @@ export const CemeteryStep: React.FC = ({ {errors?.selectedCemeteryId && ( - + {errors.selectedCemeteryId} )} diff --git a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx index 0f80f64..9d9ee5d 100644 --- a/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx +++ b/src/components/pages/CoffinDetailsStep/CoffinDetailsStep.tsx @@ -272,9 +272,10 @@ export const CoffinDetailsStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* Page heading */} @@ -293,11 +294,26 @@ export const CoffinsStep: React.FC = ({ ))} + + {coffins.length === 0 && ( + + + No coffins match your selected filters. + + + Try adjusting the category or price range. + + + )} {/* Validation error */} {errors?.selectedCoffinId && ( - + {errors.selectedCoffinId} )} diff --git a/src/components/pages/CrematoriumStep/CrematoriumStep.tsx b/src/components/pages/CrematoriumStep/CrematoriumStep.tsx index 1638104..4b65320 100644 --- a/src/components/pages/CrematoriumStep/CrematoriumStep.tsx +++ b/src/components/pages/CrematoriumStep/CrematoriumStep.tsx @@ -1,6 +1,7 @@ import React from 'react'; import Box from '@mui/material/Box'; import TextField from '@mui/material/TextField'; +import MenuItem from '@mui/material/MenuItem'; import FormControl from '@mui/material/FormControl'; import FormLabel from '@mui/material/FormLabel'; import FormControlLabel from '@mui/material/FormControlLabel'; @@ -151,9 +152,10 @@ export const CrematoriumStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Crematorium selection ─── */} @@ -226,7 +228,11 @@ export const CrematoriumStep: React.FC = ({ )} {errors?.selectedCrematoriumId && ( - + {errors.selectedCrematoriumId} )} @@ -250,7 +256,11 @@ export const CrematoriumStep: React.FC = ({ } label="No" /> {errors?.attend && ( - + {errors.attend} )} @@ -268,9 +278,9 @@ export const CrematoriumStep: React.FC = ({ sx={{ mb: 3 }} > {priorityOptions.map((opt) => ( - + ))} )} diff --git a/src/components/pages/DateTimeStep/DateTimeStep.tsx b/src/components/pages/DateTimeStep/DateTimeStep.tsx index ac91dc6..f809af4 100644 --- a/src/components/pages/DateTimeStep/DateTimeStep.tsx +++ b/src/components/pages/DateTimeStep/DateTimeStep.tsx @@ -148,7 +148,7 @@ export const DateTimeStep: React.FC = ({ onChange({ ...values, [field]: value }); }; - const personSectionHeading = isAtNeed ? 'About the person who died' : 'About the person'; + const personSectionHeading = isAtNeed ? 'About the person who has passed' : 'About the person'; const schedulingHeading = isAtNeed ? 'When are you hoping to have the service?' @@ -178,9 +178,10 @@ export const DateTimeStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Section 1: About the person ─── */} diff --git a/src/components/pages/IntroStep/IntroStep.tsx b/src/components/pages/IntroStep/IntroStep.tsx index 616adee..c738852 100644 --- a/src/components/pages/IntroStep/IntroStep.tsx +++ b/src/components/pages/IntroStep/IntroStep.tsx @@ -65,7 +65,7 @@ function getSubheading(values: IntroStepValues): string { * * Entry point with urgency-sensitive segmentation. User selects who * the funeral is for, and (if arranging for someone else) whether - * that person has died. + * that person has passed away. * * Uses the Centered Form layout variant. Progressive disclosure: * selecting "Someone else" reveals the hasPassedAway question. @@ -117,9 +117,10 @@ export const IntroStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* forWhom field */} @@ -151,7 +152,7 @@ export const IntroStep: React.FC = ({ = ({ {/* Error message */} {error && ( - + {error} )} @@ -262,9 +266,12 @@ export const PackagesStep: React.FC = ({ {packages.length === 0 && ( - + No packages match the selected budget range. + + Try selecting "All packages" to see the full range. + )} diff --git a/src/components/pages/PaymentStep/PaymentStep.tsx b/src/components/pages/PaymentStep/PaymentStep.tsx index 95ad5c6..11ede5a 100644 --- a/src/components/pages/PaymentStep/PaymentStep.tsx +++ b/src/components/pages/PaymentStep/PaymentStep.tsx @@ -161,9 +161,10 @@ export const PaymentStep: React.FC = ({ { e.preventDefault(); - onConfirmPayment(); + if (!loading) onConfirmPayment(); }} > {/* ─── Payment plan ─── */} @@ -229,7 +230,11 @@ export const PaymentStep: React.FC = ({ )} {errors?.card && ( - + {errors.card} )} @@ -310,7 +315,11 @@ export const PaymentStep: React.FC = ({ sx={{ mb: 1, alignItems: 'flex-start', '& .MuiCheckbox-root': { pt: 0.5 } }} /> {errors?.termsAccepted && ( - + {errors.termsAccepted} )} diff --git a/src/components/pages/ProvidersStep/ProvidersStep.tsx b/src/components/pages/ProvidersStep/ProvidersStep.tsx index 122e726..fc53c29 100644 --- a/src/components/pages/ProvidersStep/ProvidersStep.tsx +++ b/src/components/pages/ProvidersStep/ProvidersStep.tsx @@ -188,12 +188,16 @@ export const ProvidersStep: React.FC = ({ sx={{ mb: 2, display: 'block' }} aria-live="polite" > - Showing results from {providers.length} provider{providers.length !== 1 ? 's' : ''} + {providers.length} provider{providers.length !== 1 ? 's' : ''} found {/* Error message */} {error && ( - + {error} )} @@ -230,9 +234,12 @@ export const ProvidersStep: React.FC = ({ textAlign: 'center', }} > - + No providers found matching your search. + + Try adjusting your search or clearing filters. + )} diff --git a/src/components/pages/VenueStep/VenueStep.tsx b/src/components/pages/VenueStep/VenueStep.tsx index c4a39fc..77f67ff 100644 --- a/src/components/pages/VenueStep/VenueStep.tsx +++ b/src/components/pages/VenueStep/VenueStep.tsx @@ -207,9 +207,10 @@ export const VenueStep: React.FC = ({ { e.preventDefault(); - onContinue(); + if (!loading) onContinue(); }} > {/* ─── Search + Filters ─── */} @@ -276,11 +277,26 @@ export const VenueStep: React.FC = ({ } /> ))} + + {venues.length === 0 && ( + + + No venues found in this area. + + + Try adjusting your search or clearing filters. + + + )} {/* Validation error */} {errors?.selectedVenueId && ( - + {errors.selectedVenueId} )}