From c2c50335f983eb84bbc0e11dd87cfb4385d7c953 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 16 Apr 2024 10:35:02 +0100 Subject: [PATCH] Highlighted row --- .../api/portfolio/summary/[portfolioId]/route.ts | 2 +- .../portfolio/summary/SummaryTable.tsx | 16 +++++++++++++++- src/app/portfolio/[slug]/utils.ts | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/app/api/portfolio/summary/[portfolioId]/route.ts b/src/app/api/portfolio/summary/[portfolioId]/route.ts index 352ba35..4b40e51 100644 --- a/src/app/api/portfolio/summary/[portfolioId]/route.ts +++ b/src/app/api/portfolio/summary/[portfolioId]/route.ts @@ -139,7 +139,7 @@ export async function GET( }, { title: - "Potential valuation return on investment - highlight indicative EPC effect", + "Potential valuation return on investment - highlight indicative EPC effect*", scenarios: [ { scenarioName: portfolioName, diff --git a/src/app/components/portfolio/summary/SummaryTable.tsx b/src/app/components/portfolio/summary/SummaryTable.tsx index bfc36ac..1d7fdd7 100644 --- a/src/app/components/portfolio/summary/SummaryTable.tsx +++ b/src/app/components/portfolio/summary/SummaryTable.tsx @@ -55,6 +55,13 @@ export const useFetchPortfolioSummary = ({ }); }; +const shouldHighlightRow = (title: string) => { + return [ + "Potential valuation improvement/unit - highlight indicative EPC effect*", + "Potential valuation return on investment - highlight indicative EPC effect*", + ].includes(title); +}; + const SummaryTable = ({ data, userPortfolios, @@ -193,7 +200,14 @@ const SummaryTable = ({ {table.getRowModel().rows.map((row) => ( - + {row.getVisibleCells().map((cell) => ( {flexRender(cell.column.columnDef.cell, cell.getContext())} diff --git a/src/app/portfolio/[slug]/utils.ts b/src/app/portfolio/[slug]/utils.ts index 1179ed4..4c0750f 100644 --- a/src/app/portfolio/[slug]/utils.ts +++ b/src/app/portfolio/[slug]/utils.ts @@ -207,7 +207,7 @@ export async function getOverviewPortfolioData( }, { title: - "Potential valuation return on investment - highlight indicative EPC effect", + "Potential valuation return on investment - highlight indicative EPC effect*", scenarios: [ { scenarioName: "Today", data: "" }, {