Highlighted row

This commit is contained in:
Khalim Conn-Kowlessar 2024-04-16 10:35:02 +01:00
parent 4ceb39c833
commit c2c50335f9
3 changed files with 17 additions and 3 deletions

View file

@ -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,

View file

@ -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 = ({
</TableHeader>
<TableBody>
{table.getRowModel().rows.map((row) => (
<TableRow key={row.id}>
<TableRow
key={row.id}
style={
shouldHighlightRow(row.original.title)
? { background: "#fbf8f8" }
: {}
}
>
{row.getVisibleCells().map((cell) => (
<TableCell key={cell.id} className="px-6 py-4">
{flexRender(cell.column.columnDef.cell, cell.getContext())}

View file

@ -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: "" },
{