hooks in config/services.php/.env.example, and updated wizard steps/controllers to store session payloads, attach packages, and surface localized success/error states. - Retooled payment handling for both Stripe and PayPal, adding richer status management in CheckoutController/ PayPalController, fallback flows in the wizard’s PaymentStep.tsx, and fresh feature tests for intent creation, webhooks, and the wizard CTA. - Introduced a consent-aware Matomo analytics stack: new consent context, cookie-banner UI, useAnalytics/ useCtaExperiment hooks, and MatomoTracker component, then instrumented marketing pages (Home, Packages, Checkout) with localized copy and experiment tracking. - Polished package presentation across marketing UIs by centralizing formatting in PresentsPackages, surfacing localized description tables/placeholders, tuning badges/layouts, and syncing guest/marketing translations. - Expanded docs & reference material (docs/prp/*, TODOs, public gallery overview) and added a Playwright smoke test for the hero CTA while reconciling outstanding checklist items.
49 lines
1.6 KiB
TypeScript
49 lines
1.6 KiB
TypeScript
import React from "react";
|
|
import { Button } from "@/components/ui/button";
|
|
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
|
|
import { useCheckoutWizard } from "../WizardContext";
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
interface ConfirmationStepProps {
|
|
onViewProfile?: () => void;
|
|
onGoToAdmin?: () => void;
|
|
}
|
|
|
|
export const ConfirmationStep: React.FC<ConfirmationStepProps> = ({ onViewProfile, onGoToAdmin }) => {
|
|
const { t } = useTranslation('marketing');
|
|
const { selectedPackage } = useCheckoutWizard();
|
|
const handleProfile = React.useCallback(() => {
|
|
if (typeof onViewProfile === 'function') {
|
|
onViewProfile();
|
|
return;
|
|
}
|
|
window.location.href = '/settings/profile';
|
|
}, [onViewProfile]);
|
|
|
|
const handleAdmin = React.useCallback(() => {
|
|
if (typeof onGoToAdmin === 'function') {
|
|
onGoToAdmin();
|
|
return;
|
|
}
|
|
window.location.href = '/event-admin';
|
|
}, [onGoToAdmin]);
|
|
|
|
return (
|
|
<div className="space-y-6">
|
|
<Alert>
|
|
<AlertTitle>{t('checkout.confirmation_step.welcome')}</AlertTitle>
|
|
<AlertDescription>
|
|
{t('checkout.confirmation_step.package_activated', { name: selectedPackage?.name || '' })}
|
|
{t('checkout.confirmation_step.email_sent')}
|
|
</AlertDescription>
|
|
</Alert>
|
|
<div className="flex flex-wrap gap-3 justify-end">
|
|
<Button variant="outline" onClick={handleProfile}>
|
|
{t('checkout.confirmation_step.open_profile')}
|
|
</Button>
|
|
<Button onClick={handleAdmin}>{t('checkout.confirmation_step.to_admin')}</Button>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|