feat(mp): add Mercado Pago reauthorization notice and status card components

- Implemented MpReauthNotice component to notify users when reauthorization is needed.
- Created MpStatusCard component to display the current status of the Mercado Pago account.
- Added utility functions and constants for handling Mercado Pago status and messages.
- Introduced hooks for managing the connection and disconnection of Mercado Pago accounts.
- Developed a disconnect confirmation modal for user actions.
- Added tests for the new functionality and utility functions.
- Defined schemas for Mercado Pago account status and callback reasons in shared package.
This commit is contained in:
Jose Selesan
2026-10-07 12:00:38 -03:00
parent e03f510874
commit 21a4c69f38
64 changed files with 3154 additions and 425 deletions

View File

@@ -1,5 +1,6 @@
import type { BillingType, PaymentProvider, WeekDay } from '@gruperly/shared'
export { BILLING_LABELS, WEEK_DAY_FULL_LABELS, formatPrice, formatSchedule } from '../../lib/format'
import type { BillingType, WeekDay } from '@gruperly/shared'
export { BILLING_LABELS, formatPrice, formatSchedule, WEEK_DAY_FULL_LABELS } from '../../lib/format'
export const WEEK_DAYS: readonly WeekDay[] = [
'MONDAY',
@@ -21,23 +22,6 @@ export const WEEK_DAY_CHIPS: readonly { value: WeekDay; label: string }[] = [
{ value: 'SUNDAY', label: 'Dom' },
]
export const PAYMENT_PROVIDERS: readonly {
value: PaymentProvider
name: string
description: string
}[] = [
{
value: 'MERCADO_PAGO',
name: 'Mercado Pago',
description: 'El procesador más usado en Latinoamérica',
},
{
value: 'STRIPE',
name: 'Stripe',
description: 'Cobrá con tarjetas e internacionalmente',
},
]
export const BILLING_TYPES: readonly { value: BillingType; label: string; hint: string }[] = [
{ value: 'MONTHLY', label: 'Mensual', hint: 'Un cobro por mes' },
{ value: 'PER_CLASS', label: 'Por clase', hint: 'Cada clase que asista' },