feat: add country selection during onboarding and implement payment management features

- Introduced CountryStep component for selecting the country during onboarding, affecting payment currency.
- Updated FirstGroupStep to include country information.
- Enhanced PaymentsProvider to manage payment states and renewals.
- Created PaymentRow component for displaying individual payment details.
- Implemented PaymentsView for listing and filtering payments by group and status.
- Added API endpoints for fetching and creating payments, including batch processing.
- Defined payment schemas for validation and data handling.
- Updated GroupHeader and GroupDetailView to include charging functionality for group members.
This commit is contained in:
Jose Selesan
2026-10-08 11:42:13 -03:00
parent b11dd47534
commit 8c5caecdda
49 changed files with 2367 additions and 90 deletions

View File

@@ -5,6 +5,7 @@ import { Logo, LogoIcon } from '../../components/brand'
import { Button } from '../../components/ui'
import { useAuth } from '../../context/AuthProvider'
import { ConfirmationStep } from './ConfirmationStep'
import { CountryStep } from './CountryStep'
import { FirstGroupStep } from './FirstGroupStep'
import { useOnboarding } from './OnboardingProvider'
import { PaymentStep } from './PaymentStep'
@@ -13,6 +14,7 @@ import { WelcomeStep } from './WelcomeStep'
const STEPS = [
{ label: 'Bienvenida' },
{ label: 'País' },
{ label: 'Cobros' },
{ label: 'Tu grupo' },
{ label: 'Listo' },
@@ -81,18 +83,21 @@ export function OnboardingView() {
<div key={step} className="mt-8 animate-step-enter">
{step === 0 ? <WelcomeStep name={firstName} onNext={() => setStep(1)} /> : null}
{step === 1 ? (
<PaymentStep feedback={mpFeedback} onNext={() => setStep(2)} onBack={() => setStep(0)} />
<CountryStep onNext={() => setStep(2)} onBack={() => setStep(0)} />
) : null}
{step === 2 ? (
<PaymentStep feedback={mpFeedback} onNext={() => setStep(3)} onBack={() => setStep(1)} />
) : null}
{step === 3 ? (
<FirstGroupStep
onBack={() => setStep(1)}
onBack={() => setStep(2)}
onCompleted={(group) => {
setCreatedGroup(group)
setStep(3)
setStep(4)
}}
/>
) : null}
{step === 3 && createdGroup ? <ConfirmationStep group={createdGroup} /> : null}
{step === 4 && createdGroup ? <ConfirmationStep group={createdGroup} /> : null}
</div>
</main>
)