diff --git a/src/app/goals/page.tsx b/src/app/goals/page.tsx index 6ed331e..7bceb9f 100644 --- a/src/app/goals/page.tsx +++ b/src/app/goals/page.tsx @@ -7,6 +7,7 @@ import { useRouter } from 'next/navigation'; import styles from './page.module.css'; import Header from '@/components/Header'; import { getRoleBilingualLabel } from '@/lib/roles'; +import { useLocale } from '@/lib/i18n/LocaleContext'; interface User { id: number; @@ -31,6 +32,7 @@ interface Goal { export default function GoalsPage() { const router = useRouter(); + const { t } = useLocale(); const [users, setUsers] = useState([]); const [goals, setGoals] = useState([]); const [isLoading, setIsLoading] = useState(true); @@ -265,7 +267,7 @@ export default function GoalsPage() { {g.period} - {g.targetType} + {t('targetType.' + g.targetType)} diff --git a/src/app/plans/page.tsx b/src/app/plans/page.tsx index c275842..a90824e 100644 --- a/src/app/plans/page.tsx +++ b/src/app/plans/page.tsx @@ -6,6 +6,7 @@ import Link from 'next/link'; import { useRouter } from 'next/navigation'; import styles from './page.module.css'; import Header from '@/components/Header'; +import { useLocale } from '@/lib/i18n/LocaleContext'; interface Plan { id: number; @@ -25,6 +26,7 @@ interface Plan { export default function PlansPage() { const router = useRouter(); + const { t } = useLocale(); const [plans, setPlans] = useState([]); const [showModal, setShowModal] = useState(false); const [isLoading, setIsLoading] = useState(true); @@ -159,7 +161,7 @@ export default function PlansPage() {
{plan.code} - {plan.status} + {t('status.' + plan.status)}

{plan.name}

@@ -310,8 +312,8 @@ export default function PlansPage() { value={status} onChange={(e) => setStatus(e.target.value)} > - - + + diff --git a/src/app/sales/simulation/page.tsx b/src/app/sales/simulation/page.tsx index 199b568..91de2b4 100644 --- a/src/app/sales/simulation/page.tsx +++ b/src/app/sales/simulation/page.tsx @@ -347,7 +347,7 @@ export default function SimulationPage() { : styles.badgeRejected }`} > - {item.main.status} + {t('status.' + item.main.status)} diff --git a/src/app/settlements/approvals/page.tsx b/src/app/settlements/approvals/page.tsx index e6bd4ab..a18e3d8 100644 --- a/src/app/settlements/approvals/page.tsx +++ b/src/app/settlements/approvals/page.tsx @@ -5,6 +5,7 @@ import React, { useState, useEffect } from 'react'; import styles from './page.module.css'; import Header from '@/components/Header'; import { useRouter } from 'next/navigation'; +import { useLocale } from '@/lib/i18n/LocaleContext'; interface Settlement { id: number; @@ -38,6 +39,7 @@ interface Settlement { export default function ApprovalsPage() { const router = useRouter(); + const { t } = useLocale(); const [role, setRole] = useState(null); const [isLoading, setIsLoading] = useState(true); const [settlements, setSettlements] = useState([]); @@ -258,7 +260,7 @@ export default function ApprovalsPage() { : styles.badgeRejected }`} > - {s.status} + {t('status.' + s.status)} {s.rejectionReason && (
diff --git a/src/lib/i18n/dictionaries/en.json b/src/lib/i18n/dictionaries/en.json index afb03a1..6f2f443 100644 --- a/src/lib/i18n/dictionaries/en.json +++ b/src/lib/i18n/dictionaries/en.json @@ -29,5 +29,19 @@ "thPayout": "Total Payout", "thStatus": "Status", "thAiAudit": "AI Audit" + }, + "status": { + "ACTIVE": "Active", + "INACTIVE": "Inactive", + "PENDING": "Pending", + "SIMULATED": "Simulated", + "APPROVED": "Approved", + "REJECTED": "Rejected", + "DRAFT": "Draft" + }, + "targetType": { + "INDIVIDUAL": "Individual", + "TEAM": "Team", + "HOTEL": "Hotel" } } diff --git a/src/lib/i18n/dictionaries/es.json b/src/lib/i18n/dictionaries/es.json index 337768e..85a1bfe 100644 --- a/src/lib/i18n/dictionaries/es.json +++ b/src/lib/i18n/dictionaries/es.json @@ -29,5 +29,19 @@ "thPayout": "Pago Total", "thStatus": "Estado", "thAiAudit": "Auditoría AI" + }, + "status": { + "ACTIVE": "Activo", + "INACTIVE": "Inactivo", + "PENDING": "Pendiente", + "SIMULATED": "Simulado", + "APPROVED": "Aprobado", + "REJECTED": "Rechazado", + "DRAFT": "Borrador" + }, + "targetType": { + "INDIVIDUAL": "Individual", + "TEAM": "Equipo", + "HOTEL": "Hotel" } }