From d19899ecafe10a1ca809ff4a7528fa9dbea075c7 Mon Sep 17 00:00:00 2001 From: Arturo Volpe Date: Wed, 17 Mar 2021 22:43:30 -0300 Subject: [PATCH] feat: Add link to net worth analysis in person page ref #242 Signed-off-by: Arturo Volpe --- portal/src/analysis/components/net_worth/Graphs.tsx | 2 +- portal/src/components/person_cards/DDJJ.tsx | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/portal/src/analysis/components/net_worth/Graphs.tsx b/portal/src/analysis/components/net_worth/Graphs.tsx index a74ae38..37e0b96 100644 --- a/portal/src/analysis/components/net_worth/Graphs.tsx +++ b/portal/src/analysis/components/net_worth/Graphs.tsx @@ -47,7 +47,7 @@ export function Graphs({data, calc}: { y: data.firstYear.netWorth.amount + calc.nextYearForInversion }], }]; - }, [data]); + }, [data, calc]); const incomeIncrease = useMemo(() => { return [{ diff --git a/portal/src/components/person_cards/DDJJ.tsx b/portal/src/components/person_cards/DDJJ.tsx index 559023f..f5f7b84 100644 --- a/portal/src/components/person_cards/DDJJ.tsx +++ b/portal/src/components/person_cards/DDJJ.tsx @@ -1,19 +1,30 @@ import {Affidavit} from "../../Model"; -import {Card, Col, Table, Typography} from "antd"; +import {Button, Card, Col, Table, Tooltip, Typography} from "antd"; import Icon from "@ant-design/icons"; import {ReactComponent as Ddjj} from "../../assets/logos/ddjj.svg"; import * as React from "react"; import {formatMoney} from "../../formatters"; import './DDJJ.css' import {SOURCE_NAME_MAP} from "../../pages/PersonSearchPage"; +import {Link} from "react-router-dom"; export function DDJJCard(props: { affidavit: Affidavit[] }) { + if (!props.affidavit + || props.affidavit.length === 0 + ) return null; + const affidavit = props.affidavit; + const first = props.affidavit[0] return <> + Realizar anĂ¡lisis de crecimiento Patrimonial + + ]} extra={}> dataSource={affidavit}