From d645eda97cfb762339173142d2545a3ee64db38d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Feb 2026 18:12:01 +0000 Subject: [PATCH 1/2] feat: translate final sections of Law10Tab (summary table and data maturity) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Completed Spanish-to-English translation of Law10Tab by: - Translating summary table headers (Requisito, Estado, Score, Gap, Descripción) - Translating legend labels (Cumple, Parcial, No Cumple, Sin Datos) - Translating investment section (Coste de no cumplimiento, etc.) - Translating DataMaturitySummary title and sections - Translating all data items (Cobertura temporal 24/7, etc.) - Translating investment phases (Fase 1, Fase 2) - Translating totals section Added new translation keys: - law10.summaryTable.* (table headers, legend, investment) - law10.dataMaturity.* (title, sections, items, investment phases) All Law10Tab sections now fully support English translation. https://claude.ai/code/session_01GNbnkFoESkRcnPr3bLCYDg --- frontend/components/tabs/Law10Tab.tsx | 96 ++++++++++++++------------- frontend/locales/en.json | 66 ++++++++++++++++++ frontend/locales/es.json | 66 ++++++++++++++++++ 3 files changed, 181 insertions(+), 47 deletions(-) diff --git a/frontend/components/tabs/Law10Tab.tsx b/frontend/components/tabs/Law10Tab.tsx index e72d6c5..037c7a5 100644 --- a/frontend/components/tabs/Law10Tab.tsx +++ b/frontend/components/tabs/Law10Tab.tsx @@ -1217,11 +1217,11 @@ function Law10SummaryRoadmap({ - - - - - + + + + + @@ -1271,40 +1271,40 @@ function Law10SummaryRoadmap({
- Cumple: Requisito satisfecho + {t('law10.summaryTable.legend.complies')}
- Parcial: Requiere mejoras + {t('law10.summaryTable.legend.partial')}
- No Cumple: Accion urgente + {t('law10.summaryTable.legend.notComply')}
- Sin Datos: Campos no disponibles en CSV + {t('law10.summaryTable.legend.noData')}
{/* Inversion Estimada */}
-

Coste de no cumplimiento

-

Hasta 100K

-

Multas potenciales/infraccion

+

{t('law10.summaryTable.investment.nonComplianceCost')}

+

{t('law10.summaryTable.investment.upTo100k')}

+

{t('law10.summaryTable.investment.potentialFines')}

-

Inversion recomendada

+

{t('law10.summaryTable.investment.recommendedInvestment')}

{formatCurrency(estimatedInvestment())}

-

Basada en tu operacion

+

{t('law10.summaryTable.investment.basedOnOperation')}

-

ROI de cumplimiento

+

{t('law10.summaryTable.investment.complianceRoi')}

{data.economicModel?.roi3yr ? `${Math.round(data.economicModel.roi3yr / 2)}%` : 'Alto'}

-

Evitar sanciones + mejora CX

+

{t('law10.summaryTable.investment.avoidSanctions')}

@@ -1313,29 +1313,31 @@ function Law10SummaryRoadmap({ // Seccion: Resumen de Madurez de Datos function DataMaturitySummary({ data }: { data: AnalysisData }) { + const { t } = useTranslation(); + // Usar datos economicos reales cuando esten disponibles const currentAnnualCost = data.economicModel?.currentAnnualCost || 0; const annualSavings = data.economicModel?.annualSavings || 0; // Datos disponibles const availableData = [ - { name: 'Cobertura temporal 24/7', article: 'Art. 14' }, - { name: 'Distribucion geografica', article: 'Art. 15 parcial' }, - { name: 'Calidad resolucion proxy', article: 'Art. 17 indirecto' }, + { name: t('law10.dataMaturity.items.coverage247'), article: t('law10.dataMaturity.article', { number: '14' }) }, + { name: t('law10.dataMaturity.items.geoDistribution'), article: t('law10.dataMaturity.articlePartial', { number: '15' }) }, + { name: t('law10.dataMaturity.items.resolutionQuality'), article: t('law10.dataMaturity.articleIndirect', { number: '17' }) }, ]; // Datos estimables const estimableData = [ - { name: 'ASA <3min via proxy abandono', article: 'Art. 8.2', error: '±10%' }, - { name: 'Lenguas cooficiales via pais', article: 'Art. 15', error: 'sin detalle' }, + { name: t('law10.dataMaturity.items.asa3min'), article: t('law10.dataMaturity.article', { number: '8.2' }), error: t('law10.dataMaturity.errorMargin', { margin: '10' }) }, + { name: t('law10.dataMaturity.items.officialLanguages'), article: t('law10.dataMaturity.article', { number: '15' }), error: t('law10.dataMaturity.noDetail') }, ]; // Datos no disponibles const missingData = [ - { name: 'Tiempo resolucion casos', article: 'Art. 17' }, - { name: 'Cobros indebidos <5 dias', article: 'Art. 17' }, - { name: 'Transfer a supervisor', article: 'Art. 8' }, - { name: 'Info incidencias <2h', article: 'Art. 17' }, - { name: 'Auditoria ENAC', article: 'Art. 22', note: 'requiere contratacion externa' }, + { name: t('law10.dataMaturity.items.caseResolutionTime'), article: t('law10.dataMaturity.article', { number: '17' }) }, + { name: t('law10.dataMaturity.items.undueBilling'), article: t('law10.dataMaturity.article', { number: '17' }) }, + { name: t('law10.dataMaturity.items.supervisorTransfer'), article: t('law10.dataMaturity.article', { number: '8' }) }, + { name: t('law10.dataMaturity.items.incidentInfo'), article: t('law10.dataMaturity.article', { number: '17' }) }, + { name: t('law10.dataMaturity.items.enacAudit'), article: t('law10.dataMaturity.article', { number: '22' }), note: t('law10.dataMaturity.items.externalContractRequired') }, ]; return ( @@ -1344,17 +1346,17 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) {
-

Resumen: Madurez de Datos para Compliance

+

{t('law10.dataMaturity.title')}

-

Tu nivel actual de instrumentacion:

+

{t('law10.dataMaturity.currentLevel')}

{/* Datos disponibles */}
-

DATOS DISPONIBLES (3/10)

+

{t('law10.dataMaturity.availableData')}

    {availableData.map((item, idx) => ( @@ -1370,7 +1372,7 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) {
    -

    DATOS ESTIMABLES (2/10)

    +

    {t('law10.dataMaturity.estimableData')}

      {estimableData.map((item, idx) => ( @@ -1386,7 +1388,7 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) {
      -

      NO DISPONIBLES (5/10)

      +

      {t('law10.dataMaturity.unavailableData')}

        {missingData.map((item, idx) => ( @@ -1406,28 +1408,28 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) {
        -

        INVERSION SUGERIDA PARA COMPLIANCE COMPLETO

        +

        {t('law10.dataMaturity.investment.title')}

        {/* Fase 1 */}
        -

        Fase 1 - Instrumentacion (Q1 2026)

        +

        {t('law10.dataMaturity.investment.phase1.title')}

        • - • Tracking ASA real + {t('law10.dataMaturity.investment.phase1.realAsaTracking')} 5-8K
        • - • Sistema ticketing/casos + {t('law10.dataMaturity.investment.phase1.ticketingSystem')} 15-25K
        • - • Enriquecimiento lenguas + {t('law10.dataMaturity.investment.phase1.languageEnrichment')} 2K
        • - Subtotal: + {t('law10.dataMaturity.investment.phase1.subtotal')} 22-35K
        @@ -1435,22 +1437,22 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) { {/* Fase 2 */}
        -

        Fase 2 - Operaciones (Q2-Q3 2026)

        +

        {t('law10.dataMaturity.investment.phase2.title')}

        • - • Cobertura 24/7 (chatbot + on-call) + {t('law10.dataMaturity.investment.phase2.coverage247')} 65K/año
        • - • Copilot IA (reducir AHT) + {t('law10.dataMaturity.investment.phase2.aiCopilot')} 35K + 8K/mes
        • - • Auditor ENAC + {t('law10.dataMaturity.investment.phase2.enacAuditor')} 12-18K/año
        • - Subtotal año 1: + {t('law10.dataMaturity.investment.phase2.subtotalYear1')} 112-118K
        @@ -1460,21 +1462,21 @@ function DataMaturitySummary({ data }: { data: AnalysisData }) { {/* Totales - usar datos reales cuando disponibles */}
        -

        Inversion Total

        +

        {t('law10.dataMaturity.investment.totals.totalInvestment')}

        {currentAnnualCost > 0 ? formatCurrency(Math.round(currentAnnualCost * 0.05)) : '134-153K'}

        -

        ~5% coste anual

        +

        {t('law10.dataMaturity.investment.totals.percentAnnualCost')}

        -

        Riesgo Evitado

        +

        {t('law10.dataMaturity.investment.totals.riskAvoided')}

        {currentAnnualCost > 0 ? formatCurrency(Math.min(1000000, currentAnnualCost * 0.3)) : '750K-1M'}

        -

        sanciones potenciales

        +

        {t('law10.dataMaturity.investment.totals.potentialSanctions')}

        -

        ROI Compliance

        +

        {t('law10.dataMaturity.investment.totals.complianceRoi')}

        {data.economicModel?.roi3yr ? `${data.economicModel.roi3yr}%` : '490-650%'}

        diff --git a/frontend/locales/en.json b/frontend/locales/en.json index f06be8e..5d9de52 100644 --- a/frontend/locales/en.json +++ b/frontend/locales/en.json @@ -1649,6 +1649,72 @@ "requiredData": "Requires data", "score": "Score", "gap": "Gap" + }, + "summaryTable": { + "requirement": "Requirement", + "description": "Description", + "status": "Status", + "score": "Score", + "gap": "Gap", + "legend": { + "complies": "Complies: Requirement satisfied", + "partial": "Partial: Requires improvements", + "notComply": "Does Not Comply: Urgent action", + "noData": "No Data: Fields not available in CSV" + }, + "investment": { + "nonComplianceCost": "Cost of non-compliance", + "upTo100k": "Up to 100K", + "potentialFines": "Potential fines/infraction", + "recommendedInvestment": "Recommended investment", + "basedOnOperation": "Based on your operation", + "complianceRoi": "Compliance ROI", + "avoidSanctions": "Avoid sanctions + improve CX" + } + }, + "dataMaturity": { + "title": "Summary: Data Maturity for Compliance", + "currentLevel": "Your current instrumentation level:", + "availableData": "AVAILABLE DATA (3/10)", + "estimableData": "ESTIMABLE DATA (2/10)", + "unavailableData": "NOT AVAILABLE (5/10)", + "items": { + "coverage247": "24/7 temporal coverage", + "geoDistribution": "Geographic distribution", + "resolutionQuality": "Resolution quality proxy", + "asa3min": "ASA <3min via abandonment proxy", + "officialLanguages": "Co-official languages via country", + "caseResolutionTime": "Case resolution time", + "undueBilling": "Undue billing <5 days", + "supervisorTransfer": "Transfer to supervisor", + "incidentInfo": "Incident info <2h", + "enacAudit": "ENAC audit", + "externalContractRequired": "requires external contracting" + }, + "investment": { + "title": "SUGGESTED INVESTMENT FOR COMPLETE COMPLIANCE", + "phase1": { + "title": "Phase 1 - Instrumentation (Q1 2026)", + "realAsaTracking": "• Real ASA tracking", + "ticketingSystem": "• Ticketing/case system", + "languageEnrichment": "• Language enrichment", + "subtotal": "Subtotal:" + }, + "phase2": { + "title": "Phase 2 - Operations (Q2-Q3 2026)", + "coverage247": "• 24/7 coverage (chatbot + on-call)", + "aiCopilot": "• AI Copilot (reduce AHT)", + "enacAuditor": "• ENAC auditor", + "subtotalYear1": "Year 1 subtotal:" + }, + "totals": { + "totalInvestment": "Total Investment", + "percentAnnualCost": "~5% annual cost", + "riskAvoided": "Risk Avoided", + "potentialSanctions": "potential sanctions", + "complianceRoi": "Compliance ROI" + } + } } } } \ No newline at end of file diff --git a/frontend/locales/es.json b/frontend/locales/es.json index c297822..7f684bb 100644 --- a/frontend/locales/es.json +++ b/frontend/locales/es.json @@ -1649,6 +1649,72 @@ "requiredData": "Requiere datos", "score": "Score", "gap": "Gap" + }, + "summaryTable": { + "requirement": "Requisito", + "description": "Descripción", + "status": "Estado", + "score": "Score", + "gap": "Gap", + "legend": { + "complies": "Cumple: Requisito satisfecho", + "partial": "Parcial: Requiere mejoras", + "notComply": "No Cumple: Acción urgente", + "noData": "Sin Datos: Campos no disponibles en CSV" + }, + "investment": { + "nonComplianceCost": "Coste de no cumplimiento", + "upTo100k": "Hasta 100K", + "potentialFines": "Multas potenciales/infracción", + "recommendedInvestment": "Inversión recomendada", + "basedOnOperation": "Basada en tu operación", + "complianceRoi": "ROI de cumplimiento", + "avoidSanctions": "Evitar sanciones + mejora CX" + } + }, + "dataMaturity": { + "title": "Resumen: Madurez de Datos para Compliance", + "currentLevel": "Tu nivel actual de instrumentación:", + "availableData": "DATOS DISPONIBLES (3/10)", + "estimableData": "DATOS ESTIMABLES (2/10)", + "unavailableData": "NO DISPONIBLES (5/10)", + "items": { + "coverage247": "Cobertura temporal 24/7", + "geoDistribution": "Distribución geográfica", + "resolutionQuality": "Calidad resolución proxy", + "asa3min": "ASA <3min vía proxy abandono", + "officialLanguages": "Lenguas cooficiales vía país", + "caseResolutionTime": "Tiempo resolución casos", + "undueBilling": "Cobros indebidos <5 días", + "supervisorTransfer": "Transfer a supervisor", + "incidentInfo": "Info incidencias <2h", + "enacAudit": "Auditoría ENAC", + "externalContractRequired": "requiere contratación externa" + }, + "investment": { + "title": "INVERSIÓN SUGERIDA PARA COMPLIANCE COMPLETO", + "phase1": { + "title": "Fase 1 - Instrumentación (Q1 2026)", + "realAsaTracking": "• Tracking ASA real", + "ticketingSystem": "• Sistema ticketing/casos", + "languageEnrichment": "• Enriquecimiento lenguas", + "subtotal": "Subtotal:" + }, + "phase2": { + "title": "Fase 2 - Operaciones (Q2-Q3 2026)", + "coverage247": "• Cobertura 24/7 (chatbot + on-call)", + "aiCopilot": "• Copilot IA (reducir AHT)", + "enacAuditor": "• Auditor ENAC", + "subtotalYear1": "Subtotal año 1:" + }, + "totals": { + "totalInvestment": "Inversión Total", + "percentAnnualCost": "~5% coste anual", + "riskAvoided": "Riesgo Evitado", + "potentialSanctions": "sanciones potenciales", + "complianceRoi": "ROI Compliance" + } + } } } } \ No newline at end of file From 627504586f890294b3f00d23c63c1e7159a15a96 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Feb 2026 18:16:26 +0000 Subject: [PATCH 2/2] fix: pass redFlagConfigs as prop to child components in AgenticReadinessTab Fixed "ReferenceError: redFlagConfigs is not defined" by passing redFlagConfigs as a prop to components that need it: - TierQueueSection: Added redFlagConfigs prop and passed from parent - ExpandableSkillRow: Added redFlagConfigs prop - HumanOnlyByReasonSection: Added redFlagConfigs prop and passed from parent These components are defined before the main AgenticReadinessTab component so they don't have direct access to redFlagConfigs defined in the parent scope. https://claude.ai/code/session_01GNbnkFoESkRcnPr3bLCYDg --- .../components/tabs/AgenticReadinessTab.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/frontend/components/tabs/AgenticReadinessTab.tsx b/frontend/components/tabs/AgenticReadinessTab.tsx index 85a7ef1..574e447 100644 --- a/frontend/components/tabs/AgenticReadinessTab.tsx +++ b/frontend/components/tabs/AgenticReadinessTab.tsx @@ -2007,12 +2007,14 @@ function ExpandableSkillRow({ dataPoint, idx, isExpanded, - onToggle + onToggle, + redFlagConfigs }: { dataPoint: DrilldownDataPoint; idx: number; isExpanded: boolean; onToggle: () => void; + redFlagConfigs: RedFlagConfig[]; }) { // v3.4: Contar colas por Tier const tierCounts = { @@ -2326,10 +2328,12 @@ const TIER_SECTION_CONFIG: Record>(new Set()); const config = TIER_SECTION_CONFIG[tier]; @@ -2536,7 +2540,7 @@ function TierQueueSection({ } // Componente para colas HUMAN-ONLY agrupadas por razón/red flag -function HumanOnlyByReasonSection({ drilldownData }: { drilldownData: DrilldownDataPoint[] }) { +function HumanOnlyByReasonSection({ drilldownData, redFlagConfigs }: { drilldownData: DrilldownDataPoint[]; redFlagConfigs: RedFlagConfig[] }) { const [expandedReasons, setExpandedReasons] = useState>(new Set()); const config = TIER_SECTION_CONFIG['HUMAN-ONLY']; @@ -3692,16 +3696,16 @@ export function AgenticReadinessTab({ data, onTabChange }: AgenticReadinessTabPr {data.drilldownData && data.drilldownData.length > 0 ? ( <> {/* TABLA 1: Colas AUTOMATE - Listas para automatización */} - + {/* TABLA 2: Colas ASSIST - Candidatas a Copilot */} - + {/* TABLA 3: Colas AUGMENT - Requieren optimización */} - + {/* TABLA 4: Colas HUMAN-ONLY - Agrupadas por razón/red flag */} - + ) : ( /* Fallback a tabla por Línea de Negocio si no hay drilldown data */
RequisitoDescripcionEstadoScoreGap{t('law10.summaryTable.requirement')}{t('law10.summaryTable.description')}{t('law10.summaryTable.status')}{t('law10.summaryTable.score')}{t('law10.summaryTable.gap')}